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 068c7ed6f8..bb7dda191e 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 @@ -226,16 +226,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, @@ -301,6 +301,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 1a6dbf32e0..f7bfe3b912 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 421d99833d..a76cd1d766 100644 --- a/golem-common/src/schema/tests/wit_tests.rs +++ b/golem-common/src/schema/tests/wit_tests.rs @@ -104,11 +104,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..c712cc7d02 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,143 @@ 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(())); +} + +#[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] @@ -506,6 +663,7 @@ fn verbatim_tail_without_separator_is_rejected() { max: None, separator: None, verbatim: true, + accepts_stdio: false, }), }; let mut node = root("tool"); @@ -530,6 +688,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 +796,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 +815,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 +835,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())], @@ -691,129 +851,1095 @@ fn repeatable_list_default_is_accepted() { } #[test] -fn dangling_type_ref_is_rejected() { - // An option referencing a type id that has no definition in the graph. +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![scalar_option( - "out", - SchemaType::ref_to(TypeId::new("missing")), - )]; + body.options = vec![cfg]; let mut node = root("tool"); node.body = Some(body); - let tool = tool_with_root(node); // empty schema graph -> ref is dangling + 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" + ToolValidationError::DefaultTypeMismatch { name, .. } if name == "config" ))); } #[test] -fn dangling_ref_in_definition_is_rejected() { - // A definition body references a type id that is not in the graph; this is - // caught even though no command position references the definition. - let mut schema = SchemaGraph::empty(); - schema.defs = vec![SchemaTypeDef { - id: TypeId::new("outer"), - name: None, - body: SchemaType::list(SchemaType::ref_to(TypeId::new("inner-missing"))), - }]; - let tool = Tool { - version: "1.0.0".to_string(), - commands: CommandTree { - nodes: vec![root("tool")], - }, - schema, - }; +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::UnresolvedTypeRef { id, .. } if id == "inner-missing" + ToolValidationError::RepeatableMapTypeNotMap { name, .. } if name == "config" ))); } #[test] -fn out_of_bounds_command_index_is_rejected() { +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.subcommands = vec![CommandIndex(9)]; + 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::CommandIndexOutOfBounds { index: 9, .. } + ToolValidationError::UnresolvedTypeRef { id, .. } if id == "missing-key" ))); } #[test] -fn duplicate_global_short_across_levels_is_rejected() { - let mut alpha = scalar_option("alpha", SchemaType::string()); - alpha.short = Some('a'); - let mut apex = scalar_option("apex", SchemaType::string()); - apex.short = Some('a'); - - let mut parent = root("tool"); - parent.globals = Globals { - options: vec![alpha], - flags: Vec::new(), - }; - parent.subcommands = vec![CommandIndex(1)]; - let mut child = root("sub"); - child.globals = Globals { - options: vec![apex], - flags: Vec::new(), - }; +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(())); +} - let tool = Tool { - version: "1.0.0".to_string(), - commands: CommandTree { - nodes: vec![parent, child], - }, - schema: SchemaGraph::empty(), - }; +#[test] +fn dangling_type_ref_is_rejected() { + // An option referencing a type id that has no definition in the graph. + let mut body = empty_body(); + body.options = vec![scalar_option( + "out", + SchemaType::ref_to(TypeId::new("missing")), + )]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); // empty schema graph -> ref is dangling let errors = validate_tool(&tool).unwrap_err(); - assert!( - errors - .iter() - .any(|e| matches!(e, ToolValidationError::DuplicateShort { short: 'a', .. })) - ); + assert!(errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { id, .. } if id == "missing" + ))); } #[test] -fn orphan_command_node_is_rejected() { - let parent = root("tool"); // no subcommands -> node 1 is unreachable - let orphan = root("orphan"); - let tool = Tool { - version: "1.0.0".to_string(), - commands: CommandTree { - nodes: vec![parent, orphan], - }, - schema: SchemaGraph::empty(), - }; - let errors = validate_tool(&tool).unwrap_err(); +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!( - errors - .iter() - .any(|e| matches!(e, ToolValidationError::UnreachableCommandNode { index: 1 })) + validate_tool(&tool).is_err(), + "a pure recursive alias never resolves to a concrete input type and must be rejected" ); } #[test] -fn command_tree_cycle_is_rejected() { - // 0 -> 1 -> 0 forms a cycle. - let mut a = root("tool"); - a.subcommands = vec![CommandIndex(1)]; - let mut b = root("sub"); - b.subcommands = vec![CommandIndex(0)]; - let tool = Tool { - version: "1.0.0".to_string(), - commands: CommandTree { nodes: vec![a, b] }, - schema: SchemaGraph::empty(), - }; - let errors = validate_tool(&tool).unwrap_err(); - assert!( - errors - .iter() - .any(|e| matches!(e, ToolValidationError::CommandTreeCycle { .. })) +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 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"); + 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 + // caught even though no command position references the definition. + let mut schema = SchemaGraph::empty(); + schema.defs = vec![SchemaTypeDef { + id: TypeId::new("outer"), + name: None, + body: SchemaType::list(SchemaType::ref_to(TypeId::new("inner-missing"))), + }]; + 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 { id, .. } if id == "inner-missing" + ))); +} + +#[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"); + node.subcommands = vec![CommandIndex(9)]; + let tool = tool_with_root(node); + let errors = validate_tool(&tool).unwrap_err(); + assert!(errors.iter().any(|e| matches!( + e, + ToolValidationError::CommandIndexOutOfBounds { index: 9, .. } + ))); +} + +#[test] +fn duplicate_global_short_across_levels_is_rejected() { + let mut alpha = scalar_option("alpha", SchemaType::string()); + alpha.short = Some('a'); + let mut apex = scalar_option("apex", SchemaType::string()); + apex.short = Some('a'); + + let mut parent = root("tool"); + parent.globals = Globals { + options: vec![alpha], + flags: Vec::new(), + }; + parent.subcommands = vec![CommandIndex(1)]; + let mut child = root("sub"); + child.globals = Globals { + options: vec![apex], + flags: Vec::new(), + }; + + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { + nodes: vec![parent, child], + }, + schema: SchemaGraph::empty(), + }; + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors + .iter() + .any(|e| matches!(e, ToolValidationError::DuplicateShort { short: 'a', .. })) + ); +} + +#[test] +fn orphan_command_node_is_rejected() { + let parent = root("tool"); // no subcommands -> node 1 is unreachable + let orphan = root("orphan"); + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { + nodes: vec![parent, orphan], + }, + schema: SchemaGraph::empty(), + }; + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors + .iter() + .any(|e| matches!(e, ToolValidationError::UnreachableCommandNode { index: 1 })) + ); +} + +#[test] +fn command_tree_cycle_is_rejected() { + // 0 -> 1 -> 0 forms a cycle. + let mut a = root("tool"); + a.subcommands = vec![CommandIndex(1)]; + let mut b = root("sub"); + b.subcommands = vec![CommandIndex(0)]; + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { nodes: vec![a, b] }, + schema: SchemaGraph::empty(), + }; + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors + .iter() + .any(|e| matches!(e, ToolValidationError::CommandTreeCycle { .. })) ); } @@ -996,13 +2122,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 +2192,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 +2217,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 +2599,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 3b00340367..dc70ca4035 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,59 @@ 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, +} + +/// 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, 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 + /// `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 +338,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 +351,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 +453,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 +547,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 +611,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 +623,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, + )); + } + } + + /// 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 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. + /// 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 +734,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 +778,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 +800,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 +838,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_, ValueIsMode::WholeOrOnePeel), + ); 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(), @@ -662,9 +855,14 @@ 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(), &tail.item_type); - self.check_type_refs(command, &tail.name, &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(), position: tail.name.clone(), @@ -698,13 +896,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 +930,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, mode)) => { + match self.value_is_outcome(declared, *mode, &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 +968,92 @@ 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. 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, + mode: ValueIsMode, + 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, + + // 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) { + 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; + } + } + } + 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 + } + 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,27 +1072,72 @@ 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, option_value_is_mode(opt)), + None => ValueComparand::BlockedByTypeError, + }; scope.typed.insert(opt.long.clone(), comparand); for alias in &opt.aliases { scope.typed.insert(alias.clone(), comparand); } } +/// 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. @@ -867,61 +1189,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()); + SchemaType::Ref { id, .. } => { + 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 068c7ed6f8..bb7dda191e 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 @@ -226,16 +226,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, @@ -301,6 +301,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 dbd652bf55..4eafeaa3cd 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 49df6203a9..d374481eaf 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)] @@ -826,3 +1256,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 43b0c9844e..7855c917af 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, .. @@ -291,21 +371,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 { @@ -484,6 +636,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 36376e42e6..ea78ac9ea5 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, @@ -1105,3 +1106,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 aa9524465e..1fb0ff6195 100644 --- a/golem-schema/src/schema/validation/tests/well_formedness_tests.rs +++ b/golem-schema/src/schema/validation/tests/well_formedness_tests.rs @@ -16,11 +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, SecretSpec, TextRestrictions, UnionBranch, UnionSpec, - VariantCaseType, + BinaryRestrictions, DiscriminatorRule, FieldDiscriminator, NamedFieldType, NumericBound, + NumericRestrictionError, NumericRestrictions, QuantitySpec, QuantityValue, SchemaType, + SecretSpec, 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; @@ -69,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 dangling_ref_in_secret_inner_is_reported() { let missing = TypeId::new("missing-secret-inner"); @@ -142,6 +235,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 { @@ -504,6 +622,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 { @@ -678,3 +836,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 c2785bb39a..8a409b0e10 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, - TextRestrictions, UnionBranch, UrlRestrictions, + BinaryRestrictions, DiscriminatorRule, NumericBound, NumericRepr, NumericRestrictionError, + NumericRestrictions, PathSpec, QuantitySpec, QuantityValue, SchemaType, TextRestrictions, + UnionBranch, UrlRestrictions, numeric_bound_cmp, }; #[cfg(not(all(feature = "guest", not(feature = "host"))))] use crate::schema::schema_value::SecretValuePayload; @@ -32,6 +33,7 @@ use crate::schema::schema_value::{ use crate::schema::schema_type::{QuotaTokenSpec, SecretSpec}; #[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}; @@ -240,6 +242,10 @@ pub enum ValueError { path: ValuePath, reason: String, }, + NumericOutOfRange { + path: ValuePath, + reason: String, + }, SecretCategoryMismatch { path: ValuePath, expected: String, @@ -424,6 +430,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::SecretCategoryMismatch { path, expected, @@ -676,16 +685,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(_)) => {} @@ -925,6 +1014,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 ffecef51e5..3fc78be064 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,21 +409,29 @@ 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::Secret { spec, .. } => { check_type(graph, &spec.inner, known, errors); } 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 { .. } @@ -369,23 +440,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 + }; + } } } } @@ -527,18 +621,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(), }); @@ -565,11 +664,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(), @@ -579,6 +676,7 @@ fn check_union_branch(graph: &SchemaGraph, branch: &UnionBranch, errors: &mut Ve } } } + BodyShape::Unresolved => {} _ => errors.push(SchemaError::UnionFieldRuleOnNonRecordBody { tag: branch.tag.clone(), }), @@ -592,6 +690,7 @@ fn check_union_branch(graph: &SchemaGraph, branch: &UnionBranch, errors: &mut Ve }); } } + BodyShape::Unresolved => {} _ => errors.push(SchemaError::UnionFieldRuleOnNonRecordBody { tag: branch.tag.clone(), }), @@ -741,6 +840,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>( @@ -751,11 +855,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 06d76f6128..8343b70300 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, @@ -337,16 +338,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) => { @@ -1191,6 +1222,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 c41af991f3..ccc36b5059 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, SecretVariantValue, @@ -430,16 +430,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, .. } => { @@ -604,6 +624,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 068c7ed6f8..bb7dda191e 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 @@ -226,16 +226,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, @@ -301,6 +301,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-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(), 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/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/ffi.mbt b/sdks/moonbit/golem_sdk/gen/ffi.mbt index 21ee1ec233..d6f410a2ac 100644 --- a/sdks/moonbit/golem_sdk/gen/ffi.mbt +++ b/sdks/moonbit/golem_sdk/gen/ffi.mbt @@ -54,74 +54,68 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { ///| #doc(hidden) -pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { - @guest.wasmExportDiscoverToolsPostReturn(p0) -} - -///| -#doc(hidden) -pub fn wasmExportLoadPostReturn(p0 : Int) -> Unit { - @loadSnapshot.wasmExportLoadPostReturn(p0) +pub fn wasmExportInvokeGolemToolGuestPostReturn(p0 : Int) -> Unit { + @guest.wasmExportInvokeGolemToolGuestPostReturn(p0) } ///| #doc(hidden) -pub fn wasmExportInitialize(p0 : Int) -> Int { - @guest0.wasmExportInitialize(p0) +pub fn wasmExportLoad(p0 : Int, p1 : Int, p2 : Int, p3 : Int) -> Int { + @loadSnapshot.wasmExportLoad(p0, p1, p2, p3) } ///| #doc(hidden) -pub fn wasmExportInvokeGolemAgentGuest(p0 : Int) -> Int { - @guest0.wasmExportInvokeGolemAgentGuest(p0) +pub fn wasmExportLoadPostReturn(p0 : Int) -> Unit { + @loadSnapshot.wasmExportLoadPostReturn(p0) } ///| #doc(hidden) -pub fn wasmExportDiscoverAgentTypes() -> Int { - @guest0.wasmExportDiscoverAgentTypes() +pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { + @guest.wasmExportDiscoverToolsPostReturn(p0) } ///| #doc(hidden) -pub fn wasmExportDiscoverTools() -> Int { - @guest.wasmExportDiscoverTools() +pub fn wasmExportInitialize(p0 : Int) -> Int { + @guest0.wasmExportInitialize(p0) } ///| #doc(hidden) -pub fn wasmExportInvokeGolemToolGuestPostReturn(p0 : Int) -> Unit { - @guest.wasmExportInvokeGolemToolGuestPostReturn(p0) +pub fn wasmExportSavePostReturn(p0 : Int) -> Unit { + @saveSnapshot.wasmExportSavePostReturn(p0) } ///| #doc(hidden) -pub fn wasmExportGetTool(p0 : Int, p1 : Int) -> Int { - @guest.wasmExportGetTool(p0, p1) +pub fn wasmExportDiscoverAgentTypes() -> Int { + @guest0.wasmExportDiscoverAgentTypes() } ///| #doc(hidden) -pub fn wasmExportLoad(p0 : Int, p1 : Int, p2 : Int, p3 : Int) -> Int { - @loadSnapshot.wasmExportLoad(p0, p1, p2, p3) +pub fn wasmExportInvokeGolemAgentGuest(p0 : Int) -> Int { + @guest0.wasmExportInvokeGolemAgentGuest(p0) } ///| #doc(hidden) -pub fn wasmExportDiscoverAgentTypesPostReturn(p0 : Int) -> Unit { - @guest0.wasmExportDiscoverAgentTypesPostReturn(p0) +pub fn wasmExportDiscoverTools() -> Int { + @guest.wasmExportDiscoverTools() } ///| #doc(hidden) -pub fn wasmExportSave() -> Int { - @saveSnapshot.wasmExportSave() +pub fn wasmExportGetTool(p0 : Int, p1 : Int) -> Int { + @guest.wasmExportGetTool(p0, p1) } ///| #doc(hidden) -pub fn wasmExportSavePostReturn(p0 : Int) -> Unit { - @saveSnapshot.wasmExportSavePostReturn(p0) +pub fn wasmExportInvokeGolemAgentGuestPostReturn(p0 : Int) -> Unit { + @guest0.wasmExportInvokeGolemAgentGuestPostReturn(p0) } ///| @@ -132,8 +126,8 @@ pub fn wasmExportInitializePostReturn(p0 : Int) -> Unit { ///| #doc(hidden) -pub fn wasmExportInvokeGolemAgentGuestPostReturn(p0 : Int) -> Unit { - @guest0.wasmExportInvokeGolemAgentGuestPostReturn(p0) +pub fn wasmExportDiscoverAgentTypesPostReturn(p0 : Int) -> Unit { + @guest0.wasmExportDiscoverAgentTypesPostReturn(p0) } ///| @@ -148,6 +142,12 @@ pub fn wasmExportGetDefinition() -> Int { @guest0.wasmExportGetDefinition() } +///| +#doc(hidden) +pub fn wasmExportSave() -> Int { + @saveSnapshot.wasmExportSave() +} + ///| #doc(hidden) pub fn wasmExportGetDefinitionPostReturn(p0 : Int) -> Unit { 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 4aedd7e783..71d8061e5d 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 @@ -450,7 +450,7 @@ pub fn wasmExportInitialize(p0 : Int) -> Int { } Err(payload47) => { mbt_ffi_store8(return_area + 0, 1) - __wit_bindgen_lower_t417(return_area + 4, payload47) + __wit_bindgen_lower_t421(return_area + 4, payload47) () } @@ -479,16 +479,116 @@ 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 => { @@ -1401,7 +1501,7 @@ pub fn wasmExportInvokeGolemAgentGuest(p0 : Int) -> Int { } Some(payload48) => { mbt_ffi_store8(return_area + 4, 1) - __wit_bindgen_lower_t69(return_area + 8, payload48) + __wit_bindgen_lower_t73(return_area + 8, payload48) () } @@ -1411,7 +1511,7 @@ pub fn wasmExportInvokeGolemAgentGuest(p0 : Int) -> Int { } Err(payload49) => { mbt_ffi_store8(return_area + 0, 1) - __wit_bindgen_lower_t417(return_area + 4, payload49) + __wit_bindgen_lower_t421(return_area + 4, payload49) () } @@ -1503,16 +1603,116 @@ 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 => () + 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 => { @@ -1976,7 +2176,7 @@ pub fn wasmExportInvokeGolemAgentGuestPostReturn(p0 : Int) -> Unit { pub fn wasmExportGetDefinition() -> Int { let result : @common.AgentType = get_definition() let return_area = mbt_ffi_malloc(176) - __wit_bindgen_lower_t414(return_area + 0, result) + __wit_bindgen_lower_t418(return_area + 0, result) let ret = return_area return ret } @@ -1994,16 +2194,116 @@ pub fn wasmExportGetDefinitionPostReturn(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 => { @@ -2600,16 +2900,116 @@ pub fn wasmExportGetDefinitionPostReturn(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 => { @@ -3262,7 +3662,7 @@ pub fn wasmExportDiscoverAgentTypes() -> Int { 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_t414(iter_base + 0, iter_elem) + __wit_bindgen_lower_t418(iter_base + 0, iter_elem) } mbt_ffi_store32(return_area + 8, payload.length()) mbt_ffi_store32(return_area + 4, address) @@ -3271,7 +3671,7 @@ pub fn wasmExportDiscoverAgentTypes() -> Int { } Err(payload0) => { mbt_ffi_store8(return_area + 0, 1) - __wit_bindgen_lower_t417(return_area + 4, payload0) + __wit_bindgen_lower_t421(return_area + 4, payload0) () } @@ -3299,16 +3699,116 @@ 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 => { @@ -3913,16 +4413,116 @@ 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 => { @@ -4591,16 +5191,116 @@ 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 => { @@ -5251,27 +5951,104 @@ fn __wit_bindgen_lower_t25(ptr : Int, value : @types.MapSpec) -> Unit { fn __wit_bindgen_lower_t26(ptr : Int, value : @types.ResultSpec) -> Unit { match value.ok { None => { - mbt_ffi_store8(ptr + 0, 0) + 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_t27(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_t29( + ptr : Int, + value : @types.NumericRestrictions, +) -> Unit { + match value.min { + None => { + mbt_ffi_store8(ptr + 0, 0) + + () + } + Some(payload0) => { + mbt_ffi_store8(ptr + 0, 1) + __wit_bindgen_lower_t27(ptr + 8, payload0) + + () + } + } + + match value.max { + None => { + mbt_ffi_store8(ptr + 24, 0) () } - Some(payload0) => { - mbt_ffi_store8(ptr + 0, 1) - mbt_ffi_store32(ptr + 4, payload0) + Some(payload2) => { + mbt_ffi_store8(ptr + 24, 1) + __wit_bindgen_lower_t27(ptr + 32, payload2) () } } - match value.err { + match value.unit { None => { - mbt_ffi_store8(ptr + 8, 0) + mbt_ffi_store8(ptr + 48, 0) () } - Some(payload2) => { - mbt_ffi_store8(ptr + 8, 1) - mbt_ffi_store32(ptr + 12, payload2) + 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) () } @@ -5280,7 +6057,7 @@ fn __wit_bindgen_lower_t26(ptr : Int, value : @types.ResultSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t29(ptr : Int, value : @types.TextRestrictions) -> Unit { +fn __wit_bindgen_lower_t32(ptr : Int, value : @types.TextRestrictions) -> Unit { match value.languages { None => { mbt_ffi_store8(ptr + 0, 0) @@ -5354,7 +6131,7 @@ fn __wit_bindgen_lower_t29(ptr : Int, value : @types.TextRestrictions) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t30( +fn __wit_bindgen_lower_t33( ptr : Int, value : @types.BinaryRestrictions, ) -> Unit { @@ -5414,7 +6191,7 @@ fn __wit_bindgen_lower_t30( ///| #doc(hidden) -fn __wit_bindgen_lower_t33(ptr : Int, value : @types.PathSpec) -> Unit { +fn __wit_bindgen_lower_t36(ptr : Int, value : @types.PathSpec) -> Unit { mbt_ffi_store8(ptr + 0, value.direction.ordinal()) mbt_ffi_store8(ptr + 1, value.kind.ordinal()) @@ -5471,7 +6248,7 @@ fn __wit_bindgen_lower_t33(ptr : Int, value : @types.PathSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t34(ptr : Int, value : @types.UrlRestrictions) -> Unit { +fn __wit_bindgen_lower_t37(ptr : Int, value : @types.UrlRestrictions) -> Unit { match value.allowed_schemes { None => { mbt_ffi_store8(ptr + 0, 0) @@ -5525,7 +6302,7 @@ fn __wit_bindgen_lower_t34(ptr : Int, value : @types.UrlRestrictions) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t35(ptr : Int, value : @types.QuantityValue) -> Unit { +fn __wit_bindgen_lower_t38(ptr : Int, value : @types.QuantityValue) -> Unit { mbt_ffi_store64(ptr + 0, value.mantissa) mbt_ffi_store32(ptr + 8, value.scale) @@ -5536,7 +6313,7 @@ fn __wit_bindgen_lower_t35(ptr : Int, value : @types.QuantityValue) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantitySpec) -> Unit { +fn __wit_bindgen_lower_t40(ptr : Int, value : @types.QuantitySpec) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.base_unit) mbt_ffi_store32(ptr + 4, value.base_unit.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -5561,7 +6338,7 @@ fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantitySpec) -> Unit { } Some(payload2) => { mbt_ffi_store8(ptr + 16, 1) - __wit_bindgen_lower_t35(ptr + 24, payload2) + __wit_bindgen_lower_t38(ptr + 24, payload2) () } @@ -5575,7 +6352,7 @@ fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantitySpec) -> Unit { } Some(payload4) => { mbt_ffi_store8(ptr + 48, 1) - __wit_bindgen_lower_t35(ptr + 56, payload4) + __wit_bindgen_lower_t38(ptr + 56, payload4) () } @@ -5584,7 +6361,7 @@ fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantitySpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t38( +fn __wit_bindgen_lower_t41( ptr : Int, value : @types.FieldDiscriminator, ) -> Unit { @@ -5612,7 +6389,7 @@ fn __wit_bindgen_lower_t38( ///| #doc(hidden) -fn __wit_bindgen_lower_t39(ptr : Int, value : @types.DiscriminatorRule) -> Unit { +fn __wit_bindgen_lower_t42(ptr : Int, value : @types.DiscriminatorRule) -> Unit { match value { Prefix(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -5652,7 +6429,7 @@ fn __wit_bindgen_lower_t39(ptr : Int, value : @types.DiscriminatorRule) -> Unit } FieldEquals(payload7) => { mbt_ffi_store8(ptr + 0, 4) - __wit_bindgen_lower_t38(ptr + 4, payload7) + __wit_bindgen_lower_t41(ptr + 4, payload7) () } @@ -5670,23 +6447,23 @@ fn __wit_bindgen_lower_t39(ptr : Int, value : @types.DiscriminatorRule) -> Unit ///| #doc(hidden) -fn __wit_bindgen_lower_t40(ptr : Int, value : @types.UnionBranch) -> Unit { +fn __wit_bindgen_lower_t43(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_t39(ptr + 12, value.discriminator) + __wit_bindgen_lower_t42(ptr + 12, value.discriminator) __wit_bindgen_lower_t20(ptr + 36, value.metadata) } ///| #doc(hidden) -fn __wit_bindgen_lower_t42(ptr : Int, value : @types.UnionSpec) -> Unit { +fn __wit_bindgen_lower_t45(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_t40(iter_base + 0, iter_elem) + __wit_bindgen_lower_t43(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.branches.length()) mbt_ffi_store32(ptr + 0, address) @@ -5694,7 +6471,7 @@ fn __wit_bindgen_lower_t42(ptr : Int, value : @types.UnionSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t43(ptr : Int, value : @types.SecretSpec) -> Unit { +fn __wit_bindgen_lower_t46(ptr : Int, value : @types.SecretSpec) -> Unit { mbt_ffi_store32(ptr + 0, value.inner) match value.category { @@ -5717,7 +6494,7 @@ fn __wit_bindgen_lower_t43(ptr : Int, value : @types.SecretSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t44(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { +fn __wit_bindgen_lower_t47(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { match value.resource_name { None => { mbt_ffi_store8(ptr + 0, 0) @@ -5738,7 +6515,7 @@ fn __wit_bindgen_lower_t44(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t48(ptr : Int, value : @types.SchemaTypeBody) -> Unit { +fn __wit_bindgen_lower_t52(ptr : Int, value : @types.SchemaTypeBody) -> Unit { match value { RefType(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -5751,54 +6528,194 @@ fn __wit_bindgen_lower_t48(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(ptr + 16, payload30) + + () + } + } + () } CharType => { @@ -5811,133 +6728,133 @@ fn __wit_bindgen_lower_t48(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_t21(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_t23(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_t24(ptr + 8, payload29) + __wit_bindgen_lower_t24(ptr + 8, payload49) () } - MapType(payload30) => { + MapType(payload50) => { mbt_ffi_store8(ptr + 0, 21) - __wit_bindgen_lower_t25(ptr + 8, payload30) + __wit_bindgen_lower_t25(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_t26(ptr + 8, payload32) + __wit_bindgen_lower_t26(ptr + 8, payload52) () } - TextType(payload33) => { + TextType(payload53) => { mbt_ffi_store8(ptr + 0, 24) - __wit_bindgen_lower_t29(ptr + 8, payload33) + __wit_bindgen_lower_t32(ptr + 8, payload53) () } - BinaryType(payload34) => { + BinaryType(payload54) => { mbt_ffi_store8(ptr + 0, 25) - __wit_bindgen_lower_t30(ptr + 8, payload34) + __wit_bindgen_lower_t33(ptr + 8, payload54) () } - PathType(payload35) => { + PathType(payload55) => { mbt_ffi_store8(ptr + 0, 26) - __wit_bindgen_lower_t33(ptr + 8, payload35) + __wit_bindgen_lower_t36(ptr + 8, payload55) () } - UrlType(payload36) => { + UrlType(payload56) => { mbt_ffi_store8(ptr + 0, 27) - __wit_bindgen_lower_t34(ptr + 8, payload36) + __wit_bindgen_lower_t37(ptr + 8, payload56) () } @@ -5951,42 +6868,42 @@ fn __wit_bindgen_lower_t48(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - QuantityType(payload39) => { + QuantityType(payload59) => { mbt_ffi_store8(ptr + 0, 30) - __wit_bindgen_lower_t37(ptr + 8, payload39) + __wit_bindgen_lower_t40(ptr + 8, payload59) () } - UnionType(payload40) => { + UnionType(payload60) => { mbt_ffi_store8(ptr + 0, 31) - __wit_bindgen_lower_t42(ptr + 8, payload40) + __wit_bindgen_lower_t45(ptr + 8, payload60) () } - SecretType(payload41) => { + SecretType(payload61) => { mbt_ffi_store8(ptr + 0, 32) - __wit_bindgen_lower_t43(ptr + 8, payload41) + __wit_bindgen_lower_t46(ptr + 8, payload61) () } - QuotaTokenType(payload42) => { + QuotaTokenType(payload62) => { mbt_ffi_store8(ptr + 0, 33) - __wit_bindgen_lower_t44(ptr + 8, payload42) + __wit_bindgen_lower_t47(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) () } @@ -5994,18 +6911,18 @@ fn __wit_bindgen_lower_t48(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) () } @@ -6018,19 +6935,19 @@ fn __wit_bindgen_lower_t48(ptr : Int, value : @types.SchemaTypeBody) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t49(ptr : Int, value : @types.SchemaTypeNode) -> Unit { - __wit_bindgen_lower_t48(ptr + 0, value.body) +fn __wit_bindgen_lower_t53(ptr : Int, value : @types.SchemaTypeNode) -> Unit { + __wit_bindgen_lower_t52(ptr + 0, value.body) __wit_bindgen_lower_t20(ptr + 88, value.metadata) } ///| #doc(hidden) -fn __wit_bindgen_lower_t52(ptr : Int, value : @types.SchemaGraph) -> Unit { +fn __wit_bindgen_lower_t56(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_t49(iter_base + 0, iter_elem) + __wit_bindgen_lower_t53(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.type_nodes.length()) mbt_ffi_store32(ptr + 0, address) @@ -6048,7 +6965,7 @@ fn __wit_bindgen_lower_t52(ptr : Int, value : @types.SchemaGraph) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t54( +fn __wit_bindgen_lower_t58( ptr : Int, value : @types.VariantValuePayload, ) -> Unit { @@ -6071,14 +6988,14 @@ fn __wit_bindgen_lower_t54( ///| #doc(hidden) -fn __wit_bindgen_lower_t55(ptr : Int, value : @types.MapEntry) -> Unit { +fn __wit_bindgen_lower_t59(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_t56( +fn __wit_bindgen_lower_t60( ptr : Int, value : @types.ResultValuePayload, ) -> Unit { @@ -6126,7 +7043,7 @@ fn __wit_bindgen_lower_t56( ///| #doc(hidden) -fn __wit_bindgen_lower_t57(ptr : Int, value : @types.TextValuePayload) -> Unit { +fn __wit_bindgen_lower_t61(ptr : Int, value : @types.TextValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.text) mbt_ffi_store32(ptr + 4, value.text.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -6151,7 +7068,7 @@ fn __wit_bindgen_lower_t57(ptr : Int, value : @types.TextValuePayload) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t59( +fn __wit_bindgen_lower_t63( ptr : Int, value : @types.BinaryValuePayload, ) -> Unit { @@ -6180,7 +7097,7 @@ fn __wit_bindgen_lower_t59( ///| #doc(hidden) -fn __wit_bindgen_lower_t60( +fn __wit_bindgen_lower_t64( ptr : Int, value : @types.DurationValuePayload, ) -> Unit { @@ -6189,7 +7106,7 @@ fn __wit_bindgen_lower_t60( ///| #doc(hidden) -fn __wit_bindgen_lower_t61(ptr : Int, value : @types.UnionValuePayload) -> Unit { +fn __wit_bindgen_lower_t65(ptr : Int, value : @types.UnionValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.tag) mbt_ffi_store32(ptr + 4, value.tag.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -6198,7 +7115,7 @@ fn __wit_bindgen_lower_t61(ptr : Int, value : @types.UnionValuePayload) -> Unit ///| #doc(hidden) -fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { +fn __wit_bindgen_lower_t71(ptr : Int, value : @types.SchemaValueNode) -> Unit { match value { BoolValue(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -6297,7 +7214,7 @@ fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { } VariantValue(payload14) => { mbt_ffi_store8(ptr + 0, 14) - __wit_bindgen_lower_t54(ptr + 8, payload14) + __wit_bindgen_lower_t58(ptr + 8, payload14) () } @@ -6370,7 +7287,7 @@ fn __wit_bindgen_lower_t67(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_t55(iter_base + 0, iter_elem) + __wit_bindgen_lower_t59(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 12, payload28.length()) mbt_ffi_store32(ptr + 8, address29) @@ -6398,19 +7315,19 @@ fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { } ResultValue(payload34) => { mbt_ffi_store8(ptr + 0, 22) - __wit_bindgen_lower_t56(ptr + 8, payload34) + __wit_bindgen_lower_t60(ptr + 8, payload34) () } TextValue(payload35) => { mbt_ffi_store8(ptr + 0, 23) - __wit_bindgen_lower_t57(ptr + 8, payload35) + __wit_bindgen_lower_t61(ptr + 8, payload35) () } BinaryValue(payload36) => { mbt_ffi_store8(ptr + 0, 24) - __wit_bindgen_lower_t59(ptr + 8, payload36) + __wit_bindgen_lower_t63(ptr + 8, payload36) () } @@ -6440,19 +7357,19 @@ fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { } DurationValue(payload42) => { mbt_ffi_store8(ptr + 0, 28) - __wit_bindgen_lower_t60(ptr + 8, payload42) + __wit_bindgen_lower_t64(ptr + 8, payload42) () } QuantityValueNode(payload43) => { mbt_ffi_store8(ptr + 0, 29) - __wit_bindgen_lower_t35(ptr + 8, payload43) + __wit_bindgen_lower_t38(ptr + 8, payload43) () } UnionValue(payload44) => { mbt_ffi_store8(ptr + 0, 30) - __wit_bindgen_lower_t61(ptr + 8, payload44) + __wit_bindgen_lower_t65(ptr + 8, payload44) () } @@ -6477,12 +7394,12 @@ fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t69(ptr : Int, value : @types.SchemaValueTree) -> Unit { +fn __wit_bindgen_lower_t73(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_t67(iter_base + 0, iter_elem) + __wit_bindgen_lower_t71(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.value_nodes.length()) mbt_ffi_store32(ptr + 0, address) @@ -6491,14 +7408,14 @@ fn __wit_bindgen_lower_t69(ptr : Int, value : @types.SchemaValueTree) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t70(ptr : Int, value : @types.TypedSchemaValue) -> Unit { - __wit_bindgen_lower_t52(ptr + 0, value.graph) - __wit_bindgen_lower_t69(ptr + 20, value.value) +fn __wit_bindgen_lower_t74(ptr : Int, value : @types.TypedSchemaValue) -> Unit { + __wit_bindgen_lower_t56(ptr + 0, value.graph) + __wit_bindgen_lower_t73(ptr + 20, value.value) } ///| #doc(hidden) -fn __wit_bindgen_lower_t373(ptr : Int, value : @common.FieldSource) -> Unit { +fn __wit_bindgen_lower_t377(ptr : Int, value : @common.FieldSource) -> Unit { match value { UserSupplied => { mbt_ffi_store8(ptr + 0, 0) @@ -6516,18 +7433,18 @@ fn __wit_bindgen_lower_t373(ptr : Int, value : @common.FieldSource) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t374(ptr : Int, value : @common.NamedField) -> Unit { +fn __wit_bindgen_lower_t378(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_t373(ptr + 8, value.source) + __wit_bindgen_lower_t377(ptr + 8, value.source) mbt_ffi_store32(ptr + 12, value.schema) __wit_bindgen_lower_t20(ptr + 16, value.metadata) } ///| #doc(hidden) -fn __wit_bindgen_lower_t376(ptr : Int, value : @common.InputSchema) -> Unit { +fn __wit_bindgen_lower_t380(ptr : Int, value : @common.InputSchema) -> Unit { match value { Parameters(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -6536,7 +7453,7 @@ fn __wit_bindgen_lower_t376(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_t374(iter_base + 0, iter_elem) + __wit_bindgen_lower_t378(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 8, payload.length()) mbt_ffi_store32(ptr + 4, address) @@ -6548,7 +7465,7 @@ fn __wit_bindgen_lower_t376(ptr : Int, value : @common.InputSchema) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t377(ptr : Int, value : @common.OutputSchema) -> Unit { +fn __wit_bindgen_lower_t381(ptr : Int, value : @common.OutputSchema) -> Unit { match value { Unit => { mbt_ffi_store8(ptr + 0, 0) @@ -6566,7 +7483,7 @@ fn __wit_bindgen_lower_t377(ptr : Int, value : @common.OutputSchema) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t378(ptr : Int, value : @common.CachePolicy) -> Unit { +fn __wit_bindgen_lower_t382(ptr : Int, value : @common.CachePolicy) -> Unit { match value { NoCache => { mbt_ffi_store8(ptr + 0, 0) @@ -6589,14 +7506,14 @@ fn __wit_bindgen_lower_t378(ptr : Int, value : @common.CachePolicy) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t379(ptr : Int, value : @common.ReadOnlyConfig) -> Unit { - __wit_bindgen_lower_t378(ptr + 0, value.cache_policy) +fn __wit_bindgen_lower_t383(ptr : Int, value : @common.ReadOnlyConfig) -> Unit { + __wit_bindgen_lower_t382(ptr + 0, value.cache_policy) mbt_ffi_store8(ptr + 16, if value.uses_principal { 1 } else { 0 }) } ///| #doc(hidden) -fn __wit_bindgen_lower_t381(ptr : Int, value : @common.CorsOptions) -> Unit { +fn __wit_bindgen_lower_t385(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 { let iter_elem : String = value.allowed_patterns[index] @@ -6612,7 +7529,7 @@ fn __wit_bindgen_lower_t381(ptr : Int, value : @common.CorsOptions) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t382(ptr : Int, value : @common.HttpMethod) -> Unit { +fn __wit_bindgen_lower_t386(ptr : Int, value : @common.HttpMethod) -> Unit { match value { Get => { mbt_ffi_store8(ptr + 0, 0) @@ -6673,7 +7590,7 @@ fn __wit_bindgen_lower_t382(ptr : Int, value : @common.HttpMethod) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t384(ptr : Int, value : @common.PathVariable) -> Unit { +fn __wit_bindgen_lower_t388(ptr : Int, value : @common.PathVariable) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.variable_name) mbt_ffi_store32(ptr + 4, value.variable_name.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -6681,7 +7598,7 @@ fn __wit_bindgen_lower_t384(ptr : Int, value : @common.PathVariable) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t385(ptr : Int, value : @common.PathSegment) -> Unit { +fn __wit_bindgen_lower_t389(ptr : Int, value : @common.PathSegment) -> Unit { match value { Literal(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -6700,13 +7617,13 @@ fn __wit_bindgen_lower_t385(ptr : Int, value : @common.PathSegment) -> Unit { } PathVariable(payload2) => { mbt_ffi_store8(ptr + 0, 2) - __wit_bindgen_lower_t384(ptr + 4, payload2) + __wit_bindgen_lower_t388(ptr + 4, payload2) () } RemainingPathVariable(payload3) => { mbt_ffi_store8(ptr + 0, 3) - __wit_bindgen_lower_t384(ptr + 4, payload3) + __wit_bindgen_lower_t388(ptr + 4, payload3) () } @@ -6715,7 +7632,7 @@ fn __wit_bindgen_lower_t385(ptr : Int, value : @common.PathSegment) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t386(ptr : Int, value : @common.HeaderVariable) -> Unit { +fn __wit_bindgen_lower_t390(ptr : Int, value : @common.HeaderVariable) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.header_name) mbt_ffi_store32(ptr + 4, value.header_name.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -6727,7 +7644,7 @@ fn __wit_bindgen_lower_t386(ptr : Int, value : @common.HeaderVariable) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t387(ptr : Int, value : @common.QueryVariable) -> Unit { +fn __wit_bindgen_lower_t391(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()) mbt_ffi_store32(ptr + 0, ptr0) @@ -6739,13 +7656,13 @@ fn __wit_bindgen_lower_t387(ptr : Int, value : @common.QueryVariable) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t388(ptr : Int, value : @common.AuthDetails) -> Unit { +fn __wit_bindgen_lower_t392(ptr : Int, value : @common.AuthDetails) -> Unit { mbt_ffi_store8(ptr + 0, if value.required { 1 } else { 0 }) } ///| #doc(hidden) -fn __wit_bindgen_lower_t391( +fn __wit_bindgen_lower_t395( ptr : Int, value : @common.HttpMountDetails, ) -> Unit { @@ -6753,7 +7670,7 @@ fn __wit_bindgen_lower_t391( 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_t385(iter_base + 0, iter_elem) + __wit_bindgen_lower_t389(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.path_prefix.length()) mbt_ffi_store32(ptr + 0, address) @@ -6766,19 +7683,19 @@ fn __wit_bindgen_lower_t391( } Some(payload0) => { mbt_ffi_store8(ptr + 8, 1) - __wit_bindgen_lower_t388(ptr + 9, payload0) + __wit_bindgen_lower_t392(ptr + 9, payload0) () } } mbt_ffi_store8(ptr + 10, if value.phantom_agent { 1 } else { 0 }) - __wit_bindgen_lower_t381(ptr + 12, value.cors_options) + __wit_bindgen_lower_t385(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_t385(iter_base + 0, iter_elem) + __wit_bindgen_lower_t389(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 24, value.webhook_suffix.length()) mbt_ffi_store32(ptr + 20, address1) @@ -6786,17 +7703,17 @@ fn __wit_bindgen_lower_t391( ///| #doc(hidden) -fn __wit_bindgen_lower_t394( +fn __wit_bindgen_lower_t398( ptr : Int, value : @common.HttpEndpointDetails, ) -> Unit { - __wit_bindgen_lower_t382(ptr + 0, value.http_method) + __wit_bindgen_lower_t386(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_t385(iter_base + 0, iter_elem) + __wit_bindgen_lower_t389(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 16, value.path_suffix.length()) mbt_ffi_store32(ptr + 12, address) @@ -6805,7 +7722,7 @@ fn __wit_bindgen_lower_t394( 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_t386(iter_base + 0, iter_elem) + __wit_bindgen_lower_t390(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 24, value.header_vars.length()) mbt_ffi_store32(ptr + 20, address0) @@ -6814,7 +7731,7 @@ fn __wit_bindgen_lower_t394( 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_t387(iter_base + 0, iter_elem) + __wit_bindgen_lower_t391(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 32, value.query_vars.length()) mbt_ffi_store32(ptr + 28, address2) @@ -6827,17 +7744,17 @@ fn __wit_bindgen_lower_t394( } Some(payload4) => { mbt_ffi_store8(ptr + 36, 1) - __wit_bindgen_lower_t388(ptr + 37, payload4) + __wit_bindgen_lower_t392(ptr + 37, payload4) () } } - __wit_bindgen_lower_t381(ptr + 40, value.cors_options) + __wit_bindgen_lower_t385(ptr + 40, value.cors_options) } ///| #doc(hidden) -fn __wit_bindgen_lower_t398(ptr : Int, value : @common.AgentMethod) -> Unit { +fn __wit_bindgen_lower_t402(ptr : Int, value : @common.AgentMethod) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.name) mbt_ffi_store32(ptr + 4, value.name.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -6850,7 +7767,7 @@ fn __wit_bindgen_lower_t398(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_t394(iter_base + 0, iter_elem) + __wit_bindgen_lower_t398(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 20, value.http_endpoint.length()) mbt_ffi_store32(ptr + 16, address) @@ -6871,8 +7788,8 @@ fn __wit_bindgen_lower_t398(ptr : Int, value : @common.AgentMethod) -> Unit { () } } - __wit_bindgen_lower_t376(ptr + 36, value.input_schema) - __wit_bindgen_lower_t377(ptr + 48, value.output_schema) + __wit_bindgen_lower_t380(ptr + 36, value.input_schema) + __wit_bindgen_lower_t381(ptr + 48, value.output_schema) match value.read_only { None => { @@ -6882,7 +7799,7 @@ fn __wit_bindgen_lower_t398(ptr : Int, value : @common.AgentMethod) -> Unit { } Some(payload5) => { mbt_ffi_store8(ptr + 56, 1) - __wit_bindgen_lower_t379(ptr + 64, payload5) + __wit_bindgen_lower_t383(ptr + 64, payload5) () } @@ -6891,7 +7808,7 @@ fn __wit_bindgen_lower_t398(ptr : Int, value : @common.AgentMethod) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t404( +fn __wit_bindgen_lower_t408( ptr : Int, value : @common.AgentConstructor, ) -> Unit { @@ -6932,12 +7849,12 @@ fn __wit_bindgen_lower_t404( () } } - __wit_bindgen_lower_t376(ptr + 32, value.input_schema) + __wit_bindgen_lower_t380(ptr + 32, value.input_schema) } ///| #doc(hidden) -fn __wit_bindgen_lower_t406(ptr : Int, value : @common.AgentDependency) -> Unit { +fn __wit_bindgen_lower_t410(ptr : Int, value : @common.AgentDependency) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.type_name) mbt_ffi_store32(ptr + 4, value.type_name.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -6958,14 +7875,14 @@ fn __wit_bindgen_lower_t406(ptr : Int, value : @common.AgentDependency) -> Unit () } } - __wit_bindgen_lower_t52(ptr + 20, value.schema) - __wit_bindgen_lower_t404(ptr + 40, value.constructor_) + __wit_bindgen_lower_t56(ptr + 20, value.schema) + __wit_bindgen_lower_t408(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_t398(iter_base + 0, iter_elem) + __wit_bindgen_lower_t402(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 88, value.methods.length()) mbt_ffi_store32(ptr + 84, address) @@ -6973,7 +7890,7 @@ fn __wit_bindgen_lower_t406(ptr : Int, value : @common.AgentDependency) -> Unit ///| #doc(hidden) -fn __wit_bindgen_lower_t407( +fn __wit_bindgen_lower_t411( ptr : Int, value : @common.SnapshottingConfig, ) -> Unit { @@ -7000,7 +7917,7 @@ fn __wit_bindgen_lower_t407( ///| #doc(hidden) -fn __wit_bindgen_lower_t408(ptr : Int, value : @common.Snapshotting) -> Unit { +fn __wit_bindgen_lower_t412(ptr : Int, value : @common.Snapshotting) -> Unit { match value { Disabled => { mbt_ffi_store8(ptr + 0, 0) @@ -7009,7 +7926,7 @@ fn __wit_bindgen_lower_t408(ptr : Int, value : @common.Snapshotting) -> Unit { } Enabled(payload0) => { mbt_ffi_store8(ptr + 0, 1) - __wit_bindgen_lower_t407(ptr + 8, payload0) + __wit_bindgen_lower_t411(ptr + 8, payload0) () } @@ -7018,7 +7935,7 @@ fn __wit_bindgen_lower_t408(ptr : Int, value : @common.Snapshotting) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t410( +fn __wit_bindgen_lower_t414( ptr : Int, value : @common.AgentConfigDeclaration, ) -> Unit { @@ -7040,7 +7957,7 @@ fn __wit_bindgen_lower_t410( ///| #doc(hidden) -fn __wit_bindgen_lower_t414(ptr : Int, value : @common.AgentType) -> Unit { +fn __wit_bindgen_lower_t418(ptr : Int, value : @common.AgentType) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.type_name) mbt_ffi_store32(ptr + 4, value.type_name.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -7052,14 +7969,14 @@ fn __wit_bindgen_lower_t414(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_t52(ptr + 24, value.schema) - __wit_bindgen_lower_t404(ptr + 44, value.constructor_) + __wit_bindgen_lower_t56(ptr + 24, value.schema) + __wit_bindgen_lower_t408(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_t398(iter_base + 0, iter_elem) + __wit_bindgen_lower_t402(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 92, value.methods.length()) mbt_ffi_store32(ptr + 88, address) @@ -7068,7 +7985,7 @@ fn __wit_bindgen_lower_t414(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_t406(iter_base + 0, iter_elem) + __wit_bindgen_lower_t410(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 100, value.dependencies.length()) mbt_ffi_store32(ptr + 96, address3) @@ -7082,18 +7999,18 @@ fn __wit_bindgen_lower_t414(ptr : Int, value : @common.AgentType) -> Unit { } Some(payload5) => { mbt_ffi_store8(ptr + 108, 1) - __wit_bindgen_lower_t391(ptr + 112, payload5) + __wit_bindgen_lower_t395(ptr + 112, payload5) () } } - __wit_bindgen_lower_t408(ptr + 144, value.snapshotting) + __wit_bindgen_lower_t412(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_t410(iter_base + 0, iter_elem) + __wit_bindgen_lower_t414(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 172, value.config.length()) mbt_ffi_store32(ptr + 168, address6) @@ -7101,7 +8018,7 @@ fn __wit_bindgen_lower_t414(ptr : Int, value : @common.AgentType) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t417(ptr : Int, value : @common.AgentError) -> Unit { +fn __wit_bindgen_lower_t421(ptr : Int, value : @common.AgentError) -> Unit { match value { InvalidInput(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -7141,7 +8058,7 @@ fn __wit_bindgen_lower_t417(ptr : Int, value : @common.AgentError) -> Unit { } CustomError(payload7) => { mbt_ffi_store8(ptr + 0, 4) - __wit_bindgen_lower_t70(ptr + 4, payload7) + __wit_bindgen_lower_t74(ptr + 4, payload7) () } @@ -7149,100 +8066,100 @@ fn __wit_bindgen_lower_t417(ptr : Int, value : @common.AgentError) -> Unit { } ///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> 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_storef32(offset : Int, value : Float) = + #|(func (param i32) (param f32) local.get 0 local.get 1 f32.store) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +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 = +extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = + #|(func (param i32) (result f64) local.get 0 f64.load) + +///| +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = #|(func (param i32) (result i32) 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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| -extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = - #|(func (param i32) (result f32) local.get 0 f32.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] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array8 - #| local.get 0) +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_extend16(value : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.extend16_s) ///| -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_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_store8(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) +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_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) ///| -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_storef32(offset : Int, value : Float) = - #|(func (param i32) (param f32) local.get 0 local.get 1 f32.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_storef64(offset : Int, value : Double) = - #|(func (param i32) (param f64) local.get 0 local.get 1 f64.store) +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_load16(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_s) ///| -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_loadf32(offset : Int) -> Float = + #|(func (param i32) (result f32) local.get 0 f32.load) ///| -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_store8(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) ///| -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_load64(offset : Int) -> Int64 = + #|(func (param i32) (result i64) local.get 0 i64.load) ///| -extern "wasm" fn mbt_ffi_load16_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load16_u) +#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_store32(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) +extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| local.get 0) ///| 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_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) diff --git a/sdks/moonbit/golem_sdk/gen/interface/golem/api/loadSnapshot/ffi.mbt b/sdks/moonbit/golem_sdk/gen/interface/golem/api/loadSnapshot/ffi.mbt index 8500a6740a..af7d7a1c7a 100644 --- a/sdks/moonbit/golem_sdk/gen/interface/golem/api/loadSnapshot/ffi.mbt +++ b/sdks/moonbit/golem_sdk/gen/interface/golem/api/loadSnapshot/ffi.mbt @@ -44,31 +44,31 @@ pub fn wasmExportLoadPostReturn(p0 : Int) -> Unit { } ///| -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_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) ///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> 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_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +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_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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.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_load8_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) + +///| +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = @@ -78,13 +78,13 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| 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_store32(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) 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 16e4ed16e4..4ef8bd953b 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_t149(return_area + 0, result) + __wit_bindgen_lower_t153(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_t149(ptr : Int, value : @host.Snapshot) -> Unit { +fn __wit_bindgen_lower_t153(ptr : Int, value : @host.Snapshot) -> Unit { let ptr0 = mbt_ffi_bytes2ptr(value.payload) mbt_ffi_store32(ptr + 4, value.payload.length()) @@ -34,17 +34,6 @@ fn __wit_bindgen_lower_t149(ptr : Int, value : @host.Snapshot) -> Unit { 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_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) @@ -58,3 +47,14 @@ extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = #owned(str) extern "wasm" fn mbt_ffi_str2ptr(str : String) -> 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_store32(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) 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 a29816db50..21665c50e9 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_t518(iter_base + 0, iter_elem) + __wit_bindgen_lower_t524(iter_base + 0, iter_elem) } mbt_ffi_store32(return_area + 8, payload.length()) mbt_ffi_store32(return_area + 4, address) @@ -23,7 +23,7 @@ pub fn wasmExportDiscoverTools() -> Int { } Err(payload0) => { mbt_ffi_store8(return_area + 0, 1) - __wit_bindgen_lower_t519(return_area + 4, payload0) + __wit_bindgen_lower_t525(return_area + 4, payload0) () } @@ -69,7 +69,7 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { 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 @@ -97,13 +97,13 @@ 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 < mbt_ffi_load32(iter_base + 88) index3 = index3 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index3 * 32 + let iter_base = mbt_ffi_load32(iter_base + 84) + index3 * 32 match mbt_ffi_load8_u(iter_base + 0) { 0 => () @@ -158,14 +158,14 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { _ => panic() } } - 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)) + 1 => mbt_ffi_free(mbt_ffi_load32(iter_base + 104)) _ => panic() } } @@ -335,7 +335,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 @@ -363,13 +363,13 @@ 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 < mbt_ffi_load32(iter_base + 88) index14 = index14 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + + let iter_base = mbt_ffi_load32(iter_base + 84) + index14 * 32 match mbt_ffi_load8_u(iter_base + 0) { @@ -425,14 +425,14 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { _ => panic() } } - 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)) + 1 => mbt_ffi_free(mbt_ffi_load32(iter_base + 104)) _ => panic() } } @@ -1272,16 +1272,116 @@ 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 => { @@ -1694,16 +1794,116 @@ 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 => { @@ -2173,13 +2373,13 @@ pub fn wasmExportGetTool(p0 : Int, p1 : Int) -> Int { match result0 { Ok(payload) => { mbt_ffi_store8(return_area + 0, 0) - __wit_bindgen_lower_t518(return_area + 4, payload) + __wit_bindgen_lower_t524(return_area + 4, payload) () } Err(payload1) => { mbt_ffi_store8(return_area + 0, 1) - __wit_bindgen_lower_t519(return_area + 4, payload1) + __wit_bindgen_lower_t525(return_area + 4, payload1) () } @@ -2219,7 +2419,7 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { 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 @@ -2247,13 +2447,13 @@ 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 < mbt_ffi_load32(iter_base + 88) index3 = index3 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index3 * 32 + let iter_base = mbt_ffi_load32(iter_base + 84) + index3 * 32 match mbt_ffi_load8_u(iter_base + 0) { 0 => () @@ -2308,14 +2508,14 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { _ => panic() } } - 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)) + 1 => mbt_ffi_free(mbt_ffi_load32(iter_base + 104)) _ => panic() } } @@ -2483,7 +2683,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 @@ -2511,13 +2711,13 @@ 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 < mbt_ffi_load32(iter_base + 88) index14 = index14 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + + let iter_base = mbt_ffi_load32(iter_base + 84) + index14 * 32 match mbt_ffi_load8_u(iter_base + 0) { @@ -2573,14 +2773,14 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { _ => panic() } } - 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)) + 1 => mbt_ffi_free(mbt_ffi_load32(iter_base + 104)) _ => panic() } } @@ -3391,69 +3591,169 @@ 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 => { - 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() - } + 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() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - } - 15 => { + 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 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 { @@ -3809,16 +4109,116 @@ 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 => () + 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 => { @@ -4295,293 +4695,1033 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } mbt_ffi_free(mbt_ffi_load32(p0 + 8)) - 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 + 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 lifted112 = match mbt_ffi_load8_u(iter_base + 0) { + 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 => @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 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 result1 = 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 result2 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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(result2) + Option::Some(lifted) + } + _ => panic() } - _ => 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() + } - 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 + @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() + } - let result3 = mbt_ffi_ptr2str( + 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() + } + + @types.SchemaTypeBody::F32Type(lifted62) + } + 11 => { + 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::F64Type(lifted69) + } + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + 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 result70 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted72 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result71 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result71) + } + _ => panic() + } + + 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 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( + 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( + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result11 = mbt_ffi_ptr2str( + 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, + array84.push(@types.NamedFieldType::{ + name: result70, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted, - aliases: array4, - examples: array7, - deprecated: lifted10, - role: lifted13, + 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( + 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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( + 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( + 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( + 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( + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result28 = mbt_ffi_ptr2str( + 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, + array101.push(@types.VariantCaseType::{ + name: result86, + payload: lifted87, metadata: @types.MetadataEnvelope::{ - doc: lifted19, - aliases: array21, - examples: array24, - deprecated: lifted27, - role: lifted30, + 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( + 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( + 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 => @types.SchemaTypeBody::ListType(mbt_ffi_load32(iter_base + 8)) 20 => @@ -4596,113 +5736,113 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { }) 22 => @types.SchemaTypeBody::OptionType(mbt_ffi_load32(iter_base + 8)) 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 20)) _ => panic() } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted41, - err: lifted42, + 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( + 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 => Option::Some(mbt_ffi_load32(iter_base + 24).reinterpret_as_uint()) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 32).reinterpret_as_uint()) _ => 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( + 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, + 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( + 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 => Option::Some(mbt_ffi_load32(iter_base + 24).reinterpret_as_uint()) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 32).reinterpret_as_uint()) @@ -4710,54 +5850,54 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted54, - min_bytes: lifted55, - max_bytes: lifted56, + 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( + 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( + 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() } @@ -4765,90 +5905,90 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { @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, + 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( + 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( + 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, + allowed_schemes: lifted138, + allowed_hosts: lifted142, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result73 = mbt_ffi_ptr2str( + 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( + 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 + let lifted148 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result77 = mbt_ffi_ptr2str( + let result147 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -4856,17 +5996,17 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result77, + unit: result147, }) } _ => panic() } - let lifted80 : @types.QuantityValue? = match + let lifted150 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result79 = mbt_ffi_ptr2str( + let result149 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -4874,382 +6014,382 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result79, + unit: result149, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result73, - allowed_suffixes: array75, - min: lifted78, - max: lifted80, + 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( + 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( + 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( + 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( + 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( + 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( + 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( + 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, + field_name: result156, + literal: lifted158, }) } 5 => { - let result89 = mbt_ffi_ptr2str( + 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( + 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( + 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( + 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( + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result101 = mbt_ffi_ptr2str( + 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, + array174.push(@types.UnionBranch::{ + tag: result151, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted90, + discriminator: lifted160, metadata: @types.MetadataEnvelope::{ - doc: lifted92, - aliases: array94, - examples: array97, - deprecated: lifted100, - role: lifted103, + 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, + branches: array174, }) } 32 => { - let lifted107 : String? = match mbt_ffi_load8_u(iter_base + 12) { + let lifted177 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result106 = mbt_ffi_ptr2str( + let result176 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result106) + Option::Some(result176) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted107, + 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( + 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, + 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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( + 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( + 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( + 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( + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result123 = mbt_ffi_ptr2str( + 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, + array196.push(@types.SchemaTypeNode::{ + body: lifted182, metadata: @types.MetadataEnvelope::{ - doc: lifted114, - aliases: array116, - examples: array119, - deprecated: lifted122, - role: lifted125, + 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( + 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( + 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, + array201.push(@types.SchemaTypeDef::{ + id: result198, + name: lifted200, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(p0 + 24)) - let array162 : Array[@types.SchemaValueNode] = [] - for index163 = 0; index163 < mbt_ffi_load32(p0 + 40); index163 = index163 + 1 { - let iter_base = mbt_ffi_load32(p0 + 36) + index163 * 32 + let array232 : Array[@types.SchemaValueNode] = [] + for index233 = 0; index233 < mbt_ffi_load32(p0 + 40); index233 = index233 + 1 { + let iter_base = mbt_ffi_load32(p0 + 36) + index233 * 32 - let lifted161 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted231 = 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)) @@ -5279,28 +6419,28 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result133 = mbt_ffi_ptr2str( + 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => panic() @@ -5308,7 +6448,7 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted136, + payload: lifted206, }) } 15 => @@ -5316,170 +6456,170 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 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::{ + 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => panic() } - @types.ResultValuePayload::ErrValue(lifted149) + @types.ResultValuePayload::ErrValue(lifted219) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted150) + @types.SchemaValueNode::ResultValue(lifted220) } 23 => { - let result151 = mbt_ffi_ptr2str( + 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( + 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, + text: result221, + language: lifted223, }) } 24 => { - let result154 = mbt_ffi_ptr2bytes( + 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( + 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, + bytes: result224, + mime_type: lifted226, }) } 25 => { - let result157 = mbt_ffi_ptr2str( + 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( + 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 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -5491,7 +6631,7 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result159 = mbt_ffi_ptr2str( + let result229 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -5499,17 +6639,17 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result159, + unit: result229, }) } 30 => { - let result160 = mbt_ffi_ptr2str( + let result230 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result160, + tag: result230, body: mbt_ffi_load32(iter_base + 16), }) } @@ -5524,133 +6664,133 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - array162.push(lifted161) + array232.push(lifted231) } mbt_ffi_free(mbt_ffi_load32(p0 + 36)) - let lifted164 : @streams.InputStream? = match mbt_ffi_load8_u(p0 + 48) { + let lifted234 : @streams.InputStream? = match mbt_ffi_load8_u(p0 + 48) { 0 => Option::None 1 => Option::Some(@streams.InputStream::InputStream(mbt_ffi_load32(p0 + 52))) _ => panic() } - let lifted182 = match mbt_ffi_load8_u(p0 + 56) { + let lifted252 = match mbt_ffi_load8_u(p0 + 56) { 0 => { - let result165 = mbt_ffi_ptr2str( + let result235 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 64), mbt_ffi_load32(p0 + 68), ) - let result166 = mbt_ffi_ptr2str( + let result236 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 72), mbt_ffi_load32(p0 + 76), ) - let lifted168 : String? = match mbt_ffi_load8_u(p0 + 80) { + let lifted238 : String? = match mbt_ffi_load8_u(p0 + 80) { 0 => Option::None 1 => { - let result167 = mbt_ffi_ptr2str( + let result237 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 84), mbt_ffi_load32(p0 + 88), ) - Option::Some(result167) + Option::Some(result237) } _ => panic() } - let lifted170 : String? = match mbt_ffi_load8_u(p0 + 92) { + let lifted240 : String? = match mbt_ffi_load8_u(p0 + 92) { 0 => Option::None 1 => { - let result169 = mbt_ffi_ptr2str( + let result239 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 96), mbt_ffi_load32(p0 + 100), ) - Option::Some(result169) + Option::Some(result239) } _ => panic() } - let lifted171 : Bool? = match mbt_ffi_load8_u(p0 + 104) { + let lifted241 : Bool? = match mbt_ffi_load8_u(p0 + 104) { 0 => Option::None 1 => Option::Some(mbt_ffi_load8_u(p0 + 105) != 0) _ => panic() } - let lifted173 : String? = match mbt_ffi_load8_u(p0 + 108) { + let lifted243 : String? = match mbt_ffi_load8_u(p0 + 108) { 0 => Option::None 1 => { - let result172 = mbt_ffi_ptr2str( + let result242 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 112), mbt_ffi_load32(p0 + 116), ) - Option::Some(result172) + Option::Some(result242) } _ => panic() } - let lifted175 : String? = match mbt_ffi_load8_u(p0 + 120) { + let lifted245 : String? = match mbt_ffi_load8_u(p0 + 120) { 0 => Option::None 1 => { - let result174 = mbt_ffi_ptr2str( + let result244 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 124), mbt_ffi_load32(p0 + 128), ) - Option::Some(result174) + Option::Some(result244) } _ => panic() } - let lifted177 : String? = match mbt_ffi_load8_u(p0 + 132) { + let lifted247 : String? = match mbt_ffi_load8_u(p0 + 132) { 0 => Option::None 1 => { - let result176 = mbt_ffi_ptr2str( + let result246 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 136), mbt_ffi_load32(p0 + 140), ) - Option::Some(result176) + Option::Some(result246) } _ => panic() } - let lifted179 : String? = match mbt_ffi_load8_u(p0 + 144) { + let lifted249 : String? = match mbt_ffi_load8_u(p0 + 144) { 0 => Option::None 1 => { - let result178 = mbt_ffi_ptr2str( + let result248 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 148), mbt_ffi_load32(p0 + 152), ) - Option::Some(result178) + Option::Some(result248) } _ => panic() } - let result180 = mbt_ffi_ptr2str( + let result250 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 156), mbt_ffi_load32(p0 + 160), ) @common0.Principal::Oidc(@common0.OidcPrincipal::{ - sub: result165, - issuer: result166, - email: lifted168, - name: lifted170, - email_verified: lifted171, - given_name: lifted173, - family_name: lifted175, - picture: lifted177, - preferred_username: lifted179, - claims: result180, + sub: result235, + issuer: result236, + email: lifted238, + name: lifted240, + email_verified: lifted241, + given_name: lifted243, + family_name: lifted245, + picture: lifted247, + preferred_username: lifted249, + claims: result250, }) } 1 => { - let result181 = mbt_ffi_ptr2str( + let result251 = mbt_ffi_ptr2str( mbt_ffi_load32(p0 + 80), mbt_ffi_load32(p0 + 84), ) @@ -5663,7 +6803,7 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { low_bits: mbt_ffi_load64(p0 + 72).reinterpret_as_uint64(), }, }, - agent_id: result181, + agent_id: result251, }, }) } @@ -5680,36 +6820,36 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - let result183 : Result[@common.InvocationResult, @common.ToolError] = invoke( + let result253 : Result[@common.InvocationResult, @common.ToolError] = invoke( result, array, @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array126, - defs: array131, + type_nodes: array196, + defs: array201, root: mbt_ffi_load32(p0 + 32), }, value: @types.SchemaValueTree::{ - value_nodes: array162, + value_nodes: array232, root: mbt_ffi_load32(p0 + 44), }, }, - lifted164, - lifted182, + lifted234, + lifted252, ) mbt_ffi_free(p0) let return_area = mbt_ffi_malloc(48) - match result183 { + match result253 { Ok(payload) => { mbt_ffi_store8(return_area + 0, 0) - __wit_bindgen_lower_t523(return_area + 4, payload) + __wit_bindgen_lower_t529(return_area + 4, payload) () } - Err(payload184) => { + Err(payload254) => { mbt_ffi_store8(return_area + 0, 1) - __wit_bindgen_lower_t519(return_area + 4, payload184) + __wit_bindgen_lower_t525(return_area + 4, payload254) () } @@ -5734,16 +6874,116 @@ 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 => { @@ -6222,16 +7462,116 @@ 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 => { @@ -6888,21 +8228,98 @@ fn __wit_bindgen_lower_t26(ptr : Int, value : @types.ResultSpec) -> Unit { } Some(payload0) => { mbt_ffi_store8(ptr + 0, 1) - mbt_ffi_store32(ptr + 4, payload0) + 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_t27(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_t29( + ptr : Int, + value : @types.NumericRestrictions, +) -> Unit { + match value.min { + None => { + mbt_ffi_store8(ptr + 0, 0) + + () + } + Some(payload0) => { + mbt_ffi_store8(ptr + 0, 1) + __wit_bindgen_lower_t27(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_t27(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) () } @@ -6911,7 +8328,7 @@ fn __wit_bindgen_lower_t26(ptr : Int, value : @types.ResultSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t29(ptr : Int, value : @types.TextRestrictions) -> Unit { +fn __wit_bindgen_lower_t32(ptr : Int, value : @types.TextRestrictions) -> Unit { match value.languages { None => { mbt_ffi_store8(ptr + 0, 0) @@ -6985,7 +8402,7 @@ fn __wit_bindgen_lower_t29(ptr : Int, value : @types.TextRestrictions) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t30( +fn __wit_bindgen_lower_t33( ptr : Int, value : @types.BinaryRestrictions, ) -> Unit { @@ -7045,7 +8462,7 @@ fn __wit_bindgen_lower_t30( ///| #doc(hidden) -fn __wit_bindgen_lower_t33(ptr : Int, value : @types.PathSpec) -> Unit { +fn __wit_bindgen_lower_t36(ptr : Int, value : @types.PathSpec) -> Unit { mbt_ffi_store8(ptr + 0, value.direction.ordinal()) mbt_ffi_store8(ptr + 1, value.kind.ordinal()) @@ -7102,7 +8519,7 @@ fn __wit_bindgen_lower_t33(ptr : Int, value : @types.PathSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t34(ptr : Int, value : @types.UrlRestrictions) -> Unit { +fn __wit_bindgen_lower_t37(ptr : Int, value : @types.UrlRestrictions) -> Unit { match value.allowed_schemes { None => { mbt_ffi_store8(ptr + 0, 0) @@ -7156,7 +8573,7 @@ fn __wit_bindgen_lower_t34(ptr : Int, value : @types.UrlRestrictions) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t35(ptr : Int, value : @types.QuantityValue) -> Unit { +fn __wit_bindgen_lower_t38(ptr : Int, value : @types.QuantityValue) -> Unit { mbt_ffi_store64(ptr + 0, value.mantissa) mbt_ffi_store32(ptr + 8, value.scale) @@ -7167,7 +8584,7 @@ fn __wit_bindgen_lower_t35(ptr : Int, value : @types.QuantityValue) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantitySpec) -> Unit { +fn __wit_bindgen_lower_t40(ptr : Int, value : @types.QuantitySpec) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.base_unit) mbt_ffi_store32(ptr + 4, value.base_unit.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -7192,7 +8609,7 @@ fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantitySpec) -> Unit { } Some(payload2) => { mbt_ffi_store8(ptr + 16, 1) - __wit_bindgen_lower_t35(ptr + 24, payload2) + __wit_bindgen_lower_t38(ptr + 24, payload2) () } @@ -7206,7 +8623,7 @@ fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantitySpec) -> Unit { } Some(payload4) => { mbt_ffi_store8(ptr + 48, 1) - __wit_bindgen_lower_t35(ptr + 56, payload4) + __wit_bindgen_lower_t38(ptr + 56, payload4) () } @@ -7215,7 +8632,7 @@ fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantitySpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t38( +fn __wit_bindgen_lower_t41( ptr : Int, value : @types.FieldDiscriminator, ) -> Unit { @@ -7243,7 +8660,7 @@ fn __wit_bindgen_lower_t38( ///| #doc(hidden) -fn __wit_bindgen_lower_t39(ptr : Int, value : @types.DiscriminatorRule) -> Unit { +fn __wit_bindgen_lower_t42(ptr : Int, value : @types.DiscriminatorRule) -> Unit { match value { Prefix(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -7283,7 +8700,7 @@ fn __wit_bindgen_lower_t39(ptr : Int, value : @types.DiscriminatorRule) -> Unit } FieldEquals(payload7) => { mbt_ffi_store8(ptr + 0, 4) - __wit_bindgen_lower_t38(ptr + 4, payload7) + __wit_bindgen_lower_t41(ptr + 4, payload7) () } @@ -7301,23 +8718,23 @@ fn __wit_bindgen_lower_t39(ptr : Int, value : @types.DiscriminatorRule) -> Unit ///| #doc(hidden) -fn __wit_bindgen_lower_t40(ptr : Int, value : @types.UnionBranch) -> Unit { +fn __wit_bindgen_lower_t43(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_t39(ptr + 12, value.discriminator) + __wit_bindgen_lower_t42(ptr + 12, value.discriminator) __wit_bindgen_lower_t20(ptr + 36, value.metadata) } ///| #doc(hidden) -fn __wit_bindgen_lower_t42(ptr : Int, value : @types.UnionSpec) -> Unit { +fn __wit_bindgen_lower_t45(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_t40(iter_base + 0, iter_elem) + __wit_bindgen_lower_t43(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.branches.length()) mbt_ffi_store32(ptr + 0, address) @@ -7325,7 +8742,7 @@ fn __wit_bindgen_lower_t42(ptr : Int, value : @types.UnionSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t43(ptr : Int, value : @types.SecretSpec) -> Unit { +fn __wit_bindgen_lower_t46(ptr : Int, value : @types.SecretSpec) -> Unit { mbt_ffi_store32(ptr + 0, value.inner) match value.category { @@ -7348,7 +8765,7 @@ fn __wit_bindgen_lower_t43(ptr : Int, value : @types.SecretSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t44(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { +fn __wit_bindgen_lower_t47(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { match value.resource_name { None => { mbt_ffi_store8(ptr + 0, 0) @@ -7369,7 +8786,7 @@ fn __wit_bindgen_lower_t44(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t48(ptr : Int, value : @types.SchemaTypeBody) -> Unit { +fn __wit_bindgen_lower_t52(ptr : Int, value : @types.SchemaTypeBody) -> Unit { match value { RefType(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -7382,54 +8799,194 @@ fn __wit_bindgen_lower_t48(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(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_t29(ptr + 16, payload30) + + () + } + } + () } CharType => { @@ -7442,133 +8999,133 @@ fn __wit_bindgen_lower_t48(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_t21(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_t23(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_t24(ptr + 8, payload29) + __wit_bindgen_lower_t24(ptr + 8, payload49) () } - MapType(payload30) => { + MapType(payload50) => { mbt_ffi_store8(ptr + 0, 21) - __wit_bindgen_lower_t25(ptr + 8, payload30) + __wit_bindgen_lower_t25(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_t26(ptr + 8, payload32) + __wit_bindgen_lower_t26(ptr + 8, payload52) () } - TextType(payload33) => { + TextType(payload53) => { mbt_ffi_store8(ptr + 0, 24) - __wit_bindgen_lower_t29(ptr + 8, payload33) + __wit_bindgen_lower_t32(ptr + 8, payload53) () } - BinaryType(payload34) => { + BinaryType(payload54) => { mbt_ffi_store8(ptr + 0, 25) - __wit_bindgen_lower_t30(ptr + 8, payload34) + __wit_bindgen_lower_t33(ptr + 8, payload54) () } - PathType(payload35) => { + PathType(payload55) => { mbt_ffi_store8(ptr + 0, 26) - __wit_bindgen_lower_t33(ptr + 8, payload35) + __wit_bindgen_lower_t36(ptr + 8, payload55) () } - UrlType(payload36) => { + UrlType(payload56) => { mbt_ffi_store8(ptr + 0, 27) - __wit_bindgen_lower_t34(ptr + 8, payload36) + __wit_bindgen_lower_t37(ptr + 8, payload56) () } @@ -7582,42 +9139,42 @@ fn __wit_bindgen_lower_t48(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - QuantityType(payload39) => { + QuantityType(payload59) => { mbt_ffi_store8(ptr + 0, 30) - __wit_bindgen_lower_t37(ptr + 8, payload39) + __wit_bindgen_lower_t40(ptr + 8, payload59) () } - UnionType(payload40) => { + UnionType(payload60) => { mbt_ffi_store8(ptr + 0, 31) - __wit_bindgen_lower_t42(ptr + 8, payload40) + __wit_bindgen_lower_t45(ptr + 8, payload60) () } - SecretType(payload41) => { + SecretType(payload61) => { mbt_ffi_store8(ptr + 0, 32) - __wit_bindgen_lower_t43(ptr + 8, payload41) + __wit_bindgen_lower_t46(ptr + 8, payload61) () } - QuotaTokenType(payload42) => { + QuotaTokenType(payload62) => { mbt_ffi_store8(ptr + 0, 33) - __wit_bindgen_lower_t44(ptr + 8, payload42) + __wit_bindgen_lower_t47(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) () } @@ -7625,18 +9182,18 @@ fn __wit_bindgen_lower_t48(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) () } @@ -7649,19 +9206,19 @@ fn __wit_bindgen_lower_t48(ptr : Int, value : @types.SchemaTypeBody) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t49(ptr : Int, value : @types.SchemaTypeNode) -> Unit { - __wit_bindgen_lower_t48(ptr + 0, value.body) +fn __wit_bindgen_lower_t53(ptr : Int, value : @types.SchemaTypeNode) -> Unit { + __wit_bindgen_lower_t52(ptr + 0, value.body) __wit_bindgen_lower_t20(ptr + 88, value.metadata) } ///| #doc(hidden) -fn __wit_bindgen_lower_t52(ptr : Int, value : @types.SchemaGraph) -> Unit { +fn __wit_bindgen_lower_t56(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_t49(iter_base + 0, iter_elem) + __wit_bindgen_lower_t53(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.type_nodes.length()) mbt_ffi_store32(ptr + 0, address) @@ -7679,7 +9236,7 @@ fn __wit_bindgen_lower_t52(ptr : Int, value : @types.SchemaGraph) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t54( +fn __wit_bindgen_lower_t58( ptr : Int, value : @types.VariantValuePayload, ) -> Unit { @@ -7702,14 +9259,14 @@ fn __wit_bindgen_lower_t54( ///| #doc(hidden) -fn __wit_bindgen_lower_t55(ptr : Int, value : @types.MapEntry) -> Unit { +fn __wit_bindgen_lower_t59(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_t56( +fn __wit_bindgen_lower_t60( ptr : Int, value : @types.ResultValuePayload, ) -> Unit { @@ -7757,7 +9314,7 @@ fn __wit_bindgen_lower_t56( ///| #doc(hidden) -fn __wit_bindgen_lower_t57(ptr : Int, value : @types.TextValuePayload) -> Unit { +fn __wit_bindgen_lower_t61(ptr : Int, value : @types.TextValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.text) mbt_ffi_store32(ptr + 4, value.text.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -7782,7 +9339,7 @@ fn __wit_bindgen_lower_t57(ptr : Int, value : @types.TextValuePayload) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t59( +fn __wit_bindgen_lower_t63( ptr : Int, value : @types.BinaryValuePayload, ) -> Unit { @@ -7811,7 +9368,7 @@ fn __wit_bindgen_lower_t59( ///| #doc(hidden) -fn __wit_bindgen_lower_t60( +fn __wit_bindgen_lower_t64( ptr : Int, value : @types.DurationValuePayload, ) -> Unit { @@ -7820,7 +9377,7 @@ fn __wit_bindgen_lower_t60( ///| #doc(hidden) -fn __wit_bindgen_lower_t61(ptr : Int, value : @types.UnionValuePayload) -> Unit { +fn __wit_bindgen_lower_t65(ptr : Int, value : @types.UnionValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.tag) mbt_ffi_store32(ptr + 4, value.tag.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -7829,7 +9386,7 @@ fn __wit_bindgen_lower_t61(ptr : Int, value : @types.UnionValuePayload) -> Unit ///| #doc(hidden) -fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { +fn __wit_bindgen_lower_t71(ptr : Int, value : @types.SchemaValueNode) -> Unit { match value { BoolValue(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -7928,7 +9485,7 @@ fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { } VariantValue(payload14) => { mbt_ffi_store8(ptr + 0, 14) - __wit_bindgen_lower_t54(ptr + 8, payload14) + __wit_bindgen_lower_t58(ptr + 8, payload14) () } @@ -8001,7 +9558,7 @@ fn __wit_bindgen_lower_t67(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_t55(iter_base + 0, iter_elem) + __wit_bindgen_lower_t59(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 12, payload28.length()) mbt_ffi_store32(ptr + 8, address29) @@ -8029,19 +9586,19 @@ fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { } ResultValue(payload34) => { mbt_ffi_store8(ptr + 0, 22) - __wit_bindgen_lower_t56(ptr + 8, payload34) + __wit_bindgen_lower_t60(ptr + 8, payload34) () } TextValue(payload35) => { mbt_ffi_store8(ptr + 0, 23) - __wit_bindgen_lower_t57(ptr + 8, payload35) + __wit_bindgen_lower_t61(ptr + 8, payload35) () } BinaryValue(payload36) => { mbt_ffi_store8(ptr + 0, 24) - __wit_bindgen_lower_t59(ptr + 8, payload36) + __wit_bindgen_lower_t63(ptr + 8, payload36) () } @@ -8071,19 +9628,19 @@ fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { } DurationValue(payload42) => { mbt_ffi_store8(ptr + 0, 28) - __wit_bindgen_lower_t60(ptr + 8, payload42) + __wit_bindgen_lower_t64(ptr + 8, payload42) () } QuantityValueNode(payload43) => { mbt_ffi_store8(ptr + 0, 29) - __wit_bindgen_lower_t35(ptr + 8, payload43) + __wit_bindgen_lower_t38(ptr + 8, payload43) () } UnionValue(payload44) => { mbt_ffi_store8(ptr + 0, 30) - __wit_bindgen_lower_t61(ptr + 8, payload44) + __wit_bindgen_lower_t65(ptr + 8, payload44) () } @@ -8108,12 +9665,12 @@ fn __wit_bindgen_lower_t67(ptr : Int, value : @types.SchemaValueNode) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t69(ptr : Int, value : @types.SchemaValueTree) -> Unit { +fn __wit_bindgen_lower_t73(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_t67(iter_base + 0, iter_elem) + __wit_bindgen_lower_t71(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.value_nodes.length()) mbt_ffi_store32(ptr + 0, address) @@ -8122,14 +9679,14 @@ fn __wit_bindgen_lower_t69(ptr : Int, value : @types.SchemaValueTree) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t70(ptr : Int, value : @types.TypedSchemaValue) -> Unit { - __wit_bindgen_lower_t52(ptr + 0, value.graph) - __wit_bindgen_lower_t69(ptr + 20, value.value) +fn __wit_bindgen_lower_t74(ptr : Int, value : @types.TypedSchemaValue) -> Unit { + __wit_bindgen_lower_t56(ptr + 0, value.graph) + __wit_bindgen_lower_t73(ptr + 20, value.value) } ///| #doc(hidden) -fn __wit_bindgen_lower_t467( +fn __wit_bindgen_lower_t471( ptr : Int, value : @common.CommandAnnotations, ) -> Unit { @@ -8141,7 +9698,7 @@ fn __wit_bindgen_lower_t467( ///| #doc(hidden) -fn __wit_bindgen_lower_t468(ptr : Int, value : @common.Repetition) -> Unit { +fn __wit_bindgen_lower_t473(ptr : Int, value : @common.Repetition) -> Unit { match value { Repeated => { mbt_ffi_store8(ptr + 0, 0) @@ -8165,14 +9722,28 @@ fn __wit_bindgen_lower_t468(ptr : Int, value : @common.Repetition) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t469(ptr : Int, value : @common.RepeatableShape) -> Unit { - __wit_bindgen_lower_t468(ptr + 0, value.repetition) - mbt_ffi_store32(ptr + 8, value.type_) +fn __wit_bindgen_lower_t474( + ptr : Int, + value : @common.RepeatableListShape, +) -> Unit { + __wit_bindgen_lower_t473(ptr + 0, value.repetition) + mbt_ffi_store32(ptr + 8, value.item_type) +} + +///| +#doc(hidden) +fn __wit_bindgen_lower_t475( + ptr : Int, + value : @common.RepeatableMapShape, +) -> Unit { + __wit_bindgen_lower_t473(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_t470(ptr : Int, value : @common.OptionShape) -> Unit { +fn __wit_bindgen_lower_t476(ptr : Int, value : @common.OptionShape) -> Unit { match value { Scalar(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -8186,9 +9757,15 @@ fn __wit_bindgen_lower_t470(ptr : Int, value : @common.OptionShape) -> Unit { () } - Repeatable(payload1) => { + RepeatableList(payload1) => { mbt_ffi_store8(ptr + 0, 2) - __wit_bindgen_lower_t469(ptr + 4, payload1) + __wit_bindgen_lower_t474(ptr + 4, payload1) + + () + } + RepeatableMap(payload2) => { + mbt_ffi_store8(ptr + 0, 3) + __wit_bindgen_lower_t475(ptr + 4, payload2) () } @@ -8197,18 +9774,18 @@ fn __wit_bindgen_lower_t470(ptr : Int, value : @common.OptionShape) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t471(ptr : Int, value : @common.BoolFlagShape) -> Unit { +fn __wit_bindgen_lower_t477(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_t473(ptr : Int, value : @common.FlagShape) -> Unit { +fn __wit_bindgen_lower_t479(ptr : Int, value : @common.FlagShape) -> Unit { match value { BoolFlag(payload) => { mbt_ffi_store8(ptr + 0, 0) - __wit_bindgen_lower_t471(ptr + 4, payload) + __wit_bindgen_lower_t477(ptr + 4, payload) () } @@ -8236,16 +9813,16 @@ fn __wit_bindgen_lower_t473(ptr : Int, value : @common.FlagShape) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t474(ptr : Int, value : @common.ValueIsRef) -> Unit { +fn __wit_bindgen_lower_t480(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_t69(ptr + 8, value.value) + __wit_bindgen_lower_t73(ptr + 8, value.value) } ///| #doc(hidden) -fn __wit_bindgen_lower_t475(ptr : Int, value : @common.Ref) -> Unit { +fn __wit_bindgen_lower_t481(ptr : Int, value : @common.Ref) -> Unit { match value { Present(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -8258,7 +9835,7 @@ fn __wit_bindgen_lower_t475(ptr : Int, value : @common.Ref) -> Unit { } ValueIs(payload1) => { mbt_ffi_store8(ptr + 0, 1) - __wit_bindgen_lower_t474(ptr + 4, payload1) + __wit_bindgen_lower_t480(ptr + 4, payload1) () } @@ -8267,12 +9844,12 @@ fn __wit_bindgen_lower_t475(ptr : Int, value : @common.Ref) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t477(ptr : Int, value : @common.RefGroup) -> Unit { +fn __wit_bindgen_lower_t483(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_t475(iter_base + 0, iter_elem) + __wit_bindgen_lower_t481(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.refs.length()) mbt_ffi_store32(ptr + 0, address) @@ -8280,14 +9857,14 @@ fn __wit_bindgen_lower_t477(ptr : Int, value : @common.RefGroup) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t479(ptr : Int, value : @common.ImpliesC) -> Unit { +fn __wit_bindgen_lower_t485(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_t475(iter_base + 0, iter_elem) + __wit_bindgen_lower_t481(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 8, value.lhs.length()) mbt_ffi_store32(ptr + 4, address) @@ -8297,7 +9874,7 @@ fn __wit_bindgen_lower_t479(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_t475(iter_base + 0, iter_elem) + __wit_bindgen_lower_t481(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 20, value.rhs.length()) mbt_ffi_store32(ptr + 16, address0) @@ -8305,14 +9882,14 @@ fn __wit_bindgen_lower_t479(ptr : Int, value : @common.ImpliesC) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t480(ptr : Int, value : @common.ForbidsC) -> Unit { +fn __wit_bindgen_lower_t486(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_t475(iter_base + 0, iter_elem) + __wit_bindgen_lower_t481(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 8, value.lhs.length()) mbt_ffi_store32(ptr + 4, address) @@ -8321,7 +9898,7 @@ fn __wit_bindgen_lower_t480(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_t475(iter_base + 0, iter_elem) + __wit_bindgen_lower_t481(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 16, value.rhs.length()) mbt_ffi_store32(ptr + 12, address0) @@ -8329,7 +9906,7 @@ fn __wit_bindgen_lower_t480(ptr : Int, value : @common.ForbidsC) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t482(ptr : Int, value : @common.Constraint) -> Unit { +fn __wit_bindgen_lower_t488(ptr : Int, value : @common.Constraint) -> Unit { match value { RequiresAll(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -8338,7 +9915,7 @@ fn __wit_bindgen_lower_t482(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_t475(iter_base + 0, iter_elem) + __wit_bindgen_lower_t481(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 8, payload.length()) mbt_ffi_store32(ptr + 4, address) @@ -8352,7 +9929,7 @@ fn __wit_bindgen_lower_t482(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_t475(iter_base + 0, iter_elem) + __wit_bindgen_lower_t481(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 8, payload0.length()) mbt_ffi_store32(ptr + 4, address1) @@ -8366,7 +9943,7 @@ fn __wit_bindgen_lower_t482(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_t475(iter_base + 0, iter_elem) + __wit_bindgen_lower_t481(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 8, payload3.length()) mbt_ffi_store32(ptr + 4, address4) @@ -8380,7 +9957,7 @@ fn __wit_bindgen_lower_t482(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_t477(iter_base + 0, iter_elem) + __wit_bindgen_lower_t483(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 8, payload6.length()) mbt_ffi_store32(ptr + 4, address7) @@ -8389,13 +9966,13 @@ fn __wit_bindgen_lower_t482(ptr : Int, value : @common.Constraint) -> Unit { } Implies(payload9) => { mbt_ffi_store8(ptr + 0, 4) - __wit_bindgen_lower_t479(ptr + 4, payload9) + __wit_bindgen_lower_t485(ptr + 4, payload9) () } Forbids(payload10) => { mbt_ffi_store8(ptr + 0, 5) - __wit_bindgen_lower_t480(ptr + 4, payload10) + __wit_bindgen_lower_t486(ptr + 4, payload10) () } @@ -8404,7 +9981,7 @@ fn __wit_bindgen_lower_t482(ptr : Int, value : @common.Constraint) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t484(ptr : Int, value : @common.Example) -> Unit { +fn __wit_bindgen_lower_t490(ptr : Int, value : @common.Example) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.title) mbt_ffi_store32(ptr + 4, value.title.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -8416,7 +9993,7 @@ fn __wit_bindgen_lower_t484(ptr : Int, value : @common.Example) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t486(ptr : Int, value : @common.Doc) -> Unit { +fn __wit_bindgen_lower_t492(ptr : Int, value : @common.Doc) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.summary) mbt_ffi_store32(ptr + 4, value.summary.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -8429,7 +10006,7 @@ fn __wit_bindgen_lower_t486(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_t484(iter_base + 0, iter_elem) + __wit_bindgen_lower_t490(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 20, value.examples.length()) mbt_ffi_store32(ptr + 16, address) @@ -8437,11 +10014,11 @@ fn __wit_bindgen_lower_t486(ptr : Int, value : @common.Doc) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t489(ptr : Int, value : @common.Positional) -> Unit { +fn __wit_bindgen_lower_t495(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_t486(ptr + 8, value.doc) + __wit_bindgen_lower_t492(ptr + 8, value.doc) match value.value_name { None => { @@ -8469,21 +10046,22 @@ fn __wit_bindgen_lower_t489(ptr : Int, value : @common.Positional) -> Unit { } Some(payload4) => { mbt_ffi_store8(ptr + 48, 1) - __wit_bindgen_lower_t69(ptr + 52, payload4) + __wit_bindgen_lower_t73(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_t490(ptr : Int, value : @common.TailPositional) -> Unit { +fn __wit_bindgen_lower_t496(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_t486(ptr + 8, value.doc) + __wit_bindgen_lower_t492(ptr + 8, value.doc) match value.value_name { None => { @@ -8535,16 +10113,17 @@ fn __wit_bindgen_lower_t490(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_t493(ptr : Int, value : @common.Positionals) -> Unit { +fn __wit_bindgen_lower_t499(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_t489(iter_base + 0, iter_elem) + __wit_bindgen_lower_t495(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.fixed.length()) mbt_ffi_store32(ptr + 0, address) @@ -8557,7 +10136,7 @@ fn __wit_bindgen_lower_t493(ptr : Int, value : @common.Positionals) -> Unit { } Some(payload0) => { mbt_ffi_store8(ptr + 8, 1) - __wit_bindgen_lower_t490(ptr + 12, payload0) + __wit_bindgen_lower_t496(ptr + 12, payload0) () } @@ -8566,7 +10145,7 @@ fn __wit_bindgen_lower_t493(ptr : Int, value : @common.Positionals) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t496(ptr : Int, value : @common.OptionSpec) -> Unit { +fn __wit_bindgen_lower_t502(ptr : Int, value : @common.OptionSpec) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.long) mbt_ffi_store32(ptr + 4, value.long.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -8596,7 +10175,7 @@ fn __wit_bindgen_lower_t496(ptr : Int, value : @common.OptionSpec) -> Unit { } mbt_ffi_store32(ptr + 20, value.aliases.length()) mbt_ffi_store32(ptr + 16, address) - __wit_bindgen_lower_t486(ptr + 24, value.doc) + __wit_bindgen_lower_t492(ptr + 24, value.doc) match value.value_name { None => { @@ -8614,35 +10193,35 @@ fn __wit_bindgen_lower_t496(ptr : Int, value : @common.OptionSpec) -> Unit { () } } - __wit_bindgen_lower_t470(ptr + 60, value.shape) + __wit_bindgen_lower_t476(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_t69(ptr + 80, payload7) + mbt_ffi_store8(ptr + 80, 1) + __wit_bindgen_lower_t73(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) () } @@ -8651,7 +10230,7 @@ fn __wit_bindgen_lower_t496(ptr : Int, value : @common.OptionSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t497(ptr : Int, value : @common.FlagSpec) -> Unit { +fn __wit_bindgen_lower_t503(ptr : Int, value : @common.FlagSpec) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.long) mbt_ffi_store32(ptr + 4, value.long.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -8681,8 +10260,8 @@ fn __wit_bindgen_lower_t497(ptr : Int, value : @common.FlagSpec) -> Unit { } mbt_ffi_store32(ptr + 20, value.aliases.length()) mbt_ffi_store32(ptr + 16, address) - __wit_bindgen_lower_t486(ptr + 24, value.doc) - __wit_bindgen_lower_t473(ptr + 48, value.shape) + __wit_bindgen_lower_t492(ptr + 24, value.doc) + __wit_bindgen_lower_t479(ptr + 48, value.shape) match value.env_var { None => { @@ -8704,12 +10283,12 @@ fn __wit_bindgen_lower_t497(ptr : Int, value : @common.FlagSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t500(ptr : Int, value : @common.Globals) -> Unit { - let address = mbt_ffi_malloc(value.options.length() * 108) +fn __wit_bindgen_lower_t506(ptr : Int, value : @common.Globals) -> Unit { + 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_t496(iter_base + 0, iter_elem) + let iter_base = address + index * 112 + __wit_bindgen_lower_t502(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.options.length()) mbt_ffi_store32(ptr + 0, address) @@ -8718,7 +10297,7 @@ fn __wit_bindgen_lower_t500(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_t497(iter_base + 0, iter_elem) + __wit_bindgen_lower_t503(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 12, value.flags.length()) mbt_ffi_store32(ptr + 8, address0) @@ -8726,8 +10305,8 @@ fn __wit_bindgen_lower_t500(ptr : Int, value : @common.Globals) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t501(ptr : Int, value : @common.StreamSpec) -> Unit { - __wit_bindgen_lower_t486(ptr + 0, value.doc) +fn __wit_bindgen_lower_t507(ptr : Int, value : @common.StreamSpec) -> Unit { + __wit_bindgen_lower_t492(ptr + 0, value.doc) let address = mbt_ffi_malloc(value.mime.length() * 8) for index = 0; index < value.mime.length(); index = index + 1 { @@ -8745,24 +10324,24 @@ fn __wit_bindgen_lower_t501(ptr : Int, value : @common.StreamSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t502(ptr : Int, value : @common.Formatter) -> Unit { +fn __wit_bindgen_lower_t508(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_t486(ptr + 8, value.doc) + __wit_bindgen_lower_t492(ptr + 8, value.doc) } ///| #doc(hidden) -fn __wit_bindgen_lower_t504(ptr : Int, value : @common.ResultSpec) -> Unit { +fn __wit_bindgen_lower_t510(ptr : Int, value : @common.ResultSpec) -> Unit { mbt_ffi_store32(ptr + 0, value.type_) - __wit_bindgen_lower_t486(ptr + 4, value.doc) + __wit_bindgen_lower_t492(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_t502(iter_base + 0, iter_elem) + __wit_bindgen_lower_t508(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 32, value.formatters.length()) mbt_ffi_store32(ptr + 28, address) @@ -8774,11 +10353,11 @@ fn __wit_bindgen_lower_t504(ptr : Int, value : @common.ResultSpec) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t506(ptr : Int, value : @common.ErrorCase) -> Unit { +fn __wit_bindgen_lower_t512(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_t486(ptr + 8, value.doc) + __wit_bindgen_lower_t492(ptr + 8, value.doc) mbt_ffi_store8(ptr + 32, value.kind.ordinal()) mbt_ffi_store8(ptr + 33, value.exit_code.to_int()) @@ -8799,14 +10378,14 @@ fn __wit_bindgen_lower_t506(ptr : Int, value : @common.ErrorCase) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t512(ptr : Int, value : @common.CommandBody) -> Unit { - __wit_bindgen_lower_t493(ptr + 0, value.positionals) +fn __wit_bindgen_lower_t518(ptr : Int, value : @common.CommandBody) -> Unit { + __wit_bindgen_lower_t499(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_t496(iter_base + 0, iter_elem) + let iter_base = address + index * 112 + __wit_bindgen_lower_t502(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 92, value.options.length()) mbt_ffi_store32(ptr + 88, address) @@ -8815,7 +10394,7 @@ fn __wit_bindgen_lower_t512(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_t497(iter_base + 0, iter_elem) + __wit_bindgen_lower_t503(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 100, value.flags.length()) mbt_ffi_store32(ptr + 96, address0) @@ -8824,7 +10403,7 @@ fn __wit_bindgen_lower_t512(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_t482(iter_base + 0, iter_elem) + __wit_bindgen_lower_t488(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 108, value.constraints.length()) mbt_ffi_store32(ptr + 104, address2) @@ -8837,7 +10416,7 @@ fn __wit_bindgen_lower_t512(ptr : Int, value : @common.CommandBody) -> Unit { } Some(payload4) => { mbt_ffi_store8(ptr + 112, 1) - __wit_bindgen_lower_t501(ptr + 116, payload4) + __wit_bindgen_lower_t507(ptr + 116, payload4) () } @@ -8851,7 +10430,7 @@ fn __wit_bindgen_lower_t512(ptr : Int, value : @common.CommandBody) -> Unit { } Some(payload6) => { mbt_ffi_store8(ptr + 152, 1) - __wit_bindgen_lower_t501(ptr + 156, payload6) + __wit_bindgen_lower_t507(ptr + 156, payload6) () } @@ -8865,7 +10444,7 @@ fn __wit_bindgen_lower_t512(ptr : Int, value : @common.CommandBody) -> Unit { } Some(payload8) => { mbt_ffi_store8(ptr + 192, 1) - __wit_bindgen_lower_t504(ptr + 196, payload8) + __wit_bindgen_lower_t510(ptr + 196, payload8) () } @@ -8875,7 +10454,7 @@ fn __wit_bindgen_lower_t512(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_t506(iter_base + 0, iter_elem) + __wit_bindgen_lower_t512(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 244, value.errors.length()) mbt_ffi_store32(ptr + 240, address9) @@ -8888,7 +10467,7 @@ fn __wit_bindgen_lower_t512(ptr : Int, value : @common.CommandBody) -> Unit { } Some(payload12) => { mbt_ffi_store8(ptr + 248, 1) - __wit_bindgen_lower_t467(ptr + 249, payload12) + __wit_bindgen_lower_t471(ptr + 249, payload12) () } @@ -8897,7 +10476,7 @@ fn __wit_bindgen_lower_t512(ptr : Int, value : @common.CommandBody) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t515(ptr : Int, value : @common.CommandNode) -> Unit { +fn __wit_bindgen_lower_t521(ptr : Int, value : @common.CommandNode) -> Unit { let ptr0 = mbt_ffi_str2ptr(value.name) mbt_ffi_store32(ptr + 4, value.name.length()) mbt_ffi_store32(ptr + 0, ptr0) @@ -8913,8 +10492,8 @@ fn __wit_bindgen_lower_t515(ptr : Int, value : @common.CommandNode) -> Unit { } mbt_ffi_store32(ptr + 12, value.aliases.length()) mbt_ffi_store32(ptr + 8, address) - __wit_bindgen_lower_t486(ptr + 16, value.doc) - __wit_bindgen_lower_t500(ptr + 40, value.globals) + __wit_bindgen_lower_t492(ptr + 16, value.doc) + __wit_bindgen_lower_t506(ptr + 40, value.globals) let address2 = mbt_ffi_malloc(value.subcommands.length() * 4) for index3 = 0; index3 < value.subcommands.length(); index3 = index3 + 1 { @@ -8933,7 +10512,7 @@ fn __wit_bindgen_lower_t515(ptr : Int, value : @common.CommandNode) -> Unit { } Some(payload4) => { mbt_ffi_store8(ptr + 64, 1) - __wit_bindgen_lower_t512(ptr + 68, payload4) + __wit_bindgen_lower_t518(ptr + 68, payload4) () } @@ -8942,12 +10521,12 @@ fn __wit_bindgen_lower_t515(ptr : Int, value : @common.CommandNode) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t517(ptr : Int, value : @common.CommandTree) -> Unit { +fn __wit_bindgen_lower_t523(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_t515(iter_base + 0, iter_elem) + __wit_bindgen_lower_t521(iter_base + 0, iter_elem) } mbt_ffi_store32(ptr + 4, value.nodes.length()) mbt_ffi_store32(ptr + 0, address) @@ -8955,17 +10534,17 @@ fn __wit_bindgen_lower_t517(ptr : Int, value : @common.CommandTree) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t518(ptr : Int, value : @common.Tool) -> Unit { +fn __wit_bindgen_lower_t524(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_t517(ptr + 8, value.commands) - __wit_bindgen_lower_t52(ptr + 16, value.schema) + __wit_bindgen_lower_t523(ptr + 8, value.commands) + __wit_bindgen_lower_t56(ptr + 16, value.schema) } ///| #doc(hidden) -fn __wit_bindgen_lower_t519(ptr : Int, value : @common.ToolError) -> Unit { +fn __wit_bindgen_lower_t525(ptr : Int, value : @common.ToolError) -> Unit { match value { InvalidToolName(payload) => { mbt_ffi_store8(ptr + 0, 0) @@ -9022,7 +10601,7 @@ fn __wit_bindgen_lower_t519(ptr : Int, value : @common.ToolError) -> Unit { } CustomError(payload9) => { mbt_ffi_store8(ptr + 0, 5) - __wit_bindgen_lower_t70(ptr + 4, payload9) + __wit_bindgen_lower_t74(ptr + 4, payload9) () } @@ -9031,7 +10610,7 @@ fn __wit_bindgen_lower_t519(ptr : Int, value : @common.ToolError) -> Unit { ///| #doc(hidden) -fn __wit_bindgen_lower_t523( +fn __wit_bindgen_lower_t529( ptr : Int, value : @common.InvocationResult, ) -> Unit { @@ -9043,7 +10622,7 @@ fn __wit_bindgen_lower_t523( } Some(payload0) => { mbt_ffi_store8(ptr + 0, 1) - __wit_bindgen_lower_t70(ptr + 4, payload0) + __wit_bindgen_lower_t74(ptr + 4, payload0) () } @@ -9067,57 +10646,60 @@ fn __wit_bindgen_lower_t523( } ///| -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_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) + +///| +#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_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_load16_u(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load16_u) ///| -extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array8 - #| local.get 0) +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_store64(offset : Int, value : Int64) = #|(func (param i32) (param i64) local.get 0 local.get 1 i64.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_store16(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) ///| extern "wasm" fn mbt_ffi_free(position : Int) = #|(func (param i32) local.get 0 call $moonbit.decref) ///| -extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = - #|(func (param i32) (result i64) local.get 0 i64.load) - -///| -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_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_load32(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.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_load8(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load8_s) -///| -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_loadf64(offset : Int) -> Double = #|(func (param i32) (result f64) local.get 0 f64.load) @@ -9128,39 +10710,36 @@ 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_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_extend16(value : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.extend16_s) ///| -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_store32(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) ///| 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_extend8(value : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.extend8_s) +extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = + #|(func (param i32) (result i64) local.get 0 i64.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_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| local.get 0) ///| -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_store8(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) ///| -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_loadf32(offset : Int) -> Float = + #|(func (param i32) (result f32) local.get 0 f32.load) + +///| +extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) diff --git a/sdks/moonbit/golem_sdk/interface/golem/agent/host/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/agent/host/ffi.mbt index 59a00449e9..e679e62d6f 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/agent/host/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/agent/host/ffi.mbt @@ -136,47 +136,33 @@ fn wasmImportGetConfigValue( ) = "golem:agent/host@2.0.0" "get-config-value" ///| -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_load16_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load16_u) - -///| -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_store16(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) ///| -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_loadf32(offset : Int) -> Float = + #|(func (param i32) (result f32) local.get 0 f32.load) ///| -extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_u) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) ///| 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_loadf32(offset : Int) -> Float = - #|(func (param i32) (result f32) local.get 0 f32.load) - -///| -extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = - #|(func (param i32) (result i64) local.get 0 i64.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_load8(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_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_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array8 - #| local.get 0) +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_malloc(size : Int) -> Int = @@ -186,50 +172,64 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| local.get 1) ///| -#owned(str) -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_load16_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_u) ///| -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_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_store8(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +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_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_load16(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load16_s) -///| -extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) - ///| extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = #|(func (param i32) (result f64) local.get 0 f64.load) +///| +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_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| local.get 0) + +///| +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) + +///| +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_storef64(offset : Int, value : Double) = #|(func (param i32) (param f64) local.get 0 local.get 1 f64.store) ///| -extern "wasm" fn mbt_ffi_extend16(value : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.extend16_s) +#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_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) 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 77d9891f8e..74226a6d9c 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/agent/host/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/agent/host/top.mbt @@ -49,11 +49,11 @@ 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), @@ -70,18523 +70,26762 @@ pub fn get_all_agent_types() -> Array[@common.RegisteredAgentType] { 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)) 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 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 + 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 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() + } - let result2 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted) + } + _ => panic() + } - let lifted : 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 lifted4 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted3 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result3) + Option::Some(lifted3) + } + _ => 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 + let lifted6 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result5 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let result4 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result5) + } + _ => panic() + } - array.push(result4) + Option::Some(@types.NumericRestrictions::{ + min: lifted2, + max: lifted4, + unit: lifted6, + }) } - 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 + _ => panic() + } - let result5 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::S8Type(lifted7) + } + 3 => { + let lifted14 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted9 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted8 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array6.push(result5) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + Option::Some(lifted8) + } + _ => panic() + } - let lifted9 : 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 lifted11 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted10 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result8) + Option::Some(lifted10) + } + _ => panic() } - _ => panic() - } - let lifted12 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { - 0 => Option::None - 1 => { - let lifted11 = match mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result10 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), - ) + 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), + ) - @types.Role::Other(result10) - } - _ => panic() + Option::Some(result12) } - - Option::Some(lifted11) + _ => 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 => { - 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 result15 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 4 => { + let lifted21 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted16 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted15 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 lifted16 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + Option::Some(lifted15) + } + _ => panic() + } - let lifted18 : 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 lifted18 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted17 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result17) + Option::Some(lifted17) + } + _ => 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 lifted20 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result19 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let result19 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result19) + } + _ => panic() + } - array20.push(result19) + Option::Some(@types.NumericRestrictions::{ + min: lifted16, + max: lifted18, + unit: lifted20, + }) } - 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 + _ => panic() + } - let result22 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::S32Type(lifted21) + } + 5 => { + let lifted28 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted23 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted22 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array23.push(result22) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + Option::Some(lifted22) + } + _ => panic() + } - let lifted26 : 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 lifted25 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted24 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result25) + Option::Some(lifted24) + } + _ => panic() } - _ => panic() - } - let lifted29 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted28 = match mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result27 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + let lifted27 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result26 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.Role::Other(result27) - } - _ => panic() + Option::Some(result26) } - - Option::Some(lifted28) + _ => panic() } - _ => panic() - } - array30.push(@types.VariantCaseType::{ - name: result15, - payload: lifted16, - metadata: @types.MetadataEnvelope::{ - doc: lifted18, - aliases: array20, - examples: array23, - deprecated: lifted26, - role: lifted29, - }, - }) + Option::Some(@types.NumericRestrictions::{ + min: lifted23, + max: lifted25, + unit: lifted27, + }) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array30) + @types.SchemaTypeBody::S64Type(lifted28) } - 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 + 6 => { + let lifted35 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted30 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted29 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result32 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted29) + } + _ => panic() + } - array33.push(result32) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::EnumType(array33) - } - 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 result35 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array36.push(result35) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted32 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted31 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::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.SchemaTypeBody::FlagsType(array36) - } - 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 + Option::Some(lifted31) + } + _ => panic() + } - array38.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted34 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result33 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.SchemaTypeBody::TupleType(array38) - } - 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 lifted40 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + Option::Some(result33) + } + _ => panic() + } - let lifted41 : Int? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + Option::Some(@types.NumericRestrictions::{ + min: lifted30, + max: lifted32, + unit: lifted34, + }) + } _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted40, - err: lifted41, - }) + @types.SchemaTypeBody::U8Type(lifted35) } - 24 => { - let lifted45 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { + 7 => { + let lifted42 : @types.NumericRestrictions? = 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 result42 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted37 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted36 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array43.push(result42) + Option::Some(lifted36) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array43) - } - _ => panic() - } + let lifted39 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted38 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let lifted46 : 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() - } + Option::Some(lifted38) + } + _ => panic() + } - let lifted47 : 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 lifted41 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result40 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let lifted49 : 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), - ) + Option::Some(result40) + } + _ => panic() + } - Option::Some(result48) + Option::Some(@types.NumericRestrictions::{ + min: lifted37, + max: lifted39, + unit: lifted41, + }) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted45, - min_length: lifted46, - max_length: lifted47, - regex: lifted49, - }) + @types.SchemaTypeBody::U16Type(lifted42) } - 25 => { - let lifted53 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { + 8 => { + let lifted49 : @types.NumericRestrictions? = 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 lifted44 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted43 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result50 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted43) + } + _ => panic() + } - array51.push(result50) + let lifted46 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted45 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_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() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array51) - } - _ => panic() - } + let lifted48 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result47 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let lifted54 : 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() - } + Option::Some(result47) + } + _ => panic() + } - let lifted55 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { - 0 => Option::None - 1 => - Option::Some(mbt_ffi_load32(iter_base + 32).reinterpret_as_uint()) + Option::Some(@types.NumericRestrictions::{ + min: lifted44, + max: lifted46, + unit: lifted48, + }) + } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted53, - min_bytes: lifted54, - max_bytes: lifted55, - }) + @types.SchemaTypeBody::U32Type(lifted49) } - 26 => { - let lifted59 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 12) { + 9 => { + let lifted56 : @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 result56 = 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 => { + let lifted50 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array57.push(result56) + Option::Some(lifted50) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array57) - } - _ => panic() - } + let lifted53 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted52 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let lifted63 : 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 + Option::Some(lifted52) + } + _ => panic() + } - let result60 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted55 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result54 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - array61.push(result60) + Option::Some(result54) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array61) + Option::Some(@types.NumericRestrictions::{ + min: lifted51, + max: lifted53, + unit: lifted55, + }) } _ => 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::U64Type(lifted56) } - 27 => { - let lifted67 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { + 10 => { + let lifted63 : @types.NumericRestrictions? = 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 result64 = 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 lifted57 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array65.push(result64) + Option::Some(lifted57) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array65) - } - _ => panic() - } + let lifted60 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted59 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let lifted71 : 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 + Option::Some(lifted59) + } + _ => panic() + } - let result68 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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), + ) - array69.push(result68) + Option::Some(result61) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array69) + Option::Some(@types.NumericRestrictions::{ + min: lifted58, + max: lifted60, + unit: lifted62, + }) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted67, - allowed_hosts: lifted71, - }) + @types.SchemaTypeBody::F32Type(lifted63) } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result72 = 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 + 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 => + @types.NumericBound::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 result73 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted64) + } + _ => panic() + } - array74.push(result73) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + 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() + } - let lifted77 : @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), - ) + Option::Some(lifted66) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 32), - scale: mbt_ffi_load32(iter_base + 40), - unit: result76, - }) - } - _ => panic() - } + 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), + ) - let lifted79 : @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), - ) + Option::Some(result68) + } + _ => 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: lifted65, + max: lifted67, + unit: lifted69, }) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result72, - allowed_suffixes: array74, - min: lifted77, - max: lifted79, - }) + @types.SchemaTypeBody::F64Type(lifted70) } - 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 + 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 result80 = mbt_ffi_ptr2str( + let result71 = 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) { - 0 => { - let result81 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - - @types.DiscriminatorRule::Prefix(result81) - } + let lifted73 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None 1 => { - let result82 = mbt_ffi_ptr2str( + let result72 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result82) + Option::Some(result72) } - 2 => { - let result83 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + _ => panic() + } - @types.DiscriminatorRule::Contains(result83) - } - 3 => { - let result84 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), + 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 result74 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array.push(result74) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + 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 result75 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array76.push(result75) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + + let lifted79 : String? = match mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result78 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), ) - @types.DiscriminatorRule::Regex(result84) + Option::Some(result78) } - 4 => { - let result85 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + _ => panic() + } - let lifted87 : 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 lifted82 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted81 = match mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result80 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), ) - Option::Some(result86) + @types.Role::Other(result80) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result85, - literal: lifted87, - }) + Option::Some(lifted81) } - 5 => { - let result88 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + _ => panic() + } - @types.DiscriminatorRule::FieldAbsent(result88) - } + 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::RecordType(array83) + } + 15 => { + 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 result85 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted86 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted91 : String? = match mbt_ffi_load8_u(iter_base + 36) { + let lifted88 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result90 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), + let result87 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), ) - Option::Some(result90) + Option::Some(result87) } _ => 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 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 result92 = mbt_ffi_ptr2str( + let result89 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array93.push(result92) + array90.push(result89) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - 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 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 result95 = mbt_ffi_ptr2str( + let result92 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array96.push(result95) + array93.push(result92) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted99 : String? = match mbt_ffi_load8_u(iter_base + 64) { + let lifted96 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result98 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), + let result95 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), ) - Option::Some(result98) + Option::Some(result95) } _ => panic() } - let lifted102 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { + let lifted99 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted101 = match mbt_ffi_load8_u(iter_base + 80) { + let lifted98 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result100 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), + let result97 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result100) + @types.Role::Other(result97) } _ => panic() } - Option::Some(lifted101) + Option::Some(lifted98) } _ => panic() } - array103.push(@types.UnionBranch::{ - tag: result80, - body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted89, + array100.push(@types.VariantCaseType::{ + name: result85, + payload: lifted86, metadata: @types.MetadataEnvelope::{ - doc: lifted91, - aliases: array93, - examples: array96, - deprecated: lifted99, - role: lifted102, + doc: lifted88, + aliases: array90, + examples: array93, + deprecated: lifted96, + role: lifted99, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array103, - }) + @types.SchemaTypeBody::VariantType(array100) } - 32 => { - let lifted106 : String? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result105 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 16 => { + 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 - Option::Some(result105) - } - _ => panic() + let result102 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array103.push(result102) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted106, - }) + @types.SchemaTypeBody::EnumType(array103) } - 33 => { - let lifted108 : 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), - ) + 17 => { + 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 - Option::Some(result107) - } - _ => panic() - } + let result105 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted108, - }) - } - 34 => { - let lifted109 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + array106.push(result105) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FutureType(lifted109) + @types.SchemaTypeBody::FlagsType(array106) } - 35 => { - let lifted110 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + 18 => { + 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 + + array108.push(mbt_ffi_load32(iter_base + 0)) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::StreamType(lifted110) + @types.SchemaTypeBody::TupleType(array108) } - _ => 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() - } - - 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 + 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 lifted110 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - let result114 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted111 : Int? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + _ => panic() + } - array115.push(result114) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ + ok: lifted110, + err: lifted111, + }) + } + 24 => { + let lifted115 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 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 result112 = 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), - ) + array113.push(result112) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - array118.push(result117) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + Option::Some(array113) + } + _ => panic() + } - let lifted121 : 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 lifted116 : 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() + } - Option::Some(result120) - } - _ => panic() - } + let lifted117 : 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 lifted124 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted123 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result122 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), + let lifted119 : String? = match mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result118 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), ) - @types.Role::Other(result122) + Option::Some(result118) } _ => panic() } - Option::Some(lifted123) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted115, + min_length: lifted116, + max_length: lifted117, + regex: lifted119, + }) } - _ => 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)) + 25 => { + let lifted123 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 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 + let result120 = 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), - ) + array121.push(result120) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - let lifted129 : 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), - ) + Option::Some(array121) + } + _ => panic() + } - Option::Some(result128) - } - _ => panic() - } + let lifted124 : 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() + } - array130.push(@types.SchemaTypeDef::{ - id: result127, - name: lifted129, - body: mbt_ffi_load32(iter_base + 20), - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + 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() + } - let lifted133 : String? = match mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result132 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ + mime_types: lifted123, + min_bytes: lifted124, + max_bytes: lifted125, + }) + } + 26 => { + let lifted129 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + 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 - Option::Some(result132) - } - _ => panic() - } + let result126 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let result134 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 56), - mbt_ffi_load32(iter_base + 60), - ) + array127.push(result126) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted136 : String? = match mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result135 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), - ) + Option::Some(array127) + } + _ => panic() + } - Option::Some(result135) - } - _ => panic() - } + 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 lifted154 = match mbt_ffi_load8_u(iter_base + 76) { - 0 => { - 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 + let result130 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let result137 = 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)) - let lifted138 = 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)), - ) + Option::Some(array131) + } _ => panic() } - let lifted140 : String? = match mbt_ffi_load8_u(iter_base + 16) { + @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 lifted137 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result139 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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 result134 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(result139) + array135.push(result134) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array135) } _ => 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 lifted141 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 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 - let result141 = 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), + ) - array142.push(result141) + array139.push(result138) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + Option::Some(array139) + } + _ => panic() } - 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 + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted137, + allowed_hosts: lifted141, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result142 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + 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 result144 = mbt_ffi_ptr2str( + let result143 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array145.push(result144) + array144.push(result143) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted148 : String? = match mbt_ffi_load8_u(iter_base + 44) { + let lifted147 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result147 = mbt_ffi_ptr2str( + let result146 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), ) - Option::Some(result147) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result146, + }) } _ => panic() } - let lifted151 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { + let lifted149 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { 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 => { - let result149 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) - - @types.Role::Other(result149) - } - _ => panic() - } + let result148 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 76), + mbt_ffi_load32(iter_base + 80), + ) - Option::Some(lifted150) - } - _ => 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, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) - - @common.InputSchema::Parameters(array152) - } - _ => panic() - } - - 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 result155 = 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 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 lifted158 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => @common.HttpMethod::Get - 1 => @common.HttpMethod::Head - 2 => @common.HttpMethod::Post - 3 => @common.HttpMethod::Put - 4 => @common.HttpMethod::Delete - 5 => @common.HttpMethod::Connect - 6 => @common.HttpMethod::Options - 7 => @common.HttpMethod::Trace - 8 => @common.HttpMethod::Patch - 9 => { - let result157 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) - - @common.HttpMethod::Custom(result157) - } - _ => 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 lifted162 = 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), - ) - - @common.PathSegment::Literal(result159) - } - 1 => - @common.PathSegment::SystemVariable( - @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), - ) - 2 => { - let result160 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) - - @common.PathSegment::PathVariable(@common.PathVariable::{ - variable_name: result160, - }) - } - 3 => { - let result161 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) - - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ - variable_name: result161, + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 64), + scale: mbt_ffi_load32(iter_base + 72), + unit: result148, }) } _ => panic() } - array163.push(lifted162) - } - 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 result165 = 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), - ) - - array167.push(@common.HeaderVariable::{ - header_name: result165, - variable_name: result166, - }) - } - 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 result169 = 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), - ) - - array171.push(@common.QueryVariable::{ - query_param_name: result169, - variable_name: result170, + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result142, + allowed_suffixes: array144, + min: lifted147, + max: lifted149, }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - - let lifted173 : @common.AuthDetails? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => - Option::Some(@common.AuthDetails::{ - required: mbt_ffi_load8_u(iter_base + 37) != 0, - }) - _ => panic() - } + 31 => { + 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 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 result150 = 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 + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted159 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result151 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - array175.push(result174) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) + @types.DiscriminatorRule::Prefix(result151) + } + 1 => { + let result152 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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)) + @types.DiscriminatorRule::Suffix(result152) + } + 2 => { + let result153 = 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 => { - let result179 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) + @types.DiscriminatorRule::Contains(result153) + } + 3 => { + let result154 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - Option::Some(result179) - } - _ => panic() - } + @types.DiscriminatorRule::Regex(result154) + } + 4 => { + let result155 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let lifted198 = 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 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), + ) - let result181 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result156) + } + _ => panic() + } - let lifted182 = 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)), + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result155, + literal: lifted157, + }) + } + 5 => { + 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( + 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( + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 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), + array173.push(@types.UnionBranch::{ + tag: result150, + body: mbt_ffi_load32(iter_base + 8), + discriminator: lifted159, metadata: @types.MetadataEnvelope::{ - doc: lifted184, - aliases: array186, - examples: array189, - deprecated: lifted192, - role: lifted195, + 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 lifted176 : 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 lifted199 = match mbt_ffi_load8_u(iter_base + 48) { - 0 => @common.OutputSchema::Unit - 1 => @common.OutputSchema::Single(mbt_ffi_load32(iter_base + 52)) - _ => panic() - } + Option::Some(result175) + } + _ => panic() + } - let lifted201 : @common.ReadOnlyConfig? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted200 = match mbt_ffi_load8_u(iter_base + 64) { - 0 => @common.CachePolicy::NoCache - 1 => @common.CachePolicy::UntilWrite - 2 => - @common.CachePolicy::Ttl( - mbt_ffi_load64(iter_base + 72).reinterpret_as_uint64(), + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted176, + }) + } + 33 => { + let lifted178 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result177 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), ) + + Option::Some(result177) + } _ => panic() } - Option::Some(@common.ReadOnlyConfig::{ - cache_policy: lifted200, - uses_principal: mbt_ffi_load8_u(iter_base + 80) != 0, + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted178, }) } + 34 => { + let lifted179 : 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(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() + } + + @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 lifted183 : String? = match mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result182 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) - let result204 = mbt_ffi_ptr2str( + Option::Some(result182) + } + _ => panic() + } + + 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 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 + 100)) + + 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 + + let result187 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + 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() + } + + let lifted194 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted193 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 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, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + 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 result197 = 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 lifted199 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result205 = mbt_ffi_ptr2str( + let result198 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result205) + Option::Some(result198) } _ => 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 lifted319 = 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 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 + 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 result207 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted203 : String? = match mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result202 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) - 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(result202) + } + _ => panic() + } - Option::Some(result208) - } - _ => panic() - } + let result204 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 56), + mbt_ffi_load32(iter_base + 60), + ) - 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 lifted206 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result205 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let result210 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result205) + } + _ => panic() + } - array211.push(result210) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + let lifted224 = match mbt_ffi_load8_u(iter_base + 76) { + 0 => { + 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 - 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 result207 = 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), - ) + let lifted208 = 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() + } - array214.push(result213) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + let lifted210 : String? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result209 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - let lifted217 : String? = match mbt_ffi_load8_u(iter_base + 40) { - 0 => Option::None - 1 => { - let result216 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + Option::Some(result209) + } + _ => panic() + } - Option::Some(result216) - } - _ => 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 lifted220 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { - 0 => Option::None - 1 => { - let lifted219 = match mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result218 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), - ) + let result211 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.Role::Other(result218) - } - _ => panic() - } + array212.push(result211) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(lifted219) - } - _ => panic() - } + 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 - 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 result214 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaTypeBody::RecordType(array221) + array215.push(result214) } - 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 + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let result223 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + let lifted218 : String? = match mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result217 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), ) - let lifted224 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + Option::Some(result217) + } + _ => panic() + } - let lifted226 : 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 lifted221 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted220 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result219 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), ) - Option::Some(result225) + @types.Role::Other(result219) } _ => 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(lifted220) + } + _ => panic() + } - let result227 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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)) - array228.push(result227) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + @common.InputSchema::Parameters(array222) + } + _ => panic() + } - 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 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 - let result230 = 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), + ) - array231.push(result230) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + let result226 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let lifted234 : String? = match mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result233 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + 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 - Option::Some(result233) - } - _ => panic() - } + let lifted228 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @common.HttpMethod::Get + 1 => @common.HttpMethod::Head + 2 => @common.HttpMethod::Post + 3 => @common.HttpMethod::Put + 4 => @common.HttpMethod::Delete + 5 => @common.HttpMethod::Connect + 6 => @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), + ) - 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 => { - let result235 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + @common.HttpMethod::Custom(result227) + } + _ => panic() + } - @types.Role::Other(result235) - } - _ => 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 - Option::Some(lifted236) - } - _ => panic() - } + 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), + ) - array238.push(@types.VariantCaseType::{ - name: result223, - payload: lifted224, - metadata: @types.MetadataEnvelope::{ - doc: lifted226, - aliases: array228, - examples: array231, - deprecated: lifted234, - role: lifted237, - }, - }) + @common.PathSegment::Literal(result229) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::VariantType(array238) - } - 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 - - let result240 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), + 1 => + @common.PathSegment::SystemVariable( + @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), + ) + 2 => { + let result230 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), ) - array241.push(result240) + @common.PathSegment::PathVariable(@common.PathVariable::{ + variable_name: result230, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::EnumType(array241) - } - 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 - - let result243 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), + 3 => { + let result231 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), ) - array244.push(result243) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ + variable_name: result231, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::FlagsType(array244) + _ => panic() } - 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)) + array233.push(lifted232) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - @types.SchemaTypeBody::TupleType(array246) - } - 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 lifted248 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + 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 lifted249 : Int? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) - _ => panic() - } + let result235 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted248, - err: lifted249, + let result236 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + array237.push(@common.HeaderVariable::{ + header_name: result235, + variable_name: result236, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 20)) + + 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 result239 = 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 + 8), + mbt_ffi_load32(iter_base + 12), + ) + + 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 => + Option::Some(@common.AuthDetails::{ + required: mbt_ffi_load8_u(iter_base + 37) != 0, }) - } - 24 => { - let lifted253 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - 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 + _ => panic() + } - let result250 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array251.push(result250) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + let result244 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(array251) - } - _ => panic() - } + array245.push(result244) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let lifted254 : 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() - } + 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 lifted255 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { - 0 => Option::None + let lifted250 : 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), + ) + + Option::Some(result249) + } + _ => panic() + } + + let lifted268 = match mbt_ffi_load8_u(iter_base + 36) { + 0 => { + 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 + + let result251 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted252 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => @common.FieldSource::UserSupplied 1 => - Option::Some( - mbt_ffi_load32(iter_base + 32).reinterpret_as_uint(), + @common.FieldSource::AutoInjected( + @common.AutoInjectedKind::from(mbt_ffi_load8_u(iter_base + 9)), ) _ => panic() } - let lifted257 : String? = match mbt_ffi_load8_u(iter_base + 36) { + let lifted254 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result256 = 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 + 20), + mbt_ffi_load32(iter_base + 24), ) - Option::Some(result256) + Option::Some(result253) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted253, - min_length: lifted254, - max_length: lifted255, - regex: lifted257, - }) - } - 25 => { - let lifted261 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 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 - - let result258 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array259.push(result258) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + let result255 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(array259) - } - _ => panic() + array256.push(result255) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - 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 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 lifted263 : 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 result258 = 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 + 36)) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted261, - min_bytes: lifted262, - max_bytes: lifted263, - }) - } - 26 => { - let lifted267 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 12) { + let lifted262 : String? = match mbt_ffi_load8_u(iter_base + 44) { 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 - - let result264 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array265.push(result264) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + let result261 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) - Option::Some(array265) + Option::Some(result261) } _ => panic() } - let lifted271 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 24) { + let lifted265 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 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 - - let result268 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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), + ) - array269.push(result268) + @types.Role::Other(result263) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array269) + Option::Some(lifted264) } _ => 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, + 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, + }, }) } - 27 => { - let lifted275 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 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 + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let result272 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @common.InputSchema::Parameters(array266) + } + _ => panic() + } - array273.push(result272) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + let lifted269 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => @common.OutputSchema::Unit + 1 => @common.OutputSchema::Single(mbt_ffi_load32(iter_base + 52)) + _ => panic() + } - Option::Some(array273) - } - _ => 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 lifted271 : @common.ReadOnlyConfig? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted270 = match mbt_ffi_load8_u(iter_base + 64) { + 0 => @common.CachePolicy::NoCache + 1 => @common.CachePolicy::UntilWrite + 2 => + @common.CachePolicy::Ttl( + mbt_ffi_load64(iter_base + 72).reinterpret_as_uint64(), + ) + _ => panic() + } - let result276 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(@common.ReadOnlyConfig::{ + cache_policy: lifted270, + uses_principal: mbt_ffi_load8_u(iter_base + 80) != 0, + }) + } + _ => panic() + } - array277.push(result276) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + 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(array277) - } - _ => 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.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted275, - allowed_hosts: lifted279, - }) - } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result280 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let result274 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 lifted276 : String? = 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 result281 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result275) + } + _ => panic() + } - array282.push(result281) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + 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 lifted285 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { + let lifted459 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @types.SchemaTypeBody::RefType(mbt_ffi_load32(iter_base + 8)) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted283 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result284 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + let lifted278 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted277 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 32), - scale: mbt_ffi_load32(iter_base + 40), - unit: result284, - }) - } - _ => panic() - } + Option::Some(lifted277) + } + _ => panic() + } - let lifted287 : @types.QuantityValue? = 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 lifted280 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted279 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).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(lifted279) + } + _ => panic() + } + + let lifted282 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result281 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result281) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted278, + max: lifted280, + unit: lifted282, }) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result280, - allowed_suffixes: array282, - min: lifted285, - max: lifted287, - }) + @types.SchemaTypeBody::S8Type(lifted283) } - 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 => { - let result289 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 3 => { + let lifted290 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted285 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted284 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - @types.DiscriminatorRule::Prefix(result289) + Option::Some(lifted284) + } + _ => panic() } - 1 => { - let result290 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - @types.DiscriminatorRule::Suffix(result290) - } - 2 => { - let result291 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted287 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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() + } - @types.DiscriminatorRule::Contains(result291) + Option::Some(lifted286) + } + _ => panic() } - 3 => { - let result292 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - @types.DiscriminatorRule::Regex(result292) + 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() } - 4 => { - let result293 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - let lifted295 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result294 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) + Option::Some(@types.NumericRestrictions::{ + min: lifted285, + max: lifted287, + unit: lifted289, + }) + } + _ => panic() + } - Option::Some(result294) + @types.SchemaTypeBody::S16Type(lifted290) + } + 4 => { + let lifted297 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted292 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted291 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result293, - literal: lifted295, - }) + Option::Some(lifted291) + } + _ => panic() } - 5 => { - let result296 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - @types.DiscriminatorRule::FieldAbsent(result296) + let lifted294 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted293 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted293) + } + _ => panic() } - _ => panic() - } - let lifted299 : String? = match mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result298 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + let lifted296 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result295 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - Option::Some(result298) + Option::Some(result295) + } + _ => panic() } - _ => 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 result300 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array301.push(result300) + Option::Some(@types.NumericRestrictions::{ + min: lifted292, + max: lifted294, + unit: lifted296, + }) } - 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 + _ => panic() + } - let result303 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @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 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() + } - array304.push(result303) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + Option::Some(lifted298) + } + _ => panic() + } - let lifted307 : String? = match mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result306 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), - ) + let lifted301 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted300 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result306) + Option::Some(lifted300) + } + _ => panic() } - _ => panic() - } - let lifted310 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted309 = match mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result308 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + let lifted303 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result302 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.Role::Other(result308) - } - _ => panic() + Option::Some(result302) } - - 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, - }, - }) + Option::Some(@types.NumericRestrictions::{ + min: lifted299, + max: lifted301, + unit: lifted303, + }) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array311, - }) + @types.SchemaTypeBody::S64Type(lifted304) } - 32 => { - let lifted314 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 6 => { + let lifted311 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result313 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted306 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted305 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted305) + } + _ => panic() + } + + let lifted308 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted307 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted307) + } + _ => panic() + } + + let lifted310 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result309 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result309) + } + _ => panic() + } - Option::Some(result313) + Option::Some(@types.NumericRestrictions::{ + min: lifted306, + max: lifted308, + unit: lifted310, + }) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted314, - }) + @types.SchemaTypeBody::U8Type(lifted311) } - 33 => { - let lifted316 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 7 => { + let lifted318 : @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 lifted313 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted312 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted312) + } + _ => panic() + } + + let lifted315 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted314 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted314) + } + _ => panic() + } + + let lifted317 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result316 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result316) + } + _ => panic() + } - Option::Some(result315) + Option::Some(@types.NumericRestrictions::{ + min: lifted313, + max: lifted315, + unit: lifted317, + }) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted316, - }) + @types.SchemaTypeBody::U16Type(lifted318) } - 34 => { - let lifted317 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 8 => { + let lifted325 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + 1 => { + let lifted320 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted319 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - @types.SchemaTypeBody::FutureType(lifted317) - } - 35 => { - let lifted318 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + Option::Some(lifted319) + } + _ => panic() + } - @types.SchemaTypeBody::StreamType(lifted318) - } - _ => panic() - } + let lifted322 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted321 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => 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(lifted321) + } + _ => panic() + } - Option::Some(result320) - } - _ => panic() - } + let lifted324 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result323 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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 + Option::Some(result323) + } + _ => panic() + } - let result322 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(@types.NumericRestrictions::{ + min: lifted320, + max: lifted322, + unit: lifted324, + }) + } + _ => panic() + } - array323.push(result322) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - - 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.SchemaTypeBody::U32Type(lifted325) + } + 9 => { + let lifted332 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted327 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted326 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result325 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted326) + } + _ => panic() + } - array326.push(result325) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + let lifted329 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted328 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let lifted329 : String? = match mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result328 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) + Option::Some(lifted328) + } + _ => panic() + } - Option::Some(result328) - } - _ => panic() - } + let lifted331 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result330 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let lifted332 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted331 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result330 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + Option::Some(result330) + } + _ => panic() + } - @types.Role::Other(result330) + Option::Some(@types.NumericRestrictions::{ + min: lifted327, + max: lifted329, + unit: lifted331, + }) } _ => panic() } - Option::Some(lifted331) + @types.SchemaTypeBody::U64Type(lifted332) } - _ => 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), - ) + 10 => { + let lifted339 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted334 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted333 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 lifted337 : String? = 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), - ) + Option::Some(lifted333) + } + _ => panic() + } - Option::Some(result336) - } - _ => panic() - } + let lifted336 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted335 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - array338.push(@types.SchemaTypeDef::{ - id: result335, - name: lifted337, - body: mbt_ffi_load32(iter_base + 20), - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + Option::Some(lifted335) + } + _ => panic() + } - let lifted341 : String? = match mbt_ffi_load8_u(iter_base + 40) { - 0 => Option::None - 1 => { - let result340 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + 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(result340) - } - _ => panic() - } + Option::Some(result337) + } + _ => panic() + } - let result342 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 52), - mbt_ffi_load32(iter_base + 56), - ) + Option::Some(@types.NumericRestrictions::{ + min: lifted334, + max: lifted336, + unit: lifted338, + }) + } + _ => panic() + } - 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), - ) + @types.SchemaTypeBody::F32Type(lifted339) + } + 11 => { + let lifted346 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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() + } - Option::Some(result343) - } - _ => panic() - } + Option::Some(lifted340) + } + _ => 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 lifted343 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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() + } - let result345 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted342) + } + _ => panic() + } - let lifted346 = 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 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), + ) - let lifted348 : String? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result347 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + Option::Some(result344) + } + _ => panic() + } - Option::Some(result347) + Option::Some(@types.NumericRestrictions::{ + min: lifted341, + max: lifted343, + unit: lifted345, + }) } _ => 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 + @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 result349 = mbt_ffi_ptr2str( + let result347 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array350.push(result349) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - - 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 lifted349 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result348 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let result352 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result348) + } + _ => panic() + } - array353.push(result352) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + 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 lifted356 : String? = match mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result355 = 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 + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result355) + array351.push(result350) } - _ => panic() - } - - let lifted359 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted358 = match mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result357 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - @types.Role::Other(result357) - } - _ => panic() - } + 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 - Option::Some(lifted358) - } - _ => 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, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 76)) - - @common.InputSchema::Parameters(array360) - } - _ => panic() - } - - 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 result363 = 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 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 - - let lifted366 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => @common.HttpMethod::Get - 1 => @common.HttpMethod::Head - 2 => @common.HttpMethod::Post - 3 => @common.HttpMethod::Put - 4 => @common.HttpMethod::Delete - 5 => @common.HttpMethod::Connect - 6 => @common.HttpMethod::Options - 7 => @common.HttpMethod::Trace - 8 => @common.HttpMethod::Patch - 9 => { - let result365 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) - - @common.HttpMethod::Custom(result365) - } - _ => 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( + let result353 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), ) - @common.PathSegment::Literal(result367) + array354.push(result353) } - 1 => - @common.PathSegment::SystemVariable( - @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), - ) - 2 => { - let result368 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - @common.PathSegment::PathVariable(@common.PathVariable::{ - variable_name: result368, - }) - } - 3 => { - let result369 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + let lifted357 : String? = match mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result356 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ - variable_name: result369, - }) + Option::Some(result356) + } + _ => panic() } - _ => panic() - } - - array371.push(lifted370) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - - 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 result373 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - let result374 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - array375.push(@common.HeaderVariable::{ - header_name: result373, - variable_name: result374, - }) - } - 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), - ) + let lifted360 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted359 = match mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result358 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) - let result378 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.Role::Other(result358) + } + _ => panic() + } - array379.push(@common.QueryVariable::{ - query_param_name: result377, - variable_name: result378, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + Option::Some(lifted359) + } + _ => panic() + } - let lifted381 : @common.AuthDetails? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => - Option::Some(@common.AuthDetails::{ - required: mbt_ffi_load8_u(iter_base + 37) != 0, + 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, + }, }) - _ => panic() - } - - 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 result382 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array383.push(result382) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - - 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)) - - 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), - ) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - Option::Some(result387) + @types.SchemaTypeBody::RecordType(array361) } - _ => panic() - } - - let lifted406 = match mbt_ffi_load8_u(iter_base + 36) { - 0 => { - 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 + 15 => { + 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 result389 = mbt_ffi_ptr2str( + let result363 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted390 = 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), - ), - ) + let lifted364 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted392 : 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 result391 = mbt_ffi_ptr2str( + let result365 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result391) + Option::Some(result365) } _ => 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 + 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 result393 = mbt_ffi_ptr2str( + let result367 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array394.push(result393) + array368.push(result367) } 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 + 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 result396 = mbt_ffi_ptr2str( + let result370 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array397.push(result396) + array371.push(result370) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted400 : 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 result399 = mbt_ffi_ptr2str( + let result373 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result399) + Option::Some(result373) } _ => panic() } - let lifted403 : @types.Role? = match + let lifted377 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted402 = match mbt_ffi_load8_u(iter_base + 60) { + let lifted376 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result401 = mbt_ffi_ptr2str( + let result375 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result401) + @types.Role::Other(result375) } _ => panic() } - Option::Some(lifted402) + Option::Some(lifted376) } _ => panic() } - array404.push(@common.NamedField::{ - name: result389, - source: lifted390, - schema: mbt_ffi_load32(iter_base + 12), + array378.push(@types.VariantCaseType::{ + name: result363, + payload: lifted364, metadata: @types.MetadataEnvelope::{ - doc: lifted392, - aliases: array394, - examples: array397, - deprecated: lifted400, - role: lifted403, + doc: lifted366, + aliases: array368, + examples: array371, + deprecated: lifted374, + role: lifted377, }, }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @common.InputSchema::Parameters(array404) + @types.SchemaTypeBody::VariantType(array378) } - _ => panic() - } + 16 => { + 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 lifted407 = match mbt_ffi_load8_u(iter_base + 48) { - 0 => @common.OutputSchema::Unit - 1 => @common.OutputSchema::Single(mbt_ffi_load32(iter_base + 52)) - _ => panic() - } + let result380 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted409 : @common.ReadOnlyConfig? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted408 = match mbt_ffi_load8_u(iter_base + 64) { - 0 => @common.CachePolicy::NoCache - 1 => @common.CachePolicy::UntilWrite - 2 => - @common.CachePolicy::Ttl( - mbt_ffi_load64(iter_base + 72).reinterpret_as_uint64(), - ) - _ => panic() + array381.push(result380) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - Option::Some(@common.ReadOnlyConfig::{ - cache_policy: lifted408, - uses_principal: mbt_ffi_load8_u(iter_base + 80) != 0, - }) + @types.SchemaTypeBody::EnumType(array381) } - _ => 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), - ) + 17 => { + 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 - @common.PathSegment::Literal(result414) - } - 1 => - @common.PathSegment::SystemVariable( - @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), - ) - 2 => { - let result415 = mbt_ffi_ptr2str( + let result383 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), ) - @common.PathSegment::PathVariable(@common.PathVariable::{ - variable_name: result415, - }) + array384.push(result383) } - 3 => { - let result416 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ - variable_name: result416, - }) - } - _ => panic() + @types.SchemaTypeBody::FlagsType(array384) } + 18 => { + 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 - array418.push(lifted417) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 112)) + array386.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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, + @types.SchemaTypeBody::TupleType(array386) + } + 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(), }) - _ => 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), - ) + 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 lifted388 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - array422.push(result421) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 124)) + let lifted389 : Int? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + _ => panic() + } - 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 + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ + ok: lifted388, + err: lifted389, + }) + } + 24 => { + let lifted393 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 lifted427 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => { - let result424 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + let result390 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array391.push(result390) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - @common.PathSegment::Literal(result424) + Option::Some(array391) + } + _ => panic() } - 1 => - @common.PathSegment::SystemVariable( - @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), - ) - 2 => { - let result425 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) - @common.PathSegment::PathVariable(@common.PathVariable::{ - variable_name: result425, - }) + let lifted394 : 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() } - 3 => { - let result426 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ - variable_name: result426, - }) + let lifted395 : 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() - } - array428.push(lifted427) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 132)) + let lifted397 : String? = match mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result396 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - 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() - } + Option::Some(result396) + } + _ => 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() - } + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted393, + min_length: lifted394, + max_length: lifted395, + regex: lifted397, + }) + } + 25 => { + let lifted401 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 - @common.Snapshotting::Enabled(lifted431) - } - _ => panic() - } + let result398 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array399.push(result398) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - 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 + Option::Some(array399) + } + _ => panic() + } - let result433 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted402 : 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() + } - array434.push(result433) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) + let lifted403 : 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() + } - 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)) + @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 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 - 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 -} + let result404 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) -///| -/// 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) + array405.push(result404) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - 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), - ) + Option::Some(array405) + } + _ => panic() + } - let result0 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) + let lifted411 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + 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 result1 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 24), - mbt_ffi_load32(return_area + 28), - ) + let result408 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array409.push(result408) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - 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 - 12 => @types.SchemaTypeBody::CharType - 13 => @types.SchemaTypeBody::StringType - 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 + Option::Some(array409) + } + _ => panic() + } - let result2 = 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: lifted407, + allowed_extensions: lifted411, + }) + } + 27 => { + let lifted415 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 lifted : 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 result412 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result3) + array413.push(result412) } - _ => panic() + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array413) } + _ => 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 lifted419 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + 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 result4 = 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), + ) - array.push(result4) + array417.push(result416) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + Option::Some(array417) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted415, + allowed_hosts: lifted419, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result420 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - 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 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 result5 = 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), + ) + + array422.push(result421) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + 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), ) - array6.push(result5) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result424, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + _ => panic() + } - let lifted9 : String? = match mbt_ffi_load8_u(iter_base + 40) { - 0 => Option::None + let lifted427 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + 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() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result420, + allowed_suffixes: array422, + min: lifted425, + max: lifted427, + }) + } + 31 => { + 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 result428 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted437 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result429 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Prefix(result429) + } 1 => { - let result8 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), + let result430 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), ) - Option::Some(result8) + @types.DiscriminatorRule::Suffix(result430) } - _ => panic() - } + 2 => { + let result431 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let lifted12 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { - 0 => Option::None - 1 => { - let lifted11 = match mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result10 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), + @types.DiscriminatorRule::Contains(result431) + } + 3 => { + let result432 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Regex(result432) + } + 4 => { + let result433 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + let lifted435 : String? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result434 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), ) - @types.Role::Other(result10) + Option::Some(result434) } _ => panic() } - Option::Some(lifted11) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result433, + literal: lifted435, + }) } - _ => 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, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::RecordType(array13) - } - 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 result15 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 5 => { + let result436 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let lifted16 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + @types.DiscriminatorRule::FieldAbsent(result436) + } _ => panic() } - let lifted18 : String? = match mbt_ffi_load8_u(iter_base + 16) { + let lifted439 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result17 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), + let result438 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), ) - Option::Some(result17) + Option::Some(result438) } _ => 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 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 result19 = mbt_ffi_ptr2str( + let result440 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array20.push(result19) + array441.push(result440) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - 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 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 result22 = mbt_ffi_ptr2str( + let result443 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array23.push(result22) + array444.push(result443) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted26 : String? = match mbt_ffi_load8_u(iter_base + 44) { + let lifted447 : 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 result446 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), ) - Option::Some(result25) + Option::Some(result446) } _ => panic() } - let lifted29 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { + let lifted450 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted28 = match mbt_ffi_load8_u(iter_base + 60) { + let lifted449 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result27 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), + let result448 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result27) + @types.Role::Other(result448) } _ => panic() } - Option::Some(lifted28) + Option::Some(lifted449) } _ => panic() } - array30.push(@types.VariantCaseType::{ - name: result15, - payload: lifted16, + array451.push(@types.UnionBranch::{ + tag: result428, + body: mbt_ffi_load32(iter_base + 8), + discriminator: lifted437, metadata: @types.MetadataEnvelope::{ - doc: lifted18, - aliases: array20, - examples: array23, - deprecated: lifted26, - role: lifted29, + doc: lifted439, + aliases: array441, + examples: array444, + deprecated: lifted447, + role: lifted450, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array30) - } - 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 result32 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array33.push(result32) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::EnumType(array33) - } - 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 result35 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array36.push(result35) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::FlagsType(array36) - } - 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 - - array38.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::TupleType(array38) - } - 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), + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array451, }) - 22 => @types.SchemaTypeBody::OptionType(mbt_ffi_load32(iter_base + 8)) - 23 => { - let lifted40 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + } + 32 => { + let lifted454 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + 1 => { + let result453 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let lifted41 : Int? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + Option::Some(result453) + } _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted40, - err: lifted41, + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted454, }) } - 24 => { - let lifted45 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { + 33 => { + let lifted456 : 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 result42 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array43.push(result42) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + let result455 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - Option::Some(array43) + Option::Some(result455) } _ => panic() } - let lifted46 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted456, + }) + } + 34 => { + let lifted457 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), - ) + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted47 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { + @types.SchemaTypeBody::FutureType(lifted457) + } + 35 => { + let lifted458 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 32).reinterpret_as_uint(), - ) + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted49 : 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), - ) + @types.SchemaTypeBody::StreamType(lifted458) + } + _ => panic() + } - Option::Some(result48) - } - _ => panic() - } + let lifted461 : String? = match mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result460 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted45, - min_length: lifted46, - max_length: lifted47, - regex: lifted49, - }) + Option::Some(result460) } - 25 => { - let lifted53 : 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 + _ => panic() + } - let result50 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array51.push(result50) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + let result462 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(array51) - } - _ => panic() - } + array463.push(result462) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let lifted54 : 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 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 lifted55 : 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 result465 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted53, - min_bytes: lifted54, - max_bytes: lifted55, - }) - } - 26 => { - let lifted59 : 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 + array466.push(result465) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let result56 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted469 : String? = match mbt_ffi_load8_u(iter_base + 116) { + 0 => Option::None + 1 => { + let result468 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 120), + mbt_ffi_load32(iter_base + 124), + ) - array57.push(result56) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + Option::Some(result468) + } + _ => panic() + } + + let lifted472 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted471 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result470 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) - Option::Some(array57) + @types.Role::Other(result470) } _ => panic() } - let lifted63 : 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 + Option::Some(lifted471) + } + _ => panic() + } - let result60 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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)) - array61.push(result60) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + 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 - Option::Some(array61) - } - _ => panic() - } + let result475 = 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: lifted59, - allowed_extensions: lifted63, - }) + let lifted477 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result476 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result476) } - 27 => { - let lifted67 : 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 + _ => panic() + } - let result64 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + array478.push(@types.SchemaTypeDef::{ + id: result475, + name: lifted477, + body: mbt_ffi_load32(iter_base + 20), + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - array65.push(result64) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + 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(array65) - } + 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 lifted71 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { + let lifted488 : String? = match mbt_ffi_load8_u(iter_base + 16) { 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), - ) - - array69.push(result68) - } - mbt_ffi_free(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(array69) + Option::Some(result487) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted67, - allowed_hosts: lifted71, - }) - } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result72 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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 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 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 result73 = mbt_ffi_ptr2str( + let result492 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array74.push(result73) + array493.push(result492) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted77 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { + let lifted496 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result76 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), + let result495 = 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: result76, - }) + Option::Some(result495) } _ => panic() } - let lifted79 : @types.QuantityValue? = match + let lifted499 : @types.Role? = 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 lifted498 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result497 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result78, - }) + @types.Role::Other(result497) + } + _ => panic() + } + + Option::Some(lifted498) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result72, - allowed_suffixes: array74, - min: lifted77, - max: lifted79, + 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, + }, }) } - 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 + mbt_ffi_free(mbt_ffi_load32(iter_base + 76)) - let result80 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @common.InputSchema::Parameters(array500) + } + _ => panic() + } - let lifted89 = 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 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 - @types.DiscriminatorRule::Prefix(result81) - } - 1 => { - let result82 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let result503 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.DiscriminatorRule::Suffix(result82) - } - 2 => { - let result83 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let result504 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.DiscriminatorRule::Contains(result83) - } - 3 => { - let result84 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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 - @types.DiscriminatorRule::Regex(result84) - } - 4 => { - let result85 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted506 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @common.HttpMethod::Get + 1 => @common.HttpMethod::Head + 2 => @common.HttpMethod::Post + 3 => @common.HttpMethod::Put + 4 => @common.HttpMethod::Delete + 5 => @common.HttpMethod::Connect + 6 => @common.HttpMethod::Options + 7 => @common.HttpMethod::Trace + 8 => @common.HttpMethod::Patch + 9 => { + let result505 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - let lifted87 : 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), - ) + @common.HttpMethod::Custom(result505) + } + _ => panic() + } - Option::Some(result86) - } - _ => 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 - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result85, - literal: lifted87, - }) - } - 5 => { - let result88 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted510 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result507 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - @types.DiscriminatorRule::FieldAbsent(result88) - } + @common.PathSegment::Literal(result507) + } + 1 => + @common.PathSegment::SystemVariable( + @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), + ) + 2 => { + let result508 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) + + @common.PathSegment::PathVariable(@common.PathVariable::{ + variable_name: result508, + }) + } + 3 => { + let result509 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) + + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ + variable_name: result509, + }) + } + _ => panic() + } + + array511.push(lifted510) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + 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 result513 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let result514 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + array515.push(@common.HeaderVariable::{ + header_name: result513, + variable_name: result514, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 20)) + + 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 result517 = 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), + ) + + array519.push(@common.QueryVariable::{ + query_param_name: result517, + variable_name: result518, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + let lifted521 : @common.AuthDetails? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => + Option::Some(@common.AuthDetails::{ + required: mbt_ffi_load8_u(iter_base + 37) != 0, + }) + _ => 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 + + let result522 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array523.push(result522) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) + + 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 lifted528 : String? = match mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result527 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), + ) + + Option::Some(result527) + } + _ => panic() + } + + let lifted546 = match mbt_ffi_load8_u(iter_base + 36) { + 0 => { + 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 result529 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted530 = 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 lifted91 : String? = match mbt_ffi_load8_u(iter_base + 36) { + let lifted532 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result90 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), + let result531 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), ) - Option::Some(result90) + Option::Some(result531) } _ => 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 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 result92 = mbt_ffi_ptr2str( + let result533 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array93.push(result92) + array534.push(result533) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - 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 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 result95 = mbt_ffi_ptr2str( + let result536 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array96.push(result95) + array537.push(result536) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted99 : String? = match mbt_ffi_load8_u(iter_base + 64) { + let lifted540 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result98 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), + let result539 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), ) - Option::Some(result98) + Option::Some(result539) } _ => panic() } - let lifted102 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { + let lifted543 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted101 = match mbt_ffi_load8_u(iter_base + 80) { + let lifted542 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result100 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), + let result541 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result100) + @types.Role::Other(result541) } _ => panic() } - Option::Some(lifted101) + Option::Some(lifted542) } _ => panic() } - array103.push(@types.UnionBranch::{ - tag: result80, - body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted89, + array544.push(@common.NamedField::{ + name: result529, + source: lifted530, + schema: mbt_ffi_load32(iter_base + 12), metadata: @types.MetadataEnvelope::{ - doc: lifted91, - aliases: array93, - examples: array96, - deprecated: lifted99, - role: lifted102, + doc: lifted532, + aliases: array534, + examples: array537, + deprecated: lifted540, + role: lifted543, }, }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array103, - }) + @common.InputSchema::Parameters(array544) } - 32 => { - let lifted106 : String? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result105 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + _ => panic() + } - Option::Some(result105) - } - _ => panic() - } + let lifted547 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => @common.OutputSchema::Unit + 1 => @common.OutputSchema::Single(mbt_ffi_load32(iter_base + 52)) + _ => panic() + } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted106, - }) - } - 33 => { - let lifted108 : 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 lifted549 : @common.ReadOnlyConfig? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted548 = match mbt_ffi_load8_u(iter_base + 64) { + 0 => @common.CachePolicy::NoCache + 1 => @common.CachePolicy::UntilWrite + 2 => + @common.CachePolicy::Ttl( + mbt_ffi_load64(iter_base + 72).reinterpret_as_uint64(), ) - - Option::Some(result107) - } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted108, + Option::Some(@common.ReadOnlyConfig::{ + cache_policy: lifted548, + uses_principal: mbt_ffi_load8_u(iter_base + 80) != 0, }) } - 34 => { - let lifted109 : 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(lifted109) - } - 35 => { - let lifted110 : 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(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), - ) + 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)) - Option::Some(result112) - } - _ => panic() - } + 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)) - 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 lifted570 : @common.HttpMountDetails? = match + mbt_ffi_load8_u(iter_base + 108) { + 0 => Option::None + 1 => { + 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 result114 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted557 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result554 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - array115.push(result114) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + @common.PathSegment::Literal(result554) + } + 1 => + @common.PathSegment::SystemVariable( + @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), + ) + 2 => { + let result555 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - 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 + @common.PathSegment::PathVariable(@common.PathVariable::{ + variable_name: result555, + }) + } + 3 => { + let result556 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - let result117 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ + variable_name: result556, + }) + } + _ => panic() + } - array118.push(result117) + array558.push(lifted557) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 112)) - let lifted121 : String? = match mbt_ffi_load8_u(iter_base + 116) { + let lifted560 : @common.AuthDetails? = match + mbt_ffi_load8_u(iter_base + 120) { 0 => Option::None - 1 => { - let result120 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) - - Option::Some(result120) - } + 1 => + Option::Some(@common.AuthDetails::{ + required: mbt_ffi_load8_u(iter_base + 121) != 0, + }) _ => panic() } - let lifted124 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted123 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result122 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + 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.Role::Other(result122) - } - _ => panic() - } + let result561 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(lifted123) - } - _ => panic() + array562.push(result561) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 124)) - 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(return_area + 32)) + 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 - 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 lifted567 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result564 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - let result127 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @common.PathSegment::Literal(result564) + } + 1 => + @common.PathSegment::SystemVariable( + @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), + ) + 2 => { + let result565 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - let lifted129 : 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), - ) + @common.PathSegment::PathVariable(@common.PathVariable::{ + variable_name: result565, + }) + } + 3 => { + let result566 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - Option::Some(result128) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ + variable_name: result566, + }) + } + _ => panic() } - _ => panic() + + array568.push(lifted567) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 132)) - array130.push(@types.SchemaTypeDef::{ - id: result127, - name: lifted129, - body: mbt_ffi_load32(iter_base + 20), + 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, }) } - mbt_ffi_free(mbt_ffi_load32(return_area + 40)) - - let lifted133 : String? = match mbt_ffi_load8_u(return_area + 52) { - 0 => Option::None - 1 => { - let result132 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 56), - mbt_ffi_load32(return_area + 60), - ) + _ => panic() + } - Option::Some(result132) + let lifted572 = match mbt_ffi_load8_u(iter_base + 144) { + 0 => @common.Snapshotting::Disabled + 1 => { + let lifted571 = 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() } - _ => panic() - } - - let result134 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 64), - mbt_ffi_load32(return_area + 68), - ) - - let lifted136 : String? = match mbt_ffi_load8_u(return_area + 72) { - 0 => Option::None - 1 => { - let result135 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 76), - mbt_ffi_load32(return_area + 80), - ) - Option::Some(result135) - } - _ => panic() + @common.Snapshotting::Enabled(lifted571) } + _ => panic() + } - let lifted154 = match mbt_ffi_load8_u(return_area + 84) { - 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 result137 = 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) { - 0 => @common.FieldSource::UserSupplied - 1 => - @common.FieldSource::AutoInjected( - @common.AutoInjectedKind::from(mbt_ffi_load8_u(iter_base + 9)), - ) - _ => 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 lifted140 : 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 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 - Option::Some(result139) - } - _ => panic() - } + let result573 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array574.push(result573) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - let result141 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - 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)) - array142.push(result141) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + 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 +} - 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 +///| +/// 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 result144 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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), + ) - array145.push(result144) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + let result0 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), + ) - let lifted148 : 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 result1 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 24), + mbt_ffi_load32(return_area + 28), + ) - Option::Some(result147) - } - _ => panic() - } + 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 lifted151 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { + 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 lifted150 = match mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result149 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + let lifted2 : @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() + } - @types.Role::Other(result149) + Option::Some(lifted) } _ => panic() } - Option::Some(lifted150) - } - _ => 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, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 88)) - - @common.InputSchema::Parameters(array152) - } - _ => 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 result155 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted4 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted3 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let result156 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + Option::Some(lifted3) + } + _ => panic() + } - 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 lifted6 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result5 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let lifted158 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => @common.HttpMethod::Get - 1 => @common.HttpMethod::Head - 2 => @common.HttpMethod::Post - 3 => @common.HttpMethod::Put - 4 => @common.HttpMethod::Delete - 5 => @common.HttpMethod::Connect - 6 => @common.HttpMethod::Options - 7 => @common.HttpMethod::Trace - 8 => @common.HttpMethod::Patch - 9 => { - let result157 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + Option::Some(result5) + } + _ => panic() + } - @common.HttpMethod::Custom(result157) + Option::Some(@types.NumericRestrictions::{ + min: lifted2, + max: lifted4, + unit: lifted6, + }) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::S8Type(lifted7) } + 3 => { + let lifted14 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted9 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted8 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 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 + Option::Some(lifted8) + } + _ => panic() + } - let lifted162 = 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 lifted11 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted10 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - @common.PathSegment::Literal(result159) - } - 1 => - @common.PathSegment::SystemVariable( - @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), - ) - 2 => { - let result160 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + Option::Some(lifted10) + } + _ => panic() + } - @common.PathSegment::PathVariable(@common.PathVariable::{ - variable_name: result160, - }) - } - 3 => { - let result161 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + 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), + ) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ - variable_name: result161, + Option::Some(result12) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted9, + max: lifted11, + unit: lifted13, }) } _ => panic() } - array163.push(lifted162) + @types.SchemaTypeBody::S16Type(lifted14) } - 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 + 4 => { + let lifted21 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted16 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted15 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result165 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted15) + } + _ => panic() + } - let result166 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let lifted18 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted17 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - array167.push(@common.HeaderVariable::{ - header_name: result165, - variable_name: result166, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 20)) + Option::Some(lifted17) + } + _ => panic() + } - 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 lifted20 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result19 = 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 + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result19) + } + _ => panic() + } - let result170 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + Option::Some(@types.NumericRestrictions::{ + min: lifted16, + max: lifted18, + unit: lifted20, + }) + } + _ => panic() + } - array171.push(@common.QueryVariable::{ - query_param_name: result169, - variable_name: result170, - }) + @types.SchemaTypeBody::S32Type(lifted21) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + 5 => { + let lifted28 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted23 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted22 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 lifted173 : @common.AuthDetails? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => - Option::Some(@common.AuthDetails::{ - required: mbt_ffi_load8_u(iter_base + 37) != 0, - }) - _ => panic() - } + Option::Some(lifted22) + } + _ => 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 lifted25 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted24 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let result174 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted24) + } + _ => panic() + } - array175.push(result174) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) + let lifted27 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result26 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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)) + Option::Some(result26) + } + _ => panic() + } - let lifted180 : 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), - ) + Option::Some(@types.NumericRestrictions::{ + min: lifted23, + max: lifted25, + unit: lifted27, + }) + } + _ => panic() + } - Option::Some(result179) + @types.SchemaTypeBody::S64Type(lifted28) } - _ => panic() - } - - let lifted198 = 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 result181 = 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) { - 0 => @common.FieldSource::UserSupplied - 1 => - @common.FieldSource::AutoInjected( - @common.AutoInjectedKind::from( - mbt_ffi_load8_u(iter_base + 9), - ), - ) - _ => panic() - } - - let lifted184 : 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), - ) + 6 => { + let lifted35 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted30 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted29 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result183) + Option::Some(lifted29) + } + _ => panic() } - _ => 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 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 + 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 result188 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array189.push(result188) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted192 : 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 lifted32 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted31 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result191) + Option::Some(lifted31) + } + _ => panic() } - _ => panic() - } - let lifted195 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted194 = match mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result193 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + let lifted34 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result33 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.Role::Other(result193) - } - _ => panic() + Option::Some(result33) } - - Option::Some(lifted194) + _ => panic() } - _ => 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, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - - @common.InputSchema::Parameters(array196) - } - _ => panic() - } - let lifted199 = match mbt_ffi_load8_u(iter_base + 48) { - 0 => @common.OutputSchema::Unit - 1 => @common.OutputSchema::Single(mbt_ffi_load32(iter_base + 52)) - _ => panic() - } - - let lifted201 : @common.ReadOnlyConfig? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted200 = match mbt_ffi_load8_u(iter_base + 64) { - 0 => @common.CachePolicy::NoCache - 1 => @common.CachePolicy::UntilWrite - 2 => - @common.CachePolicy::Ttl( - mbt_ffi_load64(iter_base + 72).reinterpret_as_uint64(), - ) + Option::Some(@types.NumericRestrictions::{ + min: lifted30, + max: lifted32, + unit: lifted34, + }) + } _ => panic() } - Option::Some(@common.ReadOnlyConfig::{ - cache_policy: lifted200, - 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, - }) - } - 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 => { - let result205 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) - - Option::Some(result205) + @types.SchemaTypeBody::U8Type(lifted35) } - _ => 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 lifted319 = 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 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) { + 7 => { + let lifted42 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted37 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result208 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted36 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result208) + Option::Some(lifted36) } _ => 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 - - 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 + 24)) - - 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 result213 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted39 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted38 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - array214.push(result213) + Option::Some(lifted38) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted217 : String? = match - mbt_ffi_load8_u(iter_base + 40) { + let lifted41 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result216 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), + let result40 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), ) - Option::Some(result216) + Option::Some(result40) } _ => panic() } - let lifted220 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { + Option::Some(@types.NumericRestrictions::{ + min: lifted37, + max: lifted39, + unit: lifted41, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted42) + } + 8 => { + let lifted49 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted44 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let lifted219 = match mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result218 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), + let lifted43 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), ) - - @types.Role::Other(result218) - } _ => panic() } - Option::Some(lifted219) + Option::Some(lifted43) } _ => 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)) - - @types.SchemaTypeBody::RecordType(array221) - } - 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 lifted224 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted46 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + 1 => { + let lifted45 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_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 lifted226 : String? = match - mbt_ffi_load8_u(iter_base + 16) { + let lifted48 : 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 result47 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), ) - Option::Some(result225) + Option::Some(result47) } _ => 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: lifted44, + max: lifted46, + unit: lifted48, + }) + } + _ => panic() + } - let result227 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::U32Type(lifted49) + } + 9 => { + let lifted56 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted51 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted50 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array228.push(result227) + Option::Some(lifted50) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - - 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 result230 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted53 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted52 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - array231.push(result230) + Option::Some(lifted52) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted234 : String? = match - mbt_ffi_load8_u(iter_base + 44) { + let lifted55 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result233 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), + let result54 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), ) - Option::Some(result233) + Option::Some(result54) } _ => panic() } - let lifted237 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { + Option::Some(@types.NumericRestrictions::{ + min: lifted51, + max: lifted53, + unit: lifted55, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted56) + } + 10 => { + let lifted63 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted58 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { 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 => { - let result235 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), + let lifted57 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), ) + _ => panic() + } - @types.Role::Other(result235) - } + Option::Some(lifted57) + } + _ => panic() + } + + let lifted60 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted59 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) _ => panic() } - Option::Some(lifted236) + Option::Some(lifted59) } _ => panic() } - array238.push(@types.VariantCaseType::{ - name: result223, - payload: lifted224, - metadata: @types.MetadataEnvelope::{ - doc: lifted226, - aliases: array228, - examples: array231, - deprecated: lifted234, - role: lifted237, - }, + 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), + ) + + Option::Some(result61) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted58, + max: lifted60, + unit: lifted62, }) } - 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 - let result240 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @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 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array241.push(result240) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + Option::Some(lifted64) + } + _ => panic() + } - @types.SchemaTypeBody::EnumType(array241) - } - 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 + 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() + } - let result243 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted66) + } + _ => panic() + } - array244.push(result243) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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.SchemaTypeBody::FlagsType(array244) - } - 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 + Option::Some(result68) + } + _ => panic() + } - array246.push(mbt_ffi_load32(iter_base + 0)) + Option::Some(@types.NumericRestrictions::{ + min: lifted65, + max: lifted67, + unit: lifted69, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::TupleType(array246) + _ => panic() } - 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 lifted248 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } - let lifted249 : Int? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) - _ => 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 - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted248, - err: lifted249, - }) - } - 24 => { - let lifted253 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { + let result71 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted73 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - 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 result250 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array251.push(result250) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + let result72 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - Option::Some(array251) + Option::Some(result72) } _ => panic() } - let lifted254 : 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 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 result74 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array.push(result74) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - 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 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 result75 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array76.push(result75) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted257 : String? = match mbt_ffi_load8_u(iter_base + 36) { + let lifted79 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result256 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), + let result78 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), ) - Option::Some(result256) + Option::Some(result78) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted253, - min_length: lifted254, - max_length: lifted255, - regex: lifted257, - }) - } - 25 => { - let lifted261 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { + let lifted82 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 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 - - let result258 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted81 = match mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result80 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) - array259.push(result258) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + @types.Role::Other(result80) + } + _ => panic() + } - Option::Some(array259) + Option::Some(lifted81) } _ => 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 lifted263 : 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: lifted261, - min_bytes: lifted262, - max_bytes: lifted263, + 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, + }, }) } - 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 - - let result264 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array265.push(result264) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + @types.SchemaTypeBody::RecordType(array83) + } + 15 => { + 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 - Option::Some(array265) - } - _ => panic() - } + let result85 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted271 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 24) { + let lifted86 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 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 - - let result268 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array269.push(result268) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - - Option::Some(array269) - } + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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 lifted275 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { + let lifted88 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 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)) + let result87 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - Option::Some(array273) + Option::Some(result87) } _ => 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 result276 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array277.push(result276) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + let result89 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(array277) - } - _ => panic() + array90.push(result89) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted275, - allowed_hosts: lifted279, - }) - } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 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 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 result281 = mbt_ffi_ptr2str( + let result92 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array282.push(result281) + array93.push(result92) } - 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 lifted96 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result284 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), + let result95 = 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(result95) } _ => panic() } - let lifted287 : @types.QuantityValue? = match + let lifted99 : @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 lifted98 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result97 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result286, - }) + @types.Role::Other(result97) + } + _ => panic() + } + + Option::Some(lifted98) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result280, - allowed_suffixes: array282, - min: lifted285, - max: lifted287, + array100.push(@types.VariantCaseType::{ + name: result85, + payload: lifted86, + metadata: @types.MetadataEnvelope::{ + doc: lifted88, + aliases: array90, + examples: array93, + deprecated: lifted96, + role: lifted99, + }, }) } - 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 + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let result288 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::VariantType(array100) + } + 16 => { + 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 lifted297 = match mbt_ffi_load8_u(iter_base + 12) { - 0 => { - let result289 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let result102 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.DiscriminatorRule::Prefix(result289) - } - 1 => { - let result290 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + array103.push(result102) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.DiscriminatorRule::Suffix(result290) - } - 2 => { - let result291 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + @types.SchemaTypeBody::EnumType(array103) + } + 17 => { + 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 - @types.DiscriminatorRule::Contains(result291) - } - 3 => { - let result292 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let result105 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.DiscriminatorRule::Regex(result292) - } - 4 => { - let result293 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + array106.push(result105) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let lifted295 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result294 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) + @types.SchemaTypeBody::FlagsType(array106) + } + 18 => { + 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 - Option::Some(result294) - } - _ => panic() - } + array108.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @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.SchemaTypeBody::TupleType(array108) + } + 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 lifted110 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - @types.DiscriminatorRule::FieldAbsent(result296) - } - _ => panic() - } + let lifted111 : Int? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + _ => panic() + } - let lifted299 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result298 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ + ok: lifted110, + err: lifted111, + }) + } + 24 => { + let lifted115 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 - Option::Some(result298) - } - _ => 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 result300 = mbt_ffi_ptr2str( + let result112 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array301.push(result300) + array113.push(result112) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - 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(array113) + } + _ => panic() + } - let result303 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted116 : 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() + } - array304.push(result303) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + let lifted117 : 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 lifted307 : String? = match - mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result306 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), - ) + let lifted119 : String? = match mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result118 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - Option::Some(result306) - } - _ => panic() - } + Option::Some(result118) + } + _ => panic() + } - let lifted310 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted309 = match mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result308 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted115, + min_length: lifted116, + max_length: lifted117, + regex: lifted119, + }) + } + 25 => { + let lifted123 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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(result308) - } - _ => panic() - } + let result120 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(lifted309) - } - _ => panic() + array121.push(result120) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - 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, - }, - }) + Option::Some(array121) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + _ => panic() + } - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array311, - }) + let lifted124 : 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() } - 32 => { - let lifted314 : String? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result313 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), + + 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() + } + + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ + mime_types: lifted123, + min_bytes: lifted124, + max_bytes: lifted125, + }) + } + 26 => { + let lifted129 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + 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 + + let result126 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result313) + array127.push(result126) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted314, - }) + Option::Some(array127) + } + _ => 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), + + 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), ) - Option::Some(result315) + array131.push(result130) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted316, - }) - } - 34 => { - let lifted317 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + Option::Some(array131) } - - @types.SchemaTypeBody::FutureType(lifted317) + _ => panic() } - 35 => { - let lifted318 : 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(lifted318) - } - _ => 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 lifted137 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 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), - ) + let result134 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array135.push(result134) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(result320) + Option::Some(array135) + } + _ => panic() } - _ => panic() - } - 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 lifted141 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 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 - let result322 = 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), + ) - array323.push(result322) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + array139.push(result138) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - 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 + Option::Some(array139) + } + _ => panic() + } - let result325 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted137, + allowed_hosts: lifted141, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result142 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), ) - array326.push(result325) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + 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 lifted329 : String? = match mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result328 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), + let result143 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result328) + array144.push(result143) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted332 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted331 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result330 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + let lifted147 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result146 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) - @types.Role::Other(result330) - } - _ => panic() + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result146, + }) } - - Option::Some(lifted331) + _ => panic() } - _ => 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 lifted149 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result148 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 76), + mbt_ffi_load32(iter_base + 80), + ) - 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 + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 64), + scale: mbt_ffi_load32(iter_base + 72), + unit: result148, + }) + } + _ => panic() + } - let result335 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - let lifted337 : String? = 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), - ) - - Option::Some(result336) - } - _ => panic() + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result142, + allowed_suffixes: array144, + min: lifted147, + max: lifted149, + }) } + 31 => { + 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 - 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 result150 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted341 : String? = match mbt_ffi_load8_u(iter_base + 40) { - 0 => Option::None - 1 => { - let result340 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + let lifted159 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result151 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - Option::Some(result340) - } - _ => panic() - } + @types.DiscriminatorRule::Prefix(result151) + } + 1 => { + let result152 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let result342 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 52), - mbt_ffi_load32(iter_base + 56), - ) + @types.DiscriminatorRule::Suffix(result152) + } + 2 => { + let result153 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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), - ) + @types.DiscriminatorRule::Contains(result153) + } + 3 => { + let result154 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - Option::Some(result343) - } - _ => panic() - } + @types.DiscriminatorRule::Regex(result154) + } + 4 => { + let result155 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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 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), + ) - let result345 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result156) + } + _ => panic() + } - let lifted346 = 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), - ), + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result155, + literal: lifted157, + }) + } + 5 => { + let result158 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), ) + + @types.DiscriminatorRule::FieldAbsent(result158) + } _ => panic() } - let lifted348 : 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 result347 = 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(result347) + Option::Some(result160) } _ => 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 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 result349 = mbt_ffi_ptr2str( + let result162 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array350.push(result349) + array163.push(result162) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - 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 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 result352 = mbt_ffi_ptr2str( + let result165 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array353.push(result352) + array166.push(result165) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted356 : 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 result355 = 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(result355) + Option::Some(result168) } _ => panic() } - let lifted359 : @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 lifted358 = match mbt_ffi_load8_u(iter_base + 60) { + let lifted171 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result357 = 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(result357) + @types.Role::Other(result170) } _ => panic() } - Option::Some(lifted358) + Option::Some(lifted171) } _ => panic() } - array360.push(@common.NamedField::{ - name: result345, - source: lifted346, - schema: mbt_ffi_load32(iter_base + 12), + array173.push(@types.UnionBranch::{ + tag: result150, + body: mbt_ffi_load32(iter_base + 8), + discriminator: lifted159, metadata: @types.MetadataEnvelope::{ - doc: lifted348, - aliases: array350, - examples: array353, - deprecated: lifted356, - role: lifted359, + doc: lifted161, + aliases: array163, + examples: array166, + deprecated: lifted169, + role: lifted172, }, }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 76)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @common.InputSchema::Parameters(array360) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array173, + }) } - _ => panic() - } - - 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 result363 = 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 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 - - let lifted366 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => @common.HttpMethod::Get - 1 => @common.HttpMethod::Head - 2 => @common.HttpMethod::Post - 3 => @common.HttpMethod::Put - 4 => @common.HttpMethod::Delete - 5 => @common.HttpMethod::Connect - 6 => @common.HttpMethod::Options - 7 => @common.HttpMethod::Trace - 8 => @common.HttpMethod::Patch - 9 => { - let result365 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), + 32 => { + let lifted176 : 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), ) - @common.HttpMethod::Custom(result365) + Option::Some(result175) } _ => 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), - ) - - @common.PathSegment::Literal(result367) - } - 1 => - @common.PathSegment::SystemVariable( - @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), - ) - 2 => { - let result368 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) - - @common.PathSegment::PathVariable(@common.PathVariable::{ - variable_name: result368, - }) - } - 3 => { - let result369 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted176, + }) + } + 33 => { + let lifted178 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result177 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ - variable_name: result369, - }) - } - _ => panic() + Option::Some(result177) } - - array371.push(lifted370) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - - 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 result373 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - let result374 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - array375.push(@common.HeaderVariable::{ - header_name: result373, - variable_name: result374, - }) - } - 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), - ) - - let result378 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - array379.push(@common.QueryVariable::{ - query_param_name: result377, - variable_name: result378, - }) + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let lifted381 : @common.AuthDetails? = match - mbt_ffi_load8_u(iter_base + 36) { + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted178, + }) + } + 34 => { + let lifted179 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 1 => - Option::Some(@common.AuthDetails::{ - required: mbt_ffi_load8_u(iter_base + 37) != 0, - }) + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - 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 result382 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array383.push(result382) + @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() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - 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::StreamType(lifted180) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - 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), - ) + let lifted183 : String? = match mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result182 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) - Option::Some(result387) - } - _ => panic() + Option::Some(result182) } + _ => panic() + } - let lifted406 = match mbt_ffi_load8_u(iter_base + 36) { - 0 => { - 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 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 result389 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - let lifted390 = 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 lifted392 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result391 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) - - Option::Some(result391) - } - _ => panic() - } + let result184 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array185.push(result184) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let result393 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array394.push(result393) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + let result187 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array188.push(result187) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let result396 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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), + ) - array397.push(result396) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + Option::Some(result190) + } + _ => panic() + } - let lifted400 : String? = match - mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result399 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + let lifted194 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted193 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result192 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) - Option::Some(result399) - } - _ => panic() - } + @types.Role::Other(result192) + } + _ => panic() + } - let lifted403 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted402 = match mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result401 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + Option::Some(lifted193) + } + _ => panic() + } - @types.Role::Other(result401) - } - _ => 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(return_area + 32)) - Option::Some(lifted402) - } - _ => panic() - } + 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 - 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, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) + let result197 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @common.InputSchema::Parameters(array404) - } - _ => panic() - } + let lifted199 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result198 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - let lifted407 = match mbt_ffi_load8_u(iter_base + 48) { - 0 => @common.OutputSchema::Unit - 1 => @common.OutputSchema::Single(mbt_ffi_load32(iter_base + 52)) - _ => panic() + Option::Some(result198) } + _ => panic() + } - let lifted409 : @common.ReadOnlyConfig? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted408 = match mbt_ffi_load8_u(iter_base + 64) { - 0 => @common.CachePolicy::NoCache - 1 => @common.CachePolicy::UntilWrite - 2 => - @common.CachePolicy::Ttl( - mbt_ffi_load64(iter_base + 72).reinterpret_as_uint64(), - ) - _ => panic() - } + array200.push(@types.SchemaTypeDef::{ + id: result197, + name: lifted199, + body: mbt_ffi_load32(iter_base + 20), + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 40)) - Option::Some(@common.ReadOnlyConfig::{ - cache_policy: lifted408, - uses_principal: mbt_ffi_load8_u(iter_base + 80) != 0, - }) - } - _ => panic() - } + let lifted203 : String? = match mbt_ffi_load8_u(return_area + 52) { + 0 => Option::None + 1 => { + let result202 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 56), + mbt_ffi_load32(return_area + 60), + ) - array410.push(@common.AgentMethod::{ - name: result363, - description: result364, - http_endpoint: array385, - prompt_hint: lifted388, - input_schema: lifted406, - output_schema: lifted407, - read_only: lifted409, - }) + Option::Some(result202) } - 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, - }) + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(return_area + 104)) - let lifted430 : @common.HttpMountDetails? = match - mbt_ffi_load8_u(return_area + 116) { + let result204 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 64), + mbt_ffi_load32(return_area + 68), + ) + + let lifted206 : String? = match mbt_ffi_load8_u(return_area + 72) { 0 => Option::None 1 => { - 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 + let result205 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 76), + mbt_ffi_load32(return_area + 80), + ) - 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), - ) + Option::Some(result205) + } + _ => panic() + } - @common.PathSegment::Literal(result414) - } + let lifted224 = match mbt_ffi_load8_u(return_area + 84) { + 0 => { + 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 result207 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted208 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => @common.FieldSource::UserSupplied 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.FieldSource::AutoInjected( + @common.AutoInjectedKind::from(mbt_ffi_load8_u(iter_base + 9)), ) + _ => panic() + } - @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), + let lifted210 : String? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result209 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), ) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ - variable_name: result416, - }) + Option::Some(result209) } _ => panic() } - array418.push(lifted417) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 120)) + 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 lifted420 : @common.AuthDetails? = match - mbt_ffi_load8_u(return_area + 128) { - 0 => Option::None - 1 => - Option::Some(@common.AuthDetails::{ - required: mbt_ffi_load8_u(return_area + 129) != 0, - }) - _ => panic() - } + let result211 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array212.push(result211) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let result421 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array422.push(result421) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 132)) + let result214 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array215.push(result214) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted427 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => { - let result424 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), + let lifted218 : String? = match mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result217 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), ) - @common.PathSegment::Literal(result424) + Option::Some(result217) } - 1 => - @common.PathSegment::SystemVariable( - @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), - ) - 2 => { - let result425 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + _ => panic() + } - @common.PathSegment::PathVariable(@common.PathVariable::{ - variable_name: result425, - }) - } - 3 => { - let result426 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + let lifted221 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted220 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result219 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ - variable_name: result426, - }) + @types.Role::Other(result219) + } + _ => panic() + } + + Option::Some(lifted220) } _ => panic() } - array428.push(lifted427) + 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 + 140)) + mbt_ffi_free(mbt_ffi_load32(return_area + 88)) - 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, - }) + @common.InputSchema::Parameters(array222) } _ => panic() } - let lifted432 = match mbt_ffi_load8_u(return_area + 152) { - 0 => @common.Snapshotting::Disabled - 1 => { - let lifted431 = match mbt_ffi_load8_u(return_area + 160) { - 0 => @common.SnapshottingConfig::Default - 1 => - @common.SnapshottingConfig::Periodic( - mbt_ffi_load64(return_area + 168).reinterpret_as_uint64(), - ) - 2 => - @common.SnapshottingConfig::EveryNInvocation( - mbt_ffi_load16_u(return_area + 168) - .land(0xFFFF) - .reinterpret_as_uint(), + 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 result225 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let result226 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + 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 + + let lifted228 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @common.HttpMethod::Get + 1 => @common.HttpMethod::Head + 2 => @common.HttpMethod::Post + 3 => @common.HttpMethod::Put + 4 => @common.HttpMethod::Delete + 5 => @common.HttpMethod::Connect + 6 => @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() } - @common.Snapshotting::Enabled(lifted431) - } - _ => panic() - } - - 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 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 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 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), + ) - let result433 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @common.PathSegment::Literal(result229) + } + 1 => + @common.PathSegment::SystemVariable( + @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), + ) + 2 => { + let result230 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - array434.push(result433) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) + @common.PathSegment::PathVariable(@common.PathVariable::{ + variable_name: result230, + }) + } + 3 => { + let result231 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - 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)) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ + variable_name: result231, + }) + } + _ => panic() + } - 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 -} + array233.push(lifted232) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) -///| -/// 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 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 ptr = mbt_ffi_str2ptr(agent_type_name) + let result235 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + let result236 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - match iter_elem { - BoolValue(payload) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store8(iter_base + 8, if payload { 1 } else { 0 }) + array237.push(@common.HeaderVariable::{ + header_name: result235, + variable_name: result236, + }) + } + mbt_ffi_free(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)) + 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 - () - } - S16Value(payload1) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload1)) + let result239 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - S32Value(payload2) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload2) + let result240 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - () - } - S64Value(payload3) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload3) + array241.push(@common.QueryVariable::{ + query_param_name: result239, + variable_name: result240, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - () - } - U8Value(payload4) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload4.to_int()) + let lifted243 : @common.AuthDetails? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => + Option::Some(@common.AuthDetails::{ + required: mbt_ffi_load8_u(iter_base + 37) != 0, + }) + _ => panic() + } - () - } - U16Value(payload5) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload5.reinterpret_as_int()) + 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 - () - } - U32Value(payload6) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload6.reinterpret_as_int()) + let result244 = 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()) + array245.push(result244) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - () - } - F32Value(payload8) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload8) + 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)) - () - } - F64Value(payload9) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload9) + let lifted250 : 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), + ) - () - } - CharValue(payload10) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload10.to_int()) + Option::Some(result249) + } + _ => panic() + } - () - } - StringValue(payload11) => { - mbt_ffi_store8(iter_base + 0, 12) + let lifted268 = match mbt_ffi_load8_u(iter_base + 36) { + 0 => { + 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 - 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 result251 = 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) - } - mbt_ffi_store32(iter_base + 12, payload13.length()) - mbt_ffi_store32(iter_base + 8, address) - cleanup_list.push(address) + let lifted252 = 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() + } - () - } - VariantValue(payload14) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload14.case.reinterpret_as_int()) + let lifted254 : String? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result253 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - match payload14.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(result253) + } + _ => panic() + } - () - } - Some(payload16) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload16) + 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 result255 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - EnumValue(payload17) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload17.reinterpret_as_int()) + array256.push(result255) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - () - } - FlagsValue(payload18) => { - mbt_ffi_store8(iter_base + 0, 16) + 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 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) + let result258 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - TupleValue(payload21) => { - mbt_ffi_store8(iter_base + 0, 17) + array259.push(result258) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - 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) + let lifted262 : String? = match mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result261 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) - () - } - ListValue(payload24) => { - mbt_ffi_store8(iter_base + 0, 18) + Option::Some(result261) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 12, payload24.length()) - mbt_ffi_store32(iter_base + 8, address25) - cleanup_list.push(address25) + let lifted265 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + 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), + ) - () - } - FixedListValue(payload27) => { - mbt_ffi_store8(iter_base + 0, 19) + @types.Role::Other(result263) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 12, payload27.length()) - mbt_ffi_store32(iter_base + 8, address28) - cleanup_list.push(address28) + Option::Some(lifted264) + } + _ => panic() + } - () - } - MapValue(payload30) => { - mbt_ffi_store8(iter_base + 0, 20) + 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 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) + @common.InputSchema::Parameters(array266) + } + _ => panic() } - 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) + let lifted269 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => @common.OutputSchema::Unit + 1 => @common.OutputSchema::Single(mbt_ffi_load32(iter_base + 52)) + _ => panic() + } - () - } - Some(payload35) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload35) + let lifted271 : @common.ReadOnlyConfig? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted270 = match mbt_ffi_load8_u(iter_base + 64) { + 0 => @common.CachePolicy::NoCache + 1 => @common.CachePolicy::UntilWrite + 2 => + @common.CachePolicy::Ttl( + mbt_ffi_load64(iter_base + 72).reinterpret_as_uint64(), + ) + _ => panic() + } - () + Option::Some(@common.ReadOnlyConfig::{ + cache_policy: lifted270, + uses_principal: mbt_ffi_load8_u(iter_base + 80) != 0, + }) } + _ => panic() } - () + array272.push(@common.AgentMethod::{ + name: result225, + description: result226, + http_endpoint: array247, + prompt_hint: lifted250, + input_schema: lifted268, + output_schema: lifted269, + read_only: lifted271, + }) } - 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) + mbt_ffi_free(mbt_ffi_load32(return_area + 96)) - match payload40 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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 - () - } - Some(payload42) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload42) + let result274 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - } + let lifted276 : String? = 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), + ) - () + Option::Some(result275) } + _ => panic() } - () - } - 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) + 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 - match payload43.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + let lifted459 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @types.SchemaTypeBody::RefType(mbt_ffi_load32(iter_base + 8)) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted283 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted278 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted277 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - Some(payload46) => { - mbt_ffi_store8(iter_base + 16, 1) + Option::Some(lifted277) + } + _ => 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) + let lifted280 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted279 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - } - cleanup_list.push(ptr44) + Option::Some(lifted279) + } + _ => panic() + } - () - } - BinaryValue(payload48) => { - mbt_ffi_store8(iter_base + 0, 24) + let lifted282 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result281 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let ptr49 = mbt_ffi_bytes2ptr(payload48.bytes) + Option::Some(result281) + } + _ => panic() + } - mbt_ffi_store32(iter_base + 12, payload48.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr49) + Option::Some(@types.NumericRestrictions::{ + min: lifted278, + max: lifted280, + unit: lifted282, + }) + } + _ => panic() + } - match payload48.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + @types.SchemaTypeBody::S8Type(lifted283) + } + 3 => { + let lifted290 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted285 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted284 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - Some(payload51) => { - mbt_ffi_store8(iter_base + 16, 1) + Option::Some(lifted284) + } + _ => 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 lifted287 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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() + } - () - } - } - cleanup_list.push(ptr49) + Option::Some(lifted286) + } + _ => panic() + } - () - } - PathValue(payload53) => { - mbt_ffi_store8(iter_base + 0, 25) + 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), + ) - 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(result288) + } + _ => panic() + } - () - } - UrlValue(payload55) => { - mbt_ffi_store8(iter_base + 0, 26) + Option::Some(@types.NumericRestrictions::{ + min: lifted285, + max: lifted287, + unit: lifted289, + }) + } + _ => 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) + @types.SchemaTypeBody::S16Type(lifted290) + } + 4 => { + let lifted297 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted292 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted291 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => 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(), - ) + Option::Some(lifted291) + } + _ => panic() + } - () - } - DurationValue(payload58) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload58.nanoseconds) + let lifted294 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted293 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => 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) + Option::Some(lifted293) + } + _ => 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 lifted296 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result295 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - UnionValue(payload61) => { - mbt_ffi_store8(iter_base + 0, 30) + Option::Some(result295) + } + _ => 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(@types.NumericRestrictions::{ + min: lifted292, + max: lifted294, + unit: lifted296, + }) + } + _ => panic() + } - () - } - SecretValue(payload63) => { - mbt_ffi_store8(iter_base + 0, 31) + @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 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() + } - let @types.Secret(handle) = payload63 - mbt_ffi_store32(iter_base + 8, handle) + Option::Some(lifted298) + } + _ => panic() + } - () - } - QuotaTokenHandle(payload64) => { - mbt_ffi_store8(iter_base + 0, 32) + let lifted301 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted300 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let @types.QuotaToken(handle65) = payload64 - mbt_ffi_store32(iter_base + 8, handle65) + Option::Some(lifted300) + } + _ => panic() + } - () - } - } - } + let lifted303 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result302 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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 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 lifted239 = match mbt_ffi_load8_u(return_area + 0) { - 0 => { - let result = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 4), - mbt_ffi_load32(return_area + 8), - ) - - Result::Ok(result) - } - 1 => { - let lifted238 = match mbt_ffi_load8_u(return_area + 4) { - 0 => { - let result72 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) - - @common.AgentError::InvalidInput(result72) - } - 1 => { - let result73 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) - - @common.AgentError::InvalidMethod(result73) - } - 2 => { - let result74 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) - - @common.AgentError::InvalidType(result74) - } - 3 => { - let result75 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + Option::Some(result302) + } + _ => panic() + } - @common.AgentError::InvalidAgentId(result75) - } - 4 => { - 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 + Option::Some(@types.NumericRestrictions::{ + min: lifted299, + max: lifted301, + unit: lifted303, + }) + } + _ => panic() + } - 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 + @types.SchemaTypeBody::S64Type(lifted304) + } + 6 => { + let lifted311 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted306 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted305 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result76 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted305) + } + _ => panic() + } - let lifted : String? = match mbt_ffi_load8_u(iter_base + 12) { + let lifted308 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result77 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted307 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result77) + Option::Some(lifted307) } _ => 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), - ) + let lifted310 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result309 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - array.push(result78) + Option::Some(result309) + } + _ => panic() } - 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 + Option::Some(@types.NumericRestrictions::{ + min: lifted306, + max: lifted308, + unit: lifted310, + }) + } + _ => panic() + } - let result80 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::U8Type(lifted311) + } + 7 => { + let lifted318 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted313 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted312 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array81.push(result80) + Option::Some(lifted312) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted84 : String? = match + let lifted315 : @types.NumericBound? = 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), - ) + let lifted314 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result83) + Option::Some(lifted314) } _ => panic() } - let lifted87 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { + let lifted317 : String? = match + mbt_ffi_load8_u(iter_base + 64) { 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() - } + let result316 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - Option::Some(lifted86) + Option::Some(result316) } _ => 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, - }, + Option::Some(@types.NumericRestrictions::{ + min: lifted313, + max: lifted315, + unit: lifted317, }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::RecordType(array88) + _ => 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 lifted91 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + @types.SchemaTypeBody::U16Type(lifted318) + } + 8 => { + let lifted325 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted320 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + 1 => { + let lifted319 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted319) + } _ => panic() } - let lifted93 : String? = match - mbt_ffi_load8_u(iter_base + 16) { + let lifted322 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result92 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + let lifted321 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result92) + Option::Some(lifted321) } _ => 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 result94 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted324 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result323 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - array95.push(result94) + Option::Some(result323) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - - 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 result97 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - array98.push(result97) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + Option::Some(@types.NumericRestrictions::{ + min: lifted320, + max: lifted322, + unit: lifted324, + }) + } + _ => panic() + } - let lifted101 : String? = match - mbt_ffi_load8_u(iter_base + 44) { + @types.SchemaTypeBody::U32Type(lifted325) + } + 9 => { + let lifted332 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted327 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result100 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + let lifted326 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result100) + Option::Some(lifted326) } _ => panic() } - let lifted104 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { + let lifted329 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { 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 => { - let result102 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), + let lifted328 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), ) - - @types.Role::Other(result102) - } _ => panic() } - Option::Some(lifted103) + Option::Some(lifted328) } _ => panic() } - 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)) + let lifted331 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result330 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result330) + } + _ => panic() + } - @types.SchemaTypeBody::VariantType(array105) + Option::Some(@types.NumericRestrictions::{ + min: lifted327, + max: lifted329, + unit: lifted331, + }) + } + _ => 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 - let result107 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::U64Type(lifted332) + } + 10 => { + let lifted339 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted334 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted333 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array108.push(result107) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + Option::Some(lifted333) + } + _ => panic() + } - @types.SchemaTypeBody::EnumType(array108) - } - 17 => { - 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 + let lifted336 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted335 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let result110 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted335) + } + _ => panic() + } - array111.push(result110) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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), + ) - @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 + Option::Some(result337) + } + _ => panic() + } - array113.push(mbt_ffi_load32(iter_base + 0)) + Option::Some(@types.NumericRestrictions::{ + min: lifted334, + max: lifted336, + unit: lifted338, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::TupleType(array113) + _ => panic() } - 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 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() - } + @types.SchemaTypeBody::F32Type(lifted339) + } + 11 => { + let lifted346 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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() + } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted115, - err: lifted116, - }) - } - 24 => { - let lifted120 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - 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 + Option::Some(lifted340) + } + _ => panic() + } - let result117 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted343 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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() + } - array118.push(result117) + Option::Some(lifted342) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + _ => 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), + ) - Option::Some(array118) + Option::Some(result344) + } + _ => panic() } - _ => panic() + + Option::Some(@types.NumericRestrictions::{ + min: lifted341, + max: lifted343, + unit: lifted345, + }) } + _ => panic() + } + + @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 result347 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted121 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { + let lifted349 : String? = match + mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), + 1 => { + let result348 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), ) + + Option::Some(result348) + } _ => panic() } - 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() + 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 lifted124 : String? = match - mbt_ffi_load8_u(iter_base + 36) { + 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 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 lifted357 : String? = match + mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result123 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), + let result356 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), ) - Option::Some(result123) + Option::Some(result356) } _ => panic() } - @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) { + let lifted360 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 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 - - let result125 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted359 = match mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result358 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) - array126.push(result125) + @types.Role::Other(result358) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array126) + Option::Some(lifted359) } _ => 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() - } + 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(array361) + } + 15 => { + 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 result363 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted130 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { + let lifted364 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 32).reinterpret_as_uint(), - ) + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted128, - min_bytes: lifted129, - max_bytes: lifted130, - }) - } - 26 => { - let lifted134 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 12) { + let lifted366 : String? = match + mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 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 - - let result131 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array132.push(result131) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + let result365 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - Option::Some(array132) + Option::Some(result365) } _ => 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 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 + 28)) - - Option::Some(array136) - } - _ => 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, - }) - } - 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 - - let result139 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array140.push(result139) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - - Option::Some(array140) - } - _ => panic() - } - - let lifted146 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { - 0 => Option::None - 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 - - let result143 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array144.push(result143) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + let result367 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(array144) - } - _ => panic() + array368.push(result367) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - @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 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 result148 = mbt_ffi_ptr2str( + let result370 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array149.push(result148) + array371.push(result370) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted152 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { + let lifted374 : String? = match + mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result151 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), + let result373 = 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: result151, - }) + Option::Some(result373) } _ => panic() } - let lifted154 : @types.QuantityValue? = match + let lifted377 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result153 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 76), - mbt_ffi_load32(iter_base + 80), - ) + let lifted376 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result375 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result153, - }) + @types.Role::Other(result375) + } + _ => panic() + } + + Option::Some(lifted376) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result147, - allowed_suffixes: array149, - min: lifted152, - max: lifted154, + array378.push(@types.VariantCaseType::{ + name: result363, + payload: lifted364, + metadata: @types.MetadataEnvelope::{ + doc: lifted366, + aliases: array368, + examples: array371, + deprecated: lifted374, + role: lifted377, + }, }) } - 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 => { - let result156 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.DiscriminatorRule::Prefix(result156) - } - 1 => { - let result157 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + @types.SchemaTypeBody::VariantType(array378) + } + 16 => { + 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 - @types.DiscriminatorRule::Suffix(result157) - } - 2 => { - let result158 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let result380 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.DiscriminatorRule::Contains(result158) - } - 3 => { - let result159 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + array381.push(result380) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.DiscriminatorRule::Regex(result159) - } - 4 => { - let result160 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + @types.SchemaTypeBody::EnumType(array381) + } + 17 => { + 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 lifted162 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result161 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) + let result383 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(result161) - } - _ => panic() - } + array384.push(result383) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @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.SchemaTypeBody::FlagsType(array384) + } + 18 => { + 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 - @types.DiscriminatorRule::FieldAbsent(result163) - } - _ => panic() - } + array386.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let lifted166 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result165 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + @types.SchemaTypeBody::TupleType(array386) + } + 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 lifted388 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - Option::Some(result165) - } - _ => panic() - } + let lifted389 : Int? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + _ => panic() + } - 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.SchemaTypeBody::ResultType(@types.ResultSpec::{ + ok: lifted388, + err: lifted389, + }) + } + 24 => { + let lifted393 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 result167 = mbt_ffi_ptr2str( + let result390 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array168.push(result167) + array391.push(result390) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - 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 + Option::Some(array391) + } + _ => panic() + } - let result170 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted394 : 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() + } - array171.push(result170) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + let lifted395 : 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 lifted174 : String? = match - mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result173 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), - ) + let lifted397 : String? = match mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result396 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - Option::Some(result173) - } - _ => panic() - } + Option::Some(result396) + } + _ => panic() + } - let lifted177 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted176 = match mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result175 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted393, + min_length: lifted394, + max_length: lifted395, + regex: lifted397, + }) + } + 25 => { + let lifted401 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 - @types.Role::Other(result175) - } - _ => panic() - } + let result398 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(lifted176) - } - _ => panic() + array399.push(result398) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - 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, - }, - }) + Option::Some(array399) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + _ => panic() + } - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array178, - }) + let lifted402 : 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() } - 32 => { - let lifted181 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result180 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), + + let lifted403 : 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: 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 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 result404 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result180) + array405.push(result404) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted181, - }) + Option::Some(array405) + } + _ => panic() } - 33 => { - let lifted183 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result182 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), + + let lifted411 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + 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 result408 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result182) + array409.push(result408) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted183, - }) - } - 34 => { - let lifted184 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + Option::Some(array409) } - - @types.SchemaTypeBody::FutureType(lifted184) + _ => panic() } - 35 => { - let lifted185 : 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(lifted185) - } - _ => 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: lifted407, + allowed_extensions: lifted411, + }) } + 27 => { + let lifted415 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 lifted188 : String? = match mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result187 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), - ) + let result412 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array413.push(result412) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(result187) + Option::Some(array413) + } + _ => panic() } - _ => panic() - } - 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 lifted419 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + 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 result189 = 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), + ) - array190.push(result189) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + array417.push(result416) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - 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 + Option::Some(array417) + } + _ => panic() + } - let result192 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted415, + allowed_hosts: lifted419, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result420 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), ) - array193.push(result192) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + 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 lifted196 : String? = match mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result195 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), + let result421 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result195) + array422.push(result421) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted199 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted198 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result197 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + 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), + ) - @types.Role::Other(result197) - } - _ => panic() + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result424, + }) } - - Option::Some(lifted198) + _ => panic() } - _ => panic() - } - 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 lifted427 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result426 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 76), + mbt_ffi_load32(iter_base + 80), + ) - 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 + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 64), + scale: mbt_ffi_load32(iter_base + 72), + unit: result426, + }) + } + _ => panic() + } - let result202 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result420, + allowed_suffixes: array422, + min: lifted425, + max: lifted427, + }) + } + 31 => { + 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 lifted204 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result203 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), + let result428 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result203) - } - _ => 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)) + let lifted437 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result429 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let array236 : Array[@types.SchemaValueNode] = [] - for index237 = 0 - index237 < mbt_ffi_load32(return_area + 32) - index237 = index237 + 1 { - let iter_base = mbt_ffi_load32(return_area + 28) + index237 * 32 + @types.DiscriminatorRule::Prefix(result429) + } + 1 => { + let result430 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let lifted235 = 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 result207 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::StringValue(result207) - } - 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 - - array208.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::RecordValue(array208) - } - 14 => { - let lifted210 : Int? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + @types.DiscriminatorRule::Suffix(result430) + } + 2 => { + let result431 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted210, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 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 + @types.DiscriminatorRule::Contains(result431) + } + 3 => { + let result432 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - array211.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.DiscriminatorRule::Regex(result432) + } + 4 => { + let result433 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - @types.SchemaValueNode::FlagsValue(array211) - } - 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 lifted435 : String? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result434 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), + ) - array213.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + Option::Some(result434) + } + _ => panic() + } - @types.SchemaValueNode::TupleValue(array213) - } - 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 + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result433, + literal: lifted435, + }) + } + 5 => { + let result436 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - array215.push(mbt_ffi_load32(iter_base + 0)) + @types.DiscriminatorRule::FieldAbsent(result436) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array215) - } - 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 lifted439 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result438 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - array217.push(mbt_ffi_load32(iter_base + 0)) + Option::Some(result438) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array217) - } - 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 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 - 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)) + let result440 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaValueNode::MapValue(array219) - } - 21 => { - let lifted221 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + array441.push(result440) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - @types.SchemaValueNode::OptionValue(lifted221) - } - 22 => { - let lifted224 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted222 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + 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 - @types.ResultValuePayload::OkValue(lifted222) - } - 1 => { - let lifted223 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + let result443 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.ResultValuePayload::ErrValue(lifted223) - } - _ => panic() + array444.push(result443) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - @types.SchemaValueNode::ResultValue(lifted224) - } - 23 => { - let result225 = 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 lifted447 : String? = match + mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result226 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), + let result446 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), ) - Option::Some(result226) + Option::Some(result446) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result225, - language: lifted227, - }) - } - 24 => { - let result228 = 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 lifted450 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let result229 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + let lifted449 = match mbt_ffi_load8_u(iter_base + 80) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result448 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), + ) - Option::Some(result229) + @types.Role::Other(result448) + } + _ => panic() + } + + Option::Some(lifted449) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result228, - mime_type: lifted230, + 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, + }, }) } - 25 => { - let result231 = 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.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array451, + }) + } + 32 => { + let lifted454 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result453 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - @types.SchemaValueNode::PathValue(result231) + Option::Some(result453) + } + _ => panic() } - 26 => { - let result232 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - @types.SchemaValueNode::UrlValue(result232) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted454, + }) + } + 33 => { + let lifted456 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result455 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result455) + } + _ => panic() } - 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 result233 = 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.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted456, + }) + } + 34 => { + let lifted457 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() } - 30 => { - let result234 = 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), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), - ) - _ => panic() + @types.SchemaTypeBody::FutureType(lifted457) } + 35 => { + let lifted458 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - array236.push(lifted235) + @types.SchemaTypeBody::StreamType(lifted458) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(return_area + 28)) - @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: array236, - root: mbt_ffi_load32(return_area + 36), - }, - }) - } - _ => panic() - } + let lifted461 : String? = match mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result460 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) - Result::Err(lifted238) - } - _ => panic() - } - let ret = lifted239 - mbt_ffi_free(ptr) - mbt_ffi_free(address66) - mbt_ffi_free(return_area) + Option::Some(result460) + } + _ => panic() + } - cleanup_list.each(mbt_ffi_free) - return ret -} + 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 -///| -/// 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 ptr = mbt_ffi_str2ptr(agent_id) - let return_area = mbt_ffi_malloc(72) - wasmImportParseAgentId(ptr, agent_id.length(), return_area) + let result462 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted331 = match mbt_ffi_load8_u(return_area + 0) { - 0 => { - let result = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + array463.push(result462) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - 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 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 lifted109 = 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 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 result465 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let result0 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + array466.push(result465) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + + let lifted469 : String? = match mbt_ffi_load8_u(iter_base + 116) { + 0 => Option::None + 1 => { + let result468 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 120), + mbt_ffi_load32(iter_base + 124), ) - let lifted : 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), + Option::Some(result468) + } + _ => panic() + } + + let lifted472 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted471 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result470 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), ) - Option::Some(result1) + @types.Role::Other(result470) } _ => 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 result2 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted471) + } + _ => panic() + } - array.push(result2) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + 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)) - 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 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 result3 = 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), + ) - array4.push(result3) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + let lifted477 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result476 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - let lifted7 : 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), - ) + Option::Some(result476) + } + _ => panic() + } - Option::Some(result6) - } - _ => 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 lifted10 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { - 0 => Option::None - 1 => { - let lifted9 = match mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result8 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), - ) + 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), + ) - @types.Role::Other(result8) - } - _ => panic() - } + Option::Some(result480) + } + _ => panic() + } - Option::Some(lifted9) - } - _ => panic() - } + let result482 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 52), + mbt_ffi_load32(iter_base + 56), + ) - 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)) + 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), + ) - @types.SchemaTypeBody::RecordType(array11) + Option::Some(result483) } - 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 + _ => 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 result13 = mbt_ffi_ptr2str( + let result485 = 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) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + 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 lifted16 : 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 result15 = mbt_ffi_ptr2str( + let result487 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result15) + Option::Some(result487) } _ => 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 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 result17 = mbt_ffi_ptr2str( + let result489 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array18.push(result17) + array490.push(result489) } 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 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 result20 = mbt_ffi_ptr2str( + let result492 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array21.push(result20) + array493.push(result492) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted24 : 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 result23 = mbt_ffi_ptr2str( + let result495 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result23) + Option::Some(result495) } _ => panic() } - let lifted27 : @types.Role? = match + let lifted499 : @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 lifted498 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result25 = mbt_ffi_ptr2str( + let result497 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result25) + @types.Role::Other(result497) } _ => panic() } - Option::Some(lifted26) + Option::Some(lifted498) } _ => panic() } - array28.push(@types.VariantCaseType::{ - name: result13, - payload: lifted14, + array500.push(@common.NamedField::{ + name: result485, + source: lifted486, + schema: mbt_ffi_load32(iter_base + 12), metadata: @types.MetadataEnvelope::{ - doc: lifted16, - aliases: array18, - examples: array21, - deprecated: lifted24, - role: lifted27, + 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::VariantType(array28) + @common.InputSchema::Parameters(array500) } - 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 + _ => panic() + } - let result30 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array31.push(result30) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let result503 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaTypeBody::EnumType(array31) - } - 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 result504 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let result33 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 lifted506 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @common.HttpMethod::Get + 1 => @common.HttpMethod::Head + 2 => @common.HttpMethod::Post + 3 => @common.HttpMethod::Put + 4 => @common.HttpMethod::Delete + 5 => @common.HttpMethod::Connect + 6 => @common.HttpMethod::Options + 7 => @common.HttpMethod::Trace + 8 => @common.HttpMethod::Patch + 9 => { + let result505 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - array34.push(result33) + @common.HttpMethod::Custom(result505) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array34) - } - 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 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 - array36.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted510 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result507 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - @types.SchemaTypeBody::TupleType(array36) - } - 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 lifted38 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } - - let lifted39 : 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: lifted38, - err: lifted39, - }) - } - 24 => { - let lifted43 : 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 result40 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), + @common.PathSegment::Literal(result507) + } + 1 => + @common.PathSegment::SystemVariable( + @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), + ) + 2 => { + let result508 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), ) - array41.push(result40) + @common.PathSegment::PathVariable(@common.PathVariable::{ + variable_name: result508, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + 3 => { + let result509 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - Option::Some(array41) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ + variable_name: result509, + }) + } + _ => panic() } - _ => panic() - } - let lifted44 : 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() + array511.push(lifted510) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - let lifted45 : 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 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 lifted47 : 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 result513 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(result46) - } - _ => panic() + let result514 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + array515.push(@common.HeaderVariable::{ + header_name: result513, + variable_name: result514, + }) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 20)) - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted43, - min_length: lifted44, - max_length: lifted45, - regex: lifted47, - }) - } - 25 => { - let lifted51 : 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 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 result48 = 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), + ) - array49.push(result48) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + let result518 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - Option::Some(array49) - } - _ => panic() + array519.push(@common.QueryVariable::{ + query_param_name: result517, + variable_name: result518, + }) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let lifted52 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { + let lifted521 : @common.AuthDetails? = match + mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => - Option::Some( - mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), - ) + Option::Some(@common.AuthDetails::{ + required: mbt_ffi_load8_u(iter_base + 37) != 0, + }) _ => panic() } - let lifted53 : 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 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 result522 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array523.push(result522) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted51, - min_bytes: lifted52, - max_bytes: lifted53, + 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 }, }) } - 26 => { - let lifted57 : 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 + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let result54 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted528 : String? = match mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result527 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), + ) + + Option::Some(result527) + } + _ => panic() + } + + let lifted546 = match mbt_ffi_load8_u(iter_base + 36) { + 0 => { + 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 result529 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - array55.push(result54) + let lifted530 = 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() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array55) - } - _ => panic() - } + let lifted532 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result531 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - let lifted61 : 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 + Option::Some(result531) + } + _ => panic() + } + + 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 result58 = mbt_ffi_ptr2str( + let result533 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array59.push(result58) + array534.push(result533) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array59) - } - _ => 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, - }) - } - 27 => { - let lifted65 : 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 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 result62 = mbt_ffi_ptr2str( + let result536 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array63.push(result62) + array537.push(result536) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - Option::Some(array63) - } - _ => panic() - } + let lifted540 : String? = match + mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result539 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) - let lifted69 : 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 + Option::Some(result539) + } + _ => panic() + } - let result66 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted543 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted542 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result541 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) + + @types.Role::Other(result541) + } + _ => panic() + } - array67.push(result66) + Option::Some(lifted542) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array67) + 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, + }, + }) } - _ => panic() + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) + + @common.InputSchema::Parameters(array544) } + _ => panic() + } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted65, - allowed_hosts: lifted69, - }) + let lifted547 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => @common.OutputSchema::Unit + 1 => @common.OutputSchema::Single(mbt_ffi_load32(iter_base + 52)) + _ => panic() } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result70 = 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 lifted549 : @common.ReadOnlyConfig? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted548 = match mbt_ffi_load8_u(iter_base + 64) { + 0 => @common.CachePolicy::NoCache + 1 => @common.CachePolicy::UntilWrite + 2 => + @common.CachePolicy::Ttl( + mbt_ffi_load64(iter_base + 72).reinterpret_as_uint64(), + ) + _ => panic() + } - let result71 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array72.push(result71) + Option::Some(@common.ReadOnlyConfig::{ + cache_policy: lifted548, + uses_principal: mbt_ffi_load8_u(iter_base + 80) != 0, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - let lifted75 : @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), + 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)) + + 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)) + + let lifted570 : @common.HttpMountDetails? = match + mbt_ffi_load8_u(return_area + 116) { + 0 => Option::None + 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 lifted557 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result554 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + 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: result74, - }) + @common.PathSegment::Literal(result554) } - _ => panic() - } + 1 => + @common.PathSegment::SystemVariable( + @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), + ) + 2 => { + let result555 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - let lifted77 : @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), + @common.PathSegment::PathVariable(@common.PathVariable::{ + variable_name: result555, + }) + } + 3 => { + let result556 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + 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: result76, + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ + variable_name: result556, }) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result70, - allowed_suffixes: array72, - min: lifted75, - max: lifted77, - }) + array558.push(lifted557) } - 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 result79 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - - @types.DiscriminatorRule::Prefix(result79) - } - 1 => { - let result80 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - - @types.DiscriminatorRule::Suffix(result80) - } - 2 => { - let result81 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - - @types.DiscriminatorRule::Contains(result81) - } - 3 => { - let result82 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + mbt_ffi_free(mbt_ffi_load32(return_area + 120)) - @types.DiscriminatorRule::Regex(result82) - } - 4 => { - let result83 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted560 : @common.AuthDetails? = match + mbt_ffi_load8_u(return_area + 128) { + 0 => Option::None + 1 => + Option::Some(@common.AuthDetails::{ + required: mbt_ffi_load8_u(return_area + 129) != 0, + }) + _ => panic() + } - let lifted85 : 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 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 - Option::Some(result84) - } - _ => panic() - } + let result561 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result83, - literal: lifted85, - }) - } - 5 => { - let result86 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + array562.push(result561) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 132)) - @types.DiscriminatorRule::FieldAbsent(result86) - } - _ => panic() - } + 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 lifted89 : 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 lifted567 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result564 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - Option::Some(result88) - } - _ => panic() + @common.PathSegment::Literal(result564) } - - 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 result90 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), + 1 => + @common.PathSegment::SystemVariable( + @common.SystemVariable::from(mbt_ffi_load8_u(iter_base + 4)), + ) + 2 => { + let result565 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), ) - array91.push(result90) + @common.PathSegment::PathVariable(@common.PathVariable::{ + variable_name: result565, + }) } - 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 result93 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), + 3 => { + let result566 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), ) - array94.push(result93) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{ + variable_name: result566, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + _ => panic() + } - let lifted97 : 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), - ) + array568.push(lifted567) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 140)) - Option::Some(result96) - } - _ => panic() - } + 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() + } - let lifted100 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted99 = match mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result98 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + let lifted572 = match mbt_ffi_load8_u(return_area + 152) { + 0 => @common.Snapshotting::Disabled + 1 => { + let lifted571 = match mbt_ffi_load8_u(return_area + 160) { + 0 => @common.SnapshottingConfig::Default + 1 => + @common.SnapshottingConfig::Periodic( + mbt_ffi_load64(return_area + 168).reinterpret_as_uint64(), + ) + 2 => + @common.SnapshottingConfig::EveryNInvocation( + mbt_ffi_load16_u(return_area + 168) + .land(0xFFFF) + .reinterpret_as_uint(), + ) + _ => panic() + } - @types.Role::Other(result98) - } - _ => panic() - } + @common.Snapshotting::Enabled(lifted571) + } + _ => panic() + } - Option::Some(lifted99) - } - _ => panic() - } + 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 - 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, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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::UnionType(@types.UnionSpec::{ - branches: array101, - }) - } - 32 => { - let lifted104 : String? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result103 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let result573 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(result103) - } - _ => panic() - } + array574.push(result573) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted104, - }) - } - 33 => { - 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), - ) + 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)) - Option::Some(result105) - } - _ => panic() - } + 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::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted106, - }) - } - 34 => { - let lifted107 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } +///| +/// 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::FutureType(lifted107) - } - 35 => { - 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 ptr = mbt_ffi_str2ptr(agent_type_name) - @types.SchemaTypeBody::StreamType(lifted108) - } - _ => 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 - let lifted111 : 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), - ) + 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(result110) - } - _ => panic() - } + () + } + S8Value(payload0) => { + mbt_ffi_store8(iter_base + 0, 1) + mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload0)) - 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 + () + } + S16Value(payload1) => { + mbt_ffi_store8(iter_base + 0, 2) + mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload1)) - let result112 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + S32Value(payload2) => { + mbt_ffi_store8(iter_base + 0, 3) + mbt_ffi_store32(iter_base + 8, payload2) - array113.push(result112) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + () + } + S64Value(payload3) => { + mbt_ffi_store8(iter_base + 0, 4) + mbt_ffi_store64(iter_base + 8, payload3) - 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 + () + } + U8Value(payload4) => { + mbt_ffi_store8(iter_base + 0, 5) + mbt_ffi_store8(iter_base + 8, payload4.to_int()) - let result115 = 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()) - array116.push(result115) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + () + } + U32Value(payload6) => { + mbt_ffi_store8(iter_base + 0, 7) + mbt_ffi_store32(iter_base + 8, payload6.reinterpret_as_int()) - let lifted119 : 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), - ) + () + } + U64Value(payload7) => { + mbt_ffi_store8(iter_base + 0, 8) + mbt_ffi_store64(iter_base + 8, payload7.reinterpret_as_int64()) - Option::Some(result118) - } - _ => panic() - } + () + } + F32Value(payload8) => { + mbt_ffi_store8(iter_base + 0, 9) + mbt_ffi_storef32(iter_base + 8, payload8) - let lifted122 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted121 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result120 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + () + } + F64Value(payload9) => { + mbt_ffi_store8(iter_base + 0, 10) + mbt_ffi_storef64(iter_base + 8, payload9) - @types.Role::Other(result120) - } - _ => panic() - } + () + } + CharValue(payload10) => { + mbt_ffi_store8(iter_base + 0, 11) + mbt_ffi_store32(iter_base + 8, payload10.to_int()) - Option::Some(lifted121) - } - _ => panic() - } + () + } + StringValue(payload11) => { + mbt_ffi_store8(iter_base + 0, 12) - array123.push(@types.SchemaTypeNode::{ - body: lifted109, - metadata: @types.MetadataEnvelope::{ - doc: lifted111, - aliases: array113, - examples: array116, - deprecated: lifted119, - role: lifted122, - }, - }) + 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) + + () } - mbt_ffi_free(mbt_ffi_load32(return_area + 16)) + 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) - 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 + () + } + VariantValue(payload14) => { + mbt_ffi_store8(iter_base + 0, 14) + mbt_ffi_store32(iter_base + 8, payload14.case.reinterpret_as_int()) - let result125 = 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) - let lifted127 : 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), - ) + () + } + Some(payload16) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload16) - Option::Some(result126) + () } - _ => 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)) + EnumValue(payload17) => { + mbt_ffi_store8(iter_base + 0, 15) + mbt_ffi_store32(iter_base + 8, payload17.reinterpret_as_int()) - let array159 : Array[@types.SchemaValueNode] = [] - for index160 = 0 - index160 < mbt_ffi_load32(return_area + 40) - index160 = index160 + 1 { - let iter_base = mbt_ffi_load32(return_area + 36) + index160 * 32 + () + } + FlagsValue(payload18) => { + mbt_ffi_store8(iter_base + 0, 16) - let lifted158 = 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 result130 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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) - @types.SchemaValueNode::StringValue(result130) - } - 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 + () + } + TupleValue(payload21) => { + mbt_ffi_store8(iter_base + 0, 17) - array131.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 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) + } + mbt_ffi_store32(iter_base + 12, payload21.length()) + mbt_ffi_store32(iter_base + 8, address22) + cleanup_list.push(address22) - @types.SchemaValueNode::RecordValue(array131) - } - 14 => { - let lifted133 : Int? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + () + } + ListValue(payload24) => { + mbt_ffi_store8(iter_base + 0, 18) - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted133, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 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 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) - array134.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + FixedListValue(payload27) => { + mbt_ffi_store8(iter_base + 0, 19) - @types.SchemaValueNode::FlagsValue(array134) - } - 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 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) - array136.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + MapValue(payload30) => { + mbt_ffi_store8(iter_base + 0, 20) - @types.SchemaValueNode::TupleValue(array136) - } - 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 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) - array138.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + OptionValue(payload33) => { + mbt_ffi_store8(iter_base + 0, 21) - @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 + match payload33 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - array140.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Some(payload35) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload35) - @types.SchemaValueNode::FixedListValue(array140) + () } - 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 + } - 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)) + () + } + ResultValue(payload36) => { + mbt_ffi_store8(iter_base + 0, 22) - @types.SchemaValueNode::MapValue(array142) - } - 21 => { - let lifted144 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + match payload36 { + OkValue(payload37) => { + mbt_ffi_store8(iter_base + 8, 0) - @types.SchemaValueNode::OptionValue(lifted144) - } - 22 => { - let lifted147 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted145 : Int? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + match payload37 { + None => { + mbt_ffi_store8(iter_base + 12, 0) - @types.ResultValuePayload::OkValue(lifted145) + () } - 1 => { - let lifted146 : Int? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + Some(payload39) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload39) - @types.ResultValuePayload::ErrValue(lifted146) + () } - _ => panic() } - @types.SchemaValueNode::ResultValue(lifted147) + () } - 23 => { - let result148 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + ErrValue(payload40) => { + mbt_ffi_store8(iter_base + 8, 1) - 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), - ) + match payload40 { + None => { + mbt_ffi_store8(iter_base + 12, 0) - Option::Some(result149) + () + } + Some(payload42) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload42) + + () } - _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result148, - language: lifted150, - }) + () } - 24 => { - let result151 = 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) { - 0 => Option::None - 1 => { - let result152 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + () + } + TextValue(payload43) => { + mbt_ffi_store8(iter_base + 0, 23) - Option::Some(result152) - } - _ => panic() - } + let ptr44 = mbt_ffi_str2ptr(payload43.text) + mbt_ffi_store32(iter_base + 12, payload43.text.length()) + mbt_ffi_store32(iter_base + 8, ptr44) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result151, - mime_type: lifted153, - }) - } - 25 => { - let result154 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + match payload43.language { + None => { + mbt_ffi_store8(iter_base + 16, 0) - @types.SchemaValueNode::PathValue(result154) + () } - 26 => { - let result155 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + Some(payload46) => { + mbt_ffi_store8(iter_base + 16, 1) - @types.SchemaValueNode::UrlValue(result155) - } - 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 result156 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result156, - }) + () } - 30 => { - let result157 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + } + cleanup_list.push(ptr44) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result157, - body: mbt_ffi_load32(iter_base + 16), - }) + () + } + 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) + + () } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), - ) - _ => panic() } + cleanup_list.push(ptr49) - array159.push(lifted158) + () } - mbt_ffi_free(mbt_ffi_load32(return_area + 36)) + PathValue(payload53) => { + mbt_ffi_store8(iter_base + 0, 25) - let lifted161 : @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() + 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) - 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: array159, - root: mbt_ffi_load32(return_area + 44), - }, - }, - lifted161, - ), + 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 @types.Secret(handle) = payload63 + mbt_ffi_store32(iter_base + 8, handle) + + () + } + QuotaTokenHandle(payload64) => { + mbt_ffi_store8(iter_base + 0, 32) + + let @types.QuotaToken(handle65) = payload64 + mbt_ffi_store32(iter_base + 8, handle65) + + () + } + } + } + + 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 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 lifted309 = match mbt_ffi_load8_u(return_area + 0) { + 0 => { + let result = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 4), + mbt_ffi_load32(return_area + 8), ) + + Result::Ok(result) } 1 => { - let lifted330 = match mbt_ffi_load8_u(return_area + 8) { + let lifted308 = match mbt_ffi_load8_u(return_area + 4) { 0 => { - let result162 = mbt_ffi_ptr2str( + let result72 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), ) - @common.AgentError::InvalidInput(result162) + @common.AgentError::InvalidInput(result72) } 1 => { - let result163 = mbt_ffi_ptr2str( + let result73 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), ) - @common.AgentError::InvalidMethod(result163) + @common.AgentError::InvalidMethod(result73) } 2 => { - let result164 = mbt_ffi_ptr2str( + let result74 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), ) - @common.AgentError::InvalidType(result164) + @common.AgentError::InvalidType(result74) } 3 => { - let result165 = mbt_ffi_ptr2str( + let result75 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), ) - @common.AgentError::InvalidAgentId(result165) + @common.AgentError::InvalidAgentId(result75) } 4 => { - let array292 : Array[@types.SchemaTypeNode] = [] - for index293 = 0 - index293 < mbt_ffi_load32(return_area + 16) - index293 = index293 + 1 { - let iter_base = mbt_ffi_load32(return_area + 12) + index293 * 144 + 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 - let lifted278 = match mbt_ffi_load8_u(iter_base + 0) { + 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 => @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 array180 : Array[@types.NamedFieldType] = [] - for index181 = 0 - index181 < mbt_ffi_load32(iter_base + 12) - index181 = index181 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index181 * 68 + 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() + } - let result166 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted) + } + _ => panic() + } - let lifted168 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result167 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted78 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted77 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result167) + Option::Some(lifted77) + } + _ => panic() } - _ => panic() - } - let array170 : Array[String] = [] - for index171 = 0 - index171 < mbt_ffi_load32(iter_base + 28) - index171 = index171 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index171 * 8 + 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), + ) - let result169 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result79) + } + _ => panic() + } - array170.push(result169) + Option::Some(@types.NumericRestrictions::{ + min: lifted76, + max: lifted78, + unit: lifted80, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + _ => panic() + } - let array173 : Array[String] = [] - for index174 = 0 - index174 < mbt_ffi_load32(iter_base + 36) - index174 = index174 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 32) + - index174 * 8 + @types.SchemaTypeBody::S8Type(lifted81) + } + 3 => { + let lifted88 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted83 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted82 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result172 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted82) + } + _ => panic() + } - array173.push(result172) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - - let lifted176 : String? = match - mbt_ffi_load8_u(iter_base + 40) { - 0 => Option::None - 1 => { - let result175 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + 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 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result175) + Option::Some(lifted84) + } + _ => panic() } - _ => panic() - } - let lifted179 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { - 0 => Option::None - 1 => { - let lifted178 = match mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result177 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), - ) + let lifted87 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result86 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.Role::Other(result177) - } - _ => panic() + Option::Some(result86) } - - Option::Some(lifted178) + _ => panic() } - _ => panic() - } - array180.push(@types.NamedFieldType::{ - name: result166, - body: mbt_ffi_load32(iter_base + 8), - metadata: @types.MetadataEnvelope::{ - doc: lifted168, - aliases: array170, - examples: array173, - deprecated: lifted176, - role: lifted179, - }, - }) + Option::Some(@types.NumericRestrictions::{ + min: lifted83, + max: lifted85, + unit: lifted87, + }) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array180) + @types.SchemaTypeBody::S16Type(lifted88) } - 15 => { - let array197 : Array[@types.VariantCaseType] = [] - for index198 = 0 - index198 < mbt_ffi_load32(iter_base + 12) - index198 = index198 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index198 * 72 - - let result182 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - let lifted183 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } - - let lifted185 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result184 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 4 => { + let lifted95 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted90 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted89 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result184) + Option::Some(lifted89) + } + _ => panic() } - _ => panic() - } - - let array187 : Array[String] = [] - for index188 = 0 - index188 < mbt_ffi_load32(iter_base + 32) - index188 = index188 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + - index188 * 8 - let result186 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted92 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted91 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - array187.push(result186) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + Option::Some(lifted91) + } + _ => panic() + } - let array190 : Array[String] = [] - for index191 = 0 - index191 < mbt_ffi_load32(iter_base + 40) - index191 = index191 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + - index191 * 8 + let lifted94 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result93 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let result189 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result93) + } + _ => panic() + } - array190.push(result189) + Option::Some(@types.NumericRestrictions::{ + min: lifted90, + max: lifted92, + unit: lifted94, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + _ => panic() + } - let lifted193 : String? = match - mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result192 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + @types.SchemaTypeBody::S32Type(lifted95) + } + 5 => { + let lifted102 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted97 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted96 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result192) + Option::Some(lifted96) + } + _ => panic() } - _ => panic() - } - - let lifted196 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted195 = match mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result194 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) - @types.Role::Other(result194) + let lifted99 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted98 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::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(lifted195) + Option::Some(lifted98) + } + _ => panic() } - _ => panic() - } - - array197.push(@types.VariantCaseType::{ - name: result182, - payload: lifted183, - metadata: @types.MetadataEnvelope::{ - doc: lifted185, - aliases: array187, - examples: array190, - deprecated: lifted193, - role: lifted196, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array197) - } - 16 => { - let array200 : Array[String] = [] - for index201 = 0 - index201 < mbt_ffi_load32(iter_base + 12) - index201 = index201 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index201 * 8 + let lifted101 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result100 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let result199 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result100) + } + _ => panic() + } - array200.push(result199) + Option::Some(@types.NumericRestrictions::{ + min: lifted97, + max: lifted99, + unit: lifted101, + }) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array200) + @types.SchemaTypeBody::S64Type(lifted102) } - 17 => { - let array203 : Array[String] = [] - for index204 = 0 - index204 < mbt_ffi_load32(iter_base + 12) - index204 = index204 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index204 * 8 + 6 => { + let lifted109 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted104 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted103 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result202 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted103) + } + _ => panic() + } - array203.push(result202) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted106 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted105 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::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.SchemaTypeBody::FlagsType(array203) - } - 18 => { - 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(lifted105) + } + _ => panic() + } - array205.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted108 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result107 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.SchemaTypeBody::TupleType(array205) - } - 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 lifted207 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + Option::Some(result107) + } + _ => panic() + } - let lifted208 : Int? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + Option::Some(@types.NumericRestrictions::{ + min: lifted104, + max: lifted106, + unit: lifted108, + }) + } _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted207, - err: lifted208, - }) + @types.SchemaTypeBody::U8Type(lifted109) } - 24 => { - let lifted212 : Array[String]? = match + 7 => { + let lifted116 : @types.NumericRestrictions? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - 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 result209 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted111 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted110 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array210.push(result209) + Option::Some(lifted110) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array210) - } - _ => panic() - } + let lifted113 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted112 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let lifted213 : 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() - } + Option::Some(lifted112) + } + _ => panic() + } - let lifted214 : 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 lifted115 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result114 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let lifted216 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result215 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + Option::Some(result114) + } + _ => panic() + } - Option::Some(result215) + Option::Some(@types.NumericRestrictions::{ + min: lifted111, + max: lifted113, + unit: lifted115, + }) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted212, - min_length: lifted213, - max_length: lifted214, - regex: lifted216, - }) + @types.SchemaTypeBody::U16Type(lifted116) } - 25 => { - let lifted220 : Array[String]? = match + 8 => { + let lifted123 : @types.NumericRestrictions? = 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 lifted118 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted117 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result217 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted117) + } + _ => panic() + } + + let lifted120 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted119 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - array218.push(result217) + Option::Some(lifted119) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array218) - } - _ => panic() - } + let lifted122 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result121 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let lifted221 : 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() - } + Option::Some(result121) + } + _ => panic() + } - let lifted222 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { - 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 32).reinterpret_as_uint(), - ) + Option::Some(@types.NumericRestrictions::{ + min: lifted118, + max: lifted120, + unit: lifted122, + }) + } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted220, - min_bytes: lifted221, - max_bytes: lifted222, - }) + @types.SchemaTypeBody::U32Type(lifted123) } - 26 => { - let lifted226 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 12) { + 9 => { + let lifted130 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array224 : Array[String] = [] - for index225 = 0 - index225 < mbt_ffi_load32(iter_base + 20) - index225 = index225 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + - index225 * 8 - - let result223 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted125 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted124 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array224.push(result223) + Option::Some(lifted124) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array224) - } - _ => panic() - } + let lifted127 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted126 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let lifted230 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - 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(lifted126) + } + _ => panic() + } - let result227 = 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 + 64) { + 0 => Option::None + 1 => { + let result128 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - array228.push(result227) + Option::Some(result128) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array228) + Option::Some(@types.NumericRestrictions::{ + min: lifted125, + max: lifted127, + unit: lifted129, + }) } _ => 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: lifted226, - allowed_extensions: lifted230, - }) + @types.SchemaTypeBody::U64Type(lifted130) } - 27 => { - let lifted234 : Array[String]? = match + 10 => { + let lifted137 : @types.NumericRestrictions? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array232 : Array[String] = [] - for index233 = 0 - index233 < mbt_ffi_load32(iter_base + 16) - index233 = index233 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index233 * 8 - - let result231 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted132 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted131 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array232.push(result231) + Option::Some(lifted131) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array232) - } - _ => panic() - } + let lifted134 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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() + } - let lifted238 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { - 0 => Option::None - 1 => { - let array236 : Array[String] = [] - for index237 = 0 - index237 < mbt_ffi_load32(iter_base + 28) - index237 = index237 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index237 * 8 + Option::Some(lifted133) + } + _ => panic() + } - let result235 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted136 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result135 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - array236.push(result235) + Option::Some(result135) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array236) + Option::Some(@types.NumericRestrictions::{ + min: lifted132, + max: lifted134, + unit: lifted136, + }) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted234, - allowed_hosts: lifted238, - }) + @types.SchemaTypeBody::F32Type(lifted137) } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result239 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let array241 : Array[String] = [] - for index242 = 0 - index242 < mbt_ffi_load32(iter_base + 20) - index242 = index242 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + 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 + 16)) - - let lifted244 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { + 11 => { + let lifted144 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result243 = 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: result243, - }) - } - _ => panic() - } + 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() + } - let lifted246 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let result245 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 76), - mbt_ffi_load32(iter_base + 80), - ) + Option::Some(lifted138) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result245, + 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.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted140) + } + _ => panic() + } + + let lifted143 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result142 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result142) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted139, + max: lifted141, + unit: lifted143, }) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result239, - allowed_suffixes: array241, - min: lifted244, - max: lifted246, - }) + @types.SchemaTypeBody::F64Type(lifted144) } - 31 => { - let array270 : Array[@types.UnionBranch] = [] - for index271 = 0 - index271 < mbt_ffi_load32(iter_base + 12) - index271 = index271 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index271 * 92 + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + 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 result247 = mbt_ffi_ptr2str( + let result145 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted256 = match mbt_ffi_load8_u(iter_base + 12) { - 0 => { - let result248 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - - @types.DiscriminatorRule::Prefix(result248) - } + let lifted147 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None 1 => { - let result249 = mbt_ffi_ptr2str( + let result146 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result249) + Option::Some(result146) } - 2 => { - let result250 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + _ => panic() + } - @types.DiscriminatorRule::Contains(result250) - } - 3 => { - let result251 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), + 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 result148 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array.push(result148) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + 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 result150 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array151.push(result150) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + + let lifted154 : String? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result153 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), ) - @types.DiscriminatorRule::Regex(result251) + Option::Some(result153) } - 4 => { - let result252 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + _ => panic() + } - let lifted254 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result253 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), + let lifted157 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted156 = match mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result155 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), ) - Option::Some(result253) + @types.Role::Other(result155) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result252, - literal: lifted254, - }) + Option::Some(lifted156) } - 5 => { - let result255 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + _ => panic() + } - @types.DiscriminatorRule::FieldAbsent(result255) - } + 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(array158) + } + 15 => { + 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 result160 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted161 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted258 : String? = match - mbt_ffi_load8_u(iter_base + 36) { + let lifted163 : String? = match + mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result257 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), + let result162 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), ) - Option::Some(result257) + Option::Some(result162) } _ => panic() } - let array260 : Array[String] = [] - for index261 = 0 - index261 < mbt_ffi_load32(iter_base + 52) - index261 = index261 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 48) + - index261 * 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 result259 = mbt_ffi_ptr2str( + let result164 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array260.push(result259) + array165.push(result164) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array263 : Array[String] = [] - for index264 = 0 - index264 < mbt_ffi_load32(iter_base + 60) - index264 = index264 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + - index264 * 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 result262 = mbt_ffi_ptr2str( + let result167 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array263.push(result262) + array168.push(result167) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted266 : String? = match - mbt_ffi_load8_u(iter_base + 64) { + let lifted171 : String? = match + mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result265 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), + let result170 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), ) - Option::Some(result265) + Option::Some(result170) } _ => panic() } - let lifted269 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { + let lifted174 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted268 = match mbt_ffi_load8_u(iter_base + 80) { + let lifted173 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result267 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), + let result172 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result267) + @types.Role::Other(result172) } _ => panic() } - Option::Some(lifted268) + Option::Some(lifted173) } _ => panic() } - array270.push(@types.UnionBranch::{ - tag: result247, - body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted256, + array175.push(@types.VariantCaseType::{ + name: result160, + payload: lifted161, metadata: @types.MetadataEnvelope::{ - doc: lifted258, - aliases: array260, - examples: array263, - deprecated: lifted266, - role: lifted269, + doc: lifted163, + aliases: array165, + examples: array168, + deprecated: lifted171, + role: lifted174, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array270, - }) + @types.SchemaTypeBody::VariantType(array175) } - 32 => { - let lifted273 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result272 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 16 => { + 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 - Option::Some(result272) - } - _ => panic() + 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 + 8)) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted273, - }) + @types.SchemaTypeBody::EnumType(array178) } - 33 => { - let lifted275 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result274 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + 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 - Option::Some(result274) - } - _ => panic() + 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 + 8)) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted275, - }) + @types.SchemaTypeBody::FlagsType(array181) } - 34 => { - let lifted276 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 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)) + + @types.SchemaTypeBody::TupleType(array183) + } + 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 lifted185 : 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(lifted276) - } - 35 => { - let lifted277 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted186 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) _ => panic() } - @types.SchemaTypeBody::StreamType(lifted277) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ + ok: lifted185, + err: lifted186, + }) } - _ => panic() - } + 24 => { + let lifted190 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 lifted280 : String? = match mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result279 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), - ) - - Option::Some(result279) - } - _ => panic() - } - - let array282 : Array[String] = [] - for index283 = 0 - index283 < mbt_ffi_load32(iter_base + 104) - index283 = index283 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 100) + index283 * 8 - - let result281 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array282.push(result281) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - - let array285 : Array[String] = [] - for index286 = 0 - index286 < mbt_ffi_load32(iter_base + 112) - index286 = index286 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 108) + index286 * 8 - - let result284 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array285.push(result284) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - - let lifted288 : String? = match mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result287 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) - - Option::Some(result287) - } - _ => panic() - } + let result187 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted291 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted290 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result289 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + array188.push(result187) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - @types.Role::Other(result289) + Option::Some(array188) } _ => panic() } - Option::Some(lifted290) - } - _ => panic() - } - - array292.push(@types.SchemaTypeNode::{ - body: lifted278, - metadata: @types.MetadataEnvelope::{ - doc: lifted280, - aliases: array282, - examples: array285, - deprecated: lifted288, - role: lifted291, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 12)) - - let array297 : Array[@types.SchemaTypeDef] = [] - for index298 = 0 - index298 < mbt_ffi_load32(return_area + 24) - index298 = index298 + 1 { - let iter_base = mbt_ffi_load32(return_area + 20) + index298 * 24 - - let result294 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - let lifted296 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result295 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) - - Option::Some(result295) - } - _ => panic() - } - - array297.push(@types.SchemaTypeDef::{ - id: result294, - name: lifted296, - body: mbt_ffi_load32(iter_base + 20), - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 20)) - - let array328 : Array[@types.SchemaValueNode] = [] - for index329 = 0 - index329 < mbt_ffi_load32(return_area + 36) - index329 = index329 + 1 { - let iter_base = mbt_ffi_load32(return_area + 32) + index329 * 32 - - let lifted327 = 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 result299 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::StringValue(result299) - } - 13 => { - let array300 : Array[Int] = [] - for index301 = 0 - index301 < mbt_ffi_load32(iter_base + 12) - index301 = index301 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index301 * 4 - - array300.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::RecordValue(array300) - } - 14 => { - let lifted302 : Int? = match mbt_ffi_load8_u(iter_base + 12) { + let lifted191 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + 1 => + Option::Some( + mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), + ) _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted302, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - let array303 : Array[Bool] = [] - for index304 = 0 - index304 < mbt_ffi_load32(iter_base + 12) - index304 = index304 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index304 * 1 - - array303.push(mbt_ffi_load8_u(iter_base + 0) != 0) + let lifted192 : 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() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array303) - } - 17 => { - let array305 : Array[Int] = [] - for index306 = 0 - index306 < mbt_ffi_load32(iter_base + 12) - index306 = index306 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index306 * 4 + let lifted194 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result193 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - array305.push(mbt_ffi_load32(iter_base + 0)) + Option::Some(result193) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array305) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted190, + min_length: lifted191, + max_length: lifted192, + regex: lifted194, + }) } - 18 => { - let array307 : Array[Int] = [] - for index308 = 0 - index308 < mbt_ffi_load32(iter_base + 12) - index308 = index308 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index308 * 4 + 25 => { + let lifted198 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 - array307.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let result195 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaValueNode::ListValue(array307) - } - 19 => { - let array309 : Array[Int] = [] - for index310 = 0 - index310 < mbt_ffi_load32(iter_base + 12) - index310 = index310 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index310 * 4 + array196.push(result195) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - array309.push(mbt_ffi_load32(iter_base + 0)) + Option::Some(array196) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FixedListValue(array309) - } - 20 => { - let array311 : Array[@types.MapEntry] = [] - for index312 = 0 - index312 < mbt_ffi_load32(iter_base + 12) - index312 = index312 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index312 * 8 - array311.push(@types.MapEntry::{ - key: mbt_ffi_load32(iter_base + 0), - value: mbt_ffi_load32(iter_base + 4), - }) + let lifted199 : 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() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::MapValue(array311) - } - 21 => { - let lifted313 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted200 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + 1 => + Option::Some( + mbt_ffi_load32(iter_base + 32).reinterpret_as_uint(), + ) _ => panic() } - @types.SchemaValueNode::OptionValue(lifted313) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ + mime_types: lifted198, + min_bytes: lifted199, + max_bytes: lifted200, + }) } - 22 => { - let lifted316 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted314 : 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(lifted314) - } + 26 => { + let lifted204 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None 1 => { - let lifted315 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() + 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 result201 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array202.push(result201) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - @types.ResultValuePayload::ErrValue(lifted315) + Option::Some(array202) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted316) - } - 23 => { - let result317 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let lifted319 : String? = match - mbt_ffi_load8_u(iter_base + 16) { + let lifted208 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result318 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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 result205 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array206.push(result205) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(result318) + Option::Some(array206) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result317, - language: lifted319, + @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, }) } - 24 => { - let result320 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let lifted322 : String? = match - mbt_ffi_load8_u(iter_base + 16) { + 27 => { + let lifted212 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result321 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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 result209 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array210.push(result209) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(result321) + Option::Some(array210) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result320, - mime_type: lifted322, - }) - } - 25 => { - let result323 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let lifted216 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + 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 - @types.SchemaValueNode::PathValue(result323) - } - 26 => { - let result324 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let result213 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaValueNode::UrlValue(result324) - } - 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 result325 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + array214.push(result213) + } + mbt_ffi_free(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: result325, + Option::Some(array214) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted212, + allowed_hosts: lifted216, }) } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType 30 => { - let result326 = mbt_ffi_ptr2str( + let result217 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result326, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), - ) - _ => panic() - } + 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 - array328.push(lifted327) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 32)) + let result218 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @common.AgentError::CustomError(@types.TypedSchemaValue::{ - graph: @types.SchemaGraph::{ - type_nodes: array292, - defs: array297, - root: mbt_ffi_load32(return_area + 28), - }, - value: @types.SchemaValueTree::{ - value_nodes: array328, - root: mbt_ffi_load32(return_area + 40), - }, - }) - } - _ => panic() - } + array219.push(result218) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Result::Err(lifted330) - } - _ => panic() - } - let ret = lifted331 - mbt_ffi_free(ptr) - mbt_ffi_free(return_area) - return ret -} + let lifted222 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result221 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) -///| -/// 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, - ) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result221, + }) + } + _ => 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 lifted224 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result223 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 76), + mbt_ffi_load32(iter_base + 80), + ) -///| -/// 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] = [] + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 64), + scale: mbt_ffi_load32(iter_base + 72), + unit: result223, + }) + } + _ => panic() + } - let ptr = mbt_ffi_str2ptr(agent_type_name) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result217, + allowed_suffixes: array219, + min: lifted222, + max: lifted224, + }) + } + 31 => { + 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 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 result225 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - match iter_elem { - BoolValue(payload) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store8(iter_base + 8, if payload { 1 } else { 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), + ) - () - } - S8Value(payload0) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload0)) + @types.DiscriminatorRule::Prefix(result226) + } + 1 => { + let result227 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - S16Value(payload1) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload1)) + @types.DiscriminatorRule::Suffix(result227) + } + 2 => { + let result228 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - S32Value(payload2) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload2) + @types.DiscriminatorRule::Contains(result228) + } + 3 => { + let result229 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - S64Value(payload3) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload3) + @types.DiscriminatorRule::Regex(result229) + } + 4 => { + let result230 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - U8Value(payload4) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload4.to_int()) + 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), + ) - () - } - U16Value(payload5) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload5.reinterpret_as_int()) + Option::Some(result231) + } + _ => panic() + } - () - } - U32Value(payload6) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload6.reinterpret_as_int()) + @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), + ) - () - } - U64Value(payload7) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload7.reinterpret_as_int64()) + @types.DiscriminatorRule::FieldAbsent(result233) + } + _ => panic() + } - () - } - F32Value(payload8) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload8) + 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), + ) - () - } - F64Value(payload9) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload9) + Option::Some(result235) + } + _ => panic() + } - () - } - CharValue(payload10) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload10.to_int()) + 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 - () - } - StringValue(payload11) => { - mbt_ffi_store8(iter_base + 0, 12) + let result237 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + array238.push(result237) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - () - } - RecordValue(payload13) => { - mbt_ffi_store8(iter_base + 0, 13) + 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 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) + let result240 = 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()) + array241.push(result240) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - match payload14.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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), + ) - () - } - Some(payload16) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload16) + 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), + ) - () - } - EnumValue(payload17) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload17.reinterpret_as_int()) + @types.Role::Other(result245) + } + _ => panic() + } - () - } - FlagsValue(payload18) => { - mbt_ffi_store8(iter_base + 0, 16) + Option::Some(lifted246) + } + _ => 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 }) - } - mbt_ffi_store32(iter_base + 12, payload18.length()) - mbt_ffi_store32(iter_base + 8, address19) - cleanup_list.push(address19) + 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)) - () - } - TupleValue(payload21) => { - mbt_ffi_store8(iter_base + 0, 17) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array248, + }) + } + 32 => { + let lifted251 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result250 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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) + Option::Some(result250) + } + _ => panic() + } - () - } - ListValue(payload24) => { - mbt_ffi_store8(iter_base + 0, 18) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted251, + }) + } + 33 => { + let lifted253 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result252 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - 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) + Option::Some(result252) + } + _ => panic() + } - () - } - FixedListValue(payload27) => { - mbt_ffi_store8(iter_base + 0, 19) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted253, + }) + } + 34 => { + let lifted254 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => 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) - } - mbt_ffi_store32(iter_base + 12, payload27.length()) - mbt_ffi_store32(iter_base + 8, address28) - cleanup_list.push(address28) + @types.SchemaTypeBody::FutureType(lifted254) + } + 35 => { + let lifted255 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - () - } - MapValue(payload30) => { - mbt_ffi_store8(iter_base + 0, 20) + @types.SchemaTypeBody::StreamType(lifted255) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 12, payload30.length()) - mbt_ffi_store32(iter_base + 8, address31) - cleanup_list.push(address31) + let lifted258 : String? = match mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result257 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) - () - } - OptionValue(payload33) => { - mbt_ffi_store8(iter_base + 0, 21) + Option::Some(result257) + } + _ => panic() + } - match payload33 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + 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 - () - } - Some(payload35) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload35) + let result259 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - } + array260.push(result259) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - () - } - ResultValue(payload36) => { - mbt_ffi_store8(iter_base + 0, 22) + 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 - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8(iter_base + 8, 0) + let result262 = 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) + array263.push(result262) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - () - } - Some(payload39) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload39) + 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) } + _ => panic() } - () - } - ErrValue(payload40) => { - mbt_ffi_store8(iter_base + 8, 1) - - match payload40 { - None => { - mbt_ffi_store8(iter_base + 12, 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 + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result267 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) - () - } - Some(payload42) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload42) + @types.Role::Other(result267) + } + _ => panic() + } - () + Option::Some(lifted268) } + _ => panic() } - () + array270.push(@types.SchemaTypeNode::{ + body: lifted256, + metadata: @types.MetadataEnvelope::{ + doc: lifted258, + aliases: array260, + examples: array263, + deprecated: lifted266, + role: lifted269, + }, + }) } - } - - () - } - TextValue(payload43) => { - mbt_ffi_store8(iter_base + 0, 23) + mbt_ffi_free(mbt_ffi_load32(return_area + 8)) - let ptr44 = mbt_ffi_str2ptr(payload43.text) - mbt_ffi_store32(iter_base + 12, payload43.text.length()) - mbt_ffi_store32(iter_base + 8, ptr44) + 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 - match payload43.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + let result272 = 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 lifted274 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result273 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - 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(result273) + } + _ => panic() + } - () + array275.push(@types.SchemaTypeDef::{ + id: result272, + name: lifted274, + body: mbt_ffi_load32(iter_base + 20), + }) } - } - cleanup_list.push(ptr44) - - () - } - BinaryValue(payload48) => { - mbt_ffi_store8(iter_base + 0, 24) + mbt_ffi_free(mbt_ffi_load32(return_area + 16)) - let ptr49 = mbt_ffi_bytes2ptr(payload48.bytes) + let array306 : Array[@types.SchemaValueNode] = [] + for index307 = 0 + index307 < mbt_ffi_load32(return_area + 32) + index307 = index307 + 1 { + let iter_base = mbt_ffi_load32(return_area + 28) + index307 * 32 - mbt_ffi_store32(iter_base + 12, payload48.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr49) + let lifted305 = 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 result277 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - match payload48.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + @types.SchemaValueNode::StringValue(result277) + } + 13 => { + 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 - () - } - Some(payload51) => { - mbt_ffi_store8(iter_base + 16, 1) + array278.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 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) + @types.SchemaValueNode::RecordValue(array278) + } + 14 => { + let lifted280 : Int? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - () - } - } - cleanup_list.push(ptr49) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ + case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + payload: lifted280, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + 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 - () - } - PathValue(payload53) => { - mbt_ffi_store8(iter_base + 0, 25) + array281.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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.SchemaValueNode::FlagsValue(array281) + } + 17 => { + 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 - () - } - UrlValue(payload55) => { - mbt_ffi_store8(iter_base + 0, 26) + array283.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 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) + @types.SchemaValueNode::TupleValue(array283) + } + 18 => { + 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 - () - } - 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(), - ) + array285.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - DurationValue(payload58) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload58.nanoseconds) + @types.SchemaValueNode::ListValue(array285) + } + 19 => { + 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 - () - } - 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) + array287.push(mbt_ffi_load32(iter_base + 0)) + } + 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.SchemaValueNode::FixedListValue(array287) + } + 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 - () - } - UnionValue(payload61) => { - mbt_ffi_store8(iter_base + 0, 30) + 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)) - 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.SchemaValueNode::MapValue(array289) + } + 21 => { + let lifted291 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - () - } - SecretValue(payload63) => { - mbt_ffi_store8(iter_base + 0, 31) + @types.SchemaValueNode::OptionValue(lifted291) + } + 22 => { + let lifted294 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted292 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - let @types.Secret(handle) = payload63 - mbt_ffi_store32(iter_base + 8, handle) + @types.ResultValuePayload::OkValue(lifted292) + } + 1 => { + let lifted293 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - () - } - QuotaTokenHandle(payload64) => { - mbt_ffi_store8(iter_base + 0, 32) + @types.ResultValuePayload::ErrValue(lifted293) + } + _ => panic() + } - let @types.QuotaToken(handle65) = payload64 - mbt_ffi_store32(iter_base + 8, handle65) + @types.SchemaValueNode::ResultValue(lifted294) + } + 23 => { + let result295 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - () - } - } - } + let lifted297 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result296 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - 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(), - ) - } + Option::Some(result296) + } + _ => panic() + } - 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 + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result295, + language: lifted297, + }) + } + 24 => { + let result298 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - 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 lifted300 : 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 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) + Option::Some(result299) + } + _ => panic() + } - 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 + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result298, + mime_type: lifted300, + }) + } + 25 => { + let result301 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - match iter_elem.body { - RefType(payload75) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store32(iter_base + 8, payload75) + @types.SchemaValueNode::PathValue(result301) + } + 26 => { + let result302 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - () - } - BoolType => { - mbt_ffi_store8(iter_base + 0, 1) + @types.SchemaValueNode::UrlValue(result302) + } + 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 result303 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - () - } - S8Type => { - mbt_ffi_store8(iter_base + 0, 2) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 8), + scale: mbt_ffi_load32(iter_base + 16), + unit: result303, + }) + } + 30 => { + let result304 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - () - } - S16Type => { - mbt_ffi_store8(iter_base + 0, 3) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result304, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), + ) + _ => panic() + } - () - } - S32Type => { - mbt_ffi_store8(iter_base + 0, 4) + array306.push(lifted305) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 28)) - () + @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: array306, + root: mbt_ffi_load32(return_area + 36), + }, + }) } - S64Type => { - mbt_ffi_store8(iter_base + 0, 5) + _ => panic() + } - () - } - U8Type => { - mbt_ffi_store8(iter_base + 0, 6) + Result::Err(lifted308) + } + _ => panic() + } + let ret = lifted309 + mbt_ffi_free(ptr) + mbt_ffi_free(address66) + mbt_ffi_free(return_area) - () - } - U16Type => { - mbt_ffi_store8(iter_base + 0, 7) + cleanup_list.each(mbt_ffi_free) + return ret +} - () - } - U32Type => { - mbt_ffi_store8(iter_base + 0, 8) +///| +/// 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 ptr = mbt_ffi_str2ptr(agent_id) + let return_area = mbt_ffi_malloc(72) + wasmImportParseAgentId(ptr, agent_id.length(), return_area) - () - } - U64Type => { - mbt_ffi_store8(iter_base + 0, 9) + let lifted471 = match mbt_ffi_load8_u(return_area + 0) { + 0 => { + let result = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), + ) - () - } - F32Type => { - mbt_ffi_store8(iter_base + 0, 10) + 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 - () - } - F64Type => { - mbt_ffi_store8(iter_base + 0, 11) + let lifted179 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @types.SchemaTypeBody::RefType(mbt_ffi_load32(iter_base + 8)) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted5 : @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() + } - () - } - CharType => { - mbt_ffi_store8(iter_base + 0, 12) + Option::Some(lifted) + } + _ => panic() + } - () - } - StringType => { - mbt_ffi_store8(iter_base + 0, 13) - - () - } - RecordType(payload89) => { - mbt_ffi_store8(iter_base + 0, 14) - - 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 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) + 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() + } - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(lifted1) + } + _ => panic() + } - () - } - Some(payload92) => { - mbt_ffi_store8(iter_base + 12, 1) + 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), + ) - 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) + Option::Some(result3) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted0, + max: lifted2, + unit: lifted4, + }) } + _ => panic() } - 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 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) - } - mbt_ffi_store32(iter_base + 28, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 24, address95) + @types.SchemaTypeBody::S8Type(lifted5) + } + 3 => { + let lifted12 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted7 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted6 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 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 + Option::Some(lifted6) + } + _ => panic() + } - 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 + 36, - iter_elem.metadata.examples.length(), - ) - mbt_ffi_store32(iter_base + 32, address98) + let lifted9 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted8 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 40, 0) + Option::Some(lifted8) + } + _ => panic() + } - () - } - Some(payload101) => { - mbt_ffi_store8(iter_base + 40, 1) + let lifted11 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result10 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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) + Option::Some(result10) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted7, + max: lifted9, + unit: lifted11, + }) } + _ => panic() } - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 52, 0) - - () - } - Some(payload104) => { - mbt_ffi_store8(iter_base + 52, 1) - - match payload104 { - Multimodal => { - mbt_ffi_store8(iter_base + 56, 0) + @types.SchemaTypeBody::S16Type(lifted12) + } + 4 => { + let lifted19 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted14 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted13 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () + Option::Some(lifted13) } - UnstructuredText => { - mbt_ffi_store8(iter_base + 56, 1) + _ => panic() + } - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 56, 2) + 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 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () + Option::Some(lifted15) } - Other(payload108) => { - mbt_ffi_store8(iter_base + 56, 3) + _ => panic() + } - 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 lifted18 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result17 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () + Option::Some(result17) } + _ => panic() } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted14, + max: lifted16, + unit: lifted18, + }) } + _ => panic() } - cleanup_list.push(ptr90) - cleanup_list.push(address95) - cleanup_list.push(address98) + + @types.SchemaTypeBody::S32Type(lifted19) } - mbt_ffi_store32(iter_base + 12, payload89.length()) - mbt_ffi_store32(iter_base + 8, address110) - cleanup_list.push(address110) + 5 => { + let lifted26 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted21 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted20 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - VariantType(payload112) => { - mbt_ffi_store8(iter_base + 0, 15) + Option::Some(lifted20) + } + _ => 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 + let lifted23 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted22 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - 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) + Option::Some(lifted22) + } + _ => panic() + } - match iter_elem.payload { - None => { - mbt_ffi_store8(iter_base + 8, 0) + let lifted25 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result24 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - Some(payload115) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload115) + Option::Some(result24) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted21, + max: lifted23, + unit: lifted25, + }) } + _ => panic() } - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 16, 0) - - () - } - Some(payload117) => { - mbt_ffi_store8(iter_base + 16, 1) - - 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) - - () - } - } + @types.SchemaTypeBody::S64Type(lifted26) + } + 6 => { + let lifted33 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted28 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted27 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 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 + Option::Some(lifted27) + } + _ => panic() + } - 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) - } - 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 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) - } - mbt_ffi_store32( - iter_base + 40, - iter_elem.metadata.examples.length(), - ) - mbt_ffi_store32(iter_base + 36, address123) + let lifted30 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted29 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 44, 0) + Option::Some(lifted29) + } + _ => panic() + } - () - } - Some(payload126) => { - mbt_ffi_store8(iter_base + 44, 1) + let lifted32 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result31 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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) + Option::Some(result31) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted28, + max: lifted30, + unit: lifted32, + }) } + _ => panic() } - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 56, 0) - - () - } - Some(payload129) => { - mbt_ffi_store8(iter_base + 56, 1) - - match payload129 { - Multimodal => { - mbt_ffi_store8(iter_base + 60, 0) + @types.SchemaTypeBody::U8Type(lifted33) + } + 7 => { + let lifted40 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted35 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted34 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () + Option::Some(lifted34) } - UnstructuredText => { - mbt_ffi_store8(iter_base + 60, 1) + _ => panic() + } - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 60, 2) + let lifted37 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted36 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () + Option::Some(lifted36) } - Other(payload133) => { - mbt_ffi_store8(iter_base + 60, 3) + _ => panic() + } - 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 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() } - cleanup_list.push(ptr113) - cleanup_list.push(address120) - cleanup_list.push(address123) - } - 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) + @types.SchemaTypeBody::U16Type(lifted40) + } + 8 => { + let lifted47 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 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 + Option::Some(lifted41) + } + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 12, payload137.length()) - mbt_ffi_store32(iter_base + 8, address139) - cleanup_list.push(address139) + let lifted44 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted43 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - FlagsType(payload141) => { - mbt_ffi_store8(iter_base + 0, 17) + Option::Some(lifted43) + } + _ => panic() + } - 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 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), + ) - 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) - } - mbt_ffi_store32(iter_base + 12, payload141.length()) - mbt_ffi_store32(iter_base + 8, address143) - cleanup_list.push(address143) + Option::Some(result45) + } + _ => panic() + } - () - } - TupleType(payload145) => { - mbt_ffi_store8(iter_base + 0, 18) + Option::Some(@types.NumericRestrictions::{ + min: lifted42, + max: lifted44, + unit: lifted46, + }) + } + _ => panic() + } - 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) + @types.SchemaTypeBody::U32Type(lifted47) } - mbt_ffi_store32(iter_base + 12, payload145.length()) - mbt_ffi_store32(iter_base + 8, address146) - cleanup_list.push(address146) - - () - } - ListType(payload148) => { - mbt_ffi_store8(iter_base + 0, 19) - mbt_ffi_store32(iter_base + 8, payload148) + 9 => { + let lifted54 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted49 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted48 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - 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(), - ) + Option::Some(lifted48) + } + _ => panic() + } - () - } - 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) + 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 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - OptionType(payload151) => { - mbt_ffi_store8(iter_base + 0, 22) - mbt_ffi_store32(iter_base + 8, payload151) + Option::Some(lifted50) + } + _ => panic() + } - () - } - ResultType(payload152) => { - mbt_ffi_store8(iter_base + 0, 23) + let lifted53 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result52 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - match payload152.ok { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(result52) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted49, + max: lifted51, + unit: lifted53, + }) + } + _ => panic() } - Some(payload154) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload154) - () - } + @types.SchemaTypeBody::U64Type(lifted54) } + 10 => { + let lifted61 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted56 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted55 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 payload152.err { - None => { - mbt_ffi_store8(iter_base + 16, 0) - - () - } - Some(payload156) => { - mbt_ffi_store8(iter_base + 16, 1) - mbt_ffi_store32(iter_base + 20, payload156) - - () - } - } + Option::Some(lifted55) + } + _ => panic() + } - () - } - TextType(payload157) => { - mbt_ffi_store8(iter_base + 0, 24) + let lifted58 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted57 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - match payload157.languages { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(lifted57) + } + _ => panic() + } - () - } - Some(payload159) => { - mbt_ffi_store8(iter_base + 8, 1) + let lifted60 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result59 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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 + Option::Some(result59) + } + _ => panic() + } - 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) + Option::Some(@types.NumericRestrictions::{ + min: lifted56, + max: lifted58, + unit: lifted60, + }) } - mbt_ffi_store32(iter_base + 16, payload159.length()) - mbt_ffi_store32(iter_base + 12, address161) - cleanup_list.push(address161) - - () + _ => panic() } + + @types.SchemaTypeBody::F32Type(lifted61) } + 11 => { + let lifted68 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted63 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + 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() + } - match payload157.min_length { - None => { - mbt_ffi_store8(iter_base + 20, 0) + Option::Some(lifted62) + } + _ => panic() + } - () - } - Some(payload164) => { - mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload164.reinterpret_as_int()) + 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() + } - match payload157.max_length { - None => { - mbt_ffi_store8(iter_base + 28, 0) + 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), + ) - () - } - Some(payload166) => { - mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload166.reinterpret_as_int()) + 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 - match payload157.regex { - None => { - mbt_ffi_store8(iter_base + 36, 0) + let result69 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - Some(payload168) => { - mbt_ffi_store8(iter_base + 36, 1) + 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), + ) - 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) + 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 - () - } - BinaryType(payload170) => { - mbt_ffi_store8(iter_base + 0, 25) + let result72 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - match payload170.mime_types { - None => { - mbt_ffi_store8(iter_base + 8, 0) + array.push(result72) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - () - } - Some(payload172) => { - mbt_ffi_store8(iter_base + 8, 1) + 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 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 result73 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 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) + array74.push(result73) } - mbt_ffi_store32(iter_base + 16, payload172.length()) - mbt_ffi_store32(iter_base + 12, address174) - cleanup_list.push(address174) + 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), + ) - match payload170.min_bytes { - None => { - mbt_ffi_store8(iter_base + 20, 0) + Option::Some(result76) + } + _ => panic() + } - () - } - Some(payload177) => { - mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload177.reinterpret_as_int()) + 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() + } - match payload170.max_bytes { - None => { - mbt_ffi_store8(iter_base + 28, 0) + 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, + }, + }) } - Some(payload179) => { - mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload179.reinterpret_as_int()) + 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 - () - } - 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()) - - match payload180.allowed_mime_types { - None => { - mbt_ffi_store8(iter_base + 12, 0) - - () - } - Some(payload182) => { - mbt_ffi_store8(iter_base + 12, 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 result83 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + let lifted84 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() } - mbt_ffi_store32(iter_base + 20, payload182.length()) - mbt_ffi_store32(iter_base + 16, address184) - cleanup_list.push(address184) - () - } - } + 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), + ) - match payload180.allowed_extensions { - None => { - mbt_ffi_store8(iter_base + 24, 0) + Option::Some(result85) + } + _ => panic() + } - () - } - Some(payload187) => { - mbt_ffi_store8(iter_base + 24, 1) + 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 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 result87 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + array88.push(result87) } - mbt_ffi_store32(iter_base + 32, payload187.length()) - mbt_ffi_store32(iter_base + 28, address189) - cleanup_list.push(address189) - - () - } - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - () - } - UrlType(payload191) => { - mbt_ffi_store8(iter_base + 0, 27) + 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 - match payload191.allowed_schemes { - None => { - mbt_ffi_store8(iter_base + 8, 0) + let result90 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - Some(payload193) => { - mbt_ffi_store8(iter_base + 8, 1) + array91.push(result90) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - 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 + 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), + ) - 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) + Option::Some(result93) + } + _ => panic() } - mbt_ffi_store32(iter_base + 16, payload193.length()) - mbt_ffi_store32(iter_base + 12, address195) - cleanup_list.push(address195) - () - } - } - - match payload191.allowed_hosts { - None => { - mbt_ffi_store8(iter_base + 20, 0) - - () - } - Some(payload198) => { - mbt_ffi_store8(iter_base + 20, 1) + 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), + ) - 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.Role::Other(result95) + } + _ => panic() + } - 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) + Option::Some(lifted96) + } + _ => panic() } - mbt_ffi_store32(iter_base + 28, payload198.length()) - mbt_ffi_store32(iter_base + 24, address200) - cleanup_list.push(address200) - () + array98.push(@types.VariantCaseType::{ + name: result83, + payload: lifted84, + metadata: @types.MetadataEnvelope::{ + doc: lifted86, + aliases: array88, + examples: array91, + deprecated: lifted94, + role: lifted97, + }, + }) } - } - - () - } - DatetimeType => { - mbt_ffi_store8(iter_base + 0, 28) - - () - } - DurationType => { - mbt_ffi_store8(iter_base + 0, 29) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - QuantityType(payload204) => { - mbt_ffi_store8(iter_base + 0, 30) + @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 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 result100 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array101.push(result100) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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.SchemaTypeBody::EnumType(array101) } - mbt_ffi_store32(iter_base + 20, payload204.allowed_suffixes.length()) - mbt_ffi_store32(iter_base + 16, address207) + 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 - match payload204.min { - None => { - mbt_ffi_store8(iter_base + 24, 0) + let result103 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () + array104.push(result103) } - 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) - - 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) + 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 - match payload204.max { - None => { - mbt_ffi_store8(iter_base + 56, 0) - - () + array106.push(mbt_ffi_load32(iter_base + 0)) } - 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) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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) + @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() } - } - cleanup_list.push(ptr205) - cleanup_list.push(address207) - () - } - UnionType(payload215) => { - mbt_ffi_store8(iter_base + 0, 31) + @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 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 result110 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + array111.push(result110) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - match iter_elem.discriminator { - Prefix(payload217) => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(array111) + } + _ => panic() + } - 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 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() + } - () - } - Suffix(payload219) => { - mbt_ffi_store8(iter_base + 12, 1) + 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 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 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) } - Contains(payload221) => { - mbt_ffi_store8(iter_base + 12, 2) + _ => panic() + } - 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.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 - () - } - Regex(payload223) => { - mbt_ffi_store8(iter_base + 12, 3) + let result118 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + array119.push(result118) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - () + Option::Some(array119) } - FieldEquals(payload225) => { - mbt_ffi_store8(iter_base + 12, 4) + _ => panic() + } - 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 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() + } - match payload225.literal { - None => { - mbt_ffi_store8(iter_base + 24, 0) + 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() + } - () - } - Some(payload228) => { - mbt_ffi_store8(iter_base + 24, 1) + @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 ptr229 = mbt_ffi_str2ptr(payload228) - mbt_ffi_store32(iter_base + 32, payload228.length()) - mbt_ffi_store32(iter_base + 28, ptr229) - cleanup_list.push(ptr229) + let result124 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } + array125.push(result124) } - cleanup_list.push(ptr226) + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - () + Option::Some(array125) } - FieldAbsent(payload230) => { - mbt_ffi_store8(iter_base + 12, 5) + _ => panic() + } - 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) + 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() } - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 36, 0) + @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 - () - } - Some(payload233) => { - mbt_ffi_store8(iter_base + 36, 1) + let result132 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + array133.push(result132) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - () + Option::Some(array133) } + _ => 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) + 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() } - mbt_ffi_store32(iter_base + 52, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 48, address236) - let address239 = mbt_ffi_malloc( - iter_elem.metadata.examples.length() * 8, + @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), ) - 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 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 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_store32( - iter_base + 60, - iter_elem.metadata.examples.length(), - ) - mbt_ffi_store32(iter_base + 56, address239) + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 64, 0) + 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, + }) } - Some(payload242) => { - mbt_ffi_store8(iter_base + 64, 1) + _ => 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) + 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() } - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 76, 0) + @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 - () - } - Some(payload245) => { - mbt_ffi_store8(iter_base + 76, 1) + let result148 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - match payload245 { - Multimodal => { - mbt_ffi_store8(iter_base + 80, 0) + 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), + ) - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 80, 1) + @types.DiscriminatorRule::Prefix(result149) + } + 1 => { + let result150 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 80, 2) + @types.DiscriminatorRule::Suffix(result150) + } + 2 => { + let result151 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - Other(payload249) => { - mbt_ffi_store8(iter_base + 80, 3) + @types.DiscriminatorRule::Contains(result151) + } + 3 => { + let result152 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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) + @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() } - } - cleanup_list.push(ptr216) - cleanup_list.push(address236) - cleanup_list.push(address239) - } - mbt_ffi_store32(iter_base + 12, payload215.branches.length()) - mbt_ffi_store32(iter_base + 8, address251) - cleanup_list.push(address251) - () - } - SecretType(payload253) => { - mbt_ffi_store8(iter_base + 0, 32) - mbt_ffi_store32(iter_base + 8, payload253.inner) + 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), + ) - match payload253.category { - None => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(result158) + } + _ => panic() + } - () - } - Some(payload255) => { - mbt_ffi_store8(iter_base + 12, 1) + 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 ptr256 = mbt_ffi_str2ptr(payload255) - mbt_ffi_store32(iter_base + 20, payload255.length()) - mbt_ffi_store32(iter_base + 16, ptr256) - cleanup_list.push(ptr256) + 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)) - () - } - QuotaTokenType(payload257) => { - mbt_ffi_store8(iter_base + 0, 33) + 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 - match payload257.resource_name { - None => { - mbt_ffi_store8(iter_base + 8, 0) + let result163 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - Some(payload259) => { - mbt_ffi_store8(iter_base + 8, 1) + 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), + ) - 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) + 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), + ) - () - } - FutureType(payload261) => { - mbt_ffi_store8(iter_base + 0, 34) + @types.Role::Other(result168) + } + _ => panic() + } - match payload261 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + 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, + }, + }) } - Some(payload263) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload263) + 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 + 12) { + 0 => Option::None + 1 => { + let result173 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - StreamType(payload264) => { - mbt_ffi_store8(iter_base + 0, 35) - - match payload264 { - None => { - mbt_ffi_store8(iter_base + 8, 0) - - () + Option::Some(result173) + } + _ => panic() } - Some(payload266) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload266) - () - } + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + 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), + ) - () - } - } - - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 88, 0) + Option::Some(result175) + } + _ => panic() + } - () - } - Some(payload268) => { - mbt_ffi_store8(iter_base + 88, 1) + @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() + } - 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) + @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 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 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) - } - mbt_ffi_store32(iter_base + 104, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 100, address271) + 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), + ) - 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 + Option::Some(result180) + } + _ => panic() + } - 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 + 112, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 108, address274) + 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 - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 116, 0) + let result182 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () + array183.push(result182) } - Some(payload277) => { - mbt_ffi_store8(iter_base + 116, 1) - - 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) + 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 - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 128, 0) + let result185 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () + array186.push(result185) } - Some(payload280) => { - mbt_ffi_store8(iter_base + 128, 1) + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - match payload280 { - Multimodal => { - mbt_ffi_store8(iter_base + 132, 0) + 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), + ) - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 132, 1) + Option::Some(result188) + } + _ => panic() + } - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 132, 2) + 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() } - 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) - - () - } + Option::Some(lifted191) } - - () + _ => panic() } + + array193.push(@types.SchemaTypeNode::{ + body: lifted179, + metadata: @types.MetadataEnvelope::{ + doc: lifted181, + aliases: array183, + examples: array186, + deprecated: lifted189, + role: lifted192, + }, + }) } - cleanup_list.push(address271) - cleanup_list.push(address274) - } - mbt_ffi_store32(iter_base + 12, iter_elem.value.graph.type_nodes.length()) - mbt_ffi_store32(iter_base + 8, address286) + mbt_ffi_free(mbt_ffi_load32(return_area + 16)) - 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 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 ptr288 = mbt_ffi_str2ptr(iter_elem.id) - mbt_ffi_store32(iter_base + 4, iter_elem.id.length()) - mbt_ffi_store32(iter_base + 0, ptr288) + let result195 = 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 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() } - Some(payload290) => { - mbt_ffi_store8(iter_base + 8, 1) - - 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) - () - } + array198.push(@types.SchemaTypeDef::{ + id: result195, + name: lifted197, + body: mbt_ffi_load32(iter_base + 20), + }) } - mbt_ffi_store32(iter_base + 20, iter_elem.body) - cleanup_list.push(ptr288) - } - 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 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 - - match iter_elem { - BoolValue(payload294) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store8(iter_base + 8, if payload294 { 1 } else { 0 }) - - () - } - S8Value(payload295) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload295)) + mbt_ffi_free(mbt_ffi_load32(return_area + 24)) - () - } - S16Value(payload296) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload296)) + let array229 : Array[@types.SchemaValueNode] = [] + for index230 = 0 + index230 < mbt_ffi_load32(return_area + 40) + index230 = index230 + 1 { + let iter_base = mbt_ffi_load32(return_area + 36) + index230 * 32 - () - } - S32Value(payload297) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload297) + 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 result200 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - () - } - S64Value(payload298) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload298) + @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 - () - } - U8Value(payload299) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload299.to_int()) + array201.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - U16Value(payload300) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload300.reinterpret_as_int()) + @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() + } - () - } - U32Value(payload301) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload301.reinterpret_as_int()) + @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 - () - } - U64Value(payload302) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload302.reinterpret_as_int64()) + array204.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - F32Value(payload303) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload303) + @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 - () - } - F64Value(payload304) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload304) + array206.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - CharValue(payload305) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload305.to_int()) + @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 - () - } - StringValue(payload306) => { - mbt_ffi_store8(iter_base + 0, 12) + array208.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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.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 - () - } - RecordValue(payload308) => { - mbt_ffi_store8(iter_base + 0, 13) + array210.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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) + @types.SchemaValueNode::FixedListValue(array210) } - mbt_ffi_store32(iter_base + 12, payload308.length()) - mbt_ffi_store32(iter_base + 8, address309) - cleanup_list.push(address309) + 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 - () - } - VariantValue(payload311) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload311.case.reinterpret_as_int()) - - match payload311.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) - - () - } - Some(payload313) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload313) - - () + array212.push(@types.MapEntry::{ + key: mbt_ffi_load32(iter_base + 0), + value: mbt_ffi_load32(iter_base + 4), + }) } - } - - () - } - EnumValue(payload314) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload314.reinterpret_as_int()) - - () - } - FlagsValue(payload315) => { - mbt_ffi_store8(iter_base + 0, 16) - - 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 }) - } - mbt_ffi_store32(iter_base + 12, payload315.length()) - mbt_ffi_store32(iter_base + 8, address316) - cleanup_list.push(address316) - - () - } - TupleValue(payload318) => { - mbt_ffi_store8(iter_base + 0, 17) - - 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) - } - mbt_ffi_store32(iter_base + 12, payload318.length()) - mbt_ffi_store32(iter_base + 8, address319) - cleanup_list.push(address319) - - () - } - ListValue(payload321) => { - mbt_ffi_store8(iter_base + 0, 18) - - 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) - } - mbt_ffi_store32(iter_base + 12, payload321.length()) - mbt_ffi_store32(iter_base + 8, address322) - cleanup_list.push(address322) - - () - } - FixedListValue(payload324) => { - mbt_ffi_store8(iter_base + 0, 19) - - 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) - } - mbt_ffi_store32(iter_base + 12, payload324.length()) - mbt_ffi_store32(iter_base + 8, address325) - cleanup_list.push(address325) - - () - } - MapValue(payload327) => { - mbt_ffi_store8(iter_base + 0, 20) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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.SchemaValueNode::MapValue(array212) } - mbt_ffi_store32(iter_base + 12, payload327.length()) - mbt_ffi_store32(iter_base + 8, address328) - cleanup_list.push(address328) - - () - } - OptionValue(payload330) => { - mbt_ffi_store8(iter_base + 0, 21) - - match payload330 { - None => { - mbt_ffi_store8(iter_base + 8, 0) - - () + 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() } - Some(payload332) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload332) - () - } + @types.SchemaValueNode::OptionValue(lifted214) } - - () - } - ResultValue(payload333) => { - mbt_ffi_store8(iter_base + 0, 22) - - match payload333 { - OkValue(payload334) => { - mbt_ffi_store8(iter_base + 8, 0) - - match payload334 { - None => { - mbt_ffi_store8(iter_base + 12, 0) - - () + 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() } - Some(payload336) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload336) - () - } + @types.ResultValuePayload::OkValue(lifted215) } - - () - } - ErrValue(payload337) => { - mbt_ffi_store8(iter_base + 8, 1) - - match payload337 { - None => { - mbt_ffi_store8(iter_base + 12, 0) - - () + 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() } - Some(payload339) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload339) - () - } + @types.ResultValuePayload::ErrValue(lifted216) } - - () + _ => panic() } - } - - () - } - TextValue(payload340) => { - mbt_ffi_store8(iter_base + 0, 23) - let ptr341 = mbt_ffi_str2ptr(payload340.text) - mbt_ffi_store32(iter_base + 12, payload340.text.length()) - mbt_ffi_store32(iter_base + 8, ptr341) + @types.SchemaValueNode::ResultValue(lifted217) + } + 23 => { + let result218 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - match payload340.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + 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() } - Some(payload343) => { - mbt_ffi_store8(iter_base + 16, 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) - - () - } + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result218, + language: lifted220, + }) } - cleanup_list.push(ptr341) - - () - } - BinaryValue(payload345) => { - mbt_ffi_store8(iter_base + 0, 24) + 24 => { + let result221 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let ptr346 = mbt_ffi_bytes2ptr(payload345.bytes) + 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), + ) - mbt_ffi_store32(iter_base + 12, payload345.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr346) + Option::Some(result222) + } + _ => panic() + } - match payload345.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + @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), + ) - () - } - Some(payload348) => { - mbt_ffi_store8(iter_base + 16, 1) + @types.SchemaValueNode::PathValue(result224) + } + 26 => { + let result225 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - 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.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, + }) } - cleanup_list.push(ptr346) + 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 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), + ) + _ => panic() } - PathValue(payload350) => { - mbt_ffi_store8(iter_base + 0, 25) - 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) + array229.push(lifted228) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 36)) - () - } - UrlValue(payload352) => { - mbt_ffi_store8(iter_base + 0, 26) + let lifted231 : @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() + } - 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) + 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: array229, + root: mbt_ffi_load32(return_area + 44), + }, + }, + lifted231, + ), + ) + } + 1 => { + let lifted470 = match mbt_ffi_load8_u(return_area + 8) { + 0 => { + let result232 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) - () + @common.AgentError::InvalidInput(result232) } - 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(), + 1 => { + let result233 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), ) - () + @common.AgentError::InvalidMethod(result233) } - DurationValue(payload355) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload355.nanoseconds) + 2 => { + let result234 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) - () + @common.AgentError::InvalidType(result234) } - 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 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) + 3 => { + let result235 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) - () + @common.AgentError::InvalidAgentId(result235) } - UnionValue(payload358) => { - mbt_ffi_store8(iter_base + 0, 30) + 4 => { + let array432 : Array[@types.SchemaTypeNode] = [] + for index433 = 0 + index433 < mbt_ffi_load32(return_area + 16) + index433 = index433 + 1 { + let iter_base = mbt_ffi_load32(return_area + 12) + index433 * 144 - 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) + let lifted418 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @types.SchemaTypeBody::RefType(mbt_ffi_load32(iter_base + 8)) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted242 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted237 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted236 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - SecretValue(payload360) => { - mbt_ffi_store8(iter_base + 0, 31) + Option::Some(lifted236) + } + _ => panic() + } - let @types.Secret(handle361) = payload360 - mbt_ffi_store32(iter_base + 8, handle361) + let lifted239 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted238 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - QuotaTokenHandle(payload362) => { - mbt_ffi_store8(iter_base + 0, 32) + Option::Some(lifted238) + } + _ => panic() + } - let @types.QuotaToken(handle363) = payload362 - mbt_ffi_store32(iter_base + 8, handle363) + let lifted241 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result240 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - } - } - 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 + 36, iter_elem.value.value.root) - cleanup_list.push(address73) - cleanup_list.push(address286) - cleanup_list.push(address292) - cleanup_list.push(address364) - } - 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) + Option::Some(result240) + } + _ => panic() + } - cleanup_list.each(mbt_ffi_free) - return ret -} + Option::Some(@types.NumericRestrictions::{ + min: lifted237, + max: lifted239, + unit: lifted241, + }) + } + _ => panic() + } -///| -/// 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] = [] + @types.SchemaTypeBody::S8Type(lifted242) + } + 3 => { + let lifted249 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted244 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted243 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 WasmRpc(handle) = self + Option::Some(lifted243) + } + _ => panic() + } - let ptr = mbt_ffi_str2ptr(method_name) + let lifted246 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted245 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - 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 + Option::Some(lifted245) + } + _ => panic() + } - match iter_elem { - BoolValue(payload) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store8(iter_base + 8, if payload { 1 } else { 0 }) + let lifted248 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result247 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - S8Value(payload0) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload0)) + Option::Some(result247) + } + _ => panic() + } - () - } - S16Value(payload1) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload1)) + Option::Some(@types.NumericRestrictions::{ + min: lifted244, + max: lifted246, + unit: lifted248, + }) + } + _ => panic() + } - () - } - S32Value(payload2) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload2) + @types.SchemaTypeBody::S16Type(lifted249) + } + 4 => { + let lifted256 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted251 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted250 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - S64Value(payload3) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload3) + Option::Some(lifted250) + } + _ => panic() + } - () - } - U8Value(payload4) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload4.to_int()) + let lifted253 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted252 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @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(lifted252) + } + _ => panic() + } - () - } - U32Value(payload6) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload6.reinterpret_as_int()) + let lifted255 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result254 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - U64Value(payload7) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload7.reinterpret_as_int64()) + Option::Some(result254) + } + _ => panic() + } - () - } - F32Value(payload8) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload8) + Option::Some(@types.NumericRestrictions::{ + min: lifted251, + max: lifted253, + unit: lifted255, + }) + } + _ => panic() + } - () - } - F64Value(payload9) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload9) + @types.SchemaTypeBody::S32Type(lifted256) + } + 5 => { + let lifted263 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted258 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted257 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - CharValue(payload10) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload10.to_int()) + Option::Some(lifted257) + } + _ => panic() + } - () - } - StringValue(payload11) => { - mbt_ffi_store8(iter_base + 0, 12) + let lifted260 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted259 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).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(lifted259) + } + _ => panic() + } - () - } - RecordValue(payload13) => { - mbt_ffi_store8(iter_base + 0, 13) + let lifted262 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result261 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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) + Option::Some(result261) + } + _ => panic() + } - () - } - VariantValue(payload14) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload14.case.reinterpret_as_int()) + Option::Some(@types.NumericRestrictions::{ + min: lifted258, + max: lifted260, + unit: lifted262, + }) + } + _ => panic() + } - match payload14.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + @types.SchemaTypeBody::S64Type(lifted263) + } + 6 => { + let lifted270 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted265 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted264 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - Some(payload16) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload16) + Option::Some(lifted264) + } + _ => panic() + } - () - } - } + let lifted267 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted266 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::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(payload17) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload17.reinterpret_as_int()) + Option::Some(lifted266) + } + _ => panic() + } - () - } - FlagsValue(payload18) => { - mbt_ffi_store8(iter_base + 0, 16) + let lifted269 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result268 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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) + Option::Some(result268) + } + _ => panic() + } - () - } - TupleValue(payload21) => { - mbt_ffi_store8(iter_base + 0, 17) + Option::Some(@types.NumericRestrictions::{ + min: lifted265, + max: lifted267, + unit: lifted269, + }) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 12, payload21.length()) - mbt_ffi_store32(iter_base + 8, address22) - cleanup_list.push(address22) + @types.SchemaTypeBody::U8Type(lifted270) + } + 7 => { + let lifted277 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted272 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted271 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - ListValue(payload24) => { - mbt_ffi_store8(iter_base + 0, 18) + Option::Some(lifted271) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 12, payload24.length()) - mbt_ffi_store32(iter_base + 8, address25) - cleanup_list.push(address25) + let lifted274 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted273 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - FixedListValue(payload27) => { - mbt_ffi_store8(iter_base + 0, 19) + Option::Some(lifted273) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 12, payload27.length()) - mbt_ffi_store32(iter_base + 8, address28) - cleanup_list.push(address28) + let lifted276 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result275 = 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(result275) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 12, payload30.length()) - mbt_ffi_store32(iter_base + 8, address31) - cleanup_list.push(address31) + Option::Some(@types.NumericRestrictions::{ + min: lifted272, + max: lifted274, + unit: lifted276, + }) + } + _ => panic() + } - () - } - OptionValue(payload33) => { - mbt_ffi_store8(iter_base + 0, 21) + @types.SchemaTypeBody::U16Type(lifted277) + } + 8 => { + let lifted284 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted279 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted278 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 payload33 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(lifted278) + } + _ => panic() + } - () - } - Some(payload35) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload35) + let lifted281 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted280 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - } + Option::Some(lifted280) + } + _ => panic() + } - () - } - ResultValue(payload36) => { - mbt_ffi_store8(iter_base + 0, 22) + let lifted283 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result282 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(result282) + } + _ => panic() + } - match payload37 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(@types.NumericRestrictions::{ + min: lifted279, + max: lifted281, + unit: lifted283, + }) + } + _ => panic() + } - () + @types.SchemaTypeBody::U32Type(lifted284) } - Some(payload39) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload39) + 9 => { + let lifted291 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted286 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted285 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - } + Option::Some(lifted285) + } + _ => panic() + } - () - } - ErrValue(payload40) => { - mbt_ffi_store8(iter_base + 8, 1) + let lifted288 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted287 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - match payload40 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(lifted287) + } + _ => panic() + } - () - } - Some(payload42) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload42) + let lifted290 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result289 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () + Option::Some(result289) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted286, + max: lifted288, + unit: lifted290, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted291) } - } + 10 => { + let lifted298 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted293 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted292 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - } + Option::Some(lifted292) + } + _ => panic() + } - () - } - TextValue(payload43) => { - mbt_ffi_store8(iter_base + 0, 23) + let lifted295 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted294 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - 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(lifted294) + } + _ => panic() + } - match payload43.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + let lifted297 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result296 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - Some(payload46) => { - mbt_ffi_store8(iter_base + 16, 1) + Option::Some(result296) + } + _ => 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(@types.NumericRestrictions::{ + min: lifted293, + max: lifted295, + unit: lifted297, + }) + } + _ => panic() + } - () - } - } - cleanup_list.push(ptr44) + @types.SchemaTypeBody::F32Type(lifted298) + } + 11 => { + let lifted305 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted300 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted299 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - BinaryValue(payload48) => { - mbt_ffi_store8(iter_base + 0, 24) + Option::Some(lifted299) + } + _ => panic() + } - let ptr49 = mbt_ffi_bytes2ptr(payload48.bytes) + let lifted302 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted301 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - mbt_ffi_store32(iter_base + 12, payload48.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr49) + Option::Some(lifted301) + } + _ => panic() + } - match payload48.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + let lifted304 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result303 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - Some(payload51) => { - mbt_ffi_store8(iter_base + 16, 1) + Option::Some(result303) + } + _ => 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) + Option::Some(@types.NumericRestrictions::{ + min: lifted300, + max: lifted302, + unit: lifted304, + }) + } + _ => panic() + } - () - } - } - cleanup_list.push(ptr49) + @types.SchemaTypeBody::F64Type(lifted305) + } + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + let array320 : Array[@types.NamedFieldType] = [] + for index321 = 0 + index321 < mbt_ffi_load32(iter_base + 12) + index321 = index321 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index321 * 68 - () - } - PathValue(payload53) => { - mbt_ffi_store8(iter_base + 0, 25) + let result306 = 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) + let lifted308 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result307 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - UrlValue(payload55) => { - mbt_ffi_store8(iter_base + 0, 26) + Option::Some(result307) + } + _ => 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 array310 : Array[String] = [] + for index311 = 0 + index311 < mbt_ffi_load32(iter_base + 28) + index311 = index311 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + + index311 * 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 result309 = 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) + array310.push(result309) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - () - } - 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 array313 : Array[String] = [] + for index314 = 0 + index314 < mbt_ffi_load32(iter_base + 36) + index314 = index314 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 32) + + index314 * 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) + let result312 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - UnionValue(payload61) => { - mbt_ffi_store8(iter_base + 0, 30) + array313.push(result312) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - 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 lifted316 : String? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result315 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) - () - } - SecretValue(payload63) => { - mbt_ffi_store8(iter_base + 0, 31) + Option::Some(result315) + } + _ => panic() + } - let @types.Secret(handle64) = payload63 - mbt_ffi_store32(iter_base + 8, handle64) + let lifted319 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted318 = match mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result317 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) - () - } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8(iter_base + 0, 32) + @types.Role::Other(result317) + } + _ => panic() + } - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32(iter_base + 8, handle66) + Option::Some(lifted318) + } + _ => panic() + } - () - } - } - } - let return_area = mbt_ffi_malloc(44) - wasmImportMethodWasmRpcInvokeAndAwait( - handle, - ptr, - method_name.length(), - address67, - input.value_nodes.length(), - input.root, - return_area, - ) + array320.push(@types.NamedFieldType::{ + name: result306, + body: mbt_ffi_load32(iter_base + 8), + metadata: @types.MetadataEnvelope::{ + doc: lifted308, + aliases: array310, + examples: array313, + deprecated: lifted316, + role: lifted319, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let lifted272 = match mbt_ffi_load8_u(return_area + 0) { - 0 => { - let lifted97 : @types.SchemaValueTree? = match - mbt_ffi_load8_u(return_area + 4) { - 0 => Option::None - 1 => { - let array95 : Array[@types.SchemaValueNode] = [] - for index96 = 0 - index96 < mbt_ffi_load32(return_area + 12) - index96 = index96 + 1 { - let iter_base = mbt_ffi_load32(return_area + 8) + index96 * 32 + @types.SchemaTypeBody::RecordType(array320) + } + 15 => { + let array337 : Array[@types.VariantCaseType] = [] + for index338 = 0 + index338 < mbt_ffi_load32(iter_base + 12) + index338 = index338 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index338 * 72 - let lifted94 = 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), - ) + let result322 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @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 + let lifted323 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - array.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted325 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result324 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - @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() + Option::Some(result324) + } + _ => panic() + } + + let array327 : Array[String] = [] + for index328 = 0 + index328 < mbt_ffi_load32(iter_base + 32) + index328 = index328 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + + index328 * 8 + + let result326 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array327.push(result326) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + let array330 : Array[String] = [] + for index331 = 0 + index331 < mbt_ffi_load32(iter_base + 40) + index331 = index331 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + + index331 * 8 + + let result329 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array330.push(result329) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + + let lifted333 : String? = match + mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result332 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) + + Option::Some(result332) + } + _ => panic() + } + + let lifted336 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted335 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result334 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) + + @types.Role::Other(result334) + } + _ => panic() + } + + Option::Some(lifted335) + } + _ => panic() + } + + array337.push(@types.VariantCaseType::{ + name: result322, + payload: lifted323, + metadata: @types.MetadataEnvelope::{ + doc: lifted325, + aliases: array327, + examples: array330, + deprecated: lifted333, + role: lifted336, + }, + }) } + 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: lifted, - }) + @types.SchemaTypeBody::VariantType(array337) } - 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 + let array340 : Array[String] = [] + for index341 = 0 + index341 < mbt_ffi_load32(iter_base + 12) + index341 = index341 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index341 * 8 - array70.push(mbt_ffi_load8_u(iter_base + 0) != 0) + let result339 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array340.push(result339) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array70) + @types.SchemaTypeBody::EnumType(array340) } 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 + let array343 : Array[String] = [] + for index344 = 0 + index344 < mbt_ffi_load32(iter_base + 12) + index344 = index344 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index344 * 8 - array72.push(mbt_ffi_load32(iter_base + 0)) + 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 + 8)) - @types.SchemaValueNode::TupleValue(array72) + @types.SchemaTypeBody::FlagsType(array343) } 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 + let array345 : Array[Int] = [] + for index346 = 0 + index346 < mbt_ffi_load32(iter_base + 12) + index346 = index346 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index346 * 4 - array74.push(mbt_ffi_load32(iter_base + 0)) + array345.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array74) + @types.SchemaTypeBody::TupleType(array345) } - 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 + 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 lifted347 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - array76.push(mbt_ffi_load32(iter_base + 0)) + let lifted348 : Int? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array76) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ + ok: lifted347, + err: lifted348, + }) } - 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 + 24 => { + let lifted352 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array350 : Array[String] = [] + for index351 = 0 + index351 < mbt_ffi_load32(iter_base + 16) + index351 = index351 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index351 * 8 - array78.push(@types.MapEntry::{ - key: mbt_ffi_load32(iter_base + 0), - value: mbt_ffi_load32(iter_base + 4), - }) + let result349 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array350.push(result349) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array350) + } + _ => panic() } - 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) { + let lifted353 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + 1 => + Option::Some( + mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), + ) _ => 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() - } + let lifted354 : 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.ResultValuePayload::OkValue(lifted81) - } + let lifted356 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None 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() - } + let result355 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - @types.ResultValuePayload::ErrValue(lifted82) + Option::Some(result355) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted83) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted352, + min_length: lifted353, + max_length: lifted354, + regex: lifted356, + }) } - 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) { + 25 => { + let lifted360 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result85 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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 - Option::Some(result85) + let result357 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array358.push(result357) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array358) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result84, - language: lifted86, + let lifted361 : 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 lifted362 : 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: lifted360, + min_bytes: lifted361, + max_bytes: lifted362, }) } - 24 => { - let result87 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 26 => { + let lifted366 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let array364 : Array[String] = [] + for index365 = 0 + index365 < mbt_ffi_load32(iter_base + 20) + index365 = index365 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + + index365 * 8 - let lifted89 : String? = match mbt_ffi_load8_u(iter_base + 16) { + let result363 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array364.push(result363) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + Option::Some(array364) + } + _ => panic() + } + + let lifted370 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result88 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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 - Option::Some(result88) + let result367 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array368.push(result367) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + Option::Some(array368) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result87, - mime_type: lifted89, + @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: lifted366, + allowed_extensions: lifted370, }) } - 25 => { - let result90 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 27 => { + let lifted374 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array372 : Array[String] = [] + for index373 = 0 + index373 < mbt_ffi_load32(iter_base + 16) + index373 = index373 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index373 * 8 - @types.SchemaValueNode::PathValue(result90) - } - 26 => { - let result91 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let result371 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @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), - ) + array372.push(result371) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result92, + Option::Some(array372) + } + _ => panic() + } + + let lifted378 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + let array376 : Array[String] = [] + for index377 = 0 + index377 < mbt_ffi_load32(iter_base + 28) + index377 = index377 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + + index377 * 8 + + let result375 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array376.push(result375) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + Option::Some(array376) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted374, + allowed_hosts: lifted378, }) } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType 30 => { - let result93 = mbt_ffi_ptr2str( + let result379 = 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 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), - ) - _ => panic() - } + let array381 : Array[String] = [] + for index382 = 0 + index382 < mbt_ffi_load32(iter_base + 20) + index382 = index382 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index382 * 8 - array95.push(lifted94) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 8)) + let result380 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(@types.SchemaValueTree::{ - value_nodes: array95, - root: mbt_ffi_load32(return_area + 16), - }) - } - _ => panic() - } + array381.push(result380) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Result::Ok(lifted97) - } - 1 => { - let lifted271 = match mbt_ffi_load8_u(return_area + 4) { - 0 => { - let result98 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + let lifted384 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result383 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) - RpcError::ProtocolError(result98) - } - 1 => { - let result99 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result383, + }) + } + _ => panic() + } - RpcError::Denied(result99) - } - 2 => { - let result100 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + let lifted386 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result385 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 76), + mbt_ffi_load32(iter_base + 80), + ) - RpcError::NotFound(result100) - } - 3 => { - let result101 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 64), + scale: mbt_ffi_load32(iter_base + 72), + unit: result385, + }) + } + _ => panic() + } - RpcError::RemoteInternalError(result101) - } - 4 => { - let lifted270 = match mbt_ffi_load8_u(return_area + 8) { - 0 => { - let result102 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result379, + allowed_suffixes: array381, + min: lifted384, + max: lifted386, + }) + } + 31 => { + let array410 : Array[@types.UnionBranch] = [] + for index411 = 0 + index411 < mbt_ffi_load32(iter_base + 12) + index411 = index411 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index411 * 92 - @common.AgentError::InvalidInput(result102) - } - 1 => { - let result103 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + let result387 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @common.AgentError::InvalidMethod(result103) - } - 2 => { - let result104 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + let lifted396 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result388 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - @common.AgentError::InvalidType(result104) - } - 3 => { - let result105 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + @types.DiscriminatorRule::Prefix(result388) + } + 1 => { + let result389 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - @common.AgentError::InvalidAgentId(result105) - } - 4 => { - let array232 : Array[@types.SchemaTypeNode] = [] - for index233 = 0 - index233 < mbt_ffi_load32(return_area + 16) - index233 = index233 + 1 { - let iter_base = mbt_ffi_load32(return_area + 12) + - index233 * 144 + @types.DiscriminatorRule::Suffix(result389) + } + 2 => { + let result390 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let lifted218 = 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 array120 : Array[@types.NamedFieldType] = [] - for index121 = 0 - index121 < mbt_ffi_load32(iter_base + 12) - index121 = index121 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index121 * 68 + @types.DiscriminatorRule::Contains(result390) + } + 3 => { + let result391 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let result106 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + @types.DiscriminatorRule::Regex(result391) + } + 4 => { + let result392 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), ) - let lifted108 : String? = match - mbt_ffi_load8_u(iter_base + 12) { + let lifted394 : String? = match + mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result107 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), + let result393 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), ) - Option::Some(result107) + Option::Some(result393) } _ => panic() } - let array110 : Array[String] = [] - for index111 = 0 - index111 < mbt_ffi_load32(iter_base + 28) - index111 = index111 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index111 * 8 + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result392, + literal: lifted394, + }) + } + 5 => { + let result395 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let result109 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.DiscriminatorRule::FieldAbsent(result395) + } + _ => panic() + } - array110.push(result109) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + let lifted398 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result397 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - let array113 : Array[String] = [] - for index114 = 0 - index114 < mbt_ffi_load32(iter_base + 36) - index114 = index114 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 32) + - index114 * 8 + Option::Some(result397) + } + _ => panic() + } - let result112 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let array400 : Array[String] = [] + for index401 = 0 + index401 < mbt_ffi_load32(iter_base + 52) + index401 = index401 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 48) + + index401 * 8 - array113.push(result112) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + let result399 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted116 : String? = match - mbt_ffi_load8_u(iter_base + 40) { - 0 => Option::None - 1 => { - let result115 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + array400.push(result399) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - Option::Some(result115) - } - _ => panic() - } + let array403 : Array[String] = [] + for index404 = 0 + index404 < mbt_ffi_load32(iter_base + 60) + index404 = index404 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + + index404 * 8 - let lifted119 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { - 0 => Option::None - 1 => { - let lifted118 = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result117 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), - ) + let result402 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.Role::Other(result117) - } - _ => panic() - } + array403.push(result402) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + + let lifted406 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result405 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result405) + } + _ => panic() + } - Option::Some(lifted118) + let lifted409 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { + 0 => Option::None + 1 => { + let lifted408 = match mbt_ffi_load8_u(iter_base + 80) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result407 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), + ) + + @types.Role::Other(result407) } _ => panic() } - array120.push(@types.NamedFieldType::{ - name: result106, - body: mbt_ffi_load32(iter_base + 8), - metadata: @types.MetadataEnvelope::{ - doc: lifted108, - aliases: array110, - examples: array113, - deprecated: lifted116, - role: lifted119, - }, - }) + Option::Some(lifted408) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaTypeBody::RecordType(array120) + _ => panic() } - 15 => { - let array137 : Array[@types.VariantCaseType] = [] - for index138 = 0 - index138 < mbt_ffi_load32(iter_base + 12) - index138 = index138 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index138 * 72 - - let result122 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - let lifted123 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } - - let lifted125 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result124 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) - Option::Some(result124) - } - _ => panic() - } + array410.push(@types.UnionBranch::{ + tag: result387, + body: mbt_ffi_load32(iter_base + 8), + discriminator: lifted396, + metadata: @types.MetadataEnvelope::{ + doc: lifted398, + aliases: array400, + examples: array403, + deprecated: lifted406, + role: lifted409, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let array127 : Array[String] = [] - for index128 = 0 - index128 < mbt_ffi_load32(iter_base + 32) - index128 = index128 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + - index128 * 8 + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array410, + }) + } + 32 => { + let lifted413 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result412 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let result126 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result412) + } + _ => panic() + } - array127.push(result126) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted413, + }) + } + 33 => { + let lifted415 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result414 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - let array130 : Array[String] = [] - for index131 = 0 - index131 < mbt_ffi_load32(iter_base + 40) - index131 = index131 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + - index131 * 8 + Option::Some(result414) + } + _ => panic() + } - let result129 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted415, + }) + } + 34 => { + let lifted416 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - array130.push(result129) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + @types.SchemaTypeBody::FutureType(lifted416) + } + 35 => { + let lifted417 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - let lifted133 : String? = match - mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result132 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + @types.SchemaTypeBody::StreamType(lifted417) + } + _ => panic() + } - Option::Some(result132) - } - _ => panic() - } + let lifted420 : String? = match mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result419 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) - let lifted136 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted135 = match - mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result134 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + Option::Some(result419) + } + _ => panic() + } - @types.Role::Other(result134) - } - _ => panic() - } + let array422 : Array[String] = [] + for index423 = 0 + index423 < mbt_ffi_load32(iter_base + 104) + index423 = index423 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 100) + index423 * 8 - Option::Some(lifted135) - } - _ => panic() - } + let result421 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - array137.push(@types.VariantCaseType::{ - name: result122, - payload: lifted123, - metadata: @types.MetadataEnvelope::{ - doc: lifted125, - aliases: array127, - examples: array130, - deprecated: lifted133, - role: lifted136, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + array422.push(result421) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - @types.SchemaTypeBody::VariantType(array137) - } - 16 => { - let array140 : Array[String] = [] - for index141 = 0 - index141 < mbt_ffi_load32(iter_base + 12) - index141 = index141 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index141 * 8 + let array425 : Array[String] = [] + for index426 = 0 + index426 < mbt_ffi_load32(iter_base + 112) + index426 = index426 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 108) + index426 * 8 - let result139 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let result424 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - array140.push(result139) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + array425.push(result424) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - @types.SchemaTypeBody::EnumType(array140) - } - 17 => { - let array143 : Array[String] = [] - for index144 = 0 - index144 < mbt_ffi_load32(iter_base + 12) - index144 = index144 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index144 * 8 + let lifted428 : String? = match mbt_ffi_load8_u(iter_base + 116) { + 0 => Option::None + 1 => { + let result427 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 120), + mbt_ffi_load32(iter_base + 124), + ) - let result142 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result427) + } + _ => panic() + } - array143.push(result142) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted431 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted430 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result429 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) - @types.SchemaTypeBody::FlagsType(array143) + @types.Role::Other(result429) } - 18 => { - let array145 : Array[Int] = [] - for index146 = 0 - index146 < mbt_ffi_load32(iter_base + 12) - index146 = index146 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index146 * 4 + _ => panic() + } - array145.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + Option::Some(lifted430) + } + _ => panic() + } - @types.SchemaTypeBody::TupleType(array145) - } - 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 lifted147 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + array432.push(@types.SchemaTypeNode::{ + body: lifted418, + metadata: @types.MetadataEnvelope::{ + doc: lifted420, + aliases: array422, + examples: array425, + deprecated: lifted428, + role: lifted431, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 12)) - let lifted148 : Int? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) - _ => panic() - } + let array437 : Array[@types.SchemaTypeDef] = [] + for index438 = 0 + index438 < mbt_ffi_load32(return_area + 24) + index438 = index438 + 1 { + let iter_base = mbt_ffi_load32(return_area + 20) + index438 * 24 - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted147, - err: lifted148, - }) - } - 24 => { - 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 result434 = 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), - ) + let lifted436 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result435 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - array150.push(result149) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + Option::Some(result435) + } + _ => panic() + } - Option::Some(array150) - } - _ => panic() - } + array437.push(@types.SchemaTypeDef::{ + id: result434, + name: lifted436, + body: mbt_ffi_load32(iter_base + 20), + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 20)) - let lifted153 : 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 array468 : Array[@types.SchemaValueNode] = [] + for index469 = 0 + index469 < mbt_ffi_load32(return_area + 36) + index469 = index469 + 1 { + let iter_base = mbt_ffi_load32(return_area + 32) + index469 * 32 - let lifted154 : 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 lifted156 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result155 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + let lifted467 = 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 result439 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - Option::Some(result155) - } - _ => panic() - } + @types.SchemaValueNode::StringValue(result439) + } + 13 => { + let array440 : Array[Int] = [] + for index441 = 0 + index441 < mbt_ffi_load32(iter_base + 12) + index441 = index441 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index441 * 4 - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted152, - min_length: lifted153, - max_length: lifted154, - regex: lifted156, - }) - } - 25 => { - let lifted160 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let array158 : Array[String] = [] - for index159 = 0 - index159 < mbt_ffi_load32(iter_base + 16) - index159 = index159 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index159 * 8 + array440.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let result157 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaValueNode::RecordValue(array440) + } + 14 => { + let lifted442 : Int? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - array158.push(result157) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ + case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + payload: lifted442, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + let array443 : Array[Bool] = [] + for index444 = 0 + index444 < mbt_ffi_load32(iter_base + 12) + index444 = index444 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index444 * 1 - Option::Some(array158) - } - _ => panic() - } + array443.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let lifted161 : 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() - } + @types.SchemaValueNode::FlagsValue(array443) + } + 17 => { + 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 lifted162 : 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() - } + array445.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted160, - min_bytes: lifted161, - max_bytes: lifted162, - }) - } - 26 => { - let lifted166 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let array164 : Array[String] = [] - for index165 = 0 - index165 < mbt_ffi_load32(iter_base + 20) - index165 = index165 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + - index165 * 8 + @types.SchemaValueNode::TupleValue(array445) + } + 18 => { + let array447 : Array[Int] = [] + for index448 = 0 + index448 < mbt_ffi_load32(iter_base + 12) + index448 = index448 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index448 * 4 - let result163 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + array447.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array164.push(result163) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + @types.SchemaValueNode::ListValue(array447) + } + 19 => { + let array449 : Array[Int] = [] + for index450 = 0 + index450 < mbt_ffi_load32(iter_base + 12) + index450 = index450 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index450 * 4 - Option::Some(array164) - } - _ => panic() - } + array449.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let lifted170 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let array168 : Array[String] = [] - for index169 = 0 - index169 < mbt_ffi_load32(iter_base + 32) - index169 = index169 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + - index169 * 8 + @types.SchemaValueNode::FixedListValue(array449) + } + 20 => { + let array451 : Array[@types.MapEntry] = [] + for index452 = 0 + index452 < mbt_ffi_load32(iter_base + 12) + index452 = index452 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index452 * 8 - let result167 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + array451.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)) - array168.push(result167) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + @types.SchemaValueNode::MapValue(array451) + } + 21 => { + let lifted453 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - Option::Some(array168) - } + @types.SchemaValueNode::OptionValue(lifted453) + } + 22 => { + let lifted456 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted454 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => 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: lifted166, - allowed_extensions: lifted170, - }) + @types.ResultValuePayload::OkValue(lifted454) } - 27 => { - let lifted174 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { + 1 => { + let lifted455 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None - 1 => { - let array172 : Array[String] = [] - for index173 = 0 - index173 < mbt_ffi_load32(iter_base + 16) - index173 = index173 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index173 * 8 - - let result171 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array172.push(result171) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - - Option::Some(array172) - } + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => panic() } - let lifted178 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { - 0 => Option::None - 1 => { - let array176 : Array[String] = [] - for index177 = 0 - index177 < mbt_ffi_load32(iter_base + 28) - index177 = index177 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index177 * 8 - - let result175 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.ResultValuePayload::ErrValue(lifted455) + } + _ => panic() + } - array176.push(result175) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + @types.SchemaValueNode::ResultValue(lifted456) + } + 23 => { + let result457 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - Option::Some(array176) - } - _ => panic() - } + let lifted459 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result458 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted174, - allowed_hosts: lifted178, - }) + Option::Some(result458) } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result179 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + _ => panic() + } - let array181 : Array[String] = [] - for index182 = 0 - index182 < mbt_ffi_load32(iter_base + 20) - index182 = index182 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + - index182 * 8 + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result457, + language: lifted459, + }) + } + 24 => { + let result460 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let result180 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted462 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result461 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - array181.push(result180) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + Option::Some(result461) + } + _ => panic() + } - let lifted184 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result183 = 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: result183, - }) - } - _ => panic() - } + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result460, + mime_type: lifted462, + }) + } + 25 => { + let result463 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let lifted186 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let result185 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 76), - mbt_ffi_load32(iter_base + 80), - ) + @types.SchemaValueNode::PathValue(result463) + } + 26 => { + let result464 = 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 + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result185, - }) - } - _ => panic() - } + @types.SchemaValueNode::UrlValue(result464) + } + 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 result465 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result179, - allowed_suffixes: array181, - min: lifted184, - max: lifted186, - }) - } - 31 => { - let array210 : Array[@types.UnionBranch] = [] - for index211 = 0 - index211 < mbt_ffi_load32(iter_base + 12) - index211 = index211 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index211 * 92 + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 8), + scale: mbt_ffi_load32(iter_base + 16), + unit: result465, + }) + } + 30 => { + let result466 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let result187 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result466, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), + ) + _ => panic() + } - let lifted196 = match mbt_ffi_load8_u(iter_base + 12) { - 0 => { - let result188 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + array468.push(lifted467) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 32)) - @types.DiscriminatorRule::Prefix(result188) - } - 1 => { - let result189 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + @common.AgentError::CustomError(@types.TypedSchemaValue::{ + graph: @types.SchemaGraph::{ + type_nodes: array432, + defs: array437, + root: mbt_ffi_load32(return_area + 28), + }, + value: @types.SchemaValueTree::{ + value_nodes: array468, + root: mbt_ffi_load32(return_area + 40), + }, + }) + } + _ => panic() + } - @types.DiscriminatorRule::Suffix(result189) - } - 2 => { - let result190 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + Result::Err(lifted470) + } + _ => panic() + } + let ret = lifted471 + mbt_ffi_free(ptr) + mbt_ffi_free(return_area) + return ret +} - @types.DiscriminatorRule::Contains(result190) - } - 3 => { - let result191 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) +///| +/// 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, + ) - @types.DiscriminatorRule::Regex(result191) - } - 4 => { - let result192 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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 lifted194 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result193 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) +///| +/// 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] = [] - Option::Some(result193) - } - _ => panic() - } + let ptr = mbt_ffi_str2ptr(agent_type_name) - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result192, - literal: lifted194, - }) - } - 5 => { - let result195 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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 - @types.DiscriminatorRule::FieldAbsent(result195) - } - _ => panic() - } + match iter_elem { + BoolValue(payload) => { + mbt_ffi_store8(iter_base + 0, 0) + mbt_ffi_store8(iter_base + 8, if payload { 1 } else { 0 }) - let lifted198 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result197 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + () + } + S8Value(payload0) => { + mbt_ffi_store8(iter_base + 0, 1) + mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload0)) - Option::Some(result197) - } - _ => panic() - } + () + } + S16Value(payload1) => { + mbt_ffi_store8(iter_base + 0, 2) + mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload1)) - let array200 : Array[String] = [] - for index201 = 0 - index201 < mbt_ffi_load32(iter_base + 52) - index201 = index201 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 48) + - index201 * 8 + () + } + S32Value(payload2) => { + mbt_ffi_store8(iter_base + 0, 3) + mbt_ffi_store32(iter_base + 8, payload2) - let result199 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + S64Value(payload3) => { + mbt_ffi_store8(iter_base + 0, 4) + mbt_ffi_store64(iter_base + 8, payload3) - array200.push(result199) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + () + } + U8Value(payload4) => { + mbt_ffi_store8(iter_base + 0, 5) + mbt_ffi_store8(iter_base + 8, payload4.to_int()) - let array203 : Array[String] = [] - for index204 = 0 - index204 < mbt_ffi_load32(iter_base + 60) - index204 = index204 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + - index204 * 8 + () + } + U16Value(payload5) => { + mbt_ffi_store8(iter_base + 0, 6) + mbt_ffi_store16(iter_base + 8, payload5.reinterpret_as_int()) - let result202 = 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()) - array203.push(result202) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + () + } + U64Value(payload7) => { + mbt_ffi_store8(iter_base + 0, 8) + mbt_ffi_store64(iter_base + 8, payload7.reinterpret_as_int64()) - let lifted206 : String? = match - mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result205 = 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(result205) - } - _ => panic() - } + () + } + F64Value(payload9) => { + mbt_ffi_store8(iter_base + 0, 10) + mbt_ffi_storef64(iter_base + 8, payload9) - let lifted209 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted208 = match - mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result207 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + () + } + CharValue(payload10) => { + mbt_ffi_store8(iter_base + 0, 11) + mbt_ffi_store32(iter_base + 8, payload10.to_int()) - @types.Role::Other(result207) - } - _ => panic() - } + () + } + StringValue(payload11) => { + mbt_ffi_store8(iter_base + 0, 12) - Option::Some(lifted208) - } - _ => 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) - array210.push(@types.UnionBranch::{ - tag: result187, - body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted196, - metadata: @types.MetadataEnvelope::{ - doc: lifted198, - aliases: array200, - examples: array203, - deprecated: lifted206, - role: lifted209, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + RecordValue(payload13) => { + mbt_ffi_store8(iter_base + 0, 13) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array210, - }) - } - 32 => { - let lifted213 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result212 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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) - Option::Some(result212) - } - _ => panic() - } + () + } + VariantValue(payload14) => { + mbt_ffi_store8(iter_base + 0, 14) + mbt_ffi_store32(iter_base + 8, payload14.case.reinterpret_as_int()) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted213, - }) - } - 33 => { - let lifted215 : String? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result214 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + match payload14.payload { + None => { + mbt_ffi_store8(iter_base + 12, 0) - Option::Some(result214) - } - _ => panic() - } + () + } + Some(payload16) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload16) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted215, - }) - } - 34 => { - let lifted216 : 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(lifted216) - } - 35 => { - let lifted217 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + () + } + EnumValue(payload17) => { + mbt_ffi_store8(iter_base + 0, 15) + mbt_ffi_store32(iter_base + 8, payload17.reinterpret_as_int()) - @types.SchemaTypeBody::StreamType(lifted217) - } - _ => panic() - } + () + } + FlagsValue(payload18) => { + mbt_ffi_store8(iter_base + 0, 16) - let lifted220 : String? = match - mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result219 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), - ) + 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) - Option::Some(result219) - } - _ => panic() - } + () + } + TupleValue(payload21) => { + mbt_ffi_store8(iter_base + 0, 17) - let array222 : Array[String] = [] - for index223 = 0 - index223 < mbt_ffi_load32(iter_base + 104) - index223 = index223 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 100) + index223 * 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) + } + mbt_ffi_store32(iter_base + 12, payload21.length()) + mbt_ffi_store32(iter_base + 8, address22) + cleanup_list.push(address22) - let result221 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + ListValue(payload24) => { + mbt_ffi_store8(iter_base + 0, 18) - array222.push(result221) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + 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) - let array225 : Array[String] = [] - for index226 = 0 - index226 < mbt_ffi_load32(iter_base + 112) - index226 = index226 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 108) + index226 * 8 + () + } + FixedListValue(payload27) => { + mbt_ffi_store8(iter_base + 0, 19) - let result224 = 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) + } + mbt_ffi_store32(iter_base + 12, payload27.length()) + mbt_ffi_store32(iter_base + 8, address28) + cleanup_list.push(address28) - array225.push(result224) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + () + } + MapValue(payload30) => { + mbt_ffi_store8(iter_base + 0, 20) - let lifted228 : String? = match - mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result227 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) + 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) - Option::Some(result227) - } - _ => panic() - } + () + } + OptionValue(payload33) => { + mbt_ffi_store8(iter_base + 0, 21) - let lifted231 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted230 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result229 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) - - @types.Role::Other(result229) - } - _ => panic() - } + match payload33 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - Option::Some(lifted230) - } - _ => panic() - } + () + } + Some(payload35) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload35) - array232.push(@types.SchemaTypeNode::{ - body: lifted218, - metadata: @types.MetadataEnvelope::{ - doc: lifted220, - aliases: array222, - examples: array225, - deprecated: lifted228, - role: lifted231, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 12)) + () + } + } - let array237 : Array[@types.SchemaTypeDef] = [] - for index238 = 0 - index238 < mbt_ffi_load32(return_area + 24) - index238 = index238 + 1 { - let iter_base = mbt_ffi_load32(return_area + 20) + index238 * 24 + () + } + ResultValue(payload36) => { + mbt_ffi_store8(iter_base + 0, 22) - let result234 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload36 { + OkValue(payload37) => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted236 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result235 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + match payload37 { + None => { + mbt_ffi_store8(iter_base + 12, 0) - Option::Some(result235) - } - _ => panic() - } + () + } + Some(payload39) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload39) - array237.push(@types.SchemaTypeDef::{ - id: result234, - name: lifted236, - body: mbt_ffi_load32(iter_base + 20), - }) + () } - mbt_ffi_free(mbt_ffi_load32(return_area + 20)) + } - let array268 : Array[@types.SchemaValueNode] = [] - for index269 = 0 - index269 < mbt_ffi_load32(return_area + 36) - index269 = index269 + 1 { - let iter_base = mbt_ffi_load32(return_area + 32) + index269 * 32 + () + } + ErrValue(payload40) => { + mbt_ffi_store8(iter_base + 8, 1) - let lifted267 = 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 result239 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + match payload40 { + None => { + mbt_ffi_store8(iter_base + 12, 0) - @types.SchemaValueNode::StringValue(result239) - } - 13 => { - let array240 : Array[Int] = [] - for index241 = 0 - index241 < mbt_ffi_load32(iter_base + 12) - index241 = index241 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index241 * 4 + () + } + Some(payload42) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload42) - array240.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaValueNode::RecordValue(array240) - } - 14 => { - let lifted242 : 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: lifted242, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - let array243 : Array[Bool] = [] - for index244 = 0 - index244 < mbt_ffi_load32(iter_base + 12) - index244 = index244 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index244 * 1 + () + } + TextValue(payload43) => { + mbt_ffi_store8(iter_base + 0, 23) - array243.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let ptr44 = mbt_ffi_str2ptr(payload43.text) + mbt_ffi_store32(iter_base + 12, payload43.text.length()) + mbt_ffi_store32(iter_base + 8, ptr44) - @types.SchemaValueNode::FlagsValue(array243) - } - 17 => { - let array245 : Array[Int] = [] - for index246 = 0 - index246 < mbt_ffi_load32(iter_base + 12) - index246 = index246 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index246 * 4 + match payload43.language { + None => { + mbt_ffi_store8(iter_base + 16, 0) - array245.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Some(payload46) => { + mbt_ffi_store8(iter_base + 16, 1) - @types.SchemaValueNode::TupleValue(array245) - } - 18 => { - let array247 : Array[Int] = [] - for index248 = 0 - index248 < mbt_ffi_load32(iter_base + 12) - index248 = index248 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index248 * 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) - array247.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } + cleanup_list.push(ptr44) - @types.SchemaValueNode::ListValue(array247) - } - 19 => { - 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 + () + } + BinaryValue(payload48) => { + mbt_ffi_store8(iter_base + 0, 24) - array249.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let ptr49 = mbt_ffi_bytes2ptr(payload48.bytes) - @types.SchemaValueNode::FixedListValue(array249) - } - 20 => { - let array251 : Array[@types.MapEntry] = [] - for index252 = 0 - index252 < mbt_ffi_load32(iter_base + 12) - index252 = index252 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index252 * 8 + mbt_ffi_store32(iter_base + 12, payload48.bytes.length()) + mbt_ffi_store32(iter_base + 8, ptr49) - array251.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)) + match payload48.mime_type { + None => { + mbt_ffi_store8(iter_base + 16, 0) - @types.SchemaValueNode::MapValue(array251) - } - 21 => { - let lifted253 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + () + } + Some(payload51) => { + mbt_ffi_store8(iter_base + 16, 1) - @types.SchemaValueNode::OptionValue(lifted253) - } - 22 => { - let lifted256 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted254 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => 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) - @types.ResultValuePayload::OkValue(lifted254) - } - 1 => { - let lifted255 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + () + } + } + cleanup_list.push(ptr49) - @types.ResultValuePayload::ErrValue(lifted255) - } - _ => panic() - } + () + } + PathValue(payload53) => { + mbt_ffi_store8(iter_base + 0, 25) - @types.SchemaValueNode::ResultValue(lifted256) - } - 23 => { - let result257 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let lifted259 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result258 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) - - Option::Some(result258) - } - _ => panic() - } - - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result257, - language: lifted259, - }) - } - 24 => { - let result260 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let lifted262 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result261 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) - - Option::Some(result261) - } - _ => panic() - } - - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result260, - mime_type: lifted262, - }) - } - 25 => { - let result263 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::PathValue(result263) - } - 26 => { - let result264 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::UrlValue(result264) - } - 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 result265 = 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: result265, - }) - } - 30 => { - let result266 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result266, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) - _ => panic() - } - - array268.push(lifted267) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 32)) - - @common.AgentError::CustomError(@types.TypedSchemaValue::{ - graph: @types.SchemaGraph::{ - type_nodes: array232, - defs: array237, - root: mbt_ffi_load32(return_area + 28), - }, - value: @types.SchemaValueTree::{ - value_nodes: array268, - root: mbt_ffi_load32(return_area + 40), - }, - }) - } - _ => 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) - RpcError::RemoteAgentError(lifted270) - } - _ => panic() + () } + UrlValue(payload55) => { + mbt_ffi_store8(iter_base + 0, 26) - Result::Err(lifted271) - } - _ => panic() - } - let ret = lifted272 - 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 }) + 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) () } - S8Value(payload0) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload0)) + 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(), + ) () } - S16Value(payload1) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload1)) + DurationValue(payload58) => { + mbt_ffi_store8(iter_base + 0, 28) + mbt_ffi_store64(iter_base + 8, payload58.nanoseconds) () } - S32Value(payload2) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload2) + 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) - () - } - S64Value(payload3) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload3) + 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) () } - U8Value(payload4) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload4.to_int()) + UnionValue(payload61) => { + mbt_ffi_store8(iter_base + 0, 30) - () - } - U16Value(payload5) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload5.reinterpret_as_int()) + 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) () } - U32Value(payload6) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload6.reinterpret_as_int()) + SecretValue(payload63) => { + mbt_ffi_store8(iter_base + 0, 31) - () - } - U64Value(payload7) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload7.reinterpret_as_int64()) + let @types.Secret(handle) = payload63 + mbt_ffi_store32(iter_base + 8, handle) () } - F32Value(payload8) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload8) + QuotaTokenHandle(payload64) => { + mbt_ffi_store8(iter_base + 0, 32) - () - } - F64Value(payload9) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload9) + let @types.QuotaToken(handle65) = payload64 + mbt_ffi_store32(iter_base + 8, handle65) () } - 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 (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 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 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 - () - } - RecordValue(payload13) => { - mbt_ffi_store8(iter_base + 0, 13) + 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 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()) + 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) - match payload14.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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 - () - } - Some(payload16) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload16) + 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) - () - } - 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) + S8Type(payload77) => { + mbt_ffi_store8(iter_base + 0, 2) - () - } - TupleValue(payload21) => { - mbt_ffi_store8(iter_base + 0, 17) + match payload77 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - 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) + () + } + Some(payload79) => { + mbt_ffi_store8(iter_base + 8, 1) - () - } - ListValue(payload24) => { - mbt_ffi_store8(iter_base + 0, 18) + match payload79.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - 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) + () + } + Some(payload81) => { + mbt_ffi_store8(iter_base + 16, 1) - () - } - FixedListValue(payload27) => { - mbt_ffi_store8(iter_base + 0, 19) + match payload81 { + Signed(payload82) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload82) - 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) + () + } + Unsigned(payload83) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload83.reinterpret_as_int64(), + ) - () - } - MapValue(payload30) => { - mbt_ffi_store8(iter_base + 0, 20) + () + } + FloatBits(payload84) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload84.reinterpret_as_int64(), + ) - 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) + match payload79.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - () - } - Some(payload35) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload35) + () + } + 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) - () - } - ResultValue(payload36) => { - mbt_ffi_store8(iter_base + 0, 22) + () + } + Unsigned(payload88) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload88.reinterpret_as_int64(), + ) - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8(iter_base + 8, 0) + () + } + FloatBits(payload89) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload89.reinterpret_as_int64(), + ) - 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) - () - } - } + match payload79.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - ErrValue(payload40) => { - mbt_ffi_store8(iter_base + 8, 1) + () + } + Some(payload91) => { + mbt_ffi_store8(iter_base + 64, 1) - match payload40 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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) - () + () + } } - Some(payload42) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload42) - () - } + () } - - () } + + () } + S16Type(payload93) => { + mbt_ffi_store8(iter_base + 0, 3) - () - } - TextValue(payload43) => { - mbt_ffi_store8(iter_base + 0, 23) + match payload93 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let ptr44 = mbt_ffi_str2ptr(payload43.text) - mbt_ffi_store32(iter_base + 12, payload43.text.length()) - mbt_ffi_store32(iter_base + 8, ptr44) + () + } + Some(payload95) => { + mbt_ffi_store8(iter_base + 8, 1) - match payload43.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + match payload95.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - Some(payload46) => { - mbt_ffi_store8(iter_base + 16, 1) + () + } + Some(payload97) => { + 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) + match payload97 { + Signed(payload98) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload98) - () - } - } - cleanup_list.push(ptr44) + () + } + Unsigned(payload99) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload99.reinterpret_as_int64(), + ) - () - } - BinaryValue(payload48) => { - mbt_ffi_store8(iter_base + 0, 24) + () + } + FloatBits(payload100) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload100.reinterpret_as_int64(), + ) - 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) + match payload95.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - () - } - Some(payload51) => { - mbt_ffi_store8(iter_base + 16, 1) + () + } + Some(payload102) => { + mbt_ffi_store8(iter_base + 40, 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) + 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) + + () + } + } + + () + } } + + () } - cleanup_list.push(ptr49) + S32Type(payload109) => { + mbt_ffi_store8(iter_base + 0, 4) - () - } - PathValue(payload53) => { - mbt_ffi_store8(iter_base + 0, 25) + match payload109 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - 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) + () + } + Some(payload111) => { + mbt_ffi_store8(iter_base + 8, 1) - () - } - UrlValue(payload55) => { - mbt_ffi_store8(iter_base + 0, 26) + match payload111.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - 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) + () + } + Some(payload113) => { + mbt_ffi_store8(iter_base + 16, 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(), - ) + match payload113 { + Signed(payload114) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload114) - () - } - DurationValue(payload58) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload58.nanoseconds) + () + } + Unsigned(payload115) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload115.reinterpret_as_int64(), + ) - () - } - 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) + () + } + FloatBits(payload116) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload116.reinterpret_as_int64(), + ) - 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) + match payload111.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - () - } - SecretValue(payload63) => { - mbt_ffi_store8(iter_base + 0, 31) + () + } + Some(payload118) => { + mbt_ffi_store8(iter_base + 40, 1) - let @types.Secret(handle64) = payload63 - mbt_ffi_store32(iter_base + 8, handle64) + match payload118 { + Signed(payload119) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload119) - () - } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8(iter_base + 0, 32) + () + } + Unsigned(payload120) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload120.reinterpret_as_int64(), + ) - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32(iter_base + 8, handle66) + () + } + FloatBits(payload121) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload121.reinterpret_as_int64(), + ) - () - } - } - } - let return_area = mbt_ffi_malloc(44) - wasmImportMethodWasmRpcInvoke( - handle, - ptr, - method_name.length(), - address67, - input.value_nodes.length(), - input.root, - return_area, - ) + () + } + } - let lifted240 = match mbt_ffi_load8_u(return_area + 0) { - 0 => Result::Ok(()) - 1 => { - let lifted239 = 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), - ) + match payload111.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - RpcError::Denied(result69) - } - 2 => { - let result70 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + () + } + Some(payload123) => { + mbt_ffi_store8(iter_base + 64, 1) - RpcError::NotFound(result70) - } - 3 => { - let result71 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + 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) - RpcError::RemoteInternalError(result71) - } - 4 => { - let lifted238 = 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), - ) + () + } + S64Type(payload125) => { + mbt_ffi_store8(iter_base + 0, 5) - @common.AgentError::InvalidType(result74) - } - 3 => { - let result75 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + match payload125 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - @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 + Some(payload127) => { + mbt_ffi_store8(iter_base + 8, 1) - 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 + match payload127.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - let result76 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + () + } + 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(), ) - 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), - ) + () + } + FloatBits(payload132) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload132.reinterpret_as_int64(), + ) - 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), - ) + match payload127.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - array.push(result78) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + () + } + Some(payload134) => { + mbt_ffi_store8(iter_base + 40, 1) - 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 + match payload134 { + Signed(payload135) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload135) - let result80 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Unsigned(payload136) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload136.reinterpret_as_int64(), + ) - array81.push(result80) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + () + } + FloatBits(payload137) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload137.reinterpret_as_int64(), + ) - 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), - ) + match payload127.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - @types.Role::Other(result85) - } - _ => panic() - } + () + } + Some(payload139) => { + mbt_ffi_store8(iter_base + 64, 1) - Option::Some(lifted86) - } - _ => panic() - } + 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) - 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, - }, - }) + () + } + } + + () + } + } + + () + } + 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) + + () } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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(), + ) - @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() - } + match payload143.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let lifted93 : String? = 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), - ) + () + } + Some(payload150) => { + mbt_ffi_store8(iter_base + 40, 1) - Option::Some(result92) - } - _ => panic() - } + match payload150 { + Signed(payload151) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload151) - 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 + () + } + Unsigned(payload152) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload152.reinterpret_as_int64(), + ) - let result94 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + FloatBits(payload153) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload153.reinterpret_as_int64(), + ) - array95.push(result94) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + () + } + } - 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 result97 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload143.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - array98.push(result97) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + () + } + Some(payload155) => { + mbt_ffi_store8(iter_base + 64, 1) - let lifted101 : String? = match - mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result100 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + 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) - Option::Some(result100) - } - _ => 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 => { - let result102 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + () + } + } - @types.Role::Other(result102) - } - _ => panic() - } + () + } + U16Type(payload157) => { + mbt_ffi_store8(iter_base + 0, 7) - Option::Some(lifted103) - } - _ => panic() - } + match payload157 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - 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)) + () + } + Some(payload159) => { + mbt_ffi_store8(iter_base + 8, 1) - @types.SchemaTypeBody::VariantType(array105) - } - 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 + match payload159.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - let result107 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + () + } + 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(), ) - array108.push(result107) + () } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + FloatBits(payload164) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload164.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::EnumType(array108) + () + } } - 17 => { - 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 - 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 + 8)) + match payload159.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - @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 + () + } + Some(payload166) => { + mbt_ffi_store8(iter_base + 40, 1) - array113.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload166 { + Signed(payload167) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload167) - @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), - }) - 22 => - @types.SchemaTypeBody::OptionType( - mbt_ffi_load32(iter_base + 8), - ) - 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() + () } + Unsigned(payload168) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload168.reinterpret_as_int64(), + ) - let lifted116 : Int? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) - _ => panic() + () } + FloatBits(payload169) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload169.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted115, - err: lifted116, - }) + () + } } - 24 => { - let lifted120 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - 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 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 + 12)) + match payload159.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - Option::Some(array118) - } - _ => panic() - } + () + } + Some(payload171) => { + mbt_ffi_store8(iter_base + 64, 1) - let lifted121 : 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 ptr172 = mbt_ffi_str2ptr(payload171) + mbt_ffi_store32(iter_base + 72, payload171.length()) + mbt_ffi_store32(iter_base + 68, ptr172) + cleanup_list.push(ptr172) - 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() - } + () + } + } - let lifted124 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result123 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + () + } + } - Option::Some(result123) - } - _ => panic() - } + () + } + U32Type(payload173) => { + mbt_ffi_store8(iter_base + 0, 8) - @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 => { - 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 payload173 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let result125 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload175) => { + mbt_ffi_store8(iter_base + 8, 1) - array126.push(result125) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + match payload175.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - Option::Some(array126) - } - _ => panic() - } + () + } + Some(payload177) => { + mbt_ffi_store8(iter_base + 16, 1) - 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() + 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(), + ) - 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() + () } + FloatBits(payload180) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload180.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted128, - min_bytes: lifted129, - max_bytes: lifted130, - }) + () + } } - 26 => { - let lifted134 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 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 - - let result131 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - array132.push(result131) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + () + } + } - Option::Some(array132) - } - _ => panic() - } + match payload175.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - 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 + () + } + Some(payload182) => { + mbt_ffi_store8(iter_base + 40, 1) - let result135 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload182 { + Signed(payload183) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload183) - array136.push(result135) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + () + } + Unsigned(payload184) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload184.reinterpret_as_int64(), + ) - Option::Some(array136) - } - _ => panic() + () } + FloatBits(payload185) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload185.reinterpret_as_int64(), + ) - @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 => { - 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 - let result139 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array140.push(result139) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + match payload175.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - Option::Some(array140) - } - _ => panic() - } + () + } + Some(payload187) => { + mbt_ffi_store8(iter_base + 64, 1) - let lifted146 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { - 0 => Option::None - 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 + 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) - let result143 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array144.push(result143) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + () + } + } - Option::Some(array144) - } - _ => panic() - } + () + } + U64Type(payload189) => { + mbt_ffi_store8(iter_base + 0, 9) - @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), - ) + match payload189 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - 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 + () + } + Some(payload191) => { + mbt_ffi_store8(iter_base + 8, 1) - let result148 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload191.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - array149.push(result148) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + () + } + Some(payload193) => { + mbt_ffi_store8(iter_base + 16, 1) - let lifted152 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result151 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + match payload193 { + Signed(payload194) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload194) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 32), - scale: mbt_ffi_load32(iter_base + 40), - unit: result151, - }) - } - _ => panic() + () } + Unsigned(payload195) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload195.reinterpret_as_int64(), + ) - let lifted154 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let result153 = 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: result153, - }) - } - _ => panic() + () } + FloatBits(payload196) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload196.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result147, - allowed_suffixes: array149, - min: lifted152, - max: lifted154, - }) + () + } } - 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 => { - let result156 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match payload191.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - @types.DiscriminatorRule::Prefix(result156) - } - 1 => { - let result157 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + Some(payload198) => { + mbt_ffi_store8(iter_base + 40, 1) - @types.DiscriminatorRule::Suffix(result157) - } - 2 => { - let result158 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match payload198 { + Signed(payload199) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload199) - @types.DiscriminatorRule::Contains(result158) - } - 3 => { - let result159 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + Unsigned(payload200) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload200.reinterpret_as_int64(), + ) - @types.DiscriminatorRule::Regex(result159) - } - 4 => { - let result160 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - - let lifted162 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result161 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) - - Option::Some(result161) - } - _ => 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), - ) + () + } + FloatBits(payload201) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload201.reinterpret_as_int64(), + ) - @types.DiscriminatorRule::FieldAbsent(result163) - } - _ => panic() - } + () + } + } - let lifted166 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result165 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + () + } + } - Option::Some(result165) - } - _ => panic() - } + match payload191.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - 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 + () + } + Some(payload203) => { + mbt_ffi_store8(iter_base + 64, 1) - let result167 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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) - array168.push(result167) - } - 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 result170 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + F32Type(payload205) => { + mbt_ffi_store8(iter_base + 0, 10) - array171.push(result170) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + match payload205 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted174 : String? = match - mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result173 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), - ) + () + } + Some(payload207) => { + mbt_ffi_store8(iter_base + 8, 1) - Option::Some(result173) - } - _ => panic() - } + match payload207.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - let lifted177 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted176 = match - mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result175 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + () + } + Some(payload209) => { + mbt_ffi_store8(iter_base + 16, 1) - @types.Role::Other(result175) - } - _ => panic() - } + match payload209 { + Signed(payload210) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload210) - Option::Some(lifted176) - } - _ => panic() - } + () + } + Unsigned(payload211) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload211.reinterpret_as_int64(), + ) - 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)) + FloatBits(payload212) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload212.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array178, - }) + () + } } - 32 => { - let lifted181 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result180 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - Option::Some(result180) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted181, - }) - } - 33 => { - let lifted183 : String? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result182 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + match payload207.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - Option::Some(result182) - } - _ => panic() - } + () + } + Some(payload214) => { + mbt_ffi_store8(iter_base + 40, 1) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted183, - }) - } - 34 => { - let lifted184 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + 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(), + ) - @types.SchemaTypeBody::FutureType(lifted184) - } - 35 => { - let lifted185 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + () } + FloatBits(payload217) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload217.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::StreamType(lifted185) + () + } } - _ => panic() + + () } + } - let lifted188 : String? = match - mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result187 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), - ) + match payload207.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - Option::Some(result187) - } - _ => panic() + () } + Some(payload219) => { + mbt_ffi_store8(iter_base + 64, 1) - 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 result189 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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) - array190.push(result189) + () } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + } + + () + } + } - 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 + () + } + F64Type(payload221) => { + mbt_ffi_store8(iter_base + 0, 11) - let result192 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload221 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - array193.push(result192) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + () + } + Some(payload223) => { + mbt_ffi_store8(iter_base + 8, 1) - let lifted196 : String? = match - mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result195 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) + match payload223.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - Option::Some(result195) - } - _ => panic() + () } + Some(payload225) => { + mbt_ffi_store8(iter_base + 16, 1) - let lifted199 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted198 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result197 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + match payload225 { + Signed(payload226) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload226) - @types.Role::Other(result197) - } - _ => panic() + () } + 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(), + ) - Option::Some(lifted198) + () + } } - _ => panic() - } - 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)) - - 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 result202 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - let lifted204 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result203 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + match payload223.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - Option::Some(result203) - } - _ => panic() + () } + Some(payload230) => { + mbt_ffi_store8(iter_base + 40, 1) - array205.push(@types.SchemaTypeDef::{ - id: result202, - name: lifted204, - body: mbt_ffi_load32(iter_base + 20), - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 20)) + match payload230 { + Signed(payload231) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload231) - let array236 : Array[@types.SchemaValueNode] = [] - for index237 = 0 - index237 < mbt_ffi_load32(return_area + 36) - index237 = index237 + 1 { - let iter_base = mbt_ffi_load32(return_area + 32) + index237 * 32 + () + } + Unsigned(payload232) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload232.reinterpret_as_int64(), + ) - let lifted235 = 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 result207 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + FloatBits(payload233) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload233.reinterpret_as_int64(), + ) - @types.SchemaValueNode::StringValue(result207) + () + } } - 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 - array208.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaValueNode::RecordValue(array208) - } - 14 => { - let lifted210 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + match payload223.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted210, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 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 + () + } + Some(payload235) => { + mbt_ffi_store8(iter_base + 64, 1) - array211.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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) - @types.SchemaValueNode::FlagsValue(array211) - } - 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 + () + } + } - array213.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaValueNode::TupleValue(array213) - } - 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 + () + } + CharType => { + mbt_ffi_store8(iter_base + 0, 12) - array215.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + StringType => { + mbt_ffi_store8(iter_base + 0, 13) - @types.SchemaValueNode::ListValue(array215) - } - 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 + () + } + RecordType(payload239) => { + mbt_ffi_store8(iter_base + 0, 14) - array217.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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 - @types.SchemaValueNode::FixedListValue(array217) - } - 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 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) - 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)) + match iter_elem.metadata.doc { + None => { + mbt_ffi_store8(iter_base + 12, 0) - @types.SchemaValueNode::MapValue(array219) - } - 21 => { - let lifted221 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + () + } + Some(payload242) => { + mbt_ffi_store8(iter_base + 12, 1) - @types.SchemaValueNode::OptionValue(lifted221) - } - 22 => { - let lifted224 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted222 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + 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) - @types.ResultValuePayload::OkValue(lifted222) - } - 1 => { - let lifted223 : 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(lifted223) - } - _ => panic() - } + 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 - @types.SchemaValueNode::ResultValue(lifted224) - } - 23 => { - let result225 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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 lifted227 : 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 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 - Option::Some(result226) - } - _ => 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) + } + mbt_ffi_store32( + iter_base + 36, + iter_elem.metadata.examples.length(), + ) + mbt_ffi_store32(iter_base + 32, address248) - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result225, - language: lifted227, - }) - } - 24 => { - let result228 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + match iter_elem.metadata.deprecated { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let lifted230 : 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), - ) + () + } + Some(payload251) => { + mbt_ffi_store8(iter_base + 40, 1) - Option::Some(result229) - } - _ => panic() - } + 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) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result228, - mime_type: lifted230, - }) + () + } + } + + 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) + + () } - 25 => { - let result231 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + UnstructuredText => { + mbt_ffi_store8(iter_base + 56, 1) - @types.SchemaValueNode::PathValue(result231) + () } - 26 => { - let result232 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + UnstructuredBinary => { + mbt_ffi_store8(iter_base + 56, 2) - @types.SchemaValueNode::UrlValue(result232) + () } - 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 result233 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + Other(payload258) => { + mbt_ffi_store8(iter_base + 56, 3) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result233, - }) - } - 30 => { - let result234 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result234, - body: mbt_ffi_load32(iter_base + 16), - }) + () } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) - _ => panic() } - array236.push(lifted235) + () } - mbt_ffi_free(mbt_ffi_load32(return_area + 32)) - - @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: array236, - root: mbt_ffi_load32(return_area + 40), - }, - }) } - _ => panic() + 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) - RpcError::RemoteAgentError(lifted238) + () } - _ => panic() - } + VariantType(payload262) => { + mbt_ffi_store8(iter_base + 0, 15) - Result::Err(lifted239) - } - _ => panic() - } - let ret = lifted240 - mbt_ffi_free(ptr) - mbt_ffi_free(address67) - mbt_ffi_free(return_area) + 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 - cleanup_list.each(mbt_ffi_free) - return ret -} + 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) -///| -/// 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] = [] + match iter_elem.payload { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let WasmRpc(handle) = self + () + } + Some(payload265) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload265) - 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.metadata.doc { + 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(payload267) => { + 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 ptr268 = mbt_ffi_str2ptr(payload267) + mbt_ffi_store32(iter_base + 24, payload267.length()) + mbt_ffi_store32(iter_base + 20, ptr268) + cleanup_list.push(ptr268) - () - } - 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) + 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 - () - } - S64Value(payload3) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload3) + 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) - () - } - U8Value(payload4) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload4.to_int()) + 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 - () - } - U16Value(payload5) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload5.reinterpret_as_int()) + 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) - () - } - U32Value(payload6) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload6.reinterpret_as_int()) + match iter_elem.metadata.deprecated { + None => { + mbt_ffi_store8(iter_base + 44, 0) - () - } - U64Value(payload7) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload7.reinterpret_as_int64()) + () + } + Some(payload276) => { + mbt_ffi_store8(iter_base + 44, 1) - () - } - F32Value(payload8) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload8) + 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) - () - } - 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()) + match iter_elem.metadata.role { + None => { + mbt_ffi_store8(iter_base + 56, 0) - () - } - StringValue(payload11) => { - mbt_ffi_store8(iter_base + 0, 12) + () + } + Some(payload279) => { + mbt_ffi_store8(iter_base + 56, 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) + match payload279 { + Multimodal => { + mbt_ffi_store8(iter_base + 60, 0) - () - } - RecordValue(payload13) => { - mbt_ffi_store8(iter_base + 0, 13) + () + } + UnstructuredText => { + mbt_ffi_store8(iter_base + 60, 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) - } - mbt_ffi_store32(iter_base + 12, payload13.length()) - mbt_ffi_store32(iter_base + 8, address) - cleanup_list.push(address) + () + } + UnstructuredBinary => { + mbt_ffi_store8(iter_base + 60, 2) - () - } - VariantValue(payload14) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload14.case.reinterpret_as_int()) + () + } + Other(payload283) => { + mbt_ffi_store8(iter_base + 60, 3) - match payload14.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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) - () - } - Some(payload16) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload16) + () + } + } - () + () + } + } + 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) - () - } - EnumValue(payload17) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload17.reinterpret_as_int()) + 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 - () - } - FlagsValue(payload18) => { - mbt_ffi_store8(iter_base + 0, 16) + 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) - 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) + FlagsType(payload291) => { + mbt_ffi_store8(iter_base + 0, 17) - () - } - TupleValue(payload21) => { - 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 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 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) + + () } - mbt_ffi_store32(iter_base + 12, payload21.length()) - mbt_ffi_store32(iter_base + 8, address22) - cleanup_list.push(address22) + TupleType(payload295) => { + mbt_ffi_store8(iter_base + 0, 18) - () - } - ListValue(payload24) => { - 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) - 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) + ListType(payload298) => { + mbt_ffi_store8(iter_base + 0, 19) + mbt_ffi_store32(iter_base + 8, payload298) - () - } - FixedListValue(payload27) => { - mbt_ffi_store8(iter_base + 0, 19) + () + } + 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(), + ) - 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) + 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) - () - } - MapValue(payload30) => { - mbt_ffi_store8(iter_base + 0, 20) + () + } + OptionType(payload301) => { + mbt_ffi_store8(iter_base + 0, 22) + mbt_ffi_store32(iter_base + 8, payload301) - 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) + ResultType(payload302) => { + mbt_ffi_store8(iter_base + 0, 23) - () - } - OptionValue(payload33) => { - mbt_ffi_store8(iter_base + 0, 21) + match payload302.ok { + None => { + mbt_ffi_store8(iter_base + 8, 0) - match payload33 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + () + } + Some(payload304) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload304) - () + () + } } - Some(payload35) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload35) - () + 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) - () - } - ResultValue(payload36) => { - mbt_ffi_store8(iter_base + 0, 22) + match payload307.languages { + None => { + mbt_ffi_store8(iter_base + 8, 0) - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8(iter_base + 8, 0) + () + } + Some(payload309) => { + mbt_ffi_store8(iter_base + 8, 1) - match payload37 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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) } - Some(payload39) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload39) + mbt_ffi_store32(iter_base + 16, payload309.length()) + mbt_ffi_store32(iter_base + 12, address311) + cleanup_list.push(address311) - () - } + () } - - () } - 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) + 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()) - () + () + } } - } - - () - } - 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 payload307.max_length { + None => { + mbt_ffi_store8(iter_base + 28, 0) - match payload43.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + () + } + Some(payload316) => { + mbt_ffi_store8(iter_base + 28, 1) + mbt_ffi_store32(iter_base + 32, payload316.reinterpret_as_int()) - () + () + } } - 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) + 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) + + () + } } + + () } - cleanup_list.push(ptr44) + BinaryType(payload320) => { + mbt_ffi_store8(iter_base + 0, 25) - () - } - BinaryValue(payload48) => { - mbt_ffi_store8(iter_base + 0, 24) + match payload320.mime_types { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let ptr49 = mbt_ffi_bytes2ptr(payload48.bytes) + () + } + Some(payload322) => { + mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload48.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr49) + 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 - match payload48.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + 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) - () + () + } } - 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) + 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()) + + () + } } - } - cleanup_list.push(ptr49) - () - } - PathValue(payload53) => { - mbt_ffi_store8(iter_base + 0, 25) + match payload320.max_bytes { + None => { + mbt_ffi_store8(iter_base + 28, 0) - 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) + () + } + Some(payload329) => { + mbt_ffi_store8(iter_base + 28, 1) + mbt_ffi_store32(iter_base + 32, payload329.reinterpret_as_int()) - () - } - 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) + () + } + 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()) - () - } - 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(), - ) + match payload330.allowed_mime_types { + None => { + mbt_ffi_store8(iter_base + 12, 0) - () - } - DurationValue(payload58) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload58.nanoseconds) + () + } + Some(payload332) => { + mbt_ffi_store8(iter_base + 12, 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 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 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 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) - () - } - 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) + match payload330.allowed_extensions { + None => { + mbt_ffi_store8(iter_base + 24, 0) - () - } - SecretValue(payload63) => { - mbt_ffi_store8(iter_base + 0, 31) + () + } + Some(payload337) => { + mbt_ffi_store8(iter_base + 24, 1) - let @types.Secret(handle64) = payload63 - mbt_ffi_store32(iter_base + 8, handle64) + 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 - () - } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8(iter_base + 0, 32) + 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) - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32(iter_base + 8, handle66) + () + } + } - () - } - } - } - 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) + () + } + UrlType(payload341) => { + mbt_ffi_store8(iter_base + 0, 27) - cleanup_list.each(mbt_ffi_free) - return ret -} + match payload341.allowed_schemes { + None => { + mbt_ffi_store8(iter_base + 8, 0) -///| -/// 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] = [] + () + } + Some(payload343) => { + mbt_ffi_store8(iter_base + 8, 1) - let WasmRpc(handle) = self + 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 ptr = mbt_ffi_str2ptr(method_name) + 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) - 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 }) + match payload341.allowed_hosts { + None => { + mbt_ffi_store8(iter_base + 20, 0) - () - } - S8Value(payload0) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload0)) + () + } + Some(payload348) => { + mbt_ffi_store8(iter_base + 20, 1) - () - } - S16Value(payload1) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload1)) + 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 - () - } - S32Value(payload2) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload2) + 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) - () - } - 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()) + () + } + DatetimeType => { + mbt_ffi_store8(iter_base + 0, 28) - () - } - U16Value(payload5) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload5.reinterpret_as_int()) + () + } + DurationType => { + mbt_ffi_store8(iter_base + 0, 29) - () - } - U32Value(payload6) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload6.reinterpret_as_int()) + () + } + QuantityType(payload354) => { + mbt_ffi_store8(iter_base + 0, 30) - () - } - U64Value(payload7) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload7.reinterpret_as_int64()) + 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) - () - } - F32Value(payload8) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload8) + 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 - () - } - F64Value(payload9) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload9) + 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) - () - } - CharValue(payload10) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload10.to_int()) + match payload354.min { + None => { + mbt_ffi_store8(iter_base + 24, 0) - () - } - StringValue(payload11) => { - mbt_ffi_store8(iter_base + 0, 12) + () + } + 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 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 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) - () - } - 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) + match payload354.max { + None => { + mbt_ffi_store8(iter_base + 56, 0) - () - } - VariantValue(payload14) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload14.case.reinterpret_as_int()) + () + } + 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) - match payload14.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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) - () - } - Some(payload16) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload16) - - () + () + } } + cleanup_list.push(ptr355) + cleanup_list.push(address357) + + () } + UnionType(payload365) => { + mbt_ffi_store8(iter_base + 0, 31) - () - } - EnumValue(payload17) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload17.reinterpret_as_int()) + 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 - () - } - FlagsValue(payload18) => { - mbt_ffi_store8(iter_base + 0, 16) + 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) - 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) + match iter_elem.discriminator { + Prefix(payload367) => { + mbt_ffi_store8(iter_base + 12, 0) - () - } - TupleValue(payload21) => { - mbt_ffi_store8(iter_base + 0, 17) + 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) - 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) + () + } + Suffix(payload369) => { + mbt_ffi_store8(iter_base + 12, 1) - () - } - ListValue(payload24) => { - mbt_ffi_store8(iter_base + 0, 18) + 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) - 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) + () + } + Contains(payload371) => { + mbt_ffi_store8(iter_base + 12, 2) - () - } - FixedListValue(payload27) => { - mbt_ffi_store8(iter_base + 0, 19) + 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) - 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) + () + } + Regex(payload373) => { + mbt_ffi_store8(iter_base + 12, 3) - () - } - MapValue(payload30) => { - mbt_ffi_store8(iter_base + 0, 20) + 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) - 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) + () + } + FieldEquals(payload375) => { + mbt_ffi_store8(iter_base + 12, 4) - () - } - OptionValue(payload33) => { - mbt_ffi_store8(iter_base + 0, 21) + 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 payload33 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + match payload375.literal { + None => { + mbt_ffi_store8(iter_base + 24, 0) - () - } - Some(payload35) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload35) + () + } + 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) - () - } - ResultValue(payload36) => { - mbt_ffi_store8(iter_base + 0, 22) + () + } + } + cleanup_list.push(ptr376) - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8(iter_base + 8, 0) + () + } + FieldAbsent(payload380) => { + mbt_ffi_store8(iter_base + 12, 5) - match payload37 { + 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 + 12, 0) + mbt_ffi_store8(iter_base + 36, 0) () } - Some(payload39) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload39) + 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) () } } - () - } - ErrValue(payload40) => { - mbt_ffi_store8(iter_base + 8, 1) + 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 - match payload40 { + 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 + 12, 0) + mbt_ffi_store8(iter_base + 64, 0) () } - Some(payload42) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload42) + 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) - () - } - TextValue(payload43) => { - mbt_ffi_store8(iter_base + 0, 23) + () + } + Some(payload395) => { + mbt_ffi_store8(iter_base + 76, 1) - let ptr44 = mbt_ffi_str2ptr(payload43.text) - mbt_ffi_store32(iter_base + 12, payload43.text.length()) - mbt_ffi_store32(iter_base + 8, ptr44) + match payload395 { + Multimodal => { + mbt_ffi_store8(iter_base + 80, 0) - match payload43.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + () + } + UnstructuredText => { + mbt_ffi_store8(iter_base + 80, 1) - () - } - Some(payload46) => { - mbt_ffi_store8(iter_base + 16, 1) + () + } + UnstructuredBinary => { + mbt_ffi_store8(iter_base + 80, 2) - 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) + () + } + Other(payload399) => { + mbt_ffi_store8(iter_base + 80, 3) - () - } - } - cleanup_list.push(ptr44) + 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) - () - } - BinaryValue(payload48) => { - mbt_ffi_store8(iter_base + 0, 24) + () + } + } - let ptr49 = mbt_ffi_bytes2ptr(payload48.bytes) + () + } + } + 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) - mbt_ffi_store32(iter_base + 12, payload48.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr49) + () + } + SecretType(payload403) => { + mbt_ffi_store8(iter_base + 0, 32) + mbt_ffi_store32(iter_base + 8, payload403.inner) - match payload48.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + match payload403.category { + None => { + mbt_ffi_store8(iter_base + 12, 0) - () - } - Some(payload51) => { - mbt_ffi_store8(iter_base + 16, 1) + () + } + Some(payload405) => { + mbt_ffi_store8(iter_base + 12, 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 ptr406 = mbt_ffi_str2ptr(payload405) + mbt_ffi_store32(iter_base + 20, payload405.length()) + mbt_ffi_store32(iter_base + 16, ptr406) + cleanup_list.push(ptr406) - () + () + } } - } - cleanup_list.push(ptr49) - () - } - PathValue(payload53) => { - mbt_ffi_store8(iter_base + 0, 25) + () + } + QuotaTokenType(payload407) => { + mbt_ffi_store8(iter_base + 0, 33) - 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) + match payload407.resource_name { + None => { + mbt_ffi_store8(iter_base + 8, 0) - () - } - UrlValue(payload55) => { - mbt_ffi_store8(iter_base + 0, 26) + () + } + Some(payload409) => { + mbt_ffi_store8(iter_base + 8, 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 ptr410 = mbt_ffi_str2ptr(payload409) + mbt_ffi_store32(iter_base + 16, payload409.length()) + mbt_ffi_store32(iter_base + 12, ptr410) + cleanup_list.push(ptr410) - () - } - 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) + () + } + FutureType(payload411) => { + mbt_ffi_store8(iter_base + 0, 34) - () - } - 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) + match payload411 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - 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) + () + } + Some(payload413) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload413) - () - } - 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) + () + } + StreamType(payload414) => { + mbt_ffi_store8(iter_base + 0, 35) - () - } - SecretValue(payload63) => { - mbt_ffi_store8(iter_base + 0, 31) + match payload414 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let @types.Secret(handle64) = payload63 - mbt_ffi_store32(iter_base + 8, handle64) + () + } + Some(payload416) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload416) - () + () + } + } + + () + } } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8(iter_base + 0, 32) - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32(iter_base + 8, handle66) + 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) + + () + } } - } - } - 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) - cleanup_list.each(mbt_ffi_free) -} + 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 -///| -/// 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 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 WasmRpc(handle) = self + 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 ptr = mbt_ffi_str2ptr(method_name) + 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) - 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.metadata.deprecated { + None => { + mbt_ffi_store8(iter_base + 116, 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(payload427) => { + mbt_ffi_store8(iter_base + 116, 1) - () - } - S8Value(payload0) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload0)) + 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) - () + () + } } - 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) + match iter_elem.metadata.role { + None => { + mbt_ffi_store8(iter_base + 128, 0) - () - } - S64Value(payload3) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload3) + () + } + Some(payload430) => { + mbt_ffi_store8(iter_base + 128, 1) - () - } - U8Value(payload4) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload4.to_int()) + match payload430 { + Multimodal => { + mbt_ffi_store8(iter_base + 132, 0) - () - } - U16Value(payload5) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload5.reinterpret_as_int()) + () + } + UnstructuredText => { + mbt_ffi_store8(iter_base + 132, 1) - () - } - U32Value(payload6) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload6.reinterpret_as_int()) + () + } + UnstructuredBinary => { + mbt_ffi_store8(iter_base + 132, 2) - () - } - U64Value(payload7) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload7.reinterpret_as_int64()) + () + } + Other(payload434) => { + mbt_ffi_store8(iter_base + 132, 3) - () - } - F32Value(payload8) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload8) + 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) - () - } - 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()) + 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) - () - } - StringValue(payload11) => { - mbt_ffi_store8(iter_base + 0, 12) + 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 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 ptr438 = mbt_ffi_str2ptr(iter_elem.id) + mbt_ffi_store32(iter_base + 4, iter_elem.id.length()) + mbt_ffi_store32(iter_base + 0, ptr438) - () - } - RecordValue(payload13) => { - mbt_ffi_store8(iter_base + 0, 13) + match iter_elem.name { + None => { + mbt_ffi_store8(iter_base + 8, 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) + () } - mbt_ffi_store32(iter_base + 12, payload13.length()) - mbt_ffi_store32(iter_base + 8, address) - cleanup_list.push(address) + 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) + + () + } } - VariantValue(payload14) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload14.case.reinterpret_as_int()) + 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) - match payload14.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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 - () - } - Some(payload16) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload16) + 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)) - () - } - EnumValue(payload17) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload17.reinterpret_as_int()) + () + } + S16Value(payload446) => { + mbt_ffi_store8(iter_base + 0, 2) + mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload446)) - () - } - FlagsValue(payload18) => { - mbt_ffi_store8(iter_base + 0, 16) + () + } + S32Value(payload447) => { + mbt_ffi_store8(iter_base + 0, 3) + mbt_ffi_store32(iter_base + 8, payload447) - 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) + S64Value(payload448) => { + mbt_ffi_store8(iter_base + 0, 4) + mbt_ffi_store64(iter_base + 8, payload448) - () - } - TupleValue(payload21) => { - mbt_ffi_store8(iter_base + 0, 17) + () + } + U8Value(payload449) => { + mbt_ffi_store8(iter_base + 0, 5) + mbt_ffi_store8(iter_base + 8, payload449.to_int()) - 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) + U16Value(payload450) => { + mbt_ffi_store8(iter_base + 0, 6) + mbt_ffi_store16(iter_base + 8, payload450.reinterpret_as_int()) - () - } - ListValue(payload24) => { - mbt_ffi_store8(iter_base + 0, 18) + () + } + U32Value(payload451) => { + mbt_ffi_store8(iter_base + 0, 7) + mbt_ffi_store32(iter_base + 8, payload451.reinterpret_as_int()) - 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) + U64Value(payload452) => { + mbt_ffi_store8(iter_base + 0, 8) + mbt_ffi_store64(iter_base + 8, payload452.reinterpret_as_int64()) - () - } - FixedListValue(payload27) => { - mbt_ffi_store8(iter_base + 0, 19) + () + } + F32Value(payload453) => { + mbt_ffi_store8(iter_base + 0, 9) + mbt_ffi_storef32(iter_base + 8, payload453) - 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) + F64Value(payload454) => { + mbt_ffi_store8(iter_base + 0, 10) + mbt_ffi_storef64(iter_base + 8, payload454) - () - } - MapValue(payload30) => { - mbt_ffi_store8(iter_base + 0, 20) + () + } + CharValue(payload455) => { + mbt_ffi_store8(iter_base + 0, 11) + mbt_ffi_store32(iter_base + 8, payload455.to_int()) - 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) + StringValue(payload456) => { + mbt_ffi_store8(iter_base + 0, 12) - () - } - OptionValue(payload33) => { - mbt_ffi_store8(iter_base + 0, 21) + 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) - match payload33 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + () + } + 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) } - Some(payload35) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload35) + 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()) - () - } - 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) + 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) - () + () + } } - 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) + () + } + 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) - () - } - TextValue(payload43) => { - mbt_ffi_store8(iter_base + 0, 23) + () + } + TupleValue(payload468) => { + mbt_ffi_store8(iter_base + 0, 17) - let ptr44 = mbt_ffi_str2ptr(payload43.text) - mbt_ffi_store32(iter_base + 12, payload43.text.length()) - mbt_ffi_store32(iter_base + 8, ptr44) + 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) - match payload43.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + () + } + 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) } - Some(payload46) => { - mbt_ffi_store8(iter_base + 16, 1) + mbt_ffi_store32(iter_base + 12, payload471.length()) + mbt_ffi_store32(iter_base + 8, address472) + cleanup_list.push(address472) - 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) + () + } + 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) + + () } - cleanup_list.push(ptr44) + MapValue(payload477) => { + mbt_ffi_store8(iter_base + 0, 20) - () - } - BinaryValue(payload48) => { - mbt_ffi_store8(iter_base + 0, 24) + 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) - let ptr49 = mbt_ffi_bytes2ptr(payload48.bytes) + () + } + OptionValue(payload480) => { + mbt_ffi_store8(iter_base + 0, 21) - mbt_ffi_store32(iter_base + 12, payload48.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr49) + match payload480 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - match payload48.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + () + } + Some(payload482) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload482) - () + () + } } - 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) + () + } + 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) + + () + } + } + + () + } } + + () } - cleanup_list.push(ptr49) + 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 @types.Secret(handle511) = payload510 + mbt_ffi_store32(iter_base + 8, handle511) + + () + } + QuotaTokenHandle(payload512) => { + mbt_ffi_store8(iter_base + 0, 32) + + let @types.QuotaToken(handle513) = payload512 + mbt_ffi_store32(iter_base + 8, handle513) + + () + } } - PathValue(payload53) => { - mbt_ffi_store8(iter_base + 0, 25) + } + mbt_ffi_store32(iter_base + 32, iter_elem.value.value.value_nodes.length()) + 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(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) - 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) + 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 }) () } - 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) + S8Value(payload0) => { + mbt_ffi_store8(iter_base + 0, 1) + mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload0)) () } - 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(), - ) + S16Value(payload1) => { + mbt_ffi_store8(iter_base + 0, 2) + mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload1)) () } - DurationValue(payload58) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload58.nanoseconds) + S32Value(payload2) => { + mbt_ffi_store8(iter_base + 0, 3) + mbt_ffi_store32(iter_base + 8, payload2) () } - 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) + S64Value(payload3) => { + mbt_ffi_store8(iter_base + 0, 4) + mbt_ffi_store64(iter_base + 8, payload3) - 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) + () + } + U8Value(payload4) => { + mbt_ffi_store8(iter_base + 0, 5) + mbt_ffi_store8(iter_base + 8, payload4.to_int()) () } - UnionValue(payload61) => { - mbt_ffi_store8(iter_base + 0, 30) + U16Value(payload5) => { + mbt_ffi_store8(iter_base + 0, 6) + mbt_ffi_store16(iter_base + 8, payload5.reinterpret_as_int()) - 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) + () + } + U32Value(payload6) => { + mbt_ffi_store8(iter_base + 0, 7) + mbt_ffi_store32(iter_base + 8, payload6.reinterpret_as_int()) () } - SecretValue(payload63) => { - mbt_ffi_store8(iter_base + 0, 31) + U64Value(payload7) => { + mbt_ffi_store8(iter_base + 0, 8) + mbt_ffi_store64(iter_base + 8, payload7.reinterpret_as_int64()) - let @types.Secret(handle64) = payload63 - mbt_ffi_store32(iter_base + 8, handle64) + () + } + F32Value(payload8) => { + mbt_ffi_store8(iter_base + 0, 9) + mbt_ffi_storef32(iter_base + 8, payload8) () } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8(iter_base + 0, 32) + F64Value(payload9) => { + mbt_ffi_store8(iter_base + 0, 10) + mbt_ffi_storef64(iter_base + 8, payload9) - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32(iter_base + 8, handle66) + () + } + CharValue(payload10) => { + mbt_ffi_store8(iter_base + 0, 11) + mbt_ffi_store32(iter_base + 8, payload10.to_int()) () } - } - } - let result : Int = wasmImportMethodWasmRpcScheduleCancelableInvocation( - handle, - scheduled_time.seconds.reinterpret_as_int64(), + 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 @types.Secret(handle64) = payload63 + mbt_ffi_store32(iter_base + 8, handle64) + + () + } + 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 lifted342 = match mbt_ffi_load8_u(return_area + 0) { + 0 => { + let lifted97 : @types.SchemaValueTree? = match + mbt_ffi_load8_u(return_area + 4) { + 0 => Option::None + 1 => { + let array95 : Array[@types.SchemaValueNode] = [] + for index96 = 0 + index96 < mbt_ffi_load32(return_area + 12) + index96 = index96 + 1 { + let iter_base = mbt_ffi_load32(return_area + 8) + index96 * 32 + + let lifted94 = 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 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), + ) + _ => panic() + } + + array95.push(lifted94) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 8)) + + Option::Some(@types.SchemaValueTree::{ + value_nodes: array95, + root: mbt_ffi_load32(return_area + 16), + }) + } + _ => panic() + } + + Result::Ok(lifted97) + } + 1 => { + let lifted341 = match mbt_ffi_load8_u(return_area + 4) { + 0 => { + let result98 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), + ) + + RpcError::ProtocolError(result98) + } + 1 => { + let result99 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), + ) + + RpcError::Denied(result99) + } + 2 => { + let result100 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), + ) + + RpcError::NotFound(result100) + } + 3 => { + let result101 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), + ) + + RpcError::RemoteInternalError(result101) + } + 4 => { + let lifted340 = match mbt_ffi_load8_u(return_area + 8) { + 0 => { + let result102 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + @common.AgentError::InvalidInput(result102) + } + 1 => { + let result103 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + @common.AgentError::InvalidMethod(result103) + } + 2 => { + let result104 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + @common.AgentError::InvalidType(result104) + } + 3 => { + let result105 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + @common.AgentError::InvalidAgentId(result105) + } + 4 => { + let array302 : Array[@types.SchemaTypeNode] = [] + for index303 = 0 + index303 < mbt_ffi_load32(return_area + 16) + index303 = index303 + 1 { + let iter_base = mbt_ffi_load32(return_area + 12) + + index303 * 144 + + let lifted288 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => + @types.SchemaTypeBody::RefType( + mbt_ffi_load32(iter_base + 8), + ) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted112 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted107 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted106 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted106) + } + _ => panic() + } + + let lifted109 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted108 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted108) + } + _ => panic() + } + + let lifted111 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result110 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result110) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted107, + max: lifted109, + unit: lifted111, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted112) + } + 3 => { + let lifted119 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted114 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted113 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted113) + } + _ => panic() + } + + let lifted116 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted115 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted115) + } + _ => panic() + } + + let lifted118 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result117 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result117) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted114, + max: lifted116, + unit: lifted118, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted119) + } + 4 => { + let lifted126 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted121 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted120 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted120) + } + _ => panic() + } + + let lifted123 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted122 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted122) + } + _ => panic() + } + + let lifted125 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result124 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result124) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted121, + max: lifted123, + unit: lifted125, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted126) + } + 5 => { + let lifted133 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted128 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted127 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted127) + } + _ => panic() + } + + let lifted130 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted129 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted129) + } + _ => panic() + } + + let lifted132 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result131 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result131) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted128, + max: lifted130, + unit: lifted132, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted133) + } + 6 => { + let lifted140 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted135 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted134 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted134) + } + _ => panic() + } + + let lifted137 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted136 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted136) + } + _ => panic() + } + + let lifted139 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result138 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result138) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted135, + max: lifted137, + unit: lifted139, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted140) + } + 7 => { + let lifted147 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted142 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted141 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted141) + } + _ => panic() + } + + let lifted144 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted143 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted143) + } + _ => panic() + } + + let lifted146 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result145 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result145) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted142, + max: lifted144, + unit: lifted146, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted147) + } + 8 => { + let lifted154 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted149 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted148 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted148) + } + _ => panic() + } + + let lifted151 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted150 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted150) + } + _ => panic() + } + + let lifted153 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result152 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result152) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted149, + max: lifted151, + unit: lifted153, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted154) + } + 9 => { + let lifted161 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted156 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted155 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted155) + } + _ => panic() + } + + let lifted158 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted157 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted157) + } + _ => panic() + } + + let lifted160 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result159 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result159) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted156, + max: lifted158, + unit: lifted160, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted161) + } + 10 => { + let lifted168 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted163 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted162 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted162) + } + _ => panic() + } + + let lifted165 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted164 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted164) + } + _ => panic() + } + + 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() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted163, + max: lifted165, + unit: lifted167, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted168) + } + 11 => { + let lifted175 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted170 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted169 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted169) + } + _ => panic() + } + + let lifted172 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted171 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted171) + } + _ => panic() + } + + let lifted174 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result173 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result173) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted170, + max: lifted172, + unit: lifted174, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted175) + } + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + let array190 : Array[@types.NamedFieldType] = [] + for index191 = 0 + index191 < mbt_ffi_load32(iter_base + 12) + index191 = index191 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index191 * 68 + + let result176 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted178 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result177 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result177) + } + _ => panic() + } + + let array180 : Array[String] = [] + for index181 = 0 + index181 < mbt_ffi_load32(iter_base + 28) + index181 = index181 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + + index181 * 8 + + let result179 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array180.push(result179) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + let array183 : Array[String] = [] + for index184 = 0 + index184 < mbt_ffi_load32(iter_base + 36) + index184 = index184 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 32) + + 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 + 32)) + + let lifted186 : String? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result185 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) + + Option::Some(result185) + } + _ => panic() + } + + let lifted189 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted188 = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result187 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) + + @types.Role::Other(result187) + } + _ => panic() + } + + Option::Some(lifted188) + } + _ => panic() + } + + array190.push(@types.NamedFieldType::{ + name: result176, + body: mbt_ffi_load32(iter_base + 8), + metadata: @types.MetadataEnvelope::{ + doc: lifted178, + aliases: array180, + examples: array183, + deprecated: lifted186, + role: lifted189, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::RecordType(array190) + } + 15 => { + let array207 : Array[@types.VariantCaseType] = [] + for index208 = 0 + index208 < mbt_ffi_load32(iter_base + 12) + index208 = index208 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index208 * 72 + + let result192 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted193 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + let lifted195 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result194 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result194) + } + _ => panic() + } + + let array197 : Array[String] = [] + for index198 = 0 + index198 < mbt_ffi_load32(iter_base + 32) + index198 = index198 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + + index198 * 8 + + let result196 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array197.push(result196) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + let array200 : Array[String] = [] + for index201 = 0 + index201 < mbt_ffi_load32(iter_base + 40) + index201 = index201 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + + index201 * 8 + + let result199 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array200.push(result199) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + + let lifted203 : String? = match + mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result202 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) + + Option::Some(result202) + } + _ => panic() + } + + let lifted206 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted205 = match + mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result204 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) + + @types.Role::Other(result204) + } + _ => panic() + } + + Option::Some(lifted205) + } + _ => panic() + } + + array207.push(@types.VariantCaseType::{ + name: result192, + payload: lifted193, + metadata: @types.MetadataEnvelope::{ + doc: lifted195, + aliases: array197, + examples: array200, + deprecated: lifted203, + role: lifted206, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::VariantType(array207) + } + 16 => { + let array210 : Array[String] = [] + for index211 = 0 + index211 < mbt_ffi_load32(iter_base + 12) + index211 = index211 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index211 * 8 + + let result209 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array210.push(result209) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::EnumType(array210) + } + 17 => { + let array213 : Array[String] = [] + for index214 = 0 + index214 < mbt_ffi_load32(iter_base + 12) + index214 = index214 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index214 * 8 + + let result212 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array213.push(result212) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::FlagsType(array213) + } + 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 + + array215.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::TupleType(array215) + } + 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 lifted217 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + let lifted218 : 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: lifted217, + err: lifted218, + }) + } + 24 => { + let lifted222 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array220 : Array[String] = [] + for index221 = 0 + index221 < mbt_ffi_load32(iter_base + 16) + index221 = index221 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index221 * 8 + + let result219 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array220.push(result219) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array220) + } + _ => panic() + } + + let lifted223 : 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 lifted224 : 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 lifted226 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result225 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) + + Option::Some(result225) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted222, + min_length: lifted223, + max_length: lifted224, + regex: lifted226, + }) + } + 25 => { + let lifted230 : 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 result227 = 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 + 12)) + + Option::Some(array228) + } + _ => panic() + } + + let lifted231 : 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 lifted232 : 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: lifted230, + min_bytes: lifted231, + max_bytes: lifted232, + }) + } + 26 => { + let lifted236 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let array234 : Array[String] = [] + for index235 = 0 + index235 < mbt_ffi_load32(iter_base + 20) + index235 = index235 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + + index235 * 8 + + let result233 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array234.push(result233) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + Option::Some(array234) + } + _ => panic() + } + + let lifted240 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let array238 : Array[String] = [] + for index239 = 0 + index239 < mbt_ffi_load32(iter_base + 32) + index239 = index239 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + + index239 * 8 + + let result237 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array238.push(result237) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + Option::Some(array238) + } + _ => 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: lifted236, + allowed_extensions: lifted240, + }) + } + 27 => { + let lifted244 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array242 : Array[String] = [] + for index243 = 0 + index243 < mbt_ffi_load32(iter_base + 16) + index243 = index243 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index243 * 8 + + let result241 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array242.push(result241) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array242) + } + _ => panic() + } + + let lifted248 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + let array246 : Array[String] = [] + for index247 = 0 + index247 < mbt_ffi_load32(iter_base + 28) + index247 = index247 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + + index247 * 8 + + let result245 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array246.push(result245) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + Option::Some(array246) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted244, + allowed_hosts: lifted248, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result249 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let array251 : Array[String] = [] + for index252 = 0 + index252 < mbt_ffi_load32(iter_base + 20) + index252 = index252 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + + index252 * 8 + + let result250 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array251.push(result250) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + let lifted254 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result253 = 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: result253, + }) + } + _ => panic() + } + + let lifted256 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result255 = 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: result255, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result249, + allowed_suffixes: array251, + min: lifted254, + max: lifted256, + }) + } + 31 => { + let array280 : Array[@types.UnionBranch] = [] + for index281 = 0 + index281 < mbt_ffi_load32(iter_base + 12) + index281 = index281 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index281 * 92 + + let result257 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted266 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result258 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Prefix(result258) + } + 1 => { + let result259 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Suffix(result259) + } + 2 => { + let result260 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Contains(result260) + } + 3 => { + let result261 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Regex(result261) + } + 4 => { + let result262 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + let lifted264 : String? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result263 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), + ) + + Option::Some(result263) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result262, + literal: lifted264, + }) + } + 5 => { + let result265 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::FieldAbsent(result265) + } + _ => panic() + } + + let lifted268 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result267 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) + + Option::Some(result267) + } + _ => panic() + } + + let array270 : Array[String] = [] + for index271 = 0 + index271 < mbt_ffi_load32(iter_base + 52) + index271 = index271 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 48) + + index271 * 8 + + let result269 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array270.push(result269) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + + let array273 : Array[String] = [] + for index274 = 0 + index274 < mbt_ffi_load32(iter_base + 60) + index274 = index274 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + + 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 + 56)) + + let lifted276 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result275 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result275) + } + _ => panic() + } + + let lifted279 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { + 0 => Option::None + 1 => { + let lifted278 = match + mbt_ffi_load8_u(iter_base + 80) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result277 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), + ) + + @types.Role::Other(result277) + } + _ => panic() + } + + Option::Some(lifted278) + } + _ => panic() + } + + array280.push(@types.UnionBranch::{ + tag: result257, + body: mbt_ffi_load32(iter_base + 8), + discriminator: lifted266, + metadata: @types.MetadataEnvelope::{ + doc: lifted268, + aliases: array270, + examples: array273, + deprecated: lifted276, + role: lifted279, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array280, + }) + } + 32 => { + let lifted283 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result282 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result282) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted283, + }) + } + 33 => { + let lifted285 : String? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result284 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result284) + } + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted285, + }) + } + 34 => { + let lifted286 : 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(lifted286) + } + 35 => { + 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::StreamType(lifted287) + } + _ => panic() + } + + let lifted290 : String? = match + mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result289 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) + + Option::Some(result289) + } + _ => panic() + } + + let array292 : Array[String] = [] + for index293 = 0 + index293 < mbt_ffi_load32(iter_base + 104) + index293 = index293 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 100) + index293 * 8 + + let result291 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array292.push(result291) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + + let array295 : Array[String] = [] + for index296 = 0 + index296 < mbt_ffi_load32(iter_base + 112) + index296 = index296 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 108) + index296 * 8 + + let result294 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array295.push(result294) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + + let lifted298 : String? = match + mbt_ffi_load8_u(iter_base + 116) { + 0 => Option::None + 1 => { + let result297 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 120), + mbt_ffi_load32(iter_base + 124), + ) + + Option::Some(result297) + } + _ => panic() + } + + let lifted301 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted300 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result299 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) + + @types.Role::Other(result299) + } + _ => panic() + } + + Option::Some(lifted300) + } + _ => panic() + } + + array302.push(@types.SchemaTypeNode::{ + body: lifted288, + metadata: @types.MetadataEnvelope::{ + doc: lifted290, + aliases: array292, + examples: array295, + deprecated: lifted298, + role: lifted301, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 12)) + + let array307 : Array[@types.SchemaTypeDef] = [] + for index308 = 0 + index308 < mbt_ffi_load32(return_area + 24) + index308 = index308 + 1 { + let iter_base = mbt_ffi_load32(return_area + 20) + index308 * 24 + + let result304 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted306 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result305 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result305) + } + _ => panic() + } + + array307.push(@types.SchemaTypeDef::{ + id: result304, + name: lifted306, + body: mbt_ffi_load32(iter_base + 20), + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 20)) + + let array338 : Array[@types.SchemaValueNode] = [] + for index339 = 0 + index339 < mbt_ffi_load32(return_area + 36) + index339 = index339 + 1 { + let iter_base = mbt_ffi_load32(return_area + 32) + index339 * 32 + + let lifted337 = 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 result309 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::StringValue(result309) + } + 13 => { + 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 + + array310.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::RecordValue(array310) + } + 14 => { + let lifted312 : 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: lifted312, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + let array313 : Array[Bool] = [] + for index314 = 0 + index314 < mbt_ffi_load32(iter_base + 12) + index314 = index314 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index314 * 1 + + array313.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FlagsValue(array313) + } + 17 => { + 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 + + array315.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::TupleValue(array315) + } + 18 => { + 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 + + array317.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::ListValue(array317) + } + 19 => { + let array319 : Array[Int] = [] + for index320 = 0 + index320 < mbt_ffi_load32(iter_base + 12) + index320 = index320 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index320 * 4 + + array319.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array319) + } + 20 => { + let array321 : Array[@types.MapEntry] = [] + for index322 = 0 + index322 < mbt_ffi_load32(iter_base + 12) + index322 = index322 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index322 * 8 + + array321.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(array321) + } + 21 => { + let lifted323 : 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(lifted323) + } + 22 => { + let lifted326 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted324 : 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(lifted324) + } + 1 => { + 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::ErrValue(lifted325) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted326) + } + 23 => { + let result327 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted329 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result328 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result328) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result327, + language: lifted329, + }) + } + 24 => { + let result330 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted332 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result331 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result331) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result330, + mime_type: lifted332, + }) + } + 25 => { + let result333 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::PathValue(result333) + } + 26 => { + let result334 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UrlValue(result334) + } + 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 result335 = 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: result335, + }) + } + 30 => { + let result336 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result336, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => panic() + } + + array338.push(lifted337) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 32)) + + @common.AgentError::CustomError(@types.TypedSchemaValue::{ + graph: @types.SchemaGraph::{ + type_nodes: array302, + defs: array307, + root: mbt_ffi_load32(return_area + 28), + }, + value: @types.SchemaValueTree::{ + value_nodes: array338, + root: mbt_ffi_load32(return_area + 40), + }, + }) + } + _ => panic() + } + + RpcError::RemoteAgentError(lifted340) + } + _ => panic() + } + + Result::Err(lifted341) + } + _ => panic() + } + let ret = lifted342 + 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) + + () + } + 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 @types.Secret(handle64) = payload63 + mbt_ffi_store32(iter_base + 8, handle64) + + () + } + 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 lifted310 = match mbt_ffi_load8_u(return_area + 0) { + 0 => Result::Ok(()) + 1 => { + let lifted309 = 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 lifted308 = 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 => { + let lifted77 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + 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() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted76, + max: lifted78, + unit: lifted80, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted81) + } + 3 => { + let lifted88 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted83 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted82 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted82) + } + _ => panic() + } + + 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 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @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 => { + let result86 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result86) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted83, + max: lifted85, + unit: lifted87, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted88) + } + 4 => { + let lifted95 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted90 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted89 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted89) + } + _ => panic() + } + + let lifted92 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted91 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted91) + } + _ => panic() + } + + let lifted94 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result93 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result93) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted90, + max: lifted92, + unit: lifted94, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted95) + } + 5 => { + let lifted102 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted97 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted96 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted96) + } + _ => panic() + } + + let lifted99 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted98 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted98) + } + _ => panic() + } + + let lifted101 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result100 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result100) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted97, + max: lifted99, + unit: lifted101, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted102) + } + 6 => { + let lifted109 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted104 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted103 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted103) + } + _ => panic() + } + + let lifted106 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted105 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted105) + } + _ => panic() + } + + let lifted108 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result107 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result107) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted104, + max: lifted106, + unit: lifted108, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted109) + } + 7 => { + let lifted116 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted111 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted110 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted110) + } + _ => panic() + } + + let lifted113 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted112 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted112) + } + _ => panic() + } + + let lifted115 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result114 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result114) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted111, + max: lifted113, + unit: lifted115, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted116) + } + 8 => { + let lifted123 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted118 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted117 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted117) + } + _ => panic() + } + + let lifted120 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted119 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted119) + } + _ => panic() + } + + let lifted122 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result121 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result121) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted118, + max: lifted120, + unit: lifted122, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted123) + } + 9 => { + let lifted130 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted125 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted124 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted124) + } + _ => panic() + } + + let lifted127 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted126 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted126) + } + _ => panic() + } + + let lifted129 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result128 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result128) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted125, + max: lifted127, + unit: lifted129, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted130) + } + 10 => { + let lifted137 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted132 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted131 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted131) + } + _ => panic() + } + + let lifted134 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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() + } + + let lifted136 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result135 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result135) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted132, + max: lifted134, + unit: lifted136, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted137) + } + 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.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted140) + } + _ => panic() + } + + let lifted143 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result142 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result142) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted139, + max: lifted141, + unit: lifted143, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted144) + } + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + 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 result145 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted147 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result146 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result146) + } + _ => panic() + } + + 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 result148 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array.push(result148) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + 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 result150 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array151.push(result150) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + + let lifted154 : String? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result153 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) + + Option::Some(result153) + } + _ => panic() + } + + let lifted157 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted156 = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result155 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) + + @types.Role::Other(result155) + } + _ => panic() + } + + Option::Some(lifted156) + } + _ => panic() + } + + 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(array158) + } + 15 => { + 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 result160 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted161 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + 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), + ) + + Option::Some(result162) + } + _ => panic() + } + + 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 result164 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array165.push(result164) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + 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 result167 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array168.push(result167) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + + let lifted171 : String? = match + mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result170 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) + + Option::Some(result170) + } + _ => panic() + } + + let lifted174 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted173 = match + mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result172 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) + + @types.Role::Other(result172) + } + _ => panic() + } + + Option::Some(lifted173) + } + _ => panic() + } + + 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 => { + 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 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 + 8)) + + @types.SchemaTypeBody::EnumType(array178) + } + 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 + + 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 + 8)) + + @types.SchemaTypeBody::FlagsType(array181) + } + 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)) + + @types.SchemaTypeBody::TupleType(array183) + } + 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 lifted185 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + let lifted186 : 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: lifted185, + err: lifted186, + }) + } + 24 => { + let lifted190 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 result187 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array188.push(result187) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array188) + } + _ => panic() + } + + let lifted191 : 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 lifted192 : 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 lifted194 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result193 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) + + Option::Some(result193) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted190, + min_length: lifted191, + max_length: lifted192, + regex: lifted194, + }) + } + 25 => { + let lifted198 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 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 lifted199 : 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 lifted200 : 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: lifted198, + min_bytes: lifted199, + max_bytes: lifted200, + }) + } + 26 => { + let lifted204 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + 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 result201 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array202.push(result201) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + Option::Some(array202) + } + _ => panic() + } + + let lifted208 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + 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 result205 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array206.push(result205) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + 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: lifted204, + allowed_extensions: lifted208, + }) + } + 27 => { + let lifted212 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 result209 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array210.push(result209) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array210) + } + _ => panic() + } + + let lifted216 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + 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 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 + 24)) + + Option::Some(array214) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted212, + allowed_hosts: lifted216, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result217 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + 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 result218 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array219.push(result218) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + let lifted222 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + 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: result221, + }) + } + _ => panic() + } + + let lifted224 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + 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 => { + 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 result225 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + 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() + } + + 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() + } + + 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) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + + 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, + }) + } + 32 => { + let lifted251 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result250 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result250) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted251, + }) + } + 33 => { + let lifted253 : String? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result252 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result252) + } + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted253, + }) + } + 34 => { + 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) + } + 35 => { + 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 lifted258 : String? = match + mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result257 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) + + Option::Some(result257) + } + _ => panic() + } + + 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 result259 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array260.push(result259) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + + 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 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)) + + 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) + } + _ => panic() + } + + 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 + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + 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() + } + + 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 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 result272 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted274 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result273 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result273) + } + _ => panic() + } + + 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 array306 : Array[@types.SchemaValueNode] = [] + for index307 = 0 + index307 < mbt_ffi_load32(return_area + 36) + index307 = index307 + 1 { + let iter_base = mbt_ffi_load32(return_area + 32) + index307 * 32 + + let lifted305 = 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 result277 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::StringValue(result277) + } + 13 => { + 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 + + array278.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::RecordValue(array278) + } + 14 => { + let lifted280 : 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: lifted280, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + 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)) + + @types.SchemaValueNode::FlagsValue(array281) + } + 17 => { + 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 + + array283.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::TupleValue(array283) + } + 18 => { + 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 + + array285.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::ListValue(array285) + } + 19 => { + 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 + + array287.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array287) + } + 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 + + 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(array289) + } + 21 => { + let lifted291 : 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(lifted291) + } + 22 => { + let lifted294 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted292 : 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(lifted292) + } + 1 => { + let lifted293 : 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(lifted293) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted294) + } + 23 => { + let result295 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted297 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result296 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result296) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result295, + language: lifted297, + }) + } + 24 => { + let result298 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted300 : 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), + ) + + Option::Some(result299) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result298, + mime_type: lifted300, + }) + } + 25 => { + let result301 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::PathValue(result301) + } + 26 => { + let result302 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UrlValue(result302) + } + 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 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, + }) + } + 30 => { + let result304 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result304, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => panic() + } + + array306.push(lifted305) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 32)) + + @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: array306, + root: mbt_ffi_load32(return_area + 40), + }, + }) + } + _ => panic() + } + + RpcError::RemoteAgentError(lifted308) + } + _ => panic() + } + + Result::Err(lifted309) + } + _ => panic() + } + let ret = lifted310 + mbt_ffi_free(ptr) + mbt_ffi_free(address67) + mbt_ffi_free(return_area) + + cleanup_list.each(mbt_ffi_free) + return ret +} + +///| +/// 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 + + 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 @types.Secret(handle64) = payload63 + mbt_ffi_store32(iter_base + 8, handle64) + + () + } + QuotaTokenHandle(payload65) => { + mbt_ffi_store8(iter_base + 0, 32) + + let @types.QuotaToken(handle66) = payload65 + mbt_ffi_store32(iter_base + 8, handle66) + + () + } + } + } + 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) + + cleanup_list.each(mbt_ffi_free) + return ret +} + +///| +/// 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 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 @types.Secret(handle64) = payload63 + mbt_ffi_store32(iter_base + 8, handle64) + + () + } + QuotaTokenHandle(payload65) => { + mbt_ffi_store8(iter_base + 0, 32) + + let @types.QuotaToken(handle66) = payload65 + mbt_ffi_store32(iter_base + 8, handle66) + + () + } + } + } + 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) + + cleanup_list.each(mbt_ffi_free) +} + +///| +/// 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 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 @types.Secret(handle64) = payload63 + mbt_ffi_store32(iter_base + 8, handle64) + + () + } + QuotaTokenHandle(payload65) => { + mbt_ffi_store8(iter_base + 0, 32) + + let @types.QuotaToken(handle66) = payload65 + mbt_ffi_store32(iter_base + 8, handle66) + + () + } + } + } + let result : Int = wasmImportMethodWasmRpcScheduleCancelableInvocation( + handle, + scheduled_time.seconds.reinterpret_as_int64(), scheduled_time.nanoseconds.reinterpret_as_int(), ptr, method_name.length(), @@ -18598,1934 +26837,3854 @@ pub fn WasmRpc::schedule_cancelable_invocation( mbt_ffi_free(ptr) mbt_ffi_free(address67) - cleanup_list.each(mbt_ffi_free) - return ret -} + cleanup_list.each(mbt_ffi_free) + return ret +} + +///| +/// Subscribes to the result of the invocation +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 +} + +///| +/// Poll for the invocation. If the invocation has not completed yet, returns `none`. +pub fn FutureInvokeResult::get( + self : FutureInvokeResult, +) -> Result[@types.SchemaValueTree?, RpcError]? { + let FutureInvokeResult(handle) = self + let return_area = mbt_ffi_malloc(48) + wasmImportMethodFutureInvokeResultGet(handle, return_area) + + let lifted273 : Result[@types.SchemaValueTree?, RpcError]? = match + mbt_ffi_load8_u(return_area + 0) { + 0 => Option::None + 1 => { + let lifted272 = match mbt_ffi_load8_u(return_area + 4) { + 0 => { + let lifted27 : @types.SchemaValueTree? = match + mbt_ffi_load8_u(return_area + 8) { + 0 => Option::None + 1 => { + let array25 : Array[@types.SchemaValueNode] = [] + for index26 = 0 + index26 < mbt_ffi_load32(return_area + 16) + index26 = index26 + 1 { + let iter_base = mbt_ffi_load32(return_area + 12) + index26 * 32 + + let lifted24 = 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 index = 0 + index < mbt_ffi_load32(iter_base + 12) + index = index + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index * 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 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 + + array0.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FlagsValue(array0) + } + 17 => { + 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 + + array2.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::TupleValue(array2) + } + 18 => { + 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 + + array4.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::ListValue(array4) + } + 19 => { + 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 + + array6.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array6) + } + 20 => { + 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 + + 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(array8) + } + 21 => { + let lifted10 : 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(lifted10) + } + 22 => { + let lifted13 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted11 : 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(lifted11) + } + 1 => { + let lifted12 : 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(lifted12) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted13) + } + 23 => { + let result14 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted16 : 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), + ) + + Option::Some(result15) + } + _ => 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) { + 0 => Option::None + 1 => { + let result18 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result18) + } + _ => 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 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => panic() + } + + array25.push(lifted24) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 12)) + + Option::Some(@types.SchemaValueTree::{ + value_nodes: array25, + root: mbt_ffi_load32(return_area + 20), + }) + } + _ => panic() + } + + Result::Ok(lifted27) + } + 1 => { + let lifted271 = match mbt_ffi_load8_u(return_area + 8) { + 0 => { + let result28 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + RpcError::ProtocolError(result28) + } + 1 => { + let result29 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + RpcError::Denied(result29) + } + 2 => { + let result30 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + RpcError::NotFound(result30) + } + 3 => { + let result31 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + RpcError::RemoteInternalError(result31) + } + 4 => { + let lifted270 = match mbt_ffi_load8_u(return_area + 12) { + 0 => { + let result32 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), + ) + + @common.AgentError::InvalidInput(result32) + } + 1 => { + let result33 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), + ) + + @common.AgentError::InvalidMethod(result33) + } + 2 => { + let result34 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), + ) + + @common.AgentError::InvalidType(result34) + } + 3 => { + let result35 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), + ) + + @common.AgentError::InvalidAgentId(result35) + } + 4 => { + let array232 : Array[@types.SchemaTypeNode] = [] + for index233 = 0 + index233 < mbt_ffi_load32(return_area + 20) + index233 = index233 + 1 { + let iter_base = mbt_ffi_load32(return_area + 16) + + index233 * 144 + + let lifted218 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => + @types.SchemaTypeBody::RefType( + mbt_ffi_load32(iter_base + 8), + ) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted42 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted37 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted36 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted36) + } + _ => panic() + } + + let lifted39 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted38 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted38) + } + _ => panic() + } + + let lifted41 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result40 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result40) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted37, + max: lifted39, + unit: lifted41, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted42) + } + 3 => { + let lifted49 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted44 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted43 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted43) + } + _ => panic() + } + + let lifted46 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted45 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_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 lifted48 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result47 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result47) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted44, + max: lifted46, + unit: lifted48, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted49) + } + 4 => { + let lifted56 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted51 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted50 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_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 lifted53 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted52 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted52) + } + _ => panic() + } + + let lifted55 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result54 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result54) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted51, + max: lifted53, + unit: lifted55, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted56) + } + 5 => { + let lifted63 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted58 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted57 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted57) + } + _ => panic() + } + + let lifted60 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted59 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_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() + } + + 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), + ) + + Option::Some(result61) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted58, + max: lifted60, + unit: lifted62, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted63) + } + 6 => { + 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 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => 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() + } + + Option::Some(lifted66) + } + _ => panic() + } + + 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), + ) + + Option::Some(result68) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted65, + max: lifted67, + unit: lifted69, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted70) + } + 7 => { + let lifted77 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted72 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted71 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted71) + } + _ => panic() + } + + let lifted74 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted73 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted73) + } + _ => panic() + } + + let lifted76 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result75 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result75) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted72, + max: lifted74, + unit: lifted76, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted77) + } + 8 => { + let lifted84 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted79 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted78 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted78) + } + _ => panic() + } + + let lifted81 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted80 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted80) + } + _ => panic() + } + + let lifted83 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result82 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result82) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted79, + max: lifted81, + unit: lifted83, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted84) + } + 9 => { + let lifted91 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted86 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted85 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted85) + } + _ => panic() + } + + let lifted88 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted87 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted87) + } + _ => panic() + } + + let lifted90 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result89 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result89) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted86, + max: lifted88, + unit: lifted90, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted91) + } + 10 => { + let lifted98 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted93 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted92 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted92) + } + _ => panic() + } + + let lifted95 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted94 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted94) + } + _ => panic() + } + + let lifted97 : 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), + ) + + Option::Some(result96) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted93, + max: lifted95, + unit: lifted97, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted98) + } + 11 => { + let lifted105 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted100 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted99 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted99) + } + _ => panic() + } + + let lifted102 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted101 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted101) + } + _ => panic() + } + + let lifted104 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result103 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result103) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted100, + max: lifted102, + unit: lifted104, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted105) + } + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + let array120 : Array[@types.NamedFieldType] = [] + for index121 = 0 + index121 < mbt_ffi_load32(iter_base + 12) + index121 = index121 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index121 * 68 + + let result106 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted108 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result107 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result107) + } + _ => panic() + } + + let array110 : Array[String] = [] + for index111 = 0 + index111 < mbt_ffi_load32(iter_base + 28) + index111 = index111 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + + index111 * 8 + + let result109 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array110.push(result109) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + let array113 : Array[String] = [] + for index114 = 0 + index114 < mbt_ffi_load32(iter_base + 36) + index114 = index114 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 32) + + index114 * 8 + + let result112 = 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 + 32)) + + let lifted116 : String? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result115 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) + + Option::Some(result115) + } + _ => panic() + } + + let lifted119 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted118 = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result117 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) + + @types.Role::Other(result117) + } + _ => panic() + } + + Option::Some(lifted118) + } + _ => panic() + } + + array120.push(@types.NamedFieldType::{ + name: result106, + body: mbt_ffi_load32(iter_base + 8), + metadata: @types.MetadataEnvelope::{ + doc: lifted108, + aliases: array110, + examples: array113, + deprecated: lifted116, + role: lifted119, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::RecordType(array120) + } + 15 => { + let array137 : Array[@types.VariantCaseType] = [] + for index138 = 0 + index138 < mbt_ffi_load32(iter_base + 12) + index138 = index138 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index138 * 72 + + let result122 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted123 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + let lifted125 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result124 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result124) + } + _ => panic() + } + + let array127 : Array[String] = [] + for index128 = 0 + index128 < mbt_ffi_load32(iter_base + 32) + index128 = index128 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + + index128 * 8 + + let result126 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array127.push(result126) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + let array130 : Array[String] = [] + for index131 = 0 + index131 < mbt_ffi_load32(iter_base + 40) + index131 = index131 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + + index131 * 8 + + let result129 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array130.push(result129) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + + let lifted133 : String? = match + mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result132 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) + + Option::Some(result132) + } + _ => panic() + } + + let lifted136 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted135 = match + mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result134 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) + + @types.Role::Other(result134) + } + _ => panic() + } + + Option::Some(lifted135) + } + _ => panic() + } + + array137.push(@types.VariantCaseType::{ + name: result122, + payload: lifted123, + metadata: @types.MetadataEnvelope::{ + doc: lifted125, + aliases: array127, + examples: array130, + deprecated: lifted133, + role: lifted136, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::VariantType(array137) + } + 16 => { + let array140 : Array[String] = [] + for index141 = 0 + index141 < mbt_ffi_load32(iter_base + 12) + index141 = index141 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index141 * 8 + + let result139 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array140.push(result139) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::EnumType(array140) + } + 17 => { + let array143 : Array[String] = [] + for index144 = 0 + index144 < mbt_ffi_load32(iter_base + 12) + index144 = index144 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index144 * 8 + + let result142 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array143.push(result142) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::FlagsType(array143) + } + 18 => { + let array145 : Array[Int] = [] + for index146 = 0 + index146 < mbt_ffi_load32(iter_base + 12) + index146 = index146 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index146 * 4 + + array145.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::TupleType(array145) + } + 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 lifted147 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + let lifted148 : 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: lifted147, + err: lifted148, + }) + } + 24 => { + 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 lifted153 : 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 lifted154 : 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 lifted156 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result155 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) + + Option::Some(result155) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted152, + min_length: lifted153, + max_length: lifted154, + regex: lifted156, + }) + } + 25 => { + let lifted160 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array158 : Array[String] = [] + for index159 = 0 + index159 < mbt_ffi_load32(iter_base + 16) + index159 = index159 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index159 * 8 + + let result157 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array158.push(result157) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array158) + } + _ => panic() + } + + let lifted161 : 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 lifted162 : 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: lifted160, + min_bytes: lifted161, + max_bytes: lifted162, + }) + } + 26 => { + let lifted166 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let array164 : Array[String] = [] + for index165 = 0 + index165 < mbt_ffi_load32(iter_base + 20) + index165 = index165 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + + 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 + 16)) + + Option::Some(array164) + } + _ => panic() + } + + let lifted170 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let array168 : Array[String] = [] + for index169 = 0 + index169 < mbt_ffi_load32(iter_base + 32) + index169 = index169 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + + index169 * 8 + + let result167 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array168.push(result167) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + Option::Some(array168) + } + _ => 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: lifted166, + allowed_extensions: lifted170, + }) + } + 27 => { + let lifted174 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array172 : Array[String] = [] + for index173 = 0 + index173 < mbt_ffi_load32(iter_base + 16) + index173 = index173 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index173 * 8 + + let result171 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array172.push(result171) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array172) + } + _ => panic() + } + + let lifted178 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + let array176 : Array[String] = [] + for index177 = 0 + index177 < mbt_ffi_load32(iter_base + 28) + index177 = index177 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + + index177 * 8 + + let result175 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array176.push(result175) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + Option::Some(array176) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted174, + allowed_hosts: lifted178, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result179 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let array181 : Array[String] = [] + for index182 = 0 + index182 < mbt_ffi_load32(iter_base + 20) + index182 = index182 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + + 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 + 16)) + + let lifted184 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result183 = 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: result183, + }) + } + _ => panic() + } + + let lifted186 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result185 = 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: result185, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result179, + allowed_suffixes: array181, + min: lifted184, + max: lifted186, + }) + } + 31 => { + let array210 : Array[@types.UnionBranch] = [] + for index211 = 0 + index211 < mbt_ffi_load32(iter_base + 12) + index211 = index211 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index211 * 92 + + let result187 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted196 = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result188 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Prefix(result188) + } + 1 => { + let result189 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Suffix(result189) + } + 2 => { + let result190 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Contains(result190) + } + 3 => { + let result191 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Regex(result191) + } + 4 => { + let result192 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + let lifted194 : String? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result193 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), + ) + + Option::Some(result193) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result192, + literal: lifted194, + }) + } + 5 => { + let result195 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::FieldAbsent(result195) + } + _ => panic() + } + + let lifted198 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result197 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) + + Option::Some(result197) + } + _ => panic() + } + + let array200 : Array[String] = [] + for index201 = 0 + index201 < mbt_ffi_load32(iter_base + 52) + index201 = index201 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 48) + + index201 * 8 -///| -/// Subscribes to the result of the invocation -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 -} + let result199 = 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 FutureInvokeResult(handle) = self - let return_area = mbt_ffi_malloc(48) - wasmImportMethodFutureInvokeResultGet(handle, return_area) + array200.push(result199) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let lifted203 : Result[@types.SchemaValueTree?, RpcError]? = match - mbt_ffi_load8_u(return_area + 0) { - 0 => Option::None - 1 => { - let lifted202 = match mbt_ffi_load8_u(return_area + 4) { - 0 => { - let lifted27 : @types.SchemaValueTree? = match - mbt_ffi_load8_u(return_area + 8) { - 0 => Option::None - 1 => { - let array25 : Array[@types.SchemaValueNode] = [] - for index26 = 0 - index26 < mbt_ffi_load32(return_area + 16) - index26 = index26 + 1 { - let iter_base = mbt_ffi_load32(return_area + 12) + index26 * 32 + let array203 : Array[String] = [] + for index204 = 0 + index204 < mbt_ffi_load32(iter_base + 60) + index204 = index204 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + + index204 * 8 - let lifted24 = 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), - ) + let result202 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaValueNode::StringValue(result) - } - 13 => { - 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 + array203.push(result202) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + + let lifted206 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result205 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result205) + } + _ => panic() + } + + let lifted209 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { + 0 => Option::None + 1 => { + let lifted208 = match + mbt_ffi_load8_u(iter_base + 80) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result207 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), + ) + + @types.Role::Other(result207) + } + _ => panic() + } + + Option::Some(lifted208) + } + _ => panic() + } + + array210.push(@types.UnionBranch::{ + tag: result187, + body: mbt_ffi_load32(iter_base + 8), + discriminator: lifted196, + metadata: @types.MetadataEnvelope::{ + doc: lifted198, + aliases: array200, + examples: array203, + deprecated: lifted206, + role: lifted209, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array210, + }) + } + 32 => { + let lifted213 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result212 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result212) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted213, + }) + } + 33 => { + let lifted215 : String? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result214 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result214) + } + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted215, + }) + } + 34 => { + let lifted216 : 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(lifted216) + } + 35 => { + let lifted217 : 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(lifted217) + } + _ => panic() + } + + let lifted220 : String? = match + mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result219 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) + + Option::Some(result219) + } + _ => panic() + } + + let array222 : Array[String] = [] + for index223 = 0 + index223 < mbt_ffi_load32(iter_base + 104) + index223 = index223 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 100) + + index223 * 8 + + let result221 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array222.push(result221) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + + let array225 : Array[String] = [] + for index226 = 0 + index226 < mbt_ffi_load32(iter_base + 112) + index226 = index226 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 108) + + 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 + 108)) + + let lifted228 : String? = match + mbt_ffi_load8_u(iter_base + 116) { + 0 => Option::None + 1 => { + let result227 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 120), + mbt_ffi_load32(iter_base + 124), + ) + + Option::Some(result227) + } + _ => panic() + } + + let lifted231 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted230 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result229 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) + + @types.Role::Other(result229) + } + _ => panic() + } - array.push(mbt_ffi_load32(iter_base + 0)) + Option::Some(lifted230) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array) + array232.push(@types.SchemaTypeNode::{ + body: lifted218, + metadata: @types.MetadataEnvelope::{ + doc: lifted220, + aliases: array222, + examples: array225, + deprecated: lifted228, + role: lifted231, + }, + }) } - 14 => { - let lifted : Int? = match mbt_ffi_load8_u(iter_base + 12) { + mbt_ffi_free(mbt_ffi_load32(return_area + 16)) + + let array237 : Array[@types.SchemaTypeDef] = [] + for index238 = 0 + index238 < mbt_ffi_load32(return_area + 28) + index238 = index238 + 1 { + let iter_base = mbt_ffi_load32(return_area + 24) + + index238 * 24 + + let result234 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted236 : String? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + 1 => { + let result235 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result235) + } _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted, + array237.push(@types.SchemaTypeDef::{ + id: result234, + name: lifted236, + body: mbt_ffi_load32(iter_base + 20), }) } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - 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 + mbt_ffi_free(mbt_ffi_load32(return_area + 24)) - array0.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let array268 : Array[@types.SchemaValueNode] = [] + for index269 = 0 + index269 < mbt_ffi_load32(return_area + 40) + index269 = index269 + 1 { + let iter_base = mbt_ffi_load32(return_area + 36) + + index269 * 32 - @types.SchemaValueNode::FlagsValue(array0) - } - 17 => { - 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 + let lifted267 = 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 result239 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - array2.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::StringValue(result239) + } + 13 => { + let array240 : Array[Int] = [] + for index241 = 0 + index241 < mbt_ffi_load32(iter_base + 12) + index241 = index241 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index241 * 4 - @types.SchemaValueNode::TupleValue(array2) - } - 18 => { - 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 + array240.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array4.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::RecordValue(array240) + } + 14 => { + let lifted242 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - @types.SchemaValueNode::ListValue(array4) - } - 19 => { - 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 + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ + case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + payload: lifted242, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + let array243 : Array[Bool] = [] + for index244 = 0 + index244 < mbt_ffi_load32(iter_base + 12) + index244 = index244 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index244 * 1 - array6.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + array243.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array6) - } - 20 => { - 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.SchemaValueNode::FlagsValue(array243) + } + 17 => { + let array245 : Array[Int] = [] + for index246 = 0 + index246 < mbt_ffi_load32(iter_base + 12) + index246 = index246 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index246 * 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)) + array245.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::MapValue(array8) - } - 21 => { - let lifted10 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + @types.SchemaValueNode::TupleValue(array245) + } + 18 => { + let array247 : Array[Int] = [] + for index248 = 0 + index248 < mbt_ffi_load32(iter_base + 12) + index248 = index248 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index248 * 4 - @types.SchemaValueNode::OptionValue(lifted10) - } - 22 => { - let lifted13 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted11 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { + array247.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::ListValue(array247) + } + 19 => { + 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 + + array249.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array249) + } + 20 => { + let array251 : Array[@types.MapEntry] = [] + for index252 = 0 + index252 < mbt_ffi_load32(iter_base + 12) + index252 = index252 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index252 * 8 + + array251.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(array251) + } + 21 => { + let lifted253 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + @types.SchemaValueNode::OptionValue(lifted253) + } + 22 => { + let lifted256 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted254 : 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(lifted254) + } + 1 => { + let lifted255 : 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(lifted255) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted256) + } + 23 => { + let result257 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted259 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result258 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result258) + } _ => panic() } - @types.ResultValuePayload::OkValue(lifted11) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result257, + language: lifted259, + }) } - 1 => { - let lifted12 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { + 24 => { + let result260 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted262 : String? = match + mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + 1 => { + let result261 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result261) + } _ => panic() } - @types.ResultValuePayload::ErrValue(lifted12) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result260, + mime_type: lifted262, + }) } - _ => panic() - } + 25 => { + let result263 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaValueNode::ResultValue(lifted13) - } - 23 => { - let result14 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::PathValue(result263) + } + 26 => { + let result264 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let lifted16 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result15 = mbt_ffi_ptr2str( + @types.SchemaValueNode::UrlValue(result264) + } + 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 result265 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result15) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 8), + scale: mbt_ffi_load32(iter_base + 16), + unit: result265, + }) } + 30 => { + let result266 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result266, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result14, - language: lifted16, - }) + array268.push(lifted267) } - 24 => { - let result17 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + mbt_ffi_free(mbt_ffi_load32(return_area + 36)) - let lifted19 : 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), - ) + @common.AgentError::CustomError(@types.TypedSchemaValue::{ + graph: @types.SchemaGraph::{ + type_nodes: array232, + defs: array237, + root: mbt_ffi_load32(return_area + 32), + }, + value: @types.SchemaValueTree::{ + value_nodes: array268, + root: mbt_ffi_load32(return_area + 44), + }, + }) + } + _ => panic() + } - Option::Some(result18) - } - _ => panic() - } + RpcError::RemoteAgentError(lifted270) + } + _ => panic() + } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result17, - mime_type: lifted19, - }) + Result::Err(lifted271) + } + _ => panic() + } + + Option::Some(lifted272) + } + _ => panic() + } + let ret = lifted273 + mbt_ffi_free(return_area) + return ret +} + +///| +/// 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 FutureInvokeResult(handle) = self + wasmImportMethodFutureInvokeResultCancel(handle) +} + +///| +/// Cancel the scheduled invocation +pub fn CancellationToken::cancel(self : CancellationToken) -> Unit { + let CancellationToken(handle) = self + wasmImportMethodCancellationTokenCancel(handle) +} + +///| +/// 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] = [] + + 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 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(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 + + 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) + + () } - 25 => { - let result20 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + Unsigned(payload7) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload7.reinterpret_as_int64(), ) - @types.SchemaValueNode::PathValue(result20) + () } - 26 => { - let result21 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + FloatBits(payload8) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload8.reinterpret_as_int64(), ) - @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, - }) + () + } + } + + 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) + + () } - 30 => { - let result23 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + Unsigned(payload12) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload12.reinterpret_as_int64(), ) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result23, - body: mbt_ffi_load32(iter_base + 16), - }) + () } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), + FloatBits(payload13) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload13.reinterpret_as_int64(), ) - _ => panic() + + () + } } - array25.push(lifted24) + () } - mbt_ffi_free(mbt_ffi_load32(return_area + 12)) - - Option::Some(@types.SchemaValueTree::{ - value_nodes: array25, - root: mbt_ffi_load32(return_area + 20), - }) } - _ => panic() - } - - Result::Ok(lifted27) - } - 1 => { - let lifted201 = match mbt_ffi_load8_u(return_area + 8) { - 0 => { - let result28 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) - RpcError::ProtocolError(result28) - } - 1 => { - let result29 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + match payload3.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - RpcError::Denied(result29) - } - 2 => { - let result30 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + () + } + Some(payload15) => { + mbt_ffi_store8(iter_base + 64, 1) - RpcError::NotFound(result30) - } - 3 => { - let result31 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + 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) - RpcError::RemoteInternalError(result31) + () + } } - 4 => { - let lifted200 = match mbt_ffi_load8_u(return_area + 12) { - 0 => { - let result32 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) - @common.AgentError::InvalidInput(result32) - } - 1 => { - let result33 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) + () + } + } - @common.AgentError::InvalidMethod(result33) - } - 2 => { - let result34 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) + () + } + S16Type(payload17) => { + mbt_ffi_store8(iter_base + 0, 3) - @common.AgentError::InvalidType(result34) - } - 3 => { - let result35 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) + match payload17 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - @common.AgentError::InvalidAgentId(result35) - } - 4 => { - let array162 : Array[@types.SchemaTypeNode] = [] - for index163 = 0 - index163 < mbt_ffi_load32(return_area + 20) - index163 = index163 + 1 { - let iter_base = mbt_ffi_load32(return_area + 16) + - index163 * 144 + () + } + Some(payload19) => { + mbt_ffi_store8(iter_base + 8, 1) - let lifted148 = 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 array50 : Array[@types.NamedFieldType] = [] - for index51 = 0 - index51 < mbt_ffi_load32(iter_base + 12) - index51 = index51 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index51 * 68 + match payload19.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - let result36 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload21) => { + mbt_ffi_store8(iter_base + 16, 1) - let lifted38 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result37 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match payload21 { + Signed(payload22) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload22) - Option::Some(result37) - } - _ => panic() - } + () + } + Unsigned(payload23) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload23.reinterpret_as_int64(), + ) - let array40 : Array[String] = [] - for index41 = 0 - index41 < mbt_ffi_load32(iter_base + 28) - index41 = index41 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index41 * 8 + () + } + FloatBits(payload24) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload24.reinterpret_as_int64(), + ) - let result39 = 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 + 24)) + () + } + } - let array43 : Array[String] = [] - for index44 = 0 - index44 < mbt_ffi_load32(iter_base + 36) - index44 = index44 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 32) + - index44 * 8 + match payload19.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let result42 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload26) => { + mbt_ffi_store8(iter_base + 40, 1) - array43.push(result42) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + match payload26 { + Signed(payload27) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload27) - let lifted46 : String? = match - mbt_ffi_load8_u(iter_base + 40) { - 0 => Option::None - 1 => { - let result45 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + () + } + Unsigned(payload28) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload28.reinterpret_as_int64(), + ) - Option::Some(result45) - } - _ => panic() - } + () + } + FloatBits(payload29) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload29.reinterpret_as_int64(), + ) - let lifted49 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { - 0 => Option::None - 1 => { - let lifted48 = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result47 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), - ) + () + } + } - @types.Role::Other(result47) - } - _ => panic() - } + () + } + } - Option::Some(lifted48) - } - _ => panic() - } + match payload19.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - array50.push(@types.NamedFieldType::{ - name: result36, - body: mbt_ffi_load32(iter_base + 8), - metadata: @types.MetadataEnvelope::{ - doc: lifted38, - aliases: array40, - examples: array43, - deprecated: lifted46, - role: lifted49, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Some(payload31) => { + mbt_ffi_store8(iter_base + 64, 1) - @types.SchemaTypeBody::RecordType(array50) - } - 15 => { - let array67 : Array[@types.VariantCaseType] = [] - for index68 = 0 - index68 < mbt_ffi_load32(iter_base + 12) - index68 = index68 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index68 * 72 + 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) - let result52 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - let lifted53 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + () + } + } - let lifted55 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result54 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + () + } + S32Type(payload33) => { + mbt_ffi_store8(iter_base + 0, 4) - Option::Some(result54) - } - _ => panic() - } + match payload33 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let array57 : Array[String] = [] - for index58 = 0 - index58 < mbt_ffi_load32(iter_base + 32) - index58 = index58 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + - index58 * 8 + () + } + Some(payload35) => { + mbt_ffi_store8(iter_base + 8, 1) - let result56 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload35.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - array57.push(result56) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + () + } + Some(payload37) => { + mbt_ffi_store8(iter_base + 16, 1) - let array60 : Array[String] = [] - for index61 = 0 - index61 < mbt_ffi_load32(iter_base + 40) - index61 = index61 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + - index61 * 8 + match payload37 { + Signed(payload38) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload38) - let result59 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Unsigned(payload39) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload39.reinterpret_as_int64(), + ) - array60.push(result59) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + () + } + FloatBits(payload40) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload40.reinterpret_as_int64(), + ) - let lifted63 : String? = match - mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result62 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + () + } + } - Option::Some(result62) - } - _ => panic() - } + () + } + } - let lifted66 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted65 = match - mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result64 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + match payload35.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - @types.Role::Other(result64) - } - _ => panic() - } + () + } + Some(payload42) => { + mbt_ffi_store8(iter_base + 40, 1) - Option::Some(lifted65) - } - _ => panic() - } + match payload42 { + Signed(payload43) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload43) - array67.push(@types.VariantCaseType::{ - name: result52, - payload: lifted53, - metadata: @types.MetadataEnvelope::{ - doc: lifted55, - aliases: array57, - examples: array60, - deprecated: lifted63, - role: lifted66, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Unsigned(payload44) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload44.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::VariantType(array67) - } - 16 => { - let array70 : Array[String] = [] - for index71 = 0 - index71 < mbt_ffi_load32(iter_base + 12) - index71 = index71 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index71 * 8 + () + } + FloatBits(payload45) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload45.reinterpret_as_int64(), + ) - let result69 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array70.push(result69) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaTypeBody::EnumType(array70) - } - 17 => { - let array73 : Array[String] = [] - for index74 = 0 - index74 < mbt_ffi_load32(iter_base + 12) - index74 = index74 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index74 * 8 + match payload35.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - let result72 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload47) => { + mbt_ffi_store8(iter_base + 64, 1) - array73.push(result72) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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) - @types.SchemaTypeBody::FlagsType(array73) - } - 18 => { - let array75 : Array[Int] = [] - for index76 = 0 - index76 < mbt_ffi_load32(iter_base + 12) - index76 = index76 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index76 * 4 + () + } + } - array75.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaTypeBody::TupleType(array75) - } - 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 lifted77 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + () + } + S64Type(payload49) => { + mbt_ffi_store8(iter_base + 0, 5) - let lifted78 : Int? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) - _ => panic() - } + match payload49 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted77, - err: lifted78, - }) - } - 24 => { - let lifted82 : 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 + () + } + Some(payload51) => { + mbt_ffi_store8(iter_base + 8, 1) - let result79 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload51.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - array80.push(result79) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + () + } + Some(payload53) => { + mbt_ffi_store8(iter_base + 16, 1) - Option::Some(array80) - } - _ => panic() - } + match payload53 { + Signed(payload54) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload54) - let lifted83 : 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() - } + () + } + Unsigned(payload55) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload55.reinterpret_as_int64(), + ) - let lifted84 : 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() - } + () + } + FloatBits(payload56) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload56.reinterpret_as_int64(), + ) - let lifted86 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result85 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + () + } + } - Option::Some(result85) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted82, - min_length: lifted83, - max_length: lifted84, - regex: lifted86, - }) - } - 25 => { - let lifted90 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let array88 : Array[String] = [] - for index89 = 0 - index89 < mbt_ffi_load32(iter_base + 16) - index89 = index89 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index89 * 8 + match payload51.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let result87 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload58) => { + mbt_ffi_store8(iter_base + 40, 1) - array88.push(result87) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + match payload58 { + Signed(payload59) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload59) - Option::Some(array88) - } - _ => panic() - } + () + } + Unsigned(payload60) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload60.reinterpret_as_int64(), + ) - let lifted91 : 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() - } + () + } + FloatBits(payload61) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload61.reinterpret_as_int64(), + ) - let lifted92 : 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: lifted90, - min_bytes: lifted91, - max_bytes: lifted92, - }) - } - 26 => { - let lifted96 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let array94 : Array[String] = [] - for index95 = 0 - index95 < mbt_ffi_load32(iter_base + 20) - index95 = index95 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + - index95 * 8 + () + } + } - let result93 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload51.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - array94.push(result93) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + () + } + Some(payload63) => { + mbt_ffi_store8(iter_base + 64, 1) - Option::Some(array94) - } - _ => 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) - let lifted100 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let array98 : Array[String] = [] - for index99 = 0 - index99 < mbt_ffi_load32(iter_base + 32) - index99 = index99 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + - index99 * 8 + () + } + } - let result97 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array98.push(result97) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + () + } + U8Type(payload65) => { + mbt_ffi_store8(iter_base + 0, 6) - Option::Some(array98) - } - _ => panic() - } + match payload65 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - @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: lifted96, - allowed_extensions: lifted100, - }) - } - 27 => { - let lifted104 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let array102 : Array[String] = [] - for index103 = 0 - index103 < mbt_ffi_load32(iter_base + 16) - index103 = index103 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index103 * 8 + () + } + Some(payload67) => { + mbt_ffi_store8(iter_base + 8, 1) - let result101 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload67.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - array102.push(result101) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + () + } + Some(payload69) => { + mbt_ffi_store8(iter_base + 16, 1) - Option::Some(array102) - } - _ => panic() - } + match payload69 { + Signed(payload70) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload70) - let lifted108 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { - 0 => Option::None - 1 => { - let array106 : Array[String] = [] - for index107 = 0 - index107 < mbt_ffi_load32(iter_base + 28) - index107 = index107 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index107 * 8 + () + } + Unsigned(payload71) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload71.reinterpret_as_int64(), + ) - let result105 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + FloatBits(payload72) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload72.reinterpret_as_int64(), + ) - array106.push(result105) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + () + } + } - Option::Some(array106) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted104, - allowed_hosts: lifted108, - }) - } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result109 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + match payload67.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let array111 : Array[String] = [] - for index112 = 0 - index112 < mbt_ffi_load32(iter_base + 20) - index112 = index112 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + - index112 * 8 + () + } + Some(payload74) => { + mbt_ffi_store8(iter_base + 40, 1) - let result110 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload74 { + Signed(payload75) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload75) - array111.push(result110) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + () + } + Unsigned(payload76) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload76.reinterpret_as_int64(), + ) - let lifted114 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result113 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + () + } + FloatBits(payload77) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload77.reinterpret_as_int64(), + ) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 32), - scale: mbt_ffi_load32(iter_base + 40), - unit: result113, - }) - } - _ => panic() - } + () + } + } - let lifted116 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let result115 = 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: result115, - }) - } - _ => panic() - } + match payload67.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result109, - allowed_suffixes: array111, - min: lifted114, - max: lifted116, - }) - } - 31 => { - let array140 : Array[@types.UnionBranch] = [] - for index141 = 0 - index141 < mbt_ffi_load32(iter_base + 12) - index141 = index141 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index141 * 92 + () + } + Some(payload79) => { + mbt_ffi_store8(iter_base + 64, 1) - let result117 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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) - let lifted126 = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => { - let result118 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + } - @types.DiscriminatorRule::Prefix(result118) - } - 1 => { - let result119 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + } - @types.DiscriminatorRule::Suffix(result119) - } - 2 => { - let result120 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + U16Type(payload81) => { + mbt_ffi_store8(iter_base + 0, 7) - @types.DiscriminatorRule::Contains(result120) - } - 3 => { - let result121 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match payload81 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - @types.DiscriminatorRule::Regex(result121) - } - 4 => { - let result122 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + Some(payload83) => { + mbt_ffi_store8(iter_base + 8, 1) - let lifted124 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result123 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) + match payload83.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - Option::Some(result123) - } - _ => panic() - } + () + } + Some(payload85) => { + mbt_ffi_store8(iter_base + 16, 1) - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result122, - literal: lifted124, - }) - } - 5 => { - let result125 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match payload85 { + Signed(payload86) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload86) - @types.DiscriminatorRule::FieldAbsent(result125) - } - _ => panic() - } + () + } + Unsigned(payload87) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload87.reinterpret_as_int64(), + ) - let lifted128 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result127 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + () + } + FloatBits(payload88) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload88.reinterpret_as_int64(), + ) - Option::Some(result127) - } - _ => panic() - } + () + } + } - let array130 : Array[String] = [] - for index131 = 0 - index131 < mbt_ffi_load32(iter_base + 52) - index131 = index131 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 48) + - index131 * 8 + () + } + } - let result129 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload83.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - array130.push(result129) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + () + } + Some(payload90) => { + mbt_ffi_store8(iter_base + 40, 1) - let array133 : Array[String] = [] - for index134 = 0 - index134 < mbt_ffi_load32(iter_base + 60) - index134 = index134 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + - index134 * 8 + match payload90 { + Signed(payload91) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload91) - let result132 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Unsigned(payload92) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload92.reinterpret_as_int64(), + ) - array133.push(result132) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + () + } + FloatBits(payload93) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload93.reinterpret_as_int64(), + ) - let lifted136 : String? = match - mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result135 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), - ) + () + } + } - Option::Some(result135) - } - _ => panic() - } + () + } + } - let lifted139 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted138 = match - mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result137 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + match payload83.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - @types.Role::Other(result137) - } - _ => panic() - } + () + } + Some(payload95) => { + mbt_ffi_store8(iter_base + 64, 1) - Option::Some(lifted138) - } - _ => panic() - } + 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) - array140.push(@types.UnionBranch::{ - tag: result117, - body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted126, - metadata: @types.MetadataEnvelope::{ - doc: lifted128, - aliases: array130, - examples: array133, - deprecated: lifted136, - role: lifted139, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array140, - }) - } - 32 => { - let lifted143 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result142 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + } - Option::Some(result142) - } - _ => panic() - } + () + } + U32Type(payload97) => { + mbt_ffi_store8(iter_base + 0, 8) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted143, - }) - } - 33 => { - let lifted145 : String? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result144 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + match payload97 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - Option::Some(result144) - } - _ => panic() - } + () + } + Some(payload99) => { + mbt_ffi_store8(iter_base + 8, 1) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted145, - }) - } - 34 => { - let lifted146 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + match payload99.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - @types.SchemaTypeBody::FutureType(lifted146) - } - 35 => { - let lifted147 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + () + } + Some(payload101) => { + mbt_ffi_store8(iter_base + 16, 1) - @types.SchemaTypeBody::StreamType(lifted147) - } - _ => panic() - } + match payload101 { + Signed(payload102) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload102) - let lifted150 : String? = match - mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result149 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), - ) + () + } + Unsigned(payload103) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload103.reinterpret_as_int64(), + ) - Option::Some(result149) - } - _ => panic() - } + () + } + FloatBits(payload104) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload104.reinterpret_as_int64(), + ) - let array152 : Array[String] = [] - for index153 = 0 - index153 < mbt_ffi_load32(iter_base + 104) - index153 = index153 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 100) + - index153 * 8 + () + } + } - let result151 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array152.push(result151) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + match payload99.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let array155 : Array[String] = [] - for index156 = 0 - index156 < mbt_ffi_load32(iter_base + 112) - index156 = index156 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 108) + - index156 * 8 + () + } + Some(payload106) => { + mbt_ffi_store8(iter_base + 40, 1) - let result154 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload106 { + Signed(payload107) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload107) - array155.push(result154) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + () + } + Unsigned(payload108) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload108.reinterpret_as_int64(), + ) - let lifted158 : String? = match - mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result157 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) + () + } + FloatBits(payload109) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload109.reinterpret_as_int64(), + ) - Option::Some(result157) - } - _ => panic() - } + () + } + } - let lifted161 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted160 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result159 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + () + } + } - @types.Role::Other(result159) - } - _ => panic() - } + match payload99.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - Option::Some(lifted160) - } - _ => panic() - } + () + } + Some(payload111) => { + mbt_ffi_store8(iter_base + 64, 1) - array162.push(@types.SchemaTypeNode::{ - body: lifted148, - metadata: @types.MetadataEnvelope::{ - doc: lifted150, - aliases: array152, - examples: array155, - deprecated: lifted158, - role: lifted161, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 16)) + 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 array167 : Array[@types.SchemaTypeDef] = [] - for index168 = 0 - index168 < mbt_ffi_load32(return_area + 28) - index168 = index168 + 1 { - let iter_base = mbt_ffi_load32(return_area + 24) + - index168 * 24 + () + } + } - let result164 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } + + () + } + U64Type(payload113) => { + mbt_ffi_store8(iter_base + 0, 9) - let lifted166 : String? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result165 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + match payload113 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - Option::Some(result165) - } - _ => panic() - } + () + } + Some(payload115) => { + mbt_ffi_store8(iter_base + 8, 1) - array167.push(@types.SchemaTypeDef::{ - id: result164, - name: lifted166, - body: mbt_ffi_load32(iter_base + 20), - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 24)) + match payload115.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - let array198 : Array[@types.SchemaValueNode] = [] - for index199 = 0 - index199 < mbt_ffi_load32(return_area + 40) - index199 = index199 + 1 { - let iter_base = mbt_ffi_load32(return_area + 36) + - index199 * 32 + () + } + Some(payload117) => { + mbt_ffi_store8(iter_base + 16, 1) - let lifted197 = 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 result169 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + match payload117 { + Signed(payload118) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload118) - @types.SchemaValueNode::StringValue(result169) - } - 13 => { - let array170 : Array[Int] = [] - for index171 = 0 - index171 < mbt_ffi_load32(iter_base + 12) - index171 = index171 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index171 * 4 + () + } + Unsigned(payload119) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload119.reinterpret_as_int64(), + ) - array170.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + FloatBits(payload120) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload120.reinterpret_as_int64(), + ) - @types.SchemaValueNode::RecordValue(array170) - } - 14 => { - let lifted172 : 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: lifted172, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - let array173 : Array[Bool] = [] - for index174 = 0 - index174 < mbt_ffi_load32(iter_base + 12) - index174 = index174 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index174 * 1 + () + } + } - array173.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload115.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - @types.SchemaValueNode::FlagsValue(array173) - } - 17 => { - let array175 : Array[Int] = [] - for index176 = 0 - index176 < mbt_ffi_load32(iter_base + 12) - index176 = index176 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index176 * 4 + () + } + Some(payload122) => { + mbt_ffi_store8(iter_base + 40, 1) - array175.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload122 { + Signed(payload123) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload123) - @types.SchemaValueNode::TupleValue(array175) - } - 18 => { - let array177 : Array[Int] = [] - for index178 = 0 - index178 < mbt_ffi_load32(iter_base + 12) - index178 = index178 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index178 * 4 + () + } + Unsigned(payload124) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload124.reinterpret_as_int64(), + ) - array177.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + FloatBits(payload125) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload125.reinterpret_as_int64(), + ) - @types.SchemaValueNode::ListValue(array177) - } - 19 => { - let array179 : Array[Int] = [] - for index180 = 0 - index180 < mbt_ffi_load32(iter_base + 12) - index180 = index180 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index180 * 4 + () + } + } - array179.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaValueNode::FixedListValue(array179) - } - 20 => { - let array181 : Array[@types.MapEntry] = [] - for index182 = 0 - index182 < mbt_ffi_load32(iter_base + 12) - index182 = index182 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index182 * 8 + match payload115.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - array181.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(payload127) => { + mbt_ffi_store8(iter_base + 64, 1) - @types.SchemaValueNode::MapValue(array181) - } - 21 => { - let lifted183 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + 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) - @types.SchemaValueNode::OptionValue(lifted183) - } - 22 => { - let lifted186 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted184 : 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(lifted184) - } - 1 => { - let lifted185 : 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(lifted185) - } - _ => panic() - } + () + } + F32Type(payload129) => { + mbt_ffi_store8(iter_base + 0, 10) - @types.SchemaValueNode::ResultValue(lifted186) - } - 23 => { - let result187 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + match payload129 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted189 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result188 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + () + } + Some(payload131) => { + mbt_ffi_store8(iter_base + 8, 1) - Option::Some(result188) - } - _ => panic() - } + match payload131.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result187, - language: lifted189, - }) - } - 24 => { - let result190 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + Some(payload133) => { + mbt_ffi_store8(iter_base + 16, 1) - let lifted192 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result191 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + match payload133 { + Signed(payload134) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload134) - Option::Some(result191) - } - _ => panic() - } + () + } + Unsigned(payload135) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload135.reinterpret_as_int64(), + ) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result190, - mime_type: lifted192, - }) - } - 25 => { - let result193 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + FloatBits(payload136) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload136.reinterpret_as_int64(), + ) - @types.SchemaValueNode::PathValue(result193) - } - 26 => { - let result194 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + } - @types.SchemaValueNode::UrlValue(result194) - } - 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 result195 = 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: result195, - }) - } - 30 => { - let result196 = 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::UnionValue(@types.UnionValuePayload::{ - tag: result196, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) - _ => panic() - } + () + } + Some(payload138) => { + mbt_ffi_store8(iter_base + 40, 1) - array198.push(lifted197) + match payload138 { + Signed(payload139) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload139) + + () } - 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(), + ) - @common.AgentError::CustomError(@types.TypedSchemaValue::{ - graph: @types.SchemaGraph::{ - type_nodes: array162, - defs: array167, - root: mbt_ffi_load32(return_area + 32), - }, - value: @types.SchemaValueTree::{ - value_nodes: array198, - root: mbt_ffi_load32(return_area + 44), - }, - }) + () + } + FloatBits(payload141) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload141.reinterpret_as_int64(), + ) + + () + } } - _ => 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(lifted200) + () + } } - _ => panic() - } - Result::Err(lifted201) + () + } } - _ => panic() + + () } + F64Type(payload145) => { + mbt_ffi_store8(iter_base + 0, 11) - Option::Some(lifted202) - } - _ => panic() - } - let ret = lifted203 - mbt_ffi_free(return_area) - return ret -} + match payload145 { + None => { + mbt_ffi_store8(iter_base + 8, 0) -///| -/// 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 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 { - let CancellationToken(handle) = self - wasmImportMethodCancellationTokenCancel(handle) -} + match payload147.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) -///| -/// 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] = [] + () + } + Some(payload149) => { + mbt_ffi_store8(iter_base + 16, 1) - 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 + match payload149 { + Signed(payload150) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload150) - 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) - } + () + } + Unsigned(payload151) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload151.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 + () + } + FloatBits(payload152) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload152.reinterpret_as_int64(), + ) - 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 => { - mbt_ffi_store8(iter_base + 0, 2) + match payload147.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - () - } - S16Type => { - mbt_ffi_store8(iter_base + 0, 3) + () + } + Some(payload154) => { + mbt_ffi_store8(iter_base + 40, 1) - () - } - S32Type => { - mbt_ffi_store8(iter_base + 0, 4) + match payload154 { + Signed(payload155) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload155) - () - } - S64Type => { - mbt_ffi_store8(iter_base + 0, 5) + () + } + Unsigned(payload156) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload156.reinterpret_as_int64(), + ) - () - } - U8Type => { - mbt_ffi_store8(iter_base + 0, 6) + () + } + FloatBits(payload157) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload157.reinterpret_as_int64(), + ) - () - } - U16Type => { - mbt_ffi_store8(iter_base + 0, 7) + () + } + } - () - } - U32Type => { - mbt_ffi_store8(iter_base + 0, 8) + () + } + } - () - } - U64Type => { - mbt_ffi_store8(iter_base + 0, 9) + match payload147.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - F32Type => { - mbt_ffi_store8(iter_base + 0, 10) + () + } + Some(payload159) => { + mbt_ffi_store8(iter_base + 64, 1) - () - } - F64Type => { - mbt_ffi_store8(iter_base + 0, 11) + 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) + + () + } + } + + () + } + } () } @@ -20539,17 +30698,19 @@ pub fn get_config_value( () } - 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 { @@ -20558,51 +30719,51 @@ pub fn get_config_value( () } - 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( + let address169 = 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 + 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( + let address172 = 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 + 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 => { @@ -20610,13 +30771,13 @@ pub fn get_config_value( () } - 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) () } @@ -20628,10 +30789,10 @@ pub fn get_config_value( () } - Some(payload28) => { + Some(payload178) => { mbt_ffi_store8(iter_base + 52, 1) - match payload28 { + match payload178 { Multimodal => { mbt_ffi_store8(iter_base + 56, 0) @@ -20647,13 +30808,13 @@ pub fn get_config_value( () } - 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) () } @@ -20662,27 +30823,29 @@ pub fn get_config_value( () } } - 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 => { @@ -20690,9 +30853,9 @@ pub fn get_config_value( () } - 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) () } @@ -20704,51 +30867,51 @@ pub fn get_config_value( () } - 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( + let address194 = 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 + 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( + let address197 = 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 + 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 => { @@ -20756,13 +30919,13 @@ pub fn get_config_value( () } - 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) () } @@ -20774,10 +30937,10 @@ pub fn get_config_value( () } - Some(payload53) => { + Some(payload203) => { mbt_ffi_store8(iter_base + 56, 1) - match payload53 { + match payload203 { Multimodal => { mbt_ffi_store8(iter_base + 60, 0) @@ -20793,13 +30956,13 @@ pub fn get_config_value( () } - 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) () } @@ -20808,121 +30971,127 @@ pub fn get_config_value( () } } - 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) () } @@ -20930,77 +31099,79 @@ pub fn get_config_value( () } - 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) () } @@ -21008,59 +31179,61 @@ pub fn get_config_value( () } - 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()) () } @@ -21068,64 +31241,64 @@ pub fn get_config_value( () } - 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) () } @@ -21133,62 +31306,62 @@ pub fn get_config_value( () } - 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) () } @@ -21206,165 +31379,165 @@ pub fn get_config_value( () } - 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, + let address281 = mbt_ffi_malloc( + payload278.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 + 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) () } @@ -21376,51 +31549,51 @@ pub fn get_config_value( () } - 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( + let address310 = 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 + 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( + let address313 = 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 + 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 => { @@ -21428,13 +31601,13 @@ pub fn get_config_value( () } - 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) () } @@ -21446,10 +31619,10 @@ pub fn get_config_value( () } - Some(payload169) => { + Some(payload319) => { mbt_ffi_store8(iter_base + 76, 1) - match payload169 { + match payload319 { Multimodal => { mbt_ffi_store8(iter_base + 80, 0) @@ -21465,13 +31638,13 @@ pub fn get_config_value( () } - 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) () } @@ -21480,33 +31653,33 @@ pub fn get_config_value( () } } - 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) - mbt_ffi_store32(iter_base + 8, payload177.inner) + mbt_ffi_store32(iter_base + 8, payload327.inner) - match payload177.category { + match payload327.category { None => { mbt_ffi_store8(iter_base + 12, 0) () } - Some(payload179) => { + Some(payload329) => { mbt_ffi_store8(iter_base + 12, 1) - let ptr180 = mbt_ffi_str2ptr(payload179) - mbt_ffi_store32(iter_base + 20, payload179.length()) - mbt_ffi_store32(iter_base + 16, ptr180) - cleanup_list.push(ptr180) + let ptr330 = mbt_ffi_str2ptr(payload329) + mbt_ffi_store32(iter_base + 20, payload329.length()) + mbt_ffi_store32(iter_base + 16, ptr330) + cleanup_list.push(ptr330) () } @@ -21514,22 +31687,22 @@ pub fn get_config_value( () } - 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) () } @@ -21537,18 +31710,18 @@ pub fn get_config_value( () } - 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) () } @@ -21556,18 +31729,18 @@ pub fn get_config_value( () } - 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) () } @@ -21583,47 +31756,47 @@ pub fn get_config_value( () } - 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 => { @@ -21631,13 +31804,13 @@ pub fn get_config_value( () } - 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) () } @@ -21649,10 +31822,10 @@ pub fn get_config_value( () } - Some(payload204) => { + Some(payload354) => { mbt_ffi_store8(iter_base + 128, 1) - match payload204 { + match payload354 { Multimodal => { mbt_ffi_store8(iter_base + 132, 0) @@ -21668,13 +31841,13 @@ pub fn get_config_value( () } - 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) () } @@ -21683,18 +31856,18 @@ pub fn get_config_value( () } } - 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 => { @@ -21702,39 +31875,39 @@ pub fn get_config_value( () } - 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, + address360, expected.type_nodes.length(), - address216, + address366, expected.defs.length(), expected.root, return_area, ) - let array244 : Array[@types.SchemaValueNode] = [] - for index245 = 0 - index245 < mbt_ffi_load32(return_area + 4) - index245 = index245 + 1 { - let iter_base = mbt_ffi_load32(return_area + 0) + index245 * 32 + let array394 : Array[@types.SchemaValueNode] = [] + for index395 = 0 + index395 < mbt_ffi_load32(return_area + 4) + index395 = index395 + 1 { + let iter_base = mbt_ffi_load32(return_area + 0) + index395 * 32 - let lifted243 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted393 = 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)) @@ -21773,10 +31946,10 @@ pub fn get_config_value( } 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)) } @@ -21801,170 +31974,170 @@ pub fn get_config_value( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 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::{ + 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => panic() } - @types.ResultValuePayload::ErrValue(lifted231) + @types.ResultValuePayload::ErrValue(lifted381) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted232) + @types.SchemaValueNode::ResultValue(lifted382) } 23 => { - let result233 = mbt_ffi_ptr2str( + 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( + 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, + text: result383, + language: lifted385, }) } 24 => { - let result236 = mbt_ffi_ptr2bytes( + 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( + 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, + bytes: result386, + mime_type: lifted388, }) } 25 => { - let result239 = mbt_ffi_ptr2str( + 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( + 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 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -21976,7 +32149,7 @@ pub fn get_config_value( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result241 = mbt_ffi_ptr2str( + let result391 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -21984,17 +32157,17 @@ pub fn get_config_value( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result241, + unit: result391, }) } 30 => { - let result242 = mbt_ffi_ptr2str( + let result392 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result242, + tag: result392, body: mbt_ffi_load32(iter_base + 16), }) } @@ -22009,16 +32182,16 @@ pub fn get_config_value( _ => panic() } - array244.push(lifted243) + array394.push(lifted393) } mbt_ffi_free(mbt_ffi_load32(return_area + 0)) let ret = @types.SchemaValueTree::{ - value_nodes: array244, + value_nodes: array394, 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/context/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/api/context/ffi.mbt index 28729382ee..b148f99d73 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/api/context/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/api/context/ffi.mbt @@ -69,6 +69,19 @@ fn wasmImportMethodInvocationContextGetAttributeChains(p0 : Int, p1 : Int) = "go ///| fn wasmImportMethodInvocationContextTraceContextHeaders(p0 : Int, p1 : Int) = "golem:api/context@1.5.0" "[method]invocation-context.trace-context-headers" +///| +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) 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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) + ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #|(func (param i32) (result i32) (local i32) @@ -77,13 +90,12 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| local.get 1) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) ///| -#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) ///| extern "wasm" fn mbt_ffi_store8(offset : Int, value : Int) = @@ -93,18 +105,6 @@ extern "wasm" fn mbt_ffi_store8(offset : Int, value : Int) = extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = #|(func (param i32) (result i64) local.get 0 i64.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_load8_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_u) - -///| -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_ptr2str(ptr : Int, len : Int) -> String = #|(func (param i32) (param i32) (result i32) diff --git a/sdks/moonbit/golem_sdk/interface/golem/api/host/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/api/host/ffi.mbt index 1159c787ca..e827e6a81f 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/api/host/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/api/host/ffi.mbt @@ -153,13 +153,6 @@ fn wasmImportResolveAgentIdStrict( ///| fn wasmImportFork(p0 : Int) = "golem:api/host@1.5.0" "fork" -///| -extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array8 - #| local.get 0) - ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #|(func (param i32) (result i32) (local i32) @@ -168,46 +161,53 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| local.get 1) ///| -#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) ///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> 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_store32(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) ///| 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_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_store64(offset : Int, value : Int64) = - #|(func (param i32) (param i64) local.get 0 local.get 1 i64.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_store32(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) +extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| 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_load8_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) ///| -extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +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_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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) diff --git a/sdks/moonbit/golem_sdk/interface/golem/api/oplog/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/api/oplog/ffi.mbt index 19fa2b125b..64cc3572f6 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/api/oplog/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/api/oplog/ffi.mbt @@ -46,35 +46,21 @@ fn wasmImportConstructorSearchOplog( fn wasmImportMethodSearchOplogGetNext(p0 : Int, p1 : Int) = "golem:api/oplog@1.5.0" "[method]search-oplog.get-next" ///| -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_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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) - -///| -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_storef64(offset : Int, value : Double) = + #|(func (param i32) (param f64) local.get 0 local.get 1 f64.store) ///| -extern "wasm" fn mbt_ffi_extend8(value : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.extend8_s) +#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_load8(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_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_load16(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_s) ///| extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = @@ -84,8 +70,8 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| 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_store64(offset : Int, value : Int64) = + #|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) ///| extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = @@ -95,51 +81,65 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| 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_loadf32(offset : Int) -> Float = + #|(func (param i32) (result f32) local.get 0 f32.load) ///| -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_store8(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) ///| -extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = - #|(func (param i32) (result f32) local.get 0 f32.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_extend16(value : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.extend16_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_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_load8_u(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load8_u) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +#owned(str) +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_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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = - #|(func (param i32) (result i32) 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_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) ///| -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_load16_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_u) ///| -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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) + +///| +extern "wasm" fn mbt_ffi_extend16(value : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.extend16_s) 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 4c72bd96e3..45e7dca38e 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/api/oplog/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/api/oplog/top.mbt @@ -4547,15 +4547,15 @@ pub fn enrich_oplog_entries( return_area, ) - let lifted2365 = match mbt_ffi_load8_u(return_area + 0) { + let lifted3065 = match mbt_ffi_load8_u(return_area + 0) { 0 => { - let array2362 : Array[PublicOplogEntry] = [] - for index2363 = 0 - index2363 < mbt_ffi_load32(return_area + 8) - index2363 = index2363 + 1 { - let iter_base = mbt_ffi_load32(return_area + 4) + index2363 * 208 + let array3062 : Array[PublicOplogEntry] = [] + for index3063 = 0 + index3063 < mbt_ffi_load32(return_area + 8) + index3063 = index3063 + 1 { + let iter_base = mbt_ffi_load32(return_area + 4) + index3063 * 208 - let lifted2361 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted3061 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { let result = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), @@ -4655,11 +4655,11 @@ pub fn enrich_oplog_entries( } mbt_ffi_free(mbt_ffi_load32(iter_base + 152)) - let array639 : Array[LocalAgentConfigEntry] = [] - for index640 = 0 - index640 < mbt_ffi_load32(iter_base + 164) - index640 = index640 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 160) + index640 * 40 + let array709 : Array[LocalAgentConfigEntry] = [] + for index710 = 0 + index710 < mbt_ffi_load32(iter_base + 164) + index710 = index710 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 160) + index710 * 40 let array473 : Array[String] = [] for index474 = 0 @@ -4676,316 +4676,1126 @@ pub fn enrich_oplog_entries( } 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), ) 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 + 2 => { + let lifted481 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted476 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted475 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted475) + } + _ => panic() + } + + let lifted478 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted477 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted477) + } + _ => panic() + } + + let lifted480 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result479 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result479) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted476, + max: lifted478, + unit: lifted480, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted481) + } + 3 => { + let lifted488 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted483 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted482 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted482) + } + _ => panic() + } + + let lifted485 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted484 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => 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(result486) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted483, + max: lifted485, + unit: lifted487, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted488) + } + 4 => { + let lifted495 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted490 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted489 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted489) + } + _ => panic() + } + + let lifted492 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted491 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted491) + } + _ => panic() + } + + let lifted494 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result493 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result493) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted490, + max: lifted492, + unit: lifted494, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted495) + } + 5 => { + let lifted502 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted497 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted496 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted496) + } + _ => panic() + } + + let lifted499 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted498 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted498) + } + _ => panic() + } + + let lifted501 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result500 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result500) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted497, + max: lifted499, + unit: lifted501, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted502) + } + 6 => { + let lifted509 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted504 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted503 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted503) + } + _ => panic() + } + + let lifted506 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted505 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted505) + } + _ => panic() + } + + let lifted508 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result507 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result507) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted504, + max: lifted506, + unit: lifted508, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted509) + } + 7 => { + let lifted516 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted511 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted510 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted510) + } + _ => panic() + } + + let lifted513 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted512 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted512) + } + _ => panic() + } + + let lifted515 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result514 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result514) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted511, + max: lifted513, + unit: lifted515, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted516) + } + 8 => { + let lifted523 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted518 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted517 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted517) + } + _ => panic() + } + + let lifted520 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted519 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted519) + } + _ => panic() + } + + let lifted522 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result521 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result521) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted518, + max: lifted520, + unit: lifted522, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted523) + } + 9 => { + let lifted530 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted525 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted524 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted524) + } + _ => panic() + } + + let lifted527 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted526 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted526) + } + _ => panic() + } + + let lifted529 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result528 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result528) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted525, + max: lifted527, + unit: lifted529, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted530) + } + 10 => { + let lifted537 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted532 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted531 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted531) + } + _ => panic() + } + + let lifted534 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted533 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_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() + } + + 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), + ) + + 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 array489 : Array[@types.NamedFieldType] = [] - for index490 = 0 - index490 < mbt_ffi_load32(iter_base + 12) - index490 = index490 + 1 { + 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) + - index490 * 68 + index560 * 68 - let result475 = mbt_ffi_ptr2str( + let result545 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted477 : String? = match + let lifted547 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result476 = mbt_ffi_ptr2str( + let result546 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result476) + Option::Some(result546) } _ => panic() } - let array479 : Array[String] = [] - for index480 = 0 - index480 < mbt_ffi_load32(iter_base + 28) - index480 = index480 + 1 { + 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) + - index480 * 8 + index550 * 8 - let result478 = mbt_ffi_ptr2str( + let result548 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array479.push(result478) + array549.push(result548) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array482 : Array[String] = [] - for index483 = 0 - index483 < mbt_ffi_load32(iter_base + 36) - index483 = index483 + 1 { + 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) + - index483 * 8 + index553 * 8 - let result481 = mbt_ffi_ptr2str( + let result551 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array482.push(result481) + array552.push(result551) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted485 : String? = match + let lifted555 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result484 = mbt_ffi_ptr2str( + let result554 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result484) + Option::Some(result554) } _ => panic() } - let lifted488 : @types.Role? = match + let lifted558 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted487 = match + let lifted557 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result486 = mbt_ffi_ptr2str( + let result556 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result486) + @types.Role::Other(result556) } _ => panic() } - Option::Some(lifted487) + Option::Some(lifted557) } _ => panic() } - array489.push(@types.NamedFieldType::{ - name: result475, + array559.push(@types.NamedFieldType::{ + name: result545, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted477, - aliases: array479, - examples: array482, - deprecated: lifted485, - role: lifted488, + doc: lifted547, + aliases: array549, + examples: array552, + deprecated: lifted555, + role: lifted558, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array489) + @types.SchemaTypeBody::RecordType(array559) } 15 => { - let array506 : Array[@types.VariantCaseType] = [] - for index507 = 0 - index507 < mbt_ffi_load32(iter_base + 12) - index507 = index507 + 1 { + 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) + - index507 * 72 + index577 * 72 - let result491 = mbt_ffi_ptr2str( + let result561 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted492 : Int? = match + let lifted562 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted494 : String? = match + let lifted564 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result493 = mbt_ffi_ptr2str( + let result563 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result493) + Option::Some(result563) } _ => panic() } - let array496 : Array[String] = [] - for index497 = 0 - index497 < mbt_ffi_load32(iter_base + 32) - index497 = index497 + 1 { + 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) + - index497 * 8 + index567 * 8 - let result495 = mbt_ffi_ptr2str( + let result565 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array496.push(result495) + array566.push(result565) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array499 : Array[String] = [] - for index500 = 0 - index500 < mbt_ffi_load32(iter_base + 40) - index500 = index500 + 1 { + let array569 : Array[String] = [] + for index570 = 0 + index570 < mbt_ffi_load32(iter_base + 40) + index570 = index570 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index500 * 8 + index570 * 8 - let result498 = mbt_ffi_ptr2str( + let result568 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array499.push(result498) + array569.push(result568) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted502 : String? = match + let lifted572 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result501 = mbt_ffi_ptr2str( + let result571 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result501) + Option::Some(result571) } _ => panic() } - let lifted505 : @types.Role? = match + let lifted575 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted504 = match + let lifted574 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result503 = mbt_ffi_ptr2str( + let result573 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result503) + @types.Role::Other(result573) } _ => panic() } - Option::Some(lifted504) + Option::Some(lifted574) } _ => panic() } - array506.push(@types.VariantCaseType::{ - name: result491, - payload: lifted492, + array576.push(@types.VariantCaseType::{ + name: result561, + payload: lifted562, metadata: @types.MetadataEnvelope::{ - doc: lifted494, - aliases: array496, - examples: array499, - deprecated: lifted502, - role: lifted505, + doc: lifted564, + aliases: array566, + examples: array569, + deprecated: lifted572, + role: lifted575, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array506) + @types.SchemaTypeBody::VariantType(array576) } 16 => { - let array509 : Array[String] = [] - for index510 = 0 - index510 < mbt_ffi_load32(iter_base + 12) - index510 = index510 + 1 { + 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) + - index510 * 8 + index580 * 8 - let result508 = mbt_ffi_ptr2str( + let result578 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array509.push(result508) + array579.push(result578) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array509) + @types.SchemaTypeBody::EnumType(array579) } 17 => { - let array512 : Array[String] = [] - for index513 = 0 - index513 < mbt_ffi_load32(iter_base + 12) - index513 = index513 + 1 { + 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) + - index513 * 8 + index583 * 8 - let result511 = mbt_ffi_ptr2str( + let result581 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array512.push(result511) + array582.push(result581) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array512) + @types.SchemaTypeBody::FlagsType(array582) } 18 => { - let array514 : Array[Int] = [] - for index515 = 0 - index515 < mbt_ffi_load32(iter_base + 12) - index515 = index515 + 1 { + 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) + - index515 * 4 + index585 * 4 - array514.push(mbt_ffi_load32(iter_base + 0)) + array584.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array514) + @types.SchemaTypeBody::TupleType(array584) } 19 => @types.SchemaTypeBody::ListType( @@ -5006,14 +5816,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted516 : Int? = match + 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 lifted517 : Int? = match + let lifted587 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -5021,37 +5831,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted516, - err: lifted517, + ok: lifted586, + err: lifted587, }) } 24 => { - let lifted521 : Array[String]? = match + let lifted591 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array519 : Array[String] = [] - for index520 = 0 - index520 < mbt_ffi_load32(iter_base + 16) - index520 = index520 + 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) + - index520 * 8 + index590 * 8 - let result518 = mbt_ffi_ptr2str( + let result588 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array519.push(result518) + array589.push(result588) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array519) + Option::Some(array589) } _ => panic() } - let lifted522 : UInt? = match + let lifted592 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -5061,7 +5871,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted523 : UInt? = match + let lifted593 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -5071,54 +5881,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted525 : String? = match + let lifted595 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result524 = mbt_ffi_ptr2str( + let result594 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result524) + Option::Some(result594) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted521, - min_length: lifted522, - max_length: lifted523, - regex: lifted525, + languages: lifted591, + min_length: lifted592, + max_length: lifted593, + regex: lifted595, }) } 25 => { - let lifted529 : Array[String]? = match + let lifted599 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array527 : Array[String] = [] - for index528 = 0 - index528 < mbt_ffi_load32(iter_base + 16) - index528 = index528 + 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) + - index528 * 8 + index598 * 8 - let result526 = mbt_ffi_ptr2str( + let result596 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array527.push(result526) + array597.push(result596) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array527) + Option::Some(array597) } _ => panic() } - let lifted530 : UInt? = match + let lifted600 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -5128,7 +5938,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted531 : UInt? = match + let lifted601 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -5139,58 +5949,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted529, - min_bytes: lifted530, - max_bytes: lifted531, + mime_types: lifted599, + min_bytes: lifted600, + max_bytes: lifted601, }) } 26 => { - let lifted535 : Array[String]? = match + let lifted605 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array533 : Array[String] = [] - for index534 = 0 - index534 < mbt_ffi_load32(iter_base + 20) - index534 = index534 + 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) + - index534 * 8 + index604 * 8 - let result532 = mbt_ffi_ptr2str( + let result602 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array533.push(result532) + array603.push(result602) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array533) + Option::Some(array603) } _ => panic() } - let lifted539 : Array[String]? = match + let lifted609 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array537 : Array[String] = [] - for index538 = 0 - index538 < mbt_ffi_load32(iter_base + 32) - index538 = index538 + 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) + - index538 * 8 + index608 * 8 - let result536 = mbt_ffi_ptr2str( + let result606 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array537.push(result536) + array607.push(result606) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array537) + Option::Some(array607) } _ => panic() } @@ -5202,95 +6012,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted535, - allowed_extensions: lifted539, + allowed_mime_types: lifted605, + allowed_extensions: lifted609, }) } 27 => { - let lifted543 : Array[String]? = match + let lifted613 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array541 : Array[String] = [] - for index542 = 0 - index542 < mbt_ffi_load32(iter_base + 16) - index542 = index542 + 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) + - index542 * 8 + index612 * 8 - let result540 = mbt_ffi_ptr2str( + let result610 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array541.push(result540) + array611.push(result610) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array541) + Option::Some(array611) } _ => panic() } - let lifted547 : Array[String]? = match + let lifted617 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array545 : Array[String] = [] - for index546 = 0 - index546 < mbt_ffi_load32(iter_base + 28) - index546 = index546 + 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) + - index546 * 8 + index616 * 8 - let result544 = mbt_ffi_ptr2str( + let result614 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array545.push(result544) + array615.push(result614) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array545) + Option::Some(array615) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted543, - allowed_hosts: lifted547, + allowed_schemes: lifted613, + allowed_hosts: lifted617, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result548 = mbt_ffi_ptr2str( + let result618 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array550 : Array[String] = [] - for index551 = 0 - index551 < mbt_ffi_load32(iter_base + 20) - index551 = index551 + 1 { + 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) + - index551 * 8 + index621 * 8 - let result549 = mbt_ffi_ptr2str( + let result619 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array550.push(result549) + array620.push(result619) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted553 : @types.QuantityValue? = match + let lifted623 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result552 = mbt_ffi_ptr2str( + let result622 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -5298,17 +6108,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result552, + unit: result622, }) } _ => panic() } - let lifted555 : @types.QuantityValue? = match + let lifted625 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result554 = mbt_ffi_ptr2str( + let result624 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -5316,401 +6126,401 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result554, + unit: result624, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result548, - allowed_suffixes: array550, - min: lifted553, - max: lifted555, + base_unit: result618, + allowed_suffixes: array620, + min: lifted623, + max: lifted625, }) } 31 => { - let array579 : Array[@types.UnionBranch] = [] - for index580 = 0 - index580 < mbt_ffi_load32(iter_base + 12) - index580 = index580 + 1 { + 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) + - index580 * 92 + index650 * 92 - let result556 = mbt_ffi_ptr2str( + let result626 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted565 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted635 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result557 = mbt_ffi_ptr2str( + let result627 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result557) + @types.DiscriminatorRule::Prefix(result627) } 1 => { - let result558 = mbt_ffi_ptr2str( + let result628 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result558) + @types.DiscriminatorRule::Suffix(result628) } 2 => { - let result559 = mbt_ffi_ptr2str( + let result629 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result559) + @types.DiscriminatorRule::Contains(result629) } 3 => { - let result560 = mbt_ffi_ptr2str( + let result630 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result560) + @types.DiscriminatorRule::Regex(result630) } 4 => { - let result561 = mbt_ffi_ptr2str( + let result631 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted563 : String? = match + let lifted633 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result562 = mbt_ffi_ptr2str( + let result632 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result562) + Option::Some(result632) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result561, - literal: lifted563, + field_name: result631, + literal: lifted633, }) } 5 => { - let result564 = mbt_ffi_ptr2str( + let result634 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result564) + @types.DiscriminatorRule::FieldAbsent(result634) } _ => panic() } - let lifted567 : String? = match + let lifted637 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result566 = mbt_ffi_ptr2str( + let result636 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result566) + Option::Some(result636) } _ => panic() } - let array569 : Array[String] = [] - for index570 = 0 - index570 < mbt_ffi_load32(iter_base + 52) - index570 = index570 + 1 { + 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) + - index570 * 8 + index640 * 8 - let result568 = mbt_ffi_ptr2str( + let result638 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array569.push(result568) + 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 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) + - index573 * 8 + index643 * 8 - let result571 = mbt_ffi_ptr2str( + 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 + let lifted645 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result574 = mbt_ffi_ptr2str( + 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 + let lifted648 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted577 = match + let lifted647 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result576 = mbt_ffi_ptr2str( + 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, + array649.push(@types.UnionBranch::{ + tag: result626, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted565, + discriminator: lifted635, metadata: @types.MetadataEnvelope::{ - doc: lifted567, - aliases: array569, - examples: array572, - deprecated: lifted575, - role: lifted578, + 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, + branches: array649, }) } 32 => { - let lifted582 : String? = match + let lifted652 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result581 = mbt_ffi_ptr2str( + let result651 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result581) + Option::Some(result651) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted582, + category: lifted652, }) } 33 => { - let lifted584 : String? = match + let lifted654 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result583 = mbt_ffi_ptr2str( + 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, + resource_name: lifted654, }) } 34 => { - let lifted585 : Int? = match + let lifted655 : 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(lifted585) + @types.SchemaTypeBody::FutureType(lifted655) } 35 => { - let lifted586 : Int? = match + let lifted656 : 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(lifted586) + @types.SchemaTypeBody::StreamType(lifted656) } _ => panic() } - let lifted589 : String? = match + let lifted659 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result588 = mbt_ffi_ptr2str( + 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( + 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( + 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 + let lifted667 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result596 = mbt_ffi_ptr2str( + 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 + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result598 = mbt_ffi_ptr2str( + 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, + array671.push(@types.SchemaTypeNode::{ + body: lifted657, metadata: @types.MetadataEnvelope::{ - doc: lifted589, - aliases: array591, - examples: array594, - deprecated: lifted597, - role: lifted600, + 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( + 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( + 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, + 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 array637 : Array[@types.SchemaValueNode] = [] - for index638 = 0 - index638 < mbt_ffi_load32(iter_base + 32) - index638 = index638 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + index638 * 32 + let array707 : Array[@types.SchemaValueNode] = [] + for index708 = 0 + index708 < mbt_ffi_load32(iter_base + 32) + index708 = index708 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + index708 * 32 - let lifted636 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted706 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -5762,29 +6572,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result608 = mbt_ffi_ptr2str( + 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 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) + - index610 * 4 + 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 + let lifted681 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -5793,7 +6603,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted611, + payload: lifted681, }) } 15 => @@ -5801,180 +6611,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array612 : Array[Bool] = [] - for index613 = 0 - index613 < mbt_ffi_load32(iter_base + 12) - index613 = 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) + - index613 * 1 + 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 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) + - index615 * 4 + 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 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) + - index617 * 4 + 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 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) + - index619 * 4 + 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 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) + - index621 * 8 + index691 * 8 - array620.push(@types.MapEntry::{ + 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 + let lifted692 : 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(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 + let lifted693 : 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(lifted623) + @types.ResultValuePayload::OkValue(lifted693) } 1 => { - let lifted624 : Int? = match + let lifted694 : 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(lifted624) + @types.ResultValuePayload::ErrValue(lifted694) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted625) + @types.SchemaValueNode::ResultValue(lifted695) } 23 => { - let result626 = mbt_ffi_ptr2str( + let result696 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted628 : String? = match + let lifted698 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result627 = mbt_ffi_ptr2str( + 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, + text: result696, + language: lifted698, }) } 24 => { - let result629 = mbt_ffi_ptr2bytes( + let result699 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted631 : String? = match + let lifted701 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result630 = mbt_ffi_ptr2str( + 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, + bytes: result699, + mime_type: lifted701, }) } 25 => { - let result632 = mbt_ffi_ptr2str( + 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( + 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 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -5986,7 +6796,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result634 = mbt_ffi_ptr2str( + let result704 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -5994,17 +6804,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result634, + unit: result704, }) } 30 => { - let result635 = mbt_ffi_ptr2str( + let result705 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result635, + tag: result705, body: mbt_ffi_load32(iter_base + 16), }) } @@ -6021,20 +6831,20 @@ pub fn enrich_oplog_entries( _ => panic() } - array637.push(lifted636) + array707.push(lifted706) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - array639.push(LocalAgentConfigEntry::{ + array709.push(LocalAgentConfigEntry::{ path: array473, value: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array601, - defs: array606, + type_nodes: array671, + defs: array676, root: mbt_ffi_load32(iter_base + 24), }, value: @types.SchemaValueTree::{ - value_nodes: array637, + value_nodes: array707, root: mbt_ffi_load32(iter_base + 36), }, }, @@ -6042,7 +6852,7 @@ pub fn enrich_oplog_entries( } mbt_ffi_free(mbt_ffi_load32(iter_base + 160)) - let lifted641 : @types.Uuid? = match + let lifted711 : @types.Uuid? = match mbt_ffi_load8_u(iter_base + 168) { 0 => Option::None 1 => @@ -6086,8 +6896,8 @@ pub fn enrich_oplog_entries( 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: array639, - original_phantom_id: lifted641, + local_agent_config: array709, + original_phantom_id: lifted711, 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(), @@ -6095,7 +6905,7 @@ pub fn enrich_oplog_entries( }) } 1 => { - let lifted642 : UInt64? = match mbt_ffi_load8_u(iter_base + 24) { + let lifted712 : UInt64? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => Option::Some( @@ -6104,326 +6914,1136 @@ pub fn enrich_oplog_entries( _ => panic() } - let result643 = mbt_ffi_ptr2str( + let result713 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let lifted808 : @types.TypedSchemaValue? = match + let lifted948 : @types.TypedSchemaValue? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => { - let array770 : Array[@types.SchemaTypeNode] = [] - for index771 = 0 - index771 < mbt_ffi_load32(iter_base + 56) - index771 = index771 + 1 { + let array910 : Array[@types.SchemaTypeNode] = [] + for index911 = 0 + index911 < mbt_ffi_load32(iter_base + 56) + index911 = index911 + 1 { let iter_base = mbt_ffi_load32(iter_base + 52) + - index771 * 144 + index911 * 144 - let lifted756 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted896 = 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 + 2 => { + let lifted720 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted715 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted714 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted714) + } + _ => panic() + } + + let lifted717 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted716 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted716) + } + _ => panic() + } + + let lifted719 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result718 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result718) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted715, + max: lifted717, + unit: lifted719, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted720) + } + 3 => { + let lifted727 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted722 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted721 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted721) + } + _ => panic() + } + + let lifted724 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted723 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted723) + } + _ => panic() + } + + let lifted726 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result725 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result725) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted722, + max: lifted724, + unit: lifted726, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted727) + } + 4 => { + let lifted734 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted729 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted728 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted728) + } + _ => panic() + } + + let lifted731 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted730 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted730) + } + _ => panic() + } + + let lifted733 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result732 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result732) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted729, + max: lifted731, + unit: lifted733, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted734) + } + 5 => { + let lifted741 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted736 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted735 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted735) + } + _ => panic() + } + + let lifted738 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted737 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted737) + } + _ => panic() + } + + let lifted740 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result739 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result739) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted736, + max: lifted738, + unit: lifted740, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted741) + } + 6 => { + let lifted748 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted743 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted742 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted742) + } + _ => panic() + } + + let lifted745 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted744 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted744) + } + _ => panic() + } + + let lifted747 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result746 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result746) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted743, + max: lifted745, + unit: lifted747, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted748) + } + 7 => { + let lifted755 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted750 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted749 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted749) + } + _ => panic() + } + + let lifted752 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted751 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted751) + } + _ => panic() + } + + let lifted754 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result753 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result753) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted750, + max: lifted752, + unit: lifted754, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted755) + } + 8 => { + let lifted762 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted757 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted756 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted756) + } + _ => panic() + } + + let lifted759 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted758 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted758) + } + _ => panic() + } + + let lifted761 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result760 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result760) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted757, + max: lifted759, + unit: lifted761, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted762) + } + 9 => { + let lifted769 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted764 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted763 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted763) + } + _ => panic() + } + + let lifted766 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted765 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted765) + } + _ => panic() + } + + let lifted768 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result767 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result767) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted764, + max: lifted766, + unit: lifted768, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted769) + } + 10 => { + let lifted776 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted771 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted770 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted770) + } + _ => panic() + } + + let lifted773 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted772 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted772) + } + _ => panic() + } + + let lifted775 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result774 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result774) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted771, + max: lifted773, + unit: lifted775, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted776) + } + 11 => { + let lifted783 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted778 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted777 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted777) + } + _ => panic() + } + + let lifted780 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted779 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted779) + } + _ => panic() + } + + let lifted782 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result781 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result781) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted778, + max: lifted780, + unit: lifted782, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted783) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array658 : Array[@types.NamedFieldType] = [] - for index659 = 0 - index659 < mbt_ffi_load32(iter_base + 12) - index659 = index659 + 1 { + let array798 : Array[@types.NamedFieldType] = [] + for index799 = 0 + index799 < mbt_ffi_load32(iter_base + 12) + index799 = index799 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index659 * 68 + index799 * 68 - let result644 = mbt_ffi_ptr2str( + let result784 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted646 : String? = match + let lifted786 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result645 = mbt_ffi_ptr2str( + let result785 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result645) + Option::Some(result785) } _ => panic() } - let array648 : Array[String] = [] - for index649 = 0 - index649 < mbt_ffi_load32(iter_base + 28) - index649 = index649 + 1 { + let array788 : Array[String] = [] + for index789 = 0 + index789 < mbt_ffi_load32(iter_base + 28) + index789 = index789 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index649 * 8 + index789 * 8 - let result647 = mbt_ffi_ptr2str( + let result787 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array648.push(result647) + array788.push(result787) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array651 : Array[String] = [] - for index652 = 0 - index652 < mbt_ffi_load32(iter_base + 36) - index652 = index652 + 1 { + let array791 : Array[String] = [] + for index792 = 0 + index792 < mbt_ffi_load32(iter_base + 36) + index792 = index792 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index652 * 8 + index792 * 8 - let result650 = mbt_ffi_ptr2str( + let result790 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array651.push(result650) + array791.push(result790) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted654 : String? = match + let lifted794 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result653 = mbt_ffi_ptr2str( + let result793 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result653) + Option::Some(result793) } _ => panic() } - let lifted657 : @types.Role? = match + let lifted797 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted656 = match + let lifted796 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result655 = mbt_ffi_ptr2str( + let result795 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result655) + @types.Role::Other(result795) } _ => panic() } - Option::Some(lifted656) + Option::Some(lifted796) } _ => panic() } - array658.push(@types.NamedFieldType::{ - name: result644, + array798.push(@types.NamedFieldType::{ + name: result784, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted646, - aliases: array648, - examples: array651, - deprecated: lifted654, - role: lifted657, + doc: lifted786, + aliases: array788, + examples: array791, + deprecated: lifted794, + role: lifted797, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array658) + @types.SchemaTypeBody::RecordType(array798) } 15 => { - let array675 : Array[@types.VariantCaseType] = [] - for index676 = 0 - index676 < mbt_ffi_load32(iter_base + 12) - index676 = index676 + 1 { + let array815 : Array[@types.VariantCaseType] = [] + for index816 = 0 + index816 < mbt_ffi_load32(iter_base + 12) + index816 = index816 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index676 * 72 + index816 * 72 - let result660 = mbt_ffi_ptr2str( + let result800 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted661 : Int? = match + let lifted801 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted663 : String? = match + let lifted803 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result662 = mbt_ffi_ptr2str( + let result802 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result662) + Option::Some(result802) } _ => panic() } - let array665 : Array[String] = [] - for index666 = 0 - index666 < mbt_ffi_load32(iter_base + 32) - index666 = index666 + 1 { + let array805 : Array[String] = [] + for index806 = 0 + index806 < mbt_ffi_load32(iter_base + 32) + index806 = index806 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index666 * 8 + index806 * 8 - let result664 = mbt_ffi_ptr2str( + let result804 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array665.push(result664) + array805.push(result804) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array668 : Array[String] = [] - for index669 = 0 - index669 < mbt_ffi_load32(iter_base + 40) - index669 = index669 + 1 { + let array808 : Array[String] = [] + for index809 = 0 + index809 < mbt_ffi_load32(iter_base + 40) + index809 = index809 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index669 * 8 + index809 * 8 - let result667 = mbt_ffi_ptr2str( + let result807 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array668.push(result667) + array808.push(result807) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted671 : String? = match + let lifted811 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result670 = mbt_ffi_ptr2str( + let result810 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result670) + Option::Some(result810) } _ => panic() } - let lifted674 : @types.Role? = match + let lifted814 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted673 = match + let lifted813 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result672 = mbt_ffi_ptr2str( + let result812 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result672) + @types.Role::Other(result812) } _ => panic() } - Option::Some(lifted673) + Option::Some(lifted813) } _ => panic() } - array675.push(@types.VariantCaseType::{ - name: result660, - payload: lifted661, + array815.push(@types.VariantCaseType::{ + name: result800, + payload: lifted801, metadata: @types.MetadataEnvelope::{ - doc: lifted663, - aliases: array665, - examples: array668, - deprecated: lifted671, - role: lifted674, + doc: lifted803, + aliases: array805, + examples: array808, + deprecated: lifted811, + role: lifted814, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array675) + @types.SchemaTypeBody::VariantType(array815) } 16 => { - let array678 : Array[String] = [] - for index679 = 0 - index679 < mbt_ffi_load32(iter_base + 12) - index679 = index679 + 1 { + let array818 : Array[String] = [] + for index819 = 0 + index819 < mbt_ffi_load32(iter_base + 12) + index819 = index819 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index679 * 8 + index819 * 8 - let result677 = mbt_ffi_ptr2str( + let result817 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array678.push(result677) + array818.push(result817) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array678) + @types.SchemaTypeBody::EnumType(array818) } 17 => { - let array681 : Array[String] = [] - for index682 = 0 - index682 < mbt_ffi_load32(iter_base + 12) - index682 = index682 + 1 { + let array821 : Array[String] = [] + for index822 = 0 + index822 < mbt_ffi_load32(iter_base + 12) + index822 = index822 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index682 * 8 + index822 * 8 - let result680 = mbt_ffi_ptr2str( + let result820 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array681.push(result680) + array821.push(result820) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array681) + @types.SchemaTypeBody::FlagsType(array821) } 18 => { - let array683 : Array[Int] = [] - for index684 = 0 - index684 < mbt_ffi_load32(iter_base + 12) - index684 = index684 + 1 { + let array823 : Array[Int] = [] + for index824 = 0 + index824 < mbt_ffi_load32(iter_base + 12) + index824 = index824 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index684 * 4 + index824 * 4 - array683.push(mbt_ffi_load32(iter_base + 0)) + array823.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array683) + @types.SchemaTypeBody::TupleType(array823) } 19 => @types.SchemaTypeBody::ListType( @@ -6444,14 +8064,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted685 : Int? = match + let lifted825 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted686 : Int? = match + let lifted826 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -6459,37 +8079,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted685, - err: lifted686, + ok: lifted825, + err: lifted826, }) } 24 => { - let lifted690 : Array[String]? = match + let lifted830 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array688 : Array[String] = [] - for index689 = 0 - index689 < mbt_ffi_load32(iter_base + 16) - index689 = index689 + 1 { + let array828 : Array[String] = [] + for index829 = 0 + index829 < mbt_ffi_load32(iter_base + 16) + index829 = index829 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index689 * 8 + index829 * 8 - let result687 = mbt_ffi_ptr2str( + let result827 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array688.push(result687) + array828.push(result827) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array688) + Option::Some(array828) } _ => panic() } - let lifted691 : UInt? = match + let lifted831 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -6499,7 +8119,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted692 : UInt? = match + let lifted832 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -6509,54 +8129,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted694 : String? = match + let lifted834 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result693 = mbt_ffi_ptr2str( + let result833 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result693) + Option::Some(result833) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted690, - min_length: lifted691, - max_length: lifted692, - regex: lifted694, + languages: lifted830, + min_length: lifted831, + max_length: lifted832, + regex: lifted834, }) } 25 => { - let lifted698 : Array[String]? = match + let lifted838 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array696 : Array[String] = [] - for index697 = 0 - index697 < mbt_ffi_load32(iter_base + 16) - index697 = index697 + 1 { + let array836 : Array[String] = [] + for index837 = 0 + index837 < mbt_ffi_load32(iter_base + 16) + index837 = index837 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index697 * 8 + index837 * 8 - let result695 = mbt_ffi_ptr2str( + let result835 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array696.push(result695) + array836.push(result835) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array696) + Option::Some(array836) } _ => panic() } - let lifted699 : UInt? = match + let lifted839 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -6566,7 +8186,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted700 : UInt? = match + let lifted840 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -6577,58 +8197,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted698, - min_bytes: lifted699, - max_bytes: lifted700, + mime_types: lifted838, + min_bytes: lifted839, + max_bytes: lifted840, }) } 26 => { - let lifted704 : Array[String]? = match + let lifted844 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array702 : Array[String] = [] - for index703 = 0 - index703 < mbt_ffi_load32(iter_base + 20) - index703 = index703 + 1 { + let array842 : Array[String] = [] + for index843 = 0 + index843 < mbt_ffi_load32(iter_base + 20) + index843 = index843 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index703 * 8 + index843 * 8 - let result701 = mbt_ffi_ptr2str( + let result841 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array702.push(result701) + array842.push(result841) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array702) + Option::Some(array842) } _ => panic() } - let lifted708 : Array[String]? = match + let lifted848 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array706 : Array[String] = [] - for index707 = 0 - index707 < mbt_ffi_load32(iter_base + 32) - index707 = index707 + 1 { + let array846 : Array[String] = [] + for index847 = 0 + index847 < mbt_ffi_load32(iter_base + 32) + index847 = index847 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index707 * 8 + index847 * 8 - let result705 = mbt_ffi_ptr2str( + let result845 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array706.push(result705) + array846.push(result845) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array706) + Option::Some(array846) } _ => panic() } @@ -6640,95 +8260,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted704, - allowed_extensions: lifted708, + allowed_mime_types: lifted844, + allowed_extensions: lifted848, }) } 27 => { - let lifted712 : Array[String]? = match + let lifted852 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array710 : Array[String] = [] - for index711 = 0 - index711 < mbt_ffi_load32(iter_base + 16) - index711 = index711 + 1 { + let array850 : Array[String] = [] + for index851 = 0 + index851 < mbt_ffi_load32(iter_base + 16) + index851 = index851 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index711 * 8 + index851 * 8 - let result709 = mbt_ffi_ptr2str( + let result849 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array710.push(result709) + array850.push(result849) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array710) + Option::Some(array850) } _ => panic() } - let lifted716 : Array[String]? = match + let lifted856 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array714 : Array[String] = [] - for index715 = 0 - index715 < mbt_ffi_load32(iter_base + 28) - index715 = index715 + 1 { + let array854 : Array[String] = [] + for index855 = 0 + index855 < mbt_ffi_load32(iter_base + 28) + index855 = index855 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index715 * 8 + index855 * 8 - let result713 = mbt_ffi_ptr2str( + let result853 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array714.push(result713) + array854.push(result853) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array714) + Option::Some(array854) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted712, - allowed_hosts: lifted716, + allowed_schemes: lifted852, + allowed_hosts: lifted856, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result717 = mbt_ffi_ptr2str( + let result857 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array719 : Array[String] = [] - for index720 = 0 - index720 < mbt_ffi_load32(iter_base + 20) - index720 = index720 + 1 { + let array859 : Array[String] = [] + for index860 = 0 + index860 < mbt_ffi_load32(iter_base + 20) + index860 = index860 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index720 * 8 + index860 * 8 - let result718 = mbt_ffi_ptr2str( + let result858 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array719.push(result718) + array859.push(result858) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted722 : @types.QuantityValue? = match + let lifted862 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result721 = mbt_ffi_ptr2str( + let result861 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -6736,17 +8356,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result721, + unit: result861, }) } _ => panic() } - let lifted724 : @types.QuantityValue? = match + let lifted864 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result723 = mbt_ffi_ptr2str( + let result863 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -6754,404 +8374,404 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result723, + unit: result863, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result717, - allowed_suffixes: array719, - min: lifted722, - max: lifted724, + base_unit: result857, + allowed_suffixes: array859, + min: lifted862, + max: lifted864, }) } 31 => { - let array748 : Array[@types.UnionBranch] = [] - for index749 = 0 - index749 < mbt_ffi_load32(iter_base + 12) - index749 = index749 + 1 { + let array888 : Array[@types.UnionBranch] = [] + for index889 = 0 + index889 < mbt_ffi_load32(iter_base + 12) + index889 = index889 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index749 * 92 + index889 * 92 - let result725 = mbt_ffi_ptr2str( + let result865 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted734 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted874 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result726 = mbt_ffi_ptr2str( + let result866 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result726) + @types.DiscriminatorRule::Prefix(result866) } 1 => { - let result727 = mbt_ffi_ptr2str( + let result867 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result727) + @types.DiscriminatorRule::Suffix(result867) } 2 => { - let result728 = mbt_ffi_ptr2str( + let result868 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result728) + @types.DiscriminatorRule::Contains(result868) } 3 => { - let result729 = mbt_ffi_ptr2str( + let result869 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result729) + @types.DiscriminatorRule::Regex(result869) } 4 => { - let result730 = mbt_ffi_ptr2str( + let result870 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted732 : String? = match + let lifted872 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result731 = mbt_ffi_ptr2str( + let result871 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result731) + Option::Some(result871) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result730, - literal: lifted732, + field_name: result870, + literal: lifted872, }) } 5 => { - let result733 = mbt_ffi_ptr2str( + let result873 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result733) + @types.DiscriminatorRule::FieldAbsent(result873) } _ => panic() } - let lifted736 : String? = match + let lifted876 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result735 = mbt_ffi_ptr2str( + let result875 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result735) + Option::Some(result875) } _ => panic() } - let array738 : Array[String] = [] - for index739 = 0 - index739 < mbt_ffi_load32(iter_base + 52) - index739 = index739 + 1 { + let array878 : Array[String] = [] + for index879 = 0 + index879 < mbt_ffi_load32(iter_base + 52) + index879 = index879 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index739 * 8 + index879 * 8 - let result737 = mbt_ffi_ptr2str( + let result877 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array738.push(result737) + array878.push(result877) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array741 : Array[String] = [] - for index742 = 0 - index742 < mbt_ffi_load32(iter_base + 60) - index742 = index742 + 1 { + let array881 : Array[String] = [] + for index882 = 0 + index882 < mbt_ffi_load32(iter_base + 60) + index882 = index882 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index742 * 8 + index882 * 8 - let result740 = mbt_ffi_ptr2str( + let result880 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array741.push(result740) + array881.push(result880) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted744 : String? = match + let lifted884 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result743 = mbt_ffi_ptr2str( + let result883 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result743) + Option::Some(result883) } _ => panic() } - let lifted747 : @types.Role? = match + let lifted887 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted746 = match + let lifted886 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result745 = mbt_ffi_ptr2str( + let result885 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result745) + @types.Role::Other(result885) } _ => panic() } - Option::Some(lifted746) + Option::Some(lifted886) } _ => panic() } - array748.push(@types.UnionBranch::{ - tag: result725, + array888.push(@types.UnionBranch::{ + tag: result865, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted734, + discriminator: lifted874, metadata: @types.MetadataEnvelope::{ - doc: lifted736, - aliases: array738, - examples: array741, - deprecated: lifted744, - role: lifted747, + doc: lifted876, + aliases: array878, + examples: array881, + deprecated: lifted884, + role: lifted887, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array748, + branches: array888, }) } 32 => { - let lifted751 : String? = match + let lifted891 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result750 = mbt_ffi_ptr2str( + let result890 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result750) + Option::Some(result890) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted751, + category: lifted891, }) } 33 => { - let lifted753 : String? = match + let lifted893 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result752 = mbt_ffi_ptr2str( + let result892 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result752) + Option::Some(result892) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted753, + resource_name: lifted893, }) } 34 => { - let lifted754 : Int? = match + let lifted894 : 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(lifted754) + @types.SchemaTypeBody::FutureType(lifted894) } 35 => { - let lifted755 : Int? = match + let lifted895 : 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(lifted755) + @types.SchemaTypeBody::StreamType(lifted895) } _ => panic() } - let lifted758 : String? = match + let lifted898 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result757 = mbt_ffi_ptr2str( + let result897 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result757) + Option::Some(result897) } _ => panic() } - let array760 : Array[String] = [] - for index761 = 0 - index761 < mbt_ffi_load32(iter_base + 104) - index761 = index761 + 1 { + let array900 : Array[String] = [] + for index901 = 0 + index901 < mbt_ffi_load32(iter_base + 104) + index901 = index901 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index761 * 8 + index901 * 8 - let result759 = mbt_ffi_ptr2str( + let result899 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array760.push(result759) + array900.push(result899) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array763 : Array[String] = [] - for index764 = 0 - index764 < mbt_ffi_load32(iter_base + 112) - index764 = index764 + 1 { + let array903 : Array[String] = [] + for index904 = 0 + index904 < mbt_ffi_load32(iter_base + 112) + index904 = index904 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index764 * 8 + index904 * 8 - let result762 = mbt_ffi_ptr2str( + let result902 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array763.push(result762) + array903.push(result902) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted766 : String? = match + let lifted906 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result765 = mbt_ffi_ptr2str( + let result905 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result765) + Option::Some(result905) } _ => panic() } - let lifted769 : @types.Role? = match + let lifted909 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted768 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted908 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result767 = mbt_ffi_ptr2str( + let result907 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result767) + @types.Role::Other(result907) } _ => panic() } - Option::Some(lifted768) + Option::Some(lifted908) } _ => panic() } - array770.push(@types.SchemaTypeNode::{ - body: lifted756, + array910.push(@types.SchemaTypeNode::{ + body: lifted896, metadata: @types.MetadataEnvelope::{ - doc: lifted758, - aliases: array760, - examples: array763, - deprecated: lifted766, - role: lifted769, + doc: lifted898, + aliases: array900, + examples: array903, + deprecated: lifted906, + role: lifted909, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 52)) - let array775 : Array[@types.SchemaTypeDef] = [] - for index776 = 0 - index776 < mbt_ffi_load32(iter_base + 64) - index776 = index776 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 60) + index776 * 24 + let array915 : Array[@types.SchemaTypeDef] = [] + for index916 = 0 + index916 < mbt_ffi_load32(iter_base + 64) + index916 = index916 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 60) + index916 * 24 - let result772 = mbt_ffi_ptr2str( + let result912 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted774 : String? = match + let lifted914 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result773 = mbt_ffi_ptr2str( + let result913 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result773) + Option::Some(result913) } _ => panic() } - array775.push(@types.SchemaTypeDef::{ - id: result772, - name: lifted774, + array915.push(@types.SchemaTypeDef::{ + id: result912, + name: lifted914, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) - let array806 : Array[@types.SchemaValueNode] = [] - for index807 = 0 - index807 < mbt_ffi_load32(iter_base + 76) - index807 = index807 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 72) + index807 * 32 + let array946 : Array[@types.SchemaValueNode] = [] + for index947 = 0 + index947 < mbt_ffi_load32(iter_base + 76) + index947 = index947 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 72) + index947 * 32 - let lifted805 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted945 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -7203,29 +8823,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result777 = mbt_ffi_ptr2str( + let result917 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result777) + @types.SchemaValueNode::StringValue(result917) } 13 => { - let array778 : Array[Int] = [] - for index779 = 0 - index779 < mbt_ffi_load32(iter_base + 12) - index779 = index779 + 1 { + let array918 : Array[Int] = [] + for index919 = 0 + index919 < mbt_ffi_load32(iter_base + 12) + index919 = index919 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index779 * 4 + index919 * 4 - array778.push(mbt_ffi_load32(iter_base + 0)) + array918.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array778) + @types.SchemaValueNode::RecordValue(array918) } 14 => { - let lifted780 : Int? = match + let lifted920 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -7234,7 +8854,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted780, + payload: lifted920, }) } 15 => @@ -7242,180 +8862,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array781 : Array[Bool] = [] - for index782 = 0 - index782 < mbt_ffi_load32(iter_base + 12) - index782 = index782 + 1 { + let array921 : Array[Bool] = [] + for index922 = 0 + index922 < mbt_ffi_load32(iter_base + 12) + index922 = index922 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index782 * 1 + index922 * 1 - array781.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array921.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array781) + @types.SchemaValueNode::FlagsValue(array921) } 17 => { - let array783 : Array[Int] = [] - for index784 = 0 - index784 < mbt_ffi_load32(iter_base + 12) - index784 = index784 + 1 { + let array923 : Array[Int] = [] + for index924 = 0 + index924 < mbt_ffi_load32(iter_base + 12) + index924 = index924 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index784 * 4 + index924 * 4 - array783.push(mbt_ffi_load32(iter_base + 0)) + array923.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array783) + @types.SchemaValueNode::TupleValue(array923) } 18 => { - let array785 : Array[Int] = [] - for index786 = 0 - index786 < mbt_ffi_load32(iter_base + 12) - index786 = index786 + 1 { + let array925 : Array[Int] = [] + for index926 = 0 + index926 < mbt_ffi_load32(iter_base + 12) + index926 = index926 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index786 * 4 + index926 * 4 - array785.push(mbt_ffi_load32(iter_base + 0)) + array925.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array785) + @types.SchemaValueNode::ListValue(array925) } 19 => { - let array787 : Array[Int] = [] - for index788 = 0 - index788 < mbt_ffi_load32(iter_base + 12) - index788 = index788 + 1 { + let array927 : Array[Int] = [] + for index928 = 0 + index928 < mbt_ffi_load32(iter_base + 12) + index928 = index928 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index788 * 4 + index928 * 4 - array787.push(mbt_ffi_load32(iter_base + 0)) + array927.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array787) + @types.SchemaValueNode::FixedListValue(array927) } 20 => { - let array789 : Array[@types.MapEntry] = [] - for index790 = 0 - index790 < mbt_ffi_load32(iter_base + 12) - index790 = index790 + 1 { + let array929 : Array[@types.MapEntry] = [] + for index930 = 0 + index930 < mbt_ffi_load32(iter_base + 12) + index930 = index930 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index790 * 8 + index930 * 8 - array789.push(@types.MapEntry::{ + array929.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(array789) + @types.SchemaValueNode::MapValue(array929) } 21 => { - let lifted791 : Int? = match + let lifted931 : 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(lifted791) + @types.SchemaValueNode::OptionValue(lifted931) } 22 => { - let lifted794 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted934 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted792 : Int? = match + let lifted932 : 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(lifted792) + @types.ResultValuePayload::OkValue(lifted932) } 1 => { - let lifted793 : Int? = match + let lifted933 : 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(lifted793) + @types.ResultValuePayload::ErrValue(lifted933) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted794) + @types.SchemaValueNode::ResultValue(lifted934) } 23 => { - let result795 = mbt_ffi_ptr2str( + let result935 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted797 : String? = match + let lifted937 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result796 = mbt_ffi_ptr2str( + let result936 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result796) + Option::Some(result936) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result795, - language: lifted797, + text: result935, + language: lifted937, }) } 24 => { - let result798 = mbt_ffi_ptr2bytes( + let result938 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted800 : String? = match + let lifted940 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result799 = mbt_ffi_ptr2str( + let result939 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result799) + Option::Some(result939) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result798, - mime_type: lifted800, + bytes: result938, + mime_type: lifted940, }) } 25 => { - let result801 = mbt_ffi_ptr2str( + let result941 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result801) + @types.SchemaValueNode::PathValue(result941) } 26 => { - let result802 = mbt_ffi_ptr2str( + let result942 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result802) + @types.SchemaValueNode::UrlValue(result942) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -7427,7 +9047,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result803 = mbt_ffi_ptr2str( + let result943 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -7435,17 +9055,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result803, + unit: result943, }) } 30 => { - let result804 = mbt_ffi_ptr2str( + let result944 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result804, + tag: result944, body: mbt_ffi_load32(iter_base + 16), }) } @@ -7462,18 +9082,18 @@ pub fn enrich_oplog_entries( _ => panic() } - array806.push(lifted805) + array946.push(lifted945) } mbt_ffi_free(mbt_ffi_load32(iter_base + 72)) Option::Some(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array770, - defs: array775, + type_nodes: array910, + defs: array915, root: mbt_ffi_load32(iter_base + 68), }, value: @types.SchemaValueTree::{ - value_nodes: array806, + value_nodes: array946, root: mbt_ffi_load32(iter_base + 80), }, }) @@ -7481,13 +9101,13 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted811 = match mbt_ffi_load8_u(iter_base + 88) { + let lifted951 = match mbt_ffi_load8_u(iter_base + 88) { 0 => WrappedFunctionType::ReadLocal 1 => WrappedFunctionType::WriteLocal 2 => WrappedFunctionType::ReadRemote 3 => WrappedFunctionType::WriteRemote 4 => { - let lifted809 : UInt64? = match + let lifted949 : UInt64? = match mbt_ffi_load8_u(iter_base + 96) { 0 => Option::None 1 => @@ -7497,10 +9117,10 @@ pub fn enrich_oplog_entries( _ => panic() } - WrappedFunctionType::WriteRemoteBatched(lifted809) + WrappedFunctionType::WriteRemoteBatched(lifted949) } 5 => { - let lifted810 : UInt64? = match + let lifted950 : UInt64? = match mbt_ffi_load8_u(iter_base + 96) { 0 => Option::None 1 => @@ -7510,7 +9130,7 @@ pub fn enrich_oplog_entries( _ => panic() } - WrappedFunctionType::WriteRemoteTransaction(lifted810) + WrappedFunctionType::WriteRemoteTransaction(lifted950) } _ => panic() } @@ -7520,328 +9140,1138 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - parent_start_index: lifted642, - function_name: result643, - request: lifted808, - durable_function_type: lifted811, + parent_start_index: lifted712, + function_name: result713, + request: lifted948, + durable_function_type: lifted951, }) } 2 => { - let lifted976 : @types.TypedSchemaValue? = match + let lifted1186 : @types.TypedSchemaValue? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let array938 : Array[@types.SchemaTypeNode] = [] - for index939 = 0 - index939 < mbt_ffi_load32(iter_base + 40) - index939 = index939 + 1 { + let array1148 : Array[@types.SchemaTypeNode] = [] + for index1149 = 0 + index1149 < mbt_ffi_load32(iter_base + 40) + index1149 = index1149 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index939 * 144 + index1149 * 144 - let lifted924 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1134 = 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 + 2 => { + let lifted958 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted953 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted952 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted952) + } + _ => panic() + } + + let lifted955 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted954 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted954) + } + _ => panic() + } + + let lifted957 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result956 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result956) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted953, + max: lifted955, + unit: lifted957, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted958) + } + 3 => { + let lifted965 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted960 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted959 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted959) + } + _ => panic() + } + + let lifted962 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted961 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted961) + } + _ => panic() + } + + let lifted964 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result963 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result963) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted960, + max: lifted962, + unit: lifted964, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted965) + } + 4 => { + 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::S32Type(lifted972) + } + 5 => { + 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::S64Type(lifted979) + } + 6 => { + 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::U8Type(lifted986) + } + 7 => { + 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::U16Type(lifted993) + } + 8 => { + 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::U32Type(lifted1000) + } + 9 => { + 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::U64Type(lifted1007) + } + 10 => { + 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::F32Type(lifted1014) + } + 11 => { + 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::F64Type(lifted1021) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array826 : Array[@types.NamedFieldType] = [] - for index827 = 0 - index827 < mbt_ffi_load32(iter_base + 12) - index827 = index827 + 1 { + let array1036 : Array[@types.NamedFieldType] = [] + for index1037 = 0 + index1037 < mbt_ffi_load32(iter_base + 12) + index1037 = index1037 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index827 * 68 + index1037 * 68 - let result812 = mbt_ffi_ptr2str( + let result1022 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted814 : String? = match + let lifted1024 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result813 = mbt_ffi_ptr2str( + let result1023 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result813) + Option::Some(result1023) } _ => panic() } - let array816 : Array[String] = [] - for index817 = 0 - index817 < mbt_ffi_load32(iter_base + 28) - index817 = index817 + 1 { + let array1026 : Array[String] = [] + for index1027 = 0 + index1027 < mbt_ffi_load32(iter_base + 28) + index1027 = index1027 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index817 * 8 + index1027 * 8 - let result815 = mbt_ffi_ptr2str( + let result1025 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array816.push(result815) + array1026.push(result1025) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array819 : Array[String] = [] - for index820 = 0 - index820 < mbt_ffi_load32(iter_base + 36) - index820 = index820 + 1 { + let array1029 : Array[String] = [] + for index1030 = 0 + index1030 < mbt_ffi_load32(iter_base + 36) + index1030 = index1030 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index820 * 8 + index1030 * 8 - let result818 = mbt_ffi_ptr2str( + let result1028 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array819.push(result818) + array1029.push(result1028) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted822 : String? = match + let lifted1032 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result821 = mbt_ffi_ptr2str( + let result1031 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result821) + Option::Some(result1031) } _ => panic() } - let lifted825 : @types.Role? = match + let lifted1035 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted824 = match + let lifted1034 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result823 = mbt_ffi_ptr2str( + let result1033 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result823) + @types.Role::Other(result1033) } _ => panic() } - Option::Some(lifted824) + Option::Some(lifted1034) } _ => panic() } - array826.push(@types.NamedFieldType::{ - name: result812, + array1036.push(@types.NamedFieldType::{ + name: result1022, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted814, - aliases: array816, - examples: array819, - deprecated: lifted822, - role: lifted825, + doc: lifted1024, + aliases: array1026, + examples: array1029, + deprecated: lifted1032, + role: lifted1035, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array826) + @types.SchemaTypeBody::RecordType(array1036) } 15 => { - let array843 : Array[@types.VariantCaseType] = [] - for index844 = 0 - index844 < mbt_ffi_load32(iter_base + 12) - index844 = index844 + 1 { + let array1053 : Array[@types.VariantCaseType] = [] + for index1054 = 0 + index1054 < mbt_ffi_load32(iter_base + 12) + index1054 = index1054 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index844 * 72 + index1054 * 72 - let result828 = mbt_ffi_ptr2str( + let result1038 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted829 : Int? = match + let lifted1039 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted831 : String? = match + let lifted1041 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result830 = mbt_ffi_ptr2str( + let result1040 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result830) + Option::Some(result1040) } _ => panic() } - let array833 : Array[String] = [] - for index834 = 0 - index834 < mbt_ffi_load32(iter_base + 32) - index834 = index834 + 1 { + let array1043 : Array[String] = [] + for index1044 = 0 + index1044 < mbt_ffi_load32(iter_base + 32) + index1044 = index1044 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index834 * 8 + index1044 * 8 - let result832 = mbt_ffi_ptr2str( + let result1042 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array833.push(result832) + array1043.push(result1042) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array836 : Array[String] = [] - for index837 = 0 - index837 < mbt_ffi_load32(iter_base + 40) - index837 = index837 + 1 { + let array1046 : Array[String] = [] + for index1047 = 0 + index1047 < mbt_ffi_load32(iter_base + 40) + index1047 = index1047 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index837 * 8 + index1047 * 8 - let result835 = mbt_ffi_ptr2str( + let result1045 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array836.push(result835) + array1046.push(result1045) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted839 : String? = match + let lifted1049 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result838 = mbt_ffi_ptr2str( + let result1048 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result838) + Option::Some(result1048) } _ => panic() } - let lifted842 : @types.Role? = match + let lifted1052 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted841 = match + let lifted1051 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result840 = mbt_ffi_ptr2str( + let result1050 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result840) + @types.Role::Other(result1050) } _ => panic() } - Option::Some(lifted841) + Option::Some(lifted1051) } _ => panic() } - array843.push(@types.VariantCaseType::{ - name: result828, - payload: lifted829, + array1053.push(@types.VariantCaseType::{ + name: result1038, + payload: lifted1039, metadata: @types.MetadataEnvelope::{ - doc: lifted831, - aliases: array833, - examples: array836, - deprecated: lifted839, - role: lifted842, + doc: lifted1041, + aliases: array1043, + examples: array1046, + deprecated: lifted1049, + role: lifted1052, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array843) + @types.SchemaTypeBody::VariantType(array1053) } 16 => { - let array846 : Array[String] = [] - for index847 = 0 - index847 < mbt_ffi_load32(iter_base + 12) - index847 = index847 + 1 { + let array1056 : Array[String] = [] + for index1057 = 0 + index1057 < mbt_ffi_load32(iter_base + 12) + index1057 = index1057 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index847 * 8 + index1057 * 8 - let result845 = mbt_ffi_ptr2str( + let result1055 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array846.push(result845) + array1056.push(result1055) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array846) + @types.SchemaTypeBody::EnumType(array1056) } 17 => { - let array849 : Array[String] = [] - for index850 = 0 - index850 < mbt_ffi_load32(iter_base + 12) - index850 = index850 + 1 { + let array1059 : Array[String] = [] + for index1060 = 0 + index1060 < mbt_ffi_load32(iter_base + 12) + index1060 = index1060 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index850 * 8 + index1060 * 8 - let result848 = mbt_ffi_ptr2str( + let result1058 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array849.push(result848) + array1059.push(result1058) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array849) + @types.SchemaTypeBody::FlagsType(array1059) } 18 => { - let array851 : Array[Int] = [] - for index852 = 0 - index852 < mbt_ffi_load32(iter_base + 12) - index852 = index852 + 1 { + let array1061 : Array[Int] = [] + for index1062 = 0 + index1062 < mbt_ffi_load32(iter_base + 12) + index1062 = index1062 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index852 * 4 + index1062 * 4 - array851.push(mbt_ffi_load32(iter_base + 0)) + array1061.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array851) + @types.SchemaTypeBody::TupleType(array1061) } 19 => @types.SchemaTypeBody::ListType( @@ -7862,14 +10292,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted853 : Int? = match + let lifted1063 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted854 : Int? = match + let lifted1064 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -7877,37 +10307,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted853, - err: lifted854, + ok: lifted1063, + err: lifted1064, }) } 24 => { - let lifted858 : Array[String]? = match + let lifted1068 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array856 : Array[String] = [] - for index857 = 0 - index857 < mbt_ffi_load32(iter_base + 16) - index857 = index857 + 1 { + let array1066 : Array[String] = [] + for index1067 = 0 + index1067 < mbt_ffi_load32(iter_base + 16) + index1067 = index1067 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index857 * 8 + index1067 * 8 - let result855 = mbt_ffi_ptr2str( + let result1065 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array856.push(result855) + array1066.push(result1065) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array856) + Option::Some(array1066) } _ => panic() } - let lifted859 : UInt? = match + let lifted1069 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -7917,7 +10347,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted860 : UInt? = match + let lifted1070 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -7927,54 +10357,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted862 : String? = match + let lifted1072 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result861 = mbt_ffi_ptr2str( + let result1071 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result861) + Option::Some(result1071) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted858, - min_length: lifted859, - max_length: lifted860, - regex: lifted862, + languages: lifted1068, + min_length: lifted1069, + max_length: lifted1070, + regex: lifted1072, }) } 25 => { - let lifted866 : Array[String]? = match + let lifted1076 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array864 : Array[String] = [] - for index865 = 0 - index865 < mbt_ffi_load32(iter_base + 16) - index865 = index865 + 1 { + let array1074 : Array[String] = [] + for index1075 = 0 + index1075 < mbt_ffi_load32(iter_base + 16) + index1075 = index1075 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index865 * 8 + index1075 * 8 - let result863 = mbt_ffi_ptr2str( + let result1073 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array864.push(result863) + array1074.push(result1073) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array864) + Option::Some(array1074) } _ => panic() } - let lifted867 : UInt? = match + let lifted1077 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -7984,7 +10414,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted868 : UInt? = match + let lifted1078 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -7995,58 +10425,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted866, - min_bytes: lifted867, - max_bytes: lifted868, + mime_types: lifted1076, + min_bytes: lifted1077, + max_bytes: lifted1078, }) } 26 => { - let lifted872 : Array[String]? = match + let lifted1082 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array870 : Array[String] = [] - for index871 = 0 - index871 < mbt_ffi_load32(iter_base + 20) - index871 = index871 + 1 { + let array1080 : Array[String] = [] + for index1081 = 0 + index1081 < mbt_ffi_load32(iter_base + 20) + index1081 = index1081 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index871 * 8 + index1081 * 8 - let result869 = mbt_ffi_ptr2str( + let result1079 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array870.push(result869) + array1080.push(result1079) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array870) + Option::Some(array1080) } _ => panic() } - let lifted876 : Array[String]? = match + let lifted1086 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array874 : Array[String] = [] - for index875 = 0 - index875 < mbt_ffi_load32(iter_base + 32) - index875 = index875 + 1 { + let array1084 : Array[String] = [] + for index1085 = 0 + index1085 < mbt_ffi_load32(iter_base + 32) + index1085 = index1085 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index875 * 8 + index1085 * 8 - let result873 = mbt_ffi_ptr2str( + let result1083 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array874.push(result873) + array1084.push(result1083) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array874) + Option::Some(array1084) } _ => panic() } @@ -8058,95 +10488,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted872, - allowed_extensions: lifted876, + allowed_mime_types: lifted1082, + allowed_extensions: lifted1086, }) } 27 => { - let lifted880 : Array[String]? = match + let lifted1090 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array878 : Array[String] = [] - for index879 = 0 - index879 < mbt_ffi_load32(iter_base + 16) - index879 = index879 + 1 { + 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) + - index879 * 8 + index1089 * 8 - let result877 = mbt_ffi_ptr2str( + let result1087 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array878.push(result877) + array1088.push(result1087) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array878) + Option::Some(array1088) } _ => panic() } - let lifted884 : Array[String]? = match + let lifted1094 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array882 : Array[String] = [] - for index883 = 0 - index883 < mbt_ffi_load32(iter_base + 28) - index883 = index883 + 1 { + let array1092 : Array[String] = [] + for index1093 = 0 + index1093 < mbt_ffi_load32(iter_base + 28) + index1093 = index1093 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index883 * 8 + index1093 * 8 - let result881 = mbt_ffi_ptr2str( + let result1091 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array882.push(result881) + array1092.push(result1091) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array882) + Option::Some(array1092) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted880, - allowed_hosts: lifted884, + allowed_schemes: lifted1090, + allowed_hosts: lifted1094, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result885 = mbt_ffi_ptr2str( + let result1095 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array887 : Array[String] = [] - for index888 = 0 - index888 < mbt_ffi_load32(iter_base + 20) - index888 = index888 + 1 { + let array1097 : Array[String] = [] + for index1098 = 0 + index1098 < mbt_ffi_load32(iter_base + 20) + index1098 = index1098 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index888 * 8 + index1098 * 8 - let result886 = mbt_ffi_ptr2str( + let result1096 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array887.push(result886) + array1097.push(result1096) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted890 : @types.QuantityValue? = match + let lifted1100 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result889 = mbt_ffi_ptr2str( + let result1099 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -8154,17 +10584,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result889, + unit: result1099, }) } _ => panic() } - let lifted892 : @types.QuantityValue? = match + let lifted1102 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result891 = mbt_ffi_ptr2str( + let result1101 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -8172,404 +10602,406 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result891, + unit: result1101, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result885, - allowed_suffixes: array887, - min: lifted890, - max: lifted892, + base_unit: result1095, + allowed_suffixes: array1097, + min: lifted1100, + max: lifted1102, }) } 31 => { - let array916 : Array[@types.UnionBranch] = [] - for index917 = 0 - index917 < mbt_ffi_load32(iter_base + 12) - index917 = index917 + 1 { + let array1126 : Array[@types.UnionBranch] = [] + for index1127 = 0 + index1127 < mbt_ffi_load32(iter_base + 12) + index1127 = index1127 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index917 * 92 + index1127 * 92 - let result893 = mbt_ffi_ptr2str( + let result1103 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted902 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1112 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result894 = mbt_ffi_ptr2str( + let result1104 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result894) + @types.DiscriminatorRule::Prefix(result1104) } 1 => { - let result895 = mbt_ffi_ptr2str( + let result1105 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result895) + @types.DiscriminatorRule::Suffix(result1105) } 2 => { - let result896 = mbt_ffi_ptr2str( + let result1106 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result896) + @types.DiscriminatorRule::Contains(result1106) } 3 => { - let result897 = mbt_ffi_ptr2str( + let result1107 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result897) + @types.DiscriminatorRule::Regex(result1107) } 4 => { - let result898 = mbt_ffi_ptr2str( + let result1108 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted900 : String? = match + let lifted1110 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result899 = mbt_ffi_ptr2str( + let result1109 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result899) + Option::Some(result1109) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result898, - literal: lifted900, + field_name: result1108, + literal: lifted1110, }) } 5 => { - let result901 = mbt_ffi_ptr2str( + let result1111 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result901) + @types.DiscriminatorRule::FieldAbsent(result1111) } _ => panic() } - let lifted904 : String? = match + let lifted1114 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result903 = mbt_ffi_ptr2str( + let result1113 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result903) + Option::Some(result1113) } _ => panic() } - let array906 : Array[String] = [] - for index907 = 0 - index907 < mbt_ffi_load32(iter_base + 52) - index907 = index907 + 1 { + let array1116 : Array[String] = [] + for index1117 = 0 + index1117 < mbt_ffi_load32(iter_base + 52) + index1117 = index1117 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index907 * 8 + index1117 * 8 - let result905 = mbt_ffi_ptr2str( + let result1115 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array906.push(result905) + array1116.push(result1115) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array909 : Array[String] = [] - for index910 = 0 - index910 < mbt_ffi_load32(iter_base + 60) - index910 = index910 + 1 { + let array1119 : Array[String] = [] + for index1120 = 0 + index1120 < mbt_ffi_load32(iter_base + 60) + index1120 = index1120 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index910 * 8 + index1120 * 8 - let result908 = mbt_ffi_ptr2str( + let result1118 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array909.push(result908) + array1119.push(result1118) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted912 : String? = match + let lifted1122 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result911 = mbt_ffi_ptr2str( + let result1121 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result911) + Option::Some(result1121) } _ => panic() } - let lifted915 : @types.Role? = match + let lifted1125 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted914 = match + let lifted1124 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result913 = mbt_ffi_ptr2str( + let result1123 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result913) + @types.Role::Other(result1123) } _ => panic() } - Option::Some(lifted914) + Option::Some(lifted1124) } _ => panic() } - array916.push(@types.UnionBranch::{ - tag: result893, + array1126.push(@types.UnionBranch::{ + tag: result1103, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted902, + discriminator: lifted1112, metadata: @types.MetadataEnvelope::{ - doc: lifted904, - aliases: array906, - examples: array909, - deprecated: lifted912, - role: lifted915, + doc: lifted1114, + aliases: array1116, + examples: array1119, + deprecated: lifted1122, + role: lifted1125, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array916, + branches: array1126, }) } 32 => { - let lifted919 : String? = match + let lifted1129 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result918 = mbt_ffi_ptr2str( + let result1128 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result918) + Option::Some(result1128) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted919, + category: lifted1129, }) } 33 => { - let lifted921 : String? = match + let lifted1131 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result920 = mbt_ffi_ptr2str( + 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::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted921, + resource_name: lifted1131, }) } 34 => { - let lifted922 : Int? = match + let lifted1132 : 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(lifted922) + @types.SchemaTypeBody::FutureType(lifted1132) } 35 => { - let lifted923 : Int? = match + let lifted1133 : 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(lifted923) + @types.SchemaTypeBody::StreamType(lifted1133) } _ => panic() } - let lifted926 : String? = match + let lifted1136 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result925 = mbt_ffi_ptr2str( + let result1135 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result925) + Option::Some(result1135) } _ => panic() } - let array928 : Array[String] = [] - for index929 = 0 - index929 < mbt_ffi_load32(iter_base + 104) - index929 = index929 + 1 { + let array1138 : Array[String] = [] + for index1139 = 0 + index1139 < mbt_ffi_load32(iter_base + 104) + index1139 = index1139 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index929 * 8 + index1139 * 8 - let result927 = mbt_ffi_ptr2str( + let result1137 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array928.push(result927) + array1138.push(result1137) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array931 : Array[String] = [] - for index932 = 0 - index932 < mbt_ffi_load32(iter_base + 112) - index932 = index932 + 1 { + let array1141 : Array[String] = [] + for index1142 = 0 + index1142 < mbt_ffi_load32(iter_base + 112) + index1142 = index1142 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index932 * 8 + index1142 * 8 - let result930 = mbt_ffi_ptr2str( + let result1140 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array931.push(result930) + array1141.push(result1140) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted934 : String? = match + let lifted1144 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result933 = mbt_ffi_ptr2str( + let result1143 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result933) + Option::Some(result1143) } _ => panic() } - let lifted937 : @types.Role? = match + let lifted1147 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted936 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1146 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result935 = mbt_ffi_ptr2str( + let result1145 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result935) + @types.Role::Other(result1145) } _ => panic() } - Option::Some(lifted936) + Option::Some(lifted1146) } _ => panic() } - array938.push(@types.SchemaTypeNode::{ - body: lifted924, + array1148.push(@types.SchemaTypeNode::{ + body: lifted1134, metadata: @types.MetadataEnvelope::{ - doc: lifted926, - aliases: array928, - examples: array931, - deprecated: lifted934, - role: lifted937, + doc: lifted1136, + aliases: array1138, + examples: array1141, + deprecated: lifted1144, + role: lifted1147, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array943 : Array[@types.SchemaTypeDef] = [] - for index944 = 0 - index944 < mbt_ffi_load32(iter_base + 48) - index944 = index944 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 44) + index944 * 24 + let array1153 : Array[@types.SchemaTypeDef] = [] + for index1154 = 0 + index1154 < mbt_ffi_load32(iter_base + 48) + index1154 = index1154 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 44) + + index1154 * 24 - let result940 = mbt_ffi_ptr2str( + let result1150 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted942 : String? = match + let lifted1152 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result941 = mbt_ffi_ptr2str( + let result1151 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result941) + Option::Some(result1151) } _ => panic() } - array943.push(@types.SchemaTypeDef::{ - id: result940, - name: lifted942, + array1153.push(@types.SchemaTypeDef::{ + id: result1150, + name: lifted1152, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) - let array974 : Array[@types.SchemaValueNode] = [] - for index975 = 0 - index975 < mbt_ffi_load32(iter_base + 60) - index975 = index975 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + index975 * 32 + let array1184 : Array[@types.SchemaValueNode] = [] + for index1185 = 0 + index1185 < mbt_ffi_load32(iter_base + 60) + index1185 = index1185 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + + index1185 * 32 - let lifted973 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1183 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -8621,29 +11053,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result945 = mbt_ffi_ptr2str( + let result1155 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result945) + @types.SchemaValueNode::StringValue(result1155) } 13 => { - let array946 : Array[Int] = [] - for index947 = 0 - index947 < mbt_ffi_load32(iter_base + 12) - index947 = index947 + 1 { + let array1156 : Array[Int] = [] + for index1157 = 0 + index1157 < mbt_ffi_load32(iter_base + 12) + index1157 = index1157 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index947 * 4 + index1157 * 4 - array946.push(mbt_ffi_load32(iter_base + 0)) + array1156.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array946) + @types.SchemaValueNode::RecordValue(array1156) } 14 => { - let lifted948 : Int? = match + let lifted1158 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -8652,7 +11084,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted948, + payload: lifted1158, }) } 15 => @@ -8660,180 +11092,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array949 : Array[Bool] = [] - for index950 = 0 - index950 < mbt_ffi_load32(iter_base + 12) - index950 = index950 + 1 { + let array1159 : Array[Bool] = [] + for index1160 = 0 + index1160 < mbt_ffi_load32(iter_base + 12) + index1160 = index1160 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index950 * 1 + index1160 * 1 - array949.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1159.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array949) + @types.SchemaValueNode::FlagsValue(array1159) } 17 => { - let array951 : Array[Int] = [] - for index952 = 0 - index952 < mbt_ffi_load32(iter_base + 12) - index952 = index952 + 1 { + let array1161 : Array[Int] = [] + for index1162 = 0 + index1162 < mbt_ffi_load32(iter_base + 12) + index1162 = index1162 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index952 * 4 + index1162 * 4 - array951.push(mbt_ffi_load32(iter_base + 0)) + array1161.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array951) + @types.SchemaValueNode::TupleValue(array1161) } 18 => { - let array953 : Array[Int] = [] - for index954 = 0 - index954 < mbt_ffi_load32(iter_base + 12) - index954 = index954 + 1 { + 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) + - index954 * 4 + 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::ListValue(array953) + @types.SchemaValueNode::ListValue(array1163) } 19 => { - let array955 : Array[Int] = [] - for index956 = 0 - index956 < mbt_ffi_load32(iter_base + 12) - index956 = index956 + 1 { + 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) + - index956 * 4 + 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::FixedListValue(array955) + @types.SchemaValueNode::FixedListValue(array1165) } 20 => { - let array957 : Array[@types.MapEntry] = [] - for index958 = 0 - index958 < mbt_ffi_load32(iter_base + 12) - index958 = index958 + 1 { + let array1167 : Array[@types.MapEntry] = [] + for index1168 = 0 + index1168 < mbt_ffi_load32(iter_base + 12) + index1168 = index1168 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index958 * 8 + index1168 * 8 - array957.push(@types.MapEntry::{ + array1167.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(array957) + @types.SchemaValueNode::MapValue(array1167) } 21 => { - let lifted959 : Int? = match + let lifted1169 : 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(lifted959) + @types.SchemaValueNode::OptionValue(lifted1169) } 22 => { - let lifted962 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1172 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted960 : Int? = match + let lifted1170 : 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(lifted960) + @types.ResultValuePayload::OkValue(lifted1170) } 1 => { - let lifted961 : Int? = match + let lifted1171 : 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(lifted961) + @types.ResultValuePayload::ErrValue(lifted1171) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted962) + @types.SchemaValueNode::ResultValue(lifted1172) } 23 => { - let result963 = mbt_ffi_ptr2str( + let result1173 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted965 : String? = match + let lifted1175 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result964 = mbt_ffi_ptr2str( + let result1174 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result964) + Option::Some(result1174) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result963, - language: lifted965, + text: result1173, + language: lifted1175, }) } 24 => { - let result966 = mbt_ffi_ptr2bytes( + let result1176 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted968 : String? = match + let lifted1178 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result967 = mbt_ffi_ptr2str( + let result1177 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result967) + Option::Some(result1177) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result966, - mime_type: lifted968, + bytes: result1176, + mime_type: lifted1178, }) } 25 => { - let result969 = mbt_ffi_ptr2str( + let result1179 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result969) + @types.SchemaValueNode::PathValue(result1179) } 26 => { - let result970 = mbt_ffi_ptr2str( + let result1180 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result970) + @types.SchemaValueNode::UrlValue(result1180) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -8845,7 +11277,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result971 = mbt_ffi_ptr2str( + let result1181 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -8853,17 +11285,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result971, + unit: result1181, }) } 30 => { - let result972 = mbt_ffi_ptr2str( + let result1182 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result972, + tag: result1182, body: mbt_ffi_load32(iter_base + 16), }) } @@ -8880,18 +11312,18 @@ pub fn enrich_oplog_entries( _ => panic() } - array974.push(lifted973) + array1184.push(lifted1183) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) Option::Some(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array938, - defs: array943, + type_nodes: array1148, + defs: array1153, root: mbt_ffi_load32(iter_base + 52), }, value: @types.SchemaValueTree::{ - value_nodes: array974, + value_nodes: array1184, root: mbt_ffi_load32(iter_base + 64), }, }) @@ -8905,326 +11337,1136 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, start_index: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - response: lifted976, + response: lifted1186, forced_commit: mbt_ffi_load8_u(iter_base + 68) != 0, }) } 3 => { - let lifted1141 : @types.TypedSchemaValue? = match + let lifted1421 : @types.TypedSchemaValue? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let array1103 : Array[@types.SchemaTypeNode] = [] - for index1104 = 0 - index1104 < mbt_ffi_load32(iter_base + 40) - index1104 = index1104 + 1 { + let array1383 : Array[@types.SchemaTypeNode] = [] + for index1384 = 0 + index1384 < mbt_ffi_load32(iter_base + 40) + index1384 = index1384 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1104 * 144 + index1384 * 144 - let lifted1089 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1369 = 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 + 2 => { + let lifted1193 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1188 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1187 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1187) + } + _ => panic() + } + + let lifted1190 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1189 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1189) + } + _ => panic() + } + + let lifted1192 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1191 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1191) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1188, + max: lifted1190, + unit: lifted1192, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1193) + } + 3 => { + let lifted1200 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1195 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1194 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1194) + } + _ => panic() + } + + let lifted1197 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1196 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1196) + } + _ => panic() + } + + let lifted1199 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1198 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1198) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1195, + max: lifted1197, + unit: lifted1199, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1200) + } + 4 => { + let lifted1207 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1202 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1201 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1201) + } + _ => panic() + } + + let lifted1204 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1203 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1203) + } + _ => panic() + } + + let lifted1206 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1205 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1205) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1202, + max: lifted1204, + unit: lifted1206, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1207) + } + 5 => { + let lifted1214 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1209 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1208 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1208) + } + _ => panic() + } + + let lifted1211 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1210 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1210) + } + _ => panic() + } + + let lifted1213 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1212 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1212) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1209, + max: lifted1211, + unit: lifted1213, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1214) + } + 6 => { + let lifted1221 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1216 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1215 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1215) + } + _ => panic() + } + + let lifted1218 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1217 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1217) + } + _ => panic() + } + + let lifted1220 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1219 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1219) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1216, + max: lifted1218, + unit: lifted1220, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1221) + } + 7 => { + 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::U16Type(lifted1228) + } + 8 => { + 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::U32Type(lifted1235) + } + 9 => { + 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::U64Type(lifted1242) + } + 10 => { + 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::F32Type(lifted1249) + } + 11 => { + 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::F64Type(lifted1256) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array991 : Array[@types.NamedFieldType] = [] - for index992 = 0 - index992 < mbt_ffi_load32(iter_base + 12) - index992 = index992 + 1 { + let array1271 : Array[@types.NamedFieldType] = [] + for index1272 = 0 + index1272 < mbt_ffi_load32(iter_base + 12) + index1272 = index1272 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index992 * 68 + index1272 * 68 - let result977 = mbt_ffi_ptr2str( + let result1257 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted979 : String? = match + let lifted1259 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result978 = mbt_ffi_ptr2str( + let result1258 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result978) + Option::Some(result1258) } _ => panic() } - let array981 : Array[String] = [] - for index982 = 0 - index982 < mbt_ffi_load32(iter_base + 28) - index982 = index982 + 1 { + let array1261 : Array[String] = [] + for index1262 = 0 + index1262 < mbt_ffi_load32(iter_base + 28) + index1262 = index1262 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index982 * 8 + index1262 * 8 - let result980 = mbt_ffi_ptr2str( + let result1260 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array981.push(result980) + array1261.push(result1260) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array984 : Array[String] = [] - for index985 = 0 - index985 < mbt_ffi_load32(iter_base + 36) - index985 = index985 + 1 { + let array1264 : Array[String] = [] + for index1265 = 0 + index1265 < mbt_ffi_load32(iter_base + 36) + index1265 = index1265 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index985 * 8 + index1265 * 8 - let result983 = mbt_ffi_ptr2str( + let result1263 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array984.push(result983) + array1264.push(result1263) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted987 : String? = match + let lifted1267 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result986 = mbt_ffi_ptr2str( + let result1266 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result986) + Option::Some(result1266) } _ => panic() } - let lifted990 : @types.Role? = match + let lifted1270 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted989 = match + let lifted1269 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result988 = mbt_ffi_ptr2str( + let result1268 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result988) + @types.Role::Other(result1268) } _ => panic() } - Option::Some(lifted989) + Option::Some(lifted1269) } _ => panic() } - array991.push(@types.NamedFieldType::{ - name: result977, + array1271.push(@types.NamedFieldType::{ + name: result1257, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted979, - aliases: array981, - examples: array984, - deprecated: lifted987, - role: lifted990, + doc: lifted1259, + aliases: array1261, + examples: array1264, + deprecated: lifted1267, + role: lifted1270, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array991) + @types.SchemaTypeBody::RecordType(array1271) } 15 => { - let array1008 : Array[@types.VariantCaseType] = [] - for index1009 = 0 - index1009 < mbt_ffi_load32(iter_base + 12) - index1009 = index1009 + 1 { + let array1288 : Array[@types.VariantCaseType] = [] + for index1289 = 0 + index1289 < mbt_ffi_load32(iter_base + 12) + index1289 = index1289 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1009 * 72 + index1289 * 72 - let result993 = mbt_ffi_ptr2str( + let result1273 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted994 : Int? = match + let lifted1274 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted996 : String? = match + let lifted1276 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result995 = mbt_ffi_ptr2str( + let result1275 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result995) + Option::Some(result1275) } _ => panic() } - let array998 : Array[String] = [] - for index999 = 0 - index999 < mbt_ffi_load32(iter_base + 32) - index999 = index999 + 1 { + let array1278 : Array[String] = [] + for index1279 = 0 + index1279 < mbt_ffi_load32(iter_base + 32) + index1279 = index1279 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index999 * 8 + index1279 * 8 - let result997 = mbt_ffi_ptr2str( + let result1277 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array998.push(result997) + array1278.push(result1277) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1001 : Array[String] = [] - for index1002 = 0 - index1002 < mbt_ffi_load32(iter_base + 40) - index1002 = index1002 + 1 { + let array1281 : Array[String] = [] + for index1282 = 0 + index1282 < mbt_ffi_load32(iter_base + 40) + index1282 = index1282 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1002 * 8 + index1282 * 8 - let result1000 = mbt_ffi_ptr2str( + 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 + 36)) - let lifted1004 : String? = match + let lifted1284 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1003 = mbt_ffi_ptr2str( + let result1283 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1003) + Option::Some(result1283) } _ => panic() } - let lifted1007 : @types.Role? = match + let lifted1287 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1006 = match + let lifted1286 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1005 = mbt_ffi_ptr2str( + let result1285 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1005) + @types.Role::Other(result1285) } _ => panic() } - Option::Some(lifted1006) + Option::Some(lifted1286) } _ => panic() } - array1008.push(@types.VariantCaseType::{ - name: result993, - payload: lifted994, + array1288.push(@types.VariantCaseType::{ + name: result1273, + payload: lifted1274, metadata: @types.MetadataEnvelope::{ - doc: lifted996, - aliases: array998, - examples: array1001, - deprecated: lifted1004, - role: lifted1007, + doc: lifted1276, + aliases: array1278, + examples: array1281, + deprecated: lifted1284, + role: lifted1287, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1008) + @types.SchemaTypeBody::VariantType(array1288) } 16 => { - let array1011 : Array[String] = [] - for index1012 = 0 - index1012 < mbt_ffi_load32(iter_base + 12) - index1012 = index1012 + 1 { + let array1291 : Array[String] = [] + for index1292 = 0 + index1292 < mbt_ffi_load32(iter_base + 12) + index1292 = index1292 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1012 * 8 + index1292 * 8 - let result1010 = mbt_ffi_ptr2str( + let result1290 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1011.push(result1010) + array1291.push(result1290) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1011) + @types.SchemaTypeBody::EnumType(array1291) } 17 => { - let array1014 : Array[String] = [] - for index1015 = 0 - index1015 < mbt_ffi_load32(iter_base + 12) - index1015 = index1015 + 1 { + 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) + - index1015 * 8 + index1295 * 8 - let result1013 = mbt_ffi_ptr2str( + 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::FlagsType(array1014) + @types.SchemaTypeBody::FlagsType(array1294) } 18 => { - let array1016 : Array[Int] = [] - for index1017 = 0 - index1017 < mbt_ffi_load32(iter_base + 12) - index1017 = index1017 + 1 { + let array1296 : Array[Int] = [] + for index1297 = 0 + index1297 < mbt_ffi_load32(iter_base + 12) + index1297 = index1297 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1017 * 4 + index1297 * 4 - array1016.push(mbt_ffi_load32(iter_base + 0)) + array1296.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1016) + @types.SchemaTypeBody::TupleType(array1296) } 19 => @types.SchemaTypeBody::ListType( @@ -9245,14 +12487,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1018 : Int? = match + let lifted1298 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1019 : Int? = match + let lifted1299 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -9260,37 +12502,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1018, - err: lifted1019, + ok: lifted1298, + err: lifted1299, }) } 24 => { - let lifted1023 : Array[String]? = match + let lifted1303 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1021 : Array[String] = [] - for index1022 = 0 - index1022 < mbt_ffi_load32(iter_base + 16) - index1022 = index1022 + 1 { + let array1301 : Array[String] = [] + for index1302 = 0 + index1302 < mbt_ffi_load32(iter_base + 16) + index1302 = index1302 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1022 * 8 + index1302 * 8 - let result1020 = mbt_ffi_ptr2str( + let result1300 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1021.push(result1020) + array1301.push(result1300) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1021) + Option::Some(array1301) } _ => panic() } - let lifted1024 : UInt? = match + let lifted1304 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -9300,7 +12542,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1025 : UInt? = match + let lifted1305 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -9310,54 +12552,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1027 : String? = match + let lifted1307 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1026 = mbt_ffi_ptr2str( + let result1306 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1026) + Option::Some(result1306) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1023, - min_length: lifted1024, - max_length: lifted1025, - regex: lifted1027, + languages: lifted1303, + min_length: lifted1304, + max_length: lifted1305, + regex: lifted1307, }) } 25 => { - let lifted1031 : Array[String]? = match + let lifted1311 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1029 : Array[String] = [] - for index1030 = 0 - index1030 < mbt_ffi_load32(iter_base + 16) - index1030 = index1030 + 1 { + let array1309 : Array[String] = [] + for index1310 = 0 + index1310 < mbt_ffi_load32(iter_base + 16) + index1310 = index1310 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1030 * 8 + index1310 * 8 - let result1028 = mbt_ffi_ptr2str( + let result1308 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1029.push(result1028) + array1309.push(result1308) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1029) + Option::Some(array1309) } _ => panic() } - let lifted1032 : UInt? = match + let lifted1312 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -9367,7 +12609,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1033 : UInt? = match + let lifted1313 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -9378,58 +12620,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1031, - min_bytes: lifted1032, - max_bytes: lifted1033, + mime_types: lifted1311, + min_bytes: lifted1312, + max_bytes: lifted1313, }) } 26 => { - let lifted1037 : Array[String]? = match + let lifted1317 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1035 : Array[String] = [] - for index1036 = 0 - index1036 < mbt_ffi_load32(iter_base + 20) - index1036 = index1036 + 1 { + let array1315 : Array[String] = [] + for index1316 = 0 + index1316 < mbt_ffi_load32(iter_base + 20) + index1316 = index1316 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1036 * 8 + index1316 * 8 - let result1034 = mbt_ffi_ptr2str( + let result1314 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1035.push(result1034) + array1315.push(result1314) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1035) + Option::Some(array1315) } _ => panic() } - let lifted1041 : Array[String]? = match + let lifted1321 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1039 : Array[String] = [] - for index1040 = 0 - index1040 < mbt_ffi_load32(iter_base + 32) - index1040 = index1040 + 1 { + let array1319 : Array[String] = [] + for index1320 = 0 + index1320 < mbt_ffi_load32(iter_base + 32) + index1320 = index1320 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1040 * 8 + index1320 * 8 - let result1038 = mbt_ffi_ptr2str( + let result1318 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1039.push(result1038) + array1319.push(result1318) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1039) + Option::Some(array1319) } _ => panic() } @@ -9441,95 +12683,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1037, - allowed_extensions: lifted1041, + allowed_mime_types: lifted1317, + allowed_extensions: lifted1321, }) } 27 => { - let lifted1045 : Array[String]? = match + let lifted1325 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1043 : Array[String] = [] - for index1044 = 0 - index1044 < mbt_ffi_load32(iter_base + 16) - index1044 = index1044 + 1 { + let array1323 : Array[String] = [] + for index1324 = 0 + index1324 < mbt_ffi_load32(iter_base + 16) + index1324 = index1324 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1044 * 8 + index1324 * 8 - let result1042 = mbt_ffi_ptr2str( + let result1322 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1043.push(result1042) + array1323.push(result1322) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1043) + Option::Some(array1323) } _ => panic() } - let lifted1049 : Array[String]? = match + let lifted1329 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1047 : Array[String] = [] - for index1048 = 0 - index1048 < mbt_ffi_load32(iter_base + 28) - index1048 = index1048 + 1 { + let array1327 : Array[String] = [] + for index1328 = 0 + index1328 < mbt_ffi_load32(iter_base + 28) + index1328 = index1328 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1048 * 8 + index1328 * 8 - let result1046 = mbt_ffi_ptr2str( + let result1326 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1047.push(result1046) + array1327.push(result1326) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1047) + Option::Some(array1327) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1045, - allowed_hosts: lifted1049, + allowed_schemes: lifted1325, + allowed_hosts: lifted1329, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1050 = mbt_ffi_ptr2str( + let result1330 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1052 : Array[String] = [] - for index1053 = 0 - index1053 < mbt_ffi_load32(iter_base + 20) - index1053 = index1053 + 1 { + let array1332 : Array[String] = [] + for index1333 = 0 + index1333 < mbt_ffi_load32(iter_base + 20) + index1333 = index1333 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1053 * 8 + index1333 * 8 - let result1051 = mbt_ffi_ptr2str( + let result1331 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1052.push(result1051) + array1332.push(result1331) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1055 : @types.QuantityValue? = match + let lifted1335 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1054 = mbt_ffi_ptr2str( + let result1334 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -9537,17 +12779,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1054, + unit: result1334, }) } _ => panic() } - let lifted1057 : @types.QuantityValue? = match + let lifted1337 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1056 = mbt_ffi_ptr2str( + let result1336 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -9555,406 +12797,406 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1056, + unit: result1336, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1050, - allowed_suffixes: array1052, - min: lifted1055, - max: lifted1057, + base_unit: result1330, + allowed_suffixes: array1332, + min: lifted1335, + max: lifted1337, }) } 31 => { - let array1081 : Array[@types.UnionBranch] = [] - for index1082 = 0 - index1082 < mbt_ffi_load32(iter_base + 12) - index1082 = index1082 + 1 { + let array1361 : Array[@types.UnionBranch] = [] + for index1362 = 0 + index1362 < mbt_ffi_load32(iter_base + 12) + index1362 = index1362 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1082 * 92 + index1362 * 92 - let result1058 = mbt_ffi_ptr2str( + let result1338 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1067 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1347 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1059 = mbt_ffi_ptr2str( + let result1339 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1059) + @types.DiscriminatorRule::Prefix(result1339) } 1 => { - let result1060 = mbt_ffi_ptr2str( + let result1340 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1060) + @types.DiscriminatorRule::Suffix(result1340) } 2 => { - let result1061 = mbt_ffi_ptr2str( + let result1341 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1061) + @types.DiscriminatorRule::Contains(result1341) } 3 => { - let result1062 = mbt_ffi_ptr2str( + let result1342 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1062) + @types.DiscriminatorRule::Regex(result1342) } 4 => { - let result1063 = mbt_ffi_ptr2str( + let result1343 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1065 : String? = match + let lifted1345 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1064 = mbt_ffi_ptr2str( + let result1344 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1064) + Option::Some(result1344) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1063, - literal: lifted1065, + field_name: result1343, + literal: lifted1345, }) } 5 => { - let result1066 = mbt_ffi_ptr2str( + let result1346 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1066) + @types.DiscriminatorRule::FieldAbsent(result1346) } _ => panic() } - let lifted1069 : String? = match + let lifted1349 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1068 = mbt_ffi_ptr2str( + let result1348 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1068) + Option::Some(result1348) } _ => panic() } - let array1071 : Array[String] = [] - for index1072 = 0 - index1072 < mbt_ffi_load32(iter_base + 52) - index1072 = index1072 + 1 { + let array1351 : Array[String] = [] + for index1352 = 0 + index1352 < mbt_ffi_load32(iter_base + 52) + index1352 = index1352 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1072 * 8 + index1352 * 8 - let result1070 = mbt_ffi_ptr2str( + let result1350 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1071.push(result1070) + array1351.push(result1350) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1074 : Array[String] = [] - for index1075 = 0 - index1075 < mbt_ffi_load32(iter_base + 60) - index1075 = index1075 + 1 { + let array1354 : Array[String] = [] + for index1355 = 0 + index1355 < mbt_ffi_load32(iter_base + 60) + index1355 = index1355 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1075 * 8 + index1355 * 8 - let result1073 = mbt_ffi_ptr2str( + 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 + 56)) - let lifted1077 : String? = match + let lifted1357 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1076 = mbt_ffi_ptr2str( + let result1356 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1076) + Option::Some(result1356) } _ => panic() } - let lifted1080 : @types.Role? = match + let lifted1360 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1079 = match + let lifted1359 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1078 = mbt_ffi_ptr2str( + let result1358 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1078) + @types.Role::Other(result1358) } _ => panic() } - Option::Some(lifted1079) + Option::Some(lifted1359) } _ => panic() } - array1081.push(@types.UnionBranch::{ - tag: result1058, + array1361.push(@types.UnionBranch::{ + tag: result1338, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1067, + discriminator: lifted1347, metadata: @types.MetadataEnvelope::{ - doc: lifted1069, - aliases: array1071, - examples: array1074, - deprecated: lifted1077, - role: lifted1080, + doc: lifted1349, + aliases: array1351, + examples: array1354, + deprecated: lifted1357, + role: lifted1360, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1081, + branches: array1361, }) } 32 => { - let lifted1084 : String? = match + let lifted1364 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1083 = mbt_ffi_ptr2str( + let result1363 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1083) + Option::Some(result1363) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1084, + category: lifted1364, }) } 33 => { - let lifted1086 : String? = match + let lifted1366 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1085 = mbt_ffi_ptr2str( + let result1365 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1085) + Option::Some(result1365) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1086, + resource_name: lifted1366, }) } 34 => { - let lifted1087 : Int? = match + let lifted1367 : 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(lifted1087) + @types.SchemaTypeBody::FutureType(lifted1367) } 35 => { - let lifted1088 : Int? = match + let lifted1368 : 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(lifted1088) + @types.SchemaTypeBody::StreamType(lifted1368) } _ => panic() } - let lifted1091 : String? = match + let lifted1371 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1090 = mbt_ffi_ptr2str( + let result1370 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1090) + Option::Some(result1370) } _ => panic() } - let array1093 : Array[String] = [] - for index1094 = 0 - index1094 < mbt_ffi_load32(iter_base + 104) - index1094 = index1094 + 1 { + let array1373 : Array[String] = [] + for index1374 = 0 + index1374 < mbt_ffi_load32(iter_base + 104) + index1374 = index1374 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1094 * 8 + index1374 * 8 - let result1092 = mbt_ffi_ptr2str( + let result1372 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1093.push(result1092) + array1373.push(result1372) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1096 : Array[String] = [] - for index1097 = 0 - index1097 < mbt_ffi_load32(iter_base + 112) - index1097 = index1097 + 1 { + let array1376 : Array[String] = [] + for index1377 = 0 + index1377 < mbt_ffi_load32(iter_base + 112) + index1377 = index1377 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1097 * 8 + index1377 * 8 - let result1095 = mbt_ffi_ptr2str( + 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 + 108)) - let lifted1099 : String? = match + let lifted1379 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1098 = mbt_ffi_ptr2str( + let result1378 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1098) + Option::Some(result1378) } _ => panic() } - let lifted1102 : @types.Role? = match + let lifted1382 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1101 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1381 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1100 = mbt_ffi_ptr2str( + let result1380 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1100) + @types.Role::Other(result1380) } _ => panic() } - Option::Some(lifted1101) + Option::Some(lifted1381) } _ => panic() } - array1103.push(@types.SchemaTypeNode::{ - body: lifted1089, + array1383.push(@types.SchemaTypeNode::{ + body: lifted1369, metadata: @types.MetadataEnvelope::{ - doc: lifted1091, - aliases: array1093, - examples: array1096, - deprecated: lifted1099, - role: lifted1102, + doc: lifted1371, + aliases: array1373, + examples: array1376, + deprecated: lifted1379, + role: lifted1382, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array1108 : Array[@types.SchemaTypeDef] = [] - for index1109 = 0 - index1109 < mbt_ffi_load32(iter_base + 48) - index1109 = index1109 + 1 { + let array1388 : Array[@types.SchemaTypeDef] = [] + for index1389 = 0 + index1389 < mbt_ffi_load32(iter_base + 48) + index1389 = index1389 + 1 { let iter_base = mbt_ffi_load32(iter_base + 44) + - index1109 * 24 + index1389 * 24 - let result1105 = mbt_ffi_ptr2str( + let result1385 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1107 : String? = match + let lifted1387 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1106 = mbt_ffi_ptr2str( + let result1386 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1106) + Option::Some(result1386) } _ => panic() } - array1108.push(@types.SchemaTypeDef::{ - id: result1105, - name: lifted1107, + array1388.push(@types.SchemaTypeDef::{ + id: result1385, + name: lifted1387, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) - let array1139 : Array[@types.SchemaValueNode] = [] - for index1140 = 0 - index1140 < mbt_ffi_load32(iter_base + 60) - index1140 = index1140 + 1 { + let array1419 : Array[@types.SchemaValueNode] = [] + for index1420 = 0 + index1420 < mbt_ffi_load32(iter_base + 60) + index1420 = index1420 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1140 * 32 + index1420 * 32 - let lifted1138 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1418 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -10006,29 +13248,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1110 = mbt_ffi_ptr2str( + let result1390 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1110) + @types.SchemaValueNode::StringValue(result1390) } 13 => { - let array1111 : Array[Int] = [] - for index1112 = 0 - index1112 < mbt_ffi_load32(iter_base + 12) - index1112 = index1112 + 1 { + let array1391 : Array[Int] = [] + for index1392 = 0 + index1392 < mbt_ffi_load32(iter_base + 12) + index1392 = index1392 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1112 * 4 + index1392 * 4 - array1111.push(mbt_ffi_load32(iter_base + 0)) + array1391.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1111) + @types.SchemaValueNode::RecordValue(array1391) } 14 => { - let lifted1113 : Int? = match + let lifted1393 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -10037,7 +13279,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1113, + payload: lifted1393, }) } 15 => @@ -10045,180 +13287,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1114 : Array[Bool] = [] - for index1115 = 0 - index1115 < mbt_ffi_load32(iter_base + 12) - index1115 = index1115 + 1 { + let array1394 : Array[Bool] = [] + for index1395 = 0 + index1395 < mbt_ffi_load32(iter_base + 12) + index1395 = index1395 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1115 * 1 + index1395 * 1 - array1114.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1394.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1114) + @types.SchemaValueNode::FlagsValue(array1394) } 17 => { - let array1116 : Array[Int] = [] - for index1117 = 0 - index1117 < mbt_ffi_load32(iter_base + 12) - index1117 = index1117 + 1 { + let array1396 : Array[Int] = [] + for index1397 = 0 + index1397 < mbt_ffi_load32(iter_base + 12) + index1397 = index1397 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1117 * 4 + index1397 * 4 - array1116.push(mbt_ffi_load32(iter_base + 0)) + array1396.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1116) + @types.SchemaValueNode::TupleValue(array1396) } 18 => { - let array1118 : Array[Int] = [] - for index1119 = 0 - index1119 < mbt_ffi_load32(iter_base + 12) - index1119 = index1119 + 1 { + let array1398 : Array[Int] = [] + for index1399 = 0 + index1399 < mbt_ffi_load32(iter_base + 12) + index1399 = index1399 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1119 * 4 + index1399 * 4 - array1118.push(mbt_ffi_load32(iter_base + 0)) + array1398.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1118) + @types.SchemaValueNode::ListValue(array1398) } 19 => { - let array1120 : Array[Int] = [] - for index1121 = 0 - index1121 < mbt_ffi_load32(iter_base + 12) - index1121 = index1121 + 1 { + let array1400 : Array[Int] = [] + for index1401 = 0 + index1401 < mbt_ffi_load32(iter_base + 12) + index1401 = index1401 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1121 * 4 + index1401 * 4 - array1120.push(mbt_ffi_load32(iter_base + 0)) + array1400.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1120) + @types.SchemaValueNode::FixedListValue(array1400) } 20 => { - let array1122 : Array[@types.MapEntry] = [] - for index1123 = 0 - index1123 < mbt_ffi_load32(iter_base + 12) - index1123 = index1123 + 1 { + let array1402 : Array[@types.MapEntry] = [] + for index1403 = 0 + index1403 < mbt_ffi_load32(iter_base + 12) + index1403 = index1403 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1123 * 8 + index1403 * 8 - array1122.push(@types.MapEntry::{ + array1402.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(array1122) + @types.SchemaValueNode::MapValue(array1402) } 21 => { - let lifted1124 : Int? = match + let lifted1404 : 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(lifted1124) + @types.SchemaValueNode::OptionValue(lifted1404) } 22 => { - let lifted1127 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1407 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1125 : Int? = match + let lifted1405 : 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(lifted1125) + @types.ResultValuePayload::OkValue(lifted1405) } 1 => { - let lifted1126 : Int? = match + let lifted1406 : 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(lifted1126) + @types.ResultValuePayload::ErrValue(lifted1406) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1127) + @types.SchemaValueNode::ResultValue(lifted1407) } 23 => { - let result1128 = mbt_ffi_ptr2str( + let result1408 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1130 : String? = match + let lifted1410 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1129 = mbt_ffi_ptr2str( + let result1409 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1129) + Option::Some(result1409) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1128, - language: lifted1130, + text: result1408, + language: lifted1410, }) } 24 => { - let result1131 = mbt_ffi_ptr2bytes( + let result1411 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1133 : String? = match + let lifted1413 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1132 = mbt_ffi_ptr2str( + 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::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1131, - mime_type: lifted1133, + bytes: result1411, + mime_type: lifted1413, }) } 25 => { - let result1134 = mbt_ffi_ptr2str( + let result1414 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1134) + @types.SchemaValueNode::PathValue(result1414) } 26 => { - let result1135 = mbt_ffi_ptr2str( + let result1415 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1135) + @types.SchemaValueNode::UrlValue(result1415) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -10230,7 +13472,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1136 = mbt_ffi_ptr2str( + let result1416 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -10238,17 +13480,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1136, + unit: result1416, }) } 30 => { - let result1137 = mbt_ffi_ptr2str( + let result1417 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1137, + tag: result1417, body: mbt_ffi_load32(iter_base + 16), }) } @@ -10265,18 +13507,18 @@ pub fn enrich_oplog_entries( _ => panic() } - array1139.push(lifted1138) + array1419.push(lifted1418) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) Option::Some(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1103, - defs: array1108, + type_nodes: array1383, + defs: array1388, root: mbt_ffi_load32(iter_base + 52), }, value: @types.SchemaValueTree::{ - value_nodes: array1139, + value_nodes: array1419, root: mbt_ffi_load32(iter_base + 64), }, }) @@ -10290,328 +13532,1138 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, start_index: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - partial: lifted1141, + partial: lifted1421, }) } 4 => { - let lifted1514 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted1934 = match mbt_ffi_load8_u(iter_base + 24) { 0 => { - let result1142 = mbt_ffi_ptr2str( + let result1422 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array1269 : Array[@types.SchemaTypeNode] = [] - for index1270 = 0 - index1270 < mbt_ffi_load32(iter_base + 44) - index1270 = index1270 + 1 { + let array1619 : Array[@types.SchemaTypeNode] = [] + for index1620 = 0 + index1620 < mbt_ffi_load32(iter_base + 44) + index1620 = index1620 + 1 { let iter_base = mbt_ffi_load32(iter_base + 40) + - index1270 * 144 + index1620 * 144 - let lifted1255 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1605 = 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 + 2 => { + let lifted1429 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1424 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1423 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1423) + } + _ => panic() + } + + let lifted1426 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1425 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1425) + } + _ => panic() + } + + let lifted1428 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1427 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1427) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1424, + max: lifted1426, + unit: lifted1428, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1429) + } + 3 => { + let lifted1436 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1431 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1430 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1430) + } + _ => panic() + } + + let lifted1433 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1432 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1432) + } + _ => panic() + } + + let lifted1435 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1434 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1434) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1431, + max: lifted1433, + unit: lifted1435, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1436) + } + 4 => { + let lifted1443 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1438 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1437 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1437) + } + _ => panic() + } + + let lifted1440 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1439 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1439) + } + _ => panic() + } + + let lifted1442 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1441 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1441) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1438, + max: lifted1440, + unit: lifted1442, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1443) + } + 5 => { + let lifted1450 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1445 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1444 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1444) + } + _ => panic() + } + + let lifted1447 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1446 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1446) + } + _ => panic() + } + + let lifted1449 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1448 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1448) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1445, + max: lifted1447, + unit: lifted1449, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1450) + } + 6 => { + let lifted1457 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1452 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1451 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1451) + } + _ => panic() + } + + let lifted1454 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1453 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1453) + } + _ => panic() + } + + let lifted1456 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1455 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1455) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1452, + max: lifted1454, + unit: lifted1456, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1457) + } + 7 => { + let lifted1464 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1459 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1458 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1458) + } + _ => panic() + } + + let lifted1461 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1460 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1460) + } + _ => panic() + } + + let lifted1463 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1462 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1462) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1459, + max: lifted1461, + unit: lifted1463, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1464) + } + 8 => { + let lifted1471 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1466 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1465 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1465) + } + _ => panic() + } + + let lifted1468 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1467 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1467) + } + _ => panic() + } + + let lifted1470 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1469 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1469) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1466, + max: lifted1468, + unit: lifted1470, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1471) + } + 9 => { + let lifted1478 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1473 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1472 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1472) + } + _ => panic() + } + + let lifted1475 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1474 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1474) + } + _ => panic() + } + + let lifted1477 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1476 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1476) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1473, + max: lifted1475, + unit: lifted1477, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1478) + } + 10 => { + let lifted1485 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1480 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1479 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1479) + } + _ => panic() + } + + let lifted1482 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1481 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1481) + } + _ => panic() + } + + let lifted1484 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1483 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1483) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1480, + max: lifted1482, + unit: lifted1484, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1485) + } + 11 => { + let lifted1492 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1487 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1486 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1486) + } + _ => panic() + } + + let lifted1489 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1488 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1488) + } + _ => panic() + } + + let lifted1491 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1490 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1490) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1487, + max: lifted1489, + unit: lifted1491, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1492) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1157 : Array[@types.NamedFieldType] = [] - for index1158 = 0 - index1158 < mbt_ffi_load32(iter_base + 12) - index1158 = index1158 + 1 { + let array1507 : Array[@types.NamedFieldType] = [] + for index1508 = 0 + index1508 < mbt_ffi_load32(iter_base + 12) + index1508 = index1508 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1158 * 68 + index1508 * 68 - let result1143 = mbt_ffi_ptr2str( + let result1493 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1145 : String? = match + let lifted1495 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1144 = mbt_ffi_ptr2str( + let result1494 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1144) + Option::Some(result1494) } _ => panic() } - let array1147 : Array[String] = [] - for index1148 = 0 - index1148 < mbt_ffi_load32(iter_base + 28) - index1148 = index1148 + 1 { + let array1497 : Array[String] = [] + for index1498 = 0 + index1498 < mbt_ffi_load32(iter_base + 28) + index1498 = index1498 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1148 * 8 + index1498 * 8 - let result1146 = mbt_ffi_ptr2str( + let result1496 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1147.push(result1146) + array1497.push(result1496) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1150 : Array[String] = [] - for index1151 = 0 - index1151 < mbt_ffi_load32(iter_base + 36) - index1151 = index1151 + 1 { + let array1500 : Array[String] = [] + for index1501 = 0 + index1501 < mbt_ffi_load32(iter_base + 36) + index1501 = index1501 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1151 * 8 + index1501 * 8 - let result1149 = mbt_ffi_ptr2str( + let result1499 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1150.push(result1149) + array1500.push(result1499) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1153 : String? = match + let lifted1503 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1152 = mbt_ffi_ptr2str( + let result1502 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1152) + Option::Some(result1502) } _ => panic() } - let lifted1156 : @types.Role? = match + let lifted1506 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1155 = match + let lifted1505 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1154 = mbt_ffi_ptr2str( + let result1504 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1154) + @types.Role::Other(result1504) } _ => panic() } - Option::Some(lifted1155) + Option::Some(lifted1505) } _ => panic() } - array1157.push(@types.NamedFieldType::{ - name: result1143, + array1507.push(@types.NamedFieldType::{ + name: result1493, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1145, - aliases: array1147, - examples: array1150, - deprecated: lifted1153, - role: lifted1156, + doc: lifted1495, + aliases: array1497, + examples: array1500, + deprecated: lifted1503, + role: lifted1506, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1157) + @types.SchemaTypeBody::RecordType(array1507) } 15 => { - let array1174 : Array[@types.VariantCaseType] = [] - for index1175 = 0 - index1175 < mbt_ffi_load32(iter_base + 12) - index1175 = index1175 + 1 { + let array1524 : Array[@types.VariantCaseType] = [] + for index1525 = 0 + index1525 < mbt_ffi_load32(iter_base + 12) + index1525 = index1525 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1175 * 72 + index1525 * 72 - let result1159 = mbt_ffi_ptr2str( + let result1509 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1160 : Int? = match + let lifted1510 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1162 : String? = match + let lifted1512 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1161 = mbt_ffi_ptr2str( + let result1511 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1161) + Option::Some(result1511) } _ => panic() } - let array1164 : Array[String] = [] - for index1165 = 0 - index1165 < mbt_ffi_load32(iter_base + 32) - index1165 = index1165 + 1 { + let array1514 : Array[String] = [] + for index1515 = 0 + index1515 < mbt_ffi_load32(iter_base + 32) + index1515 = index1515 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1165 * 8 + index1515 * 8 - let result1163 = mbt_ffi_ptr2str( + let result1513 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1164.push(result1163) + array1514.push(result1513) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1167 : Array[String] = [] - for index1168 = 0 - index1168 < mbt_ffi_load32(iter_base + 40) - index1168 = index1168 + 1 { + let array1517 : Array[String] = [] + for index1518 = 0 + index1518 < mbt_ffi_load32(iter_base + 40) + index1518 = index1518 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1168 * 8 + index1518 * 8 - let result1166 = mbt_ffi_ptr2str( + let result1516 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1167.push(result1166) + array1517.push(result1516) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1170 : String? = match + let lifted1520 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1169 = mbt_ffi_ptr2str( + let result1519 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1169) + Option::Some(result1519) } _ => panic() } - let lifted1173 : @types.Role? = match + let lifted1523 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1172 = match + let lifted1522 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1171 = mbt_ffi_ptr2str( + let result1521 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1171) + @types.Role::Other(result1521) } _ => panic() } - Option::Some(lifted1172) + Option::Some(lifted1522) } _ => panic() } - array1174.push(@types.VariantCaseType::{ - name: result1159, - payload: lifted1160, + array1524.push(@types.VariantCaseType::{ + name: result1509, + payload: lifted1510, metadata: @types.MetadataEnvelope::{ - doc: lifted1162, - aliases: array1164, - examples: array1167, - deprecated: lifted1170, - role: lifted1173, + doc: lifted1512, + aliases: array1514, + examples: array1517, + deprecated: lifted1520, + role: lifted1523, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1174) + @types.SchemaTypeBody::VariantType(array1524) } 16 => { - let array1177 : Array[String] = [] - for index1178 = 0 - index1178 < mbt_ffi_load32(iter_base + 12) - index1178 = index1178 + 1 { + let array1527 : Array[String] = [] + for index1528 = 0 + index1528 < mbt_ffi_load32(iter_base + 12) + index1528 = index1528 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1178 * 8 + index1528 * 8 - let result1176 = mbt_ffi_ptr2str( + let result1526 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1177.push(result1176) + array1527.push(result1526) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1177) + @types.SchemaTypeBody::EnumType(array1527) } 17 => { - let array1180 : Array[String] = [] - for index1181 = 0 - index1181 < mbt_ffi_load32(iter_base + 12) - index1181 = index1181 + 1 { + let array1530 : Array[String] = [] + for index1531 = 0 + index1531 < mbt_ffi_load32(iter_base + 12) + index1531 = index1531 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1181 * 8 + index1531 * 8 - let result1179 = mbt_ffi_ptr2str( + let result1529 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1180.push(result1179) + array1530.push(result1529) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1180) + @types.SchemaTypeBody::FlagsType(array1530) } 18 => { - let array1182 : Array[Int] = [] - for index1183 = 0 - index1183 < mbt_ffi_load32(iter_base + 12) - index1183 = index1183 + 1 { + let array1532 : Array[Int] = [] + for index1533 = 0 + index1533 < mbt_ffi_load32(iter_base + 12) + index1533 = index1533 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1183 * 4 + index1533 * 4 - array1182.push(mbt_ffi_load32(iter_base + 0)) + array1532.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1182) + @types.SchemaTypeBody::TupleType(array1532) } 19 => @types.SchemaTypeBody::ListType( @@ -10632,14 +14684,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1184 : Int? = match + let lifted1534 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1185 : Int? = match + let lifted1535 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -10647,37 +14699,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1184, - err: lifted1185, + ok: lifted1534, + err: lifted1535, }) } 24 => { - let lifted1189 : Array[String]? = match + let lifted1539 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1187 : Array[String] = [] - for index1188 = 0 - index1188 < mbt_ffi_load32(iter_base + 16) - index1188 = index1188 + 1 { + let array1537 : Array[String] = [] + for index1538 = 0 + index1538 < mbt_ffi_load32(iter_base + 16) + index1538 = index1538 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1188 * 8 + index1538 * 8 - let result1186 = mbt_ffi_ptr2str( + let result1536 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1187.push(result1186) + array1537.push(result1536) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1187) + Option::Some(array1537) } _ => panic() } - let lifted1190 : UInt? = match + let lifted1540 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -10687,7 +14739,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1191 : UInt? = match + let lifted1541 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -10697,54 +14749,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1193 : String? = match + let lifted1543 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1192 = mbt_ffi_ptr2str( + let result1542 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1192) + Option::Some(result1542) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1189, - min_length: lifted1190, - max_length: lifted1191, - regex: lifted1193, + languages: lifted1539, + min_length: lifted1540, + max_length: lifted1541, + regex: lifted1543, }) } 25 => { - let lifted1197 : Array[String]? = match + let lifted1547 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1195 : Array[String] = [] - for index1196 = 0 - index1196 < mbt_ffi_load32(iter_base + 16) - index1196 = index1196 + 1 { + let array1545 : Array[String] = [] + for index1546 = 0 + index1546 < mbt_ffi_load32(iter_base + 16) + index1546 = index1546 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1196 * 8 + index1546 * 8 - let result1194 = mbt_ffi_ptr2str( + let result1544 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1195.push(result1194) + array1545.push(result1544) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1195) + Option::Some(array1545) } _ => panic() } - let lifted1198 : UInt? = match + let lifted1548 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -10754,7 +14806,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1199 : UInt? = match + let lifted1549 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -10765,58 +14817,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1197, - min_bytes: lifted1198, - max_bytes: lifted1199, + mime_types: lifted1547, + min_bytes: lifted1548, + max_bytes: lifted1549, }) } 26 => { - let lifted1203 : Array[String]? = match + let lifted1553 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1201 : Array[String] = [] - for index1202 = 0 - index1202 < mbt_ffi_load32(iter_base + 20) - index1202 = index1202 + 1 { + let array1551 : Array[String] = [] + for index1552 = 0 + index1552 < mbt_ffi_load32(iter_base + 20) + index1552 = index1552 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1202 * 8 + index1552 * 8 - let result1200 = mbt_ffi_ptr2str( + let result1550 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1201.push(result1200) + array1551.push(result1550) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1201) + Option::Some(array1551) } _ => panic() } - let lifted1207 : Array[String]? = match + let lifted1557 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1205 : Array[String] = [] - for index1206 = 0 - index1206 < mbt_ffi_load32(iter_base + 32) - index1206 = index1206 + 1 { + let array1555 : Array[String] = [] + for index1556 = 0 + index1556 < mbt_ffi_load32(iter_base + 32) + index1556 = index1556 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1206 * 8 + index1556 * 8 - let result1204 = mbt_ffi_ptr2str( + 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 + 28)) - Option::Some(array1205) + Option::Some(array1555) } _ => panic() } @@ -10828,95 +14880,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1203, - allowed_extensions: lifted1207, + allowed_mime_types: lifted1553, + allowed_extensions: lifted1557, }) } 27 => { - let lifted1211 : Array[String]? = match + let lifted1561 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1209 : Array[String] = [] - for index1210 = 0 - index1210 < mbt_ffi_load32(iter_base + 16) - index1210 = index1210 + 1 { + let array1559 : Array[String] = [] + for index1560 = 0 + index1560 < mbt_ffi_load32(iter_base + 16) + index1560 = index1560 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1210 * 8 + index1560 * 8 - let result1208 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array1209) + Option::Some(array1559) } _ => panic() } - let lifted1215 : Array[String]? = match + let lifted1565 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1213 : Array[String] = [] - for index1214 = 0 - index1214 < mbt_ffi_load32(iter_base + 28) - index1214 = index1214 + 1 { + let array1563 : Array[String] = [] + for index1564 = 0 + index1564 < mbt_ffi_load32(iter_base + 28) + index1564 = index1564 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1214 * 8 + index1564 * 8 - let result1212 = mbt_ffi_ptr2str( + 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 + 24)) - Option::Some(array1213) + Option::Some(array1563) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1211, - allowed_hosts: lifted1215, + allowed_schemes: lifted1561, + allowed_hosts: lifted1565, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1216 = mbt_ffi_ptr2str( + let result1566 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1218 : Array[String] = [] - for index1219 = 0 - index1219 < mbt_ffi_load32(iter_base + 20) - index1219 = index1219 + 1 { + let array1568 : Array[String] = [] + for index1569 = 0 + index1569 < mbt_ffi_load32(iter_base + 20) + index1569 = index1569 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1219 * 8 + index1569 * 8 - let result1217 = mbt_ffi_ptr2str( + let result1567 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1218.push(result1217) + array1568.push(result1567) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1221 : @types.QuantityValue? = match + let lifted1571 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1220 = mbt_ffi_ptr2str( + let result1570 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -10924,17 +14976,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1220, + unit: result1570, }) } _ => panic() } - let lifted1223 : @types.QuantityValue? = match + let lifted1573 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1222 = mbt_ffi_ptr2str( + let result1572 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -10942,406 +14994,406 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1222, + unit: result1572, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1216, - allowed_suffixes: array1218, - min: lifted1221, - max: lifted1223, + base_unit: result1566, + allowed_suffixes: array1568, + min: lifted1571, + max: lifted1573, }) } 31 => { - let array1247 : Array[@types.UnionBranch] = [] - for index1248 = 0 - index1248 < mbt_ffi_load32(iter_base + 12) - index1248 = index1248 + 1 { + let array1597 : Array[@types.UnionBranch] = [] + for index1598 = 0 + index1598 < mbt_ffi_load32(iter_base + 12) + index1598 = index1598 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1248 * 92 + index1598 * 92 - let result1224 = mbt_ffi_ptr2str( + let result1574 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1233 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1583 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1225 = mbt_ffi_ptr2str( + let result1575 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1225) + @types.DiscriminatorRule::Prefix(result1575) } 1 => { - let result1226 = mbt_ffi_ptr2str( + let result1576 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1226) + @types.DiscriminatorRule::Suffix(result1576) } 2 => { - let result1227 = mbt_ffi_ptr2str( + let result1577 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1227) + @types.DiscriminatorRule::Contains(result1577) } 3 => { - let result1228 = mbt_ffi_ptr2str( + let result1578 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1228) + @types.DiscriminatorRule::Regex(result1578) } 4 => { - let result1229 = mbt_ffi_ptr2str( + let result1579 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1231 : String? = match + let lifted1581 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1230 = mbt_ffi_ptr2str( + let result1580 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1230) + Option::Some(result1580) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1229, - literal: lifted1231, + field_name: result1579, + literal: lifted1581, }) } 5 => { - let result1232 = mbt_ffi_ptr2str( + let result1582 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1232) + @types.DiscriminatorRule::FieldAbsent(result1582) } _ => panic() } - let lifted1235 : String? = match + let lifted1585 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1234 = mbt_ffi_ptr2str( + let result1584 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1234) + Option::Some(result1584) } _ => panic() } - let array1237 : Array[String] = [] - for index1238 = 0 - index1238 < mbt_ffi_load32(iter_base + 52) - index1238 = index1238 + 1 { + let array1587 : Array[String] = [] + for index1588 = 0 + index1588 < mbt_ffi_load32(iter_base + 52) + index1588 = index1588 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1238 * 8 + index1588 * 8 - let result1236 = mbt_ffi_ptr2str( + let result1586 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1237.push(result1236) + array1587.push(result1586) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1240 : Array[String] = [] - for index1241 = 0 - index1241 < mbt_ffi_load32(iter_base + 60) - index1241 = index1241 + 1 { + let array1590 : Array[String] = [] + for index1591 = 0 + index1591 < mbt_ffi_load32(iter_base + 60) + index1591 = index1591 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1241 * 8 + index1591 * 8 - let result1239 = mbt_ffi_ptr2str( + let result1589 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1240.push(result1239) + array1590.push(result1589) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1243 : String? = match + let lifted1593 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1242 = mbt_ffi_ptr2str( + let result1592 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1242) + Option::Some(result1592) } _ => panic() } - let lifted1246 : @types.Role? = match + let lifted1596 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1245 = match + let lifted1595 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1244 = mbt_ffi_ptr2str( + let result1594 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1244) + @types.Role::Other(result1594) } _ => panic() } - Option::Some(lifted1245) + Option::Some(lifted1595) } _ => panic() } - array1247.push(@types.UnionBranch::{ - tag: result1224, + array1597.push(@types.UnionBranch::{ + tag: result1574, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1233, + discriminator: lifted1583, metadata: @types.MetadataEnvelope::{ - doc: lifted1235, - aliases: array1237, - examples: array1240, - deprecated: lifted1243, - role: lifted1246, + doc: lifted1585, + aliases: array1587, + examples: array1590, + deprecated: lifted1593, + role: lifted1596, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1247, + branches: array1597, }) } 32 => { - let lifted1250 : String? = match + let lifted1600 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1249 = mbt_ffi_ptr2str( + let result1599 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1249) + Option::Some(result1599) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1250, + category: lifted1600, }) } 33 => { - let lifted1252 : String? = match + let lifted1602 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1251 = mbt_ffi_ptr2str( + let result1601 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1251) + Option::Some(result1601) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1252, + resource_name: lifted1602, }) } 34 => { - let lifted1253 : Int? = match + let lifted1603 : 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(lifted1253) + @types.SchemaTypeBody::FutureType(lifted1603) } 35 => { - let lifted1254 : Int? = match + let lifted1604 : 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(lifted1254) + @types.SchemaTypeBody::StreamType(lifted1604) } _ => panic() } - let lifted1257 : String? = match + let lifted1607 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1256 = mbt_ffi_ptr2str( + let result1606 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1256) + Option::Some(result1606) } _ => panic() } - let array1259 : Array[String] = [] - for index1260 = 0 - index1260 < mbt_ffi_load32(iter_base + 104) - index1260 = index1260 + 1 { + let array1609 : Array[String] = [] + for index1610 = 0 + index1610 < mbt_ffi_load32(iter_base + 104) + index1610 = index1610 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1260 * 8 + index1610 * 8 - let result1258 = mbt_ffi_ptr2str( + let result1608 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1259.push(result1258) + array1609.push(result1608) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1262 : Array[String] = [] - for index1263 = 0 - index1263 < mbt_ffi_load32(iter_base + 112) - index1263 = index1263 + 1 { + let array1612 : Array[String] = [] + for index1613 = 0 + index1613 < mbt_ffi_load32(iter_base + 112) + index1613 = index1613 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1263 * 8 + index1613 * 8 - let result1261 = mbt_ffi_ptr2str( + let result1611 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1262.push(result1261) + array1612.push(result1611) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1265 : String? = match + let lifted1615 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1264 = mbt_ffi_ptr2str( + let result1614 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1264) + Option::Some(result1614) } _ => panic() } - let lifted1268 : @types.Role? = match + let lifted1618 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1267 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1617 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1266 = mbt_ffi_ptr2str( + let result1616 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1266) + @types.Role::Other(result1616) } _ => panic() } - Option::Some(lifted1267) + Option::Some(lifted1617) } _ => panic() } - array1269.push(@types.SchemaTypeNode::{ - body: lifted1255, + array1619.push(@types.SchemaTypeNode::{ + body: lifted1605, metadata: @types.MetadataEnvelope::{ - doc: lifted1257, - aliases: array1259, - examples: array1262, - deprecated: lifted1265, - role: lifted1268, + doc: lifted1607, + aliases: array1609, + examples: array1612, + deprecated: lifted1615, + role: lifted1618, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let array1274 : Array[@types.SchemaTypeDef] = [] - for index1275 = 0 - index1275 < mbt_ffi_load32(iter_base + 52) - index1275 = index1275 + 1 { + let array1624 : Array[@types.SchemaTypeDef] = [] + for index1625 = 0 + index1625 < mbt_ffi_load32(iter_base + 52) + index1625 = index1625 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1275 * 24 + index1625 * 24 - let result1271 = mbt_ffi_ptr2str( + let result1621 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1273 : String? = match + let lifted1623 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1272 = mbt_ffi_ptr2str( + let result1622 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1272) + Option::Some(result1622) } _ => panic() } - array1274.push(@types.SchemaTypeDef::{ - id: result1271, - name: lifted1273, + array1624.push(@types.SchemaTypeDef::{ + id: result1621, + name: lifted1623, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1305 : Array[@types.SchemaValueNode] = [] - for index1306 = 0 - index1306 < mbt_ffi_load32(iter_base + 64) - index1306 = index1306 + 1 { + let array1655 : Array[@types.SchemaValueNode] = [] + for index1656 = 0 + index1656 < mbt_ffi_load32(iter_base + 64) + index1656 = index1656 + 1 { let iter_base = mbt_ffi_load32(iter_base + 60) + - index1306 * 32 + index1656 * 32 - let lifted1304 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1654 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -11393,29 +15445,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1276 = mbt_ffi_ptr2str( + let result1626 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1276) + @types.SchemaValueNode::StringValue(result1626) } 13 => { - let array1277 : Array[Int] = [] - for index1278 = 0 - index1278 < mbt_ffi_load32(iter_base + 12) - index1278 = index1278 + 1 { + let array1627 : Array[Int] = [] + for index1628 = 0 + index1628 < mbt_ffi_load32(iter_base + 12) + index1628 = index1628 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1278 * 4 + index1628 * 4 - array1277.push(mbt_ffi_load32(iter_base + 0)) + array1627.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1277) + @types.SchemaValueNode::RecordValue(array1627) } 14 => { - let lifted1279 : Int? = match + let lifted1629 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -11424,7 +15476,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1279, + payload: lifted1629, }) } 15 => @@ -11432,180 +15484,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1280 : Array[Bool] = [] - for index1281 = 0 - index1281 < mbt_ffi_load32(iter_base + 12) - index1281 = index1281 + 1 { + let array1630 : Array[Bool] = [] + for index1631 = 0 + index1631 < mbt_ffi_load32(iter_base + 12) + index1631 = index1631 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1281 * 1 + index1631 * 1 - array1280.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1630.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1280) + @types.SchemaValueNode::FlagsValue(array1630) } 17 => { - let array1282 : Array[Int] = [] - for index1283 = 0 - index1283 < mbt_ffi_load32(iter_base + 12) - index1283 = index1283 + 1 { + let array1632 : Array[Int] = [] + for index1633 = 0 + index1633 < mbt_ffi_load32(iter_base + 12) + index1633 = index1633 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1283 * 4 + index1633 * 4 - array1282.push(mbt_ffi_load32(iter_base + 0)) + array1632.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1282) + @types.SchemaValueNode::TupleValue(array1632) } 18 => { - let array1284 : Array[Int] = [] - for index1285 = 0 - index1285 < mbt_ffi_load32(iter_base + 12) - index1285 = index1285 + 1 { + let array1634 : Array[Int] = [] + for index1635 = 0 + index1635 < mbt_ffi_load32(iter_base + 12) + index1635 = index1635 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1285 * 4 + index1635 * 4 - array1284.push(mbt_ffi_load32(iter_base + 0)) + array1634.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1284) + @types.SchemaValueNode::ListValue(array1634) } 19 => { - let array1286 : Array[Int] = [] - for index1287 = 0 - index1287 < mbt_ffi_load32(iter_base + 12) - index1287 = index1287 + 1 { + 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) + - index1287 * 4 + 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::FixedListValue(array1286) + @types.SchemaValueNode::FixedListValue(array1636) } 20 => { - let array1288 : Array[@types.MapEntry] = [] - for index1289 = 0 - index1289 < mbt_ffi_load32(iter_base + 12) - index1289 = index1289 + 1 { + let array1638 : Array[@types.MapEntry] = [] + for index1639 = 0 + index1639 < mbt_ffi_load32(iter_base + 12) + index1639 = index1639 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1289 * 8 + index1639 * 8 - array1288.push(@types.MapEntry::{ + array1638.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(array1288) + @types.SchemaValueNode::MapValue(array1638) } 21 => { - let lifted1290 : Int? = match + let lifted1640 : 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(lifted1290) + @types.SchemaValueNode::OptionValue(lifted1640) } 22 => { - let lifted1293 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1643 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1291 : Int? = match + let lifted1641 : 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(lifted1291) + @types.ResultValuePayload::OkValue(lifted1641) } 1 => { - let lifted1292 : Int? = match + let lifted1642 : 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(lifted1292) + @types.ResultValuePayload::ErrValue(lifted1642) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1293) + @types.SchemaValueNode::ResultValue(lifted1643) } 23 => { - let result1294 = mbt_ffi_ptr2str( + let result1644 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1296 : String? = match + let lifted1646 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1295 = mbt_ffi_ptr2str( + let result1645 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1295) + Option::Some(result1645) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1294, - language: lifted1296, + text: result1644, + language: lifted1646, }) } 24 => { - let result1297 = mbt_ffi_ptr2bytes( + let result1647 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1299 : String? = match + let lifted1649 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1298 = mbt_ffi_ptr2str( + let result1648 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1298) + Option::Some(result1648) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1297, - mime_type: lifted1299, + bytes: result1647, + mime_type: lifted1649, }) } 25 => { - let result1300 = mbt_ffi_ptr2str( + let result1650 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1300) + @types.SchemaValueNode::PathValue(result1650) } 26 => { - let result1301 = mbt_ffi_ptr2str( + let result1651 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1301) + @types.SchemaValueNode::UrlValue(result1651) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -11617,7 +15669,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1302 = mbt_ffi_ptr2str( + let result1652 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -11625,17 +15677,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1302, + unit: result1652, }) } 30 => { - let result1303 = mbt_ffi_ptr2str( + let result1653 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1303, + tag: result1653, body: mbt_ffi_load32(iter_base + 16), }) } @@ -11652,65 +15704,65 @@ pub fn enrich_oplog_entries( _ => panic() } - array1305.push(lifted1304) + array1655.push(lifted1654) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) - let result1307 = mbt_ffi_ptr2str( + let result1657 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 72), mbt_ffi_load32(iter_base + 76), ) - let array1309 : Array[String] = [] - for index1310 = 0 - index1310 < mbt_ffi_load32(iter_base + 84) - index1310 = index1310 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index1310 * 8 + let array1659 : Array[String] = [] + for index1660 = 0 + index1660 < mbt_ffi_load32(iter_base + 84) + index1660 = index1660 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 80) + index1660 * 8 - let result1308 = mbt_ffi_ptr2str( + let result1658 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1309.push(result1308) + array1659.push(result1658) } mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) - let array1324 : Array[Array[SpanData]] = [] - for index1325 = 0 - index1325 < mbt_ffi_load32(iter_base + 92) - index1325 = index1325 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index1325 * 8 + let array1674 : Array[Array[SpanData]] = [] + for index1675 = 0 + index1675 < mbt_ffi_load32(iter_base + 92) + index1675 = index1675 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index1675 * 8 - let array1322 : Array[SpanData] = [] - for index1323 = 0 - index1323 < mbt_ffi_load32(iter_base + 4) - index1323 = index1323 + 1 { + let array1672 : Array[SpanData] = [] + for index1673 = 0 + index1673 < mbt_ffi_load32(iter_base + 4) + index1673 = index1673 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index1323 * 80 + index1673 * 80 - let lifted1321 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1671 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1311 = mbt_ffi_ptr2str( + let result1661 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1313 : String? = match + let lifted1663 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1312 = mbt_ffi_ptr2str( + let result1662 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1312) + Option::Some(result1662) } _ => panic() } - let lifted1314 : UInt64? = match + let lifted1664 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -11720,411 +15772,1221 @@ pub fn enrich_oplog_entries( _ => panic() } - let array1318 : Array[@context.Attribute] = [] - for index1319 = 0 - index1319 < mbt_ffi_load32(iter_base + 68) - index1319 = index1319 + 1 { + let array1668 : Array[@context.Attribute] = [] + for index1669 = 0 + index1669 < mbt_ffi_load32(iter_base + 68) + index1669 = index1669 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index1319 * 20 + index1669 * 20 - let result1315 = mbt_ffi_ptr2str( + let result1665 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1317 = match + let lifted1667 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1316 = mbt_ffi_ptr2str( + let result1666 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1316) + @context.AttributeValue::String(result1666) } _ => panic() } - array1318.push(@context.Attribute::{ - key: result1315, - value: lifted1317, + array1668.push(@context.Attribute::{ + key: result1665, + value: lifted1667, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result1311, + span_id: result1661, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted1313, - linked_context: lifted1314, - attributes: array1318, + parent: lifted1663, + linked_context: lifted1664, + attributes: array1668, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result1320 = mbt_ffi_ptr2str( + let result1670 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result1320, + span_id: result1670, }) } _ => panic() } - array1322.push(lifted1321) + array1672.push(lifted1671) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array1324.push(array1322) + array1674.push(array1672) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) AgentInvocation::AgentInitialization(AgentInitializationParameters::{ - idempotency_key: result1142, + idempotency_key: result1422, constructor_parameters: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1269, - defs: array1274, + type_nodes: array1619, + defs: array1624, root: mbt_ffi_load32(iter_base + 56), }, value: @types.SchemaValueTree::{ - value_nodes: array1305, + value_nodes: array1655, root: mbt_ffi_load32(iter_base + 68), }, }, - trace_id: result1307, - trace_states: array1309, - invocation_context: array1324, + trace_id: result1657, + trace_states: array1659, + invocation_context: array1674, }) } 1 => { - let result1326 = mbt_ffi_ptr2str( + let result1676 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result1327 = mbt_ffi_ptr2str( + let result1677 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let array1454 : Array[@types.SchemaTypeNode] = [] - for index1455 = 0 - index1455 < mbt_ffi_load32(iter_base + 52) - index1455 = index1455 + 1 { + let array1874 : Array[@types.SchemaTypeNode] = [] + for index1875 = 0 + index1875 < mbt_ffi_load32(iter_base + 52) + index1875 = index1875 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1455 * 144 + index1875 * 144 - let lifted1440 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1860 = 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 + 2 => { + let lifted1684 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1679 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1678 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1678) + } + _ => panic() + } + + let lifted1681 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1680 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1680) + } + _ => panic() + } + + let lifted1683 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1682 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1682) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1679, + max: lifted1681, + unit: lifted1683, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1684) + } + 3 => { + let lifted1691 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1686 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1685 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1685) + } + _ => panic() + } + + let lifted1688 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1687 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1687) + } + _ => panic() + } + + let lifted1690 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1689 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1689) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1686, + max: lifted1688, + unit: lifted1690, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1691) + } + 4 => { + let lifted1698 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1693 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1692 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1692) + } + _ => panic() + } + + let lifted1695 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1694 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1694) + } + _ => panic() + } + + let lifted1697 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1696 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1696) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1693, + max: lifted1695, + unit: lifted1697, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1698) + } + 5 => { + let lifted1705 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1700 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1699 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1699) + } + _ => panic() + } + + let lifted1702 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1701 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1701) + } + _ => panic() + } + + let lifted1704 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1703 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1703) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1700, + max: lifted1702, + unit: lifted1704, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1705) + } + 6 => { + let lifted1712 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1707 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1706 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1706) + } + _ => panic() + } + + let lifted1709 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1708 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1708) + } + _ => panic() + } + + let lifted1711 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1710 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1710) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1707, + max: lifted1709, + unit: lifted1711, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1712) + } + 7 => { + let lifted1719 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1714 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1713 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1713) + } + _ => panic() + } + + let lifted1716 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1715 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1715) + } + _ => panic() + } + + let lifted1718 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1717 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1717) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1714, + max: lifted1716, + unit: lifted1718, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1719) + } + 8 => { + let lifted1726 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1721 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1720 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1720) + } + _ => panic() + } + + let lifted1723 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1722 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1722) + } + _ => panic() + } + + let lifted1725 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1724 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1724) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1721, + max: lifted1723, + unit: lifted1725, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1726) + } + 9 => { + let lifted1733 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1728 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1727 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1727) + } + _ => panic() + } + + let lifted1730 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1729 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1729) + } + _ => panic() + } + + let lifted1732 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1731 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1731) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1728, + max: lifted1730, + unit: lifted1732, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1733) + } + 10 => { + let lifted1740 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1735 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1734 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1734) + } + _ => panic() + } + + let lifted1737 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1736 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1736) + } + _ => panic() + } + + let lifted1739 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1738 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1738) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1735, + max: lifted1737, + unit: lifted1739, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1740) + } + 11 => { + let lifted1747 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1742 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1741 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1741) + } + _ => panic() + } + + let lifted1744 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1743 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1743) + } + _ => panic() + } + + let lifted1746 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1745 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1745) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1742, + max: lifted1744, + unit: lifted1746, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1747) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1342 : Array[@types.NamedFieldType] = [] - for index1343 = 0 - index1343 < mbt_ffi_load32(iter_base + 12) - index1343 = index1343 + 1 { + let array1762 : Array[@types.NamedFieldType] = [] + for index1763 = 0 + index1763 < mbt_ffi_load32(iter_base + 12) + index1763 = index1763 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1343 * 68 + index1763 * 68 - let result1328 = mbt_ffi_ptr2str( + let result1748 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1330 : String? = match + let lifted1750 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1329 = mbt_ffi_ptr2str( + let result1749 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1329) + Option::Some(result1749) } _ => panic() } - let array1332 : Array[String] = [] - for index1333 = 0 - index1333 < mbt_ffi_load32(iter_base + 28) - index1333 = index1333 + 1 { + let array1752 : Array[String] = [] + for index1753 = 0 + index1753 < mbt_ffi_load32(iter_base + 28) + index1753 = index1753 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1333 * 8 + index1753 * 8 - let result1331 = mbt_ffi_ptr2str( + let result1751 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1332.push(result1331) + array1752.push(result1751) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1335 : Array[String] = [] - for index1336 = 0 - index1336 < mbt_ffi_load32(iter_base + 36) - index1336 = index1336 + 1 { + let array1755 : Array[String] = [] + for index1756 = 0 + index1756 < mbt_ffi_load32(iter_base + 36) + index1756 = index1756 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1336 * 8 + index1756 * 8 - let result1334 = mbt_ffi_ptr2str( + let result1754 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1335.push(result1334) + array1755.push(result1754) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1338 : String? = match + let lifted1758 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1337 = mbt_ffi_ptr2str( + let result1757 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1337) + Option::Some(result1757) } _ => panic() } - let lifted1341 : @types.Role? = match + let lifted1761 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1340 = match + let lifted1760 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1339 = mbt_ffi_ptr2str( + let result1759 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1339) + @types.Role::Other(result1759) } _ => panic() } - Option::Some(lifted1340) + Option::Some(lifted1760) } _ => panic() } - array1342.push(@types.NamedFieldType::{ - name: result1328, + array1762.push(@types.NamedFieldType::{ + name: result1748, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1330, - aliases: array1332, - examples: array1335, - deprecated: lifted1338, - role: lifted1341, + doc: lifted1750, + aliases: array1752, + examples: array1755, + deprecated: lifted1758, + role: lifted1761, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1342) + @types.SchemaTypeBody::RecordType(array1762) } 15 => { - let array1359 : Array[@types.VariantCaseType] = [] - for index1360 = 0 - index1360 < mbt_ffi_load32(iter_base + 12) - index1360 = index1360 + 1 { + let array1779 : Array[@types.VariantCaseType] = [] + for index1780 = 0 + index1780 < mbt_ffi_load32(iter_base + 12) + index1780 = index1780 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1360 * 72 + index1780 * 72 - let result1344 = mbt_ffi_ptr2str( + let result1764 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1345 : Int? = match + let lifted1765 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1347 : String? = match + let lifted1767 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1346 = mbt_ffi_ptr2str( + let result1766 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1346) + Option::Some(result1766) } _ => panic() } - let array1349 : Array[String] = [] - for index1350 = 0 - index1350 < mbt_ffi_load32(iter_base + 32) - index1350 = index1350 + 1 { + let array1769 : Array[String] = [] + for index1770 = 0 + index1770 < mbt_ffi_load32(iter_base + 32) + index1770 = index1770 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1350 * 8 + index1770 * 8 - let result1348 = mbt_ffi_ptr2str( + let result1768 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1349.push(result1348) + array1769.push(result1768) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1352 : Array[String] = [] - for index1353 = 0 - index1353 < mbt_ffi_load32(iter_base + 40) - index1353 = index1353 + 1 { + let array1772 : Array[String] = [] + for index1773 = 0 + index1773 < mbt_ffi_load32(iter_base + 40) + index1773 = index1773 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1353 * 8 + index1773 * 8 - let result1351 = mbt_ffi_ptr2str( + let result1771 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1352.push(result1351) + array1772.push(result1771) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1355 : String? = match + let lifted1775 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1354 = mbt_ffi_ptr2str( + let result1774 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1354) + Option::Some(result1774) } _ => panic() } - let lifted1358 : @types.Role? = match + let lifted1778 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1357 = match + let lifted1777 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1356 = mbt_ffi_ptr2str( + let result1776 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1356) + @types.Role::Other(result1776) } _ => panic() } - Option::Some(lifted1357) + Option::Some(lifted1777) } _ => panic() } - array1359.push(@types.VariantCaseType::{ - name: result1344, - payload: lifted1345, + array1779.push(@types.VariantCaseType::{ + name: result1764, + payload: lifted1765, metadata: @types.MetadataEnvelope::{ - doc: lifted1347, - aliases: array1349, - examples: array1352, - deprecated: lifted1355, - role: lifted1358, + doc: lifted1767, + aliases: array1769, + examples: array1772, + deprecated: lifted1775, + role: lifted1778, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1359) + @types.SchemaTypeBody::VariantType(array1779) } 16 => { - let array1362 : Array[String] = [] - for index1363 = 0 - index1363 < mbt_ffi_load32(iter_base + 12) - index1363 = index1363 + 1 { + let array1782 : Array[String] = [] + for index1783 = 0 + index1783 < mbt_ffi_load32(iter_base + 12) + index1783 = index1783 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1363 * 8 + index1783 * 8 - let result1361 = mbt_ffi_ptr2str( + let result1781 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1362.push(result1361) + array1782.push(result1781) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1362) + @types.SchemaTypeBody::EnumType(array1782) } 17 => { - let array1365 : Array[String] = [] - for index1366 = 0 - index1366 < mbt_ffi_load32(iter_base + 12) - index1366 = index1366 + 1 { + let array1785 : Array[String] = [] + for index1786 = 0 + index1786 < mbt_ffi_load32(iter_base + 12) + index1786 = index1786 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1366 * 8 + index1786 * 8 - let result1364 = mbt_ffi_ptr2str( + let result1784 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1365.push(result1364) + array1785.push(result1784) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1365) + @types.SchemaTypeBody::FlagsType(array1785) } 18 => { - let array1367 : Array[Int] = [] - for index1368 = 0 - index1368 < mbt_ffi_load32(iter_base + 12) - index1368 = index1368 + 1 { + let array1787 : Array[Int] = [] + for index1788 = 0 + index1788 < mbt_ffi_load32(iter_base + 12) + index1788 = index1788 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1368 * 4 + index1788 * 4 - array1367.push(mbt_ffi_load32(iter_base + 0)) + array1787.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1367) + @types.SchemaTypeBody::TupleType(array1787) } 19 => @types.SchemaTypeBody::ListType( @@ -12145,14 +17007,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1369 : Int? = match + let lifted1789 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1370 : Int? = match + let lifted1790 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -12160,37 +17022,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1369, - err: lifted1370, + ok: lifted1789, + err: lifted1790, }) } 24 => { - let lifted1374 : Array[String]? = match + let lifted1794 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1372 : Array[String] = [] - for index1373 = 0 - index1373 < mbt_ffi_load32(iter_base + 16) - index1373 = index1373 + 1 { + let array1792 : Array[String] = [] + for index1793 = 0 + index1793 < mbt_ffi_load32(iter_base + 16) + index1793 = index1793 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1373 * 8 + index1793 * 8 - let result1371 = mbt_ffi_ptr2str( + let result1791 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1372.push(result1371) + array1792.push(result1791) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1372) + Option::Some(array1792) } _ => panic() } - let lifted1375 : UInt? = match + let lifted1795 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -12200,7 +17062,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1376 : UInt? = match + let lifted1796 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -12210,54 +17072,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1378 : String? = match + let lifted1798 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1377 = mbt_ffi_ptr2str( + let result1797 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1377) + Option::Some(result1797) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1374, - min_length: lifted1375, - max_length: lifted1376, - regex: lifted1378, + languages: lifted1794, + min_length: lifted1795, + max_length: lifted1796, + regex: lifted1798, }) } 25 => { - let lifted1382 : Array[String]? = match + let lifted1802 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1380 : Array[String] = [] - for index1381 = 0 - index1381 < mbt_ffi_load32(iter_base + 16) - index1381 = index1381 + 1 { + let array1800 : Array[String] = [] + for index1801 = 0 + index1801 < mbt_ffi_load32(iter_base + 16) + index1801 = index1801 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1381 * 8 + index1801 * 8 - let result1379 = mbt_ffi_ptr2str( + let result1799 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1380.push(result1379) + array1800.push(result1799) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1380) + Option::Some(array1800) } _ => panic() } - let lifted1383 : UInt? = match + let lifted1803 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -12267,7 +17129,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1384 : UInt? = match + let lifted1804 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -12278,58 +17140,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1382, - min_bytes: lifted1383, - max_bytes: lifted1384, + mime_types: lifted1802, + min_bytes: lifted1803, + max_bytes: lifted1804, }) } 26 => { - let lifted1388 : Array[String]? = match + let lifted1808 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1386 : Array[String] = [] - for index1387 = 0 - index1387 < mbt_ffi_load32(iter_base + 20) - index1387 = index1387 + 1 { + let array1806 : Array[String] = [] + for index1807 = 0 + index1807 < mbt_ffi_load32(iter_base + 20) + index1807 = index1807 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1387 * 8 + index1807 * 8 - let result1385 = mbt_ffi_ptr2str( + let result1805 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1386.push(result1385) + array1806.push(result1805) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1386) + Option::Some(array1806) } _ => panic() } - let lifted1392 : Array[String]? = match + let lifted1812 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1390 : Array[String] = [] - for index1391 = 0 - index1391 < mbt_ffi_load32(iter_base + 32) - index1391 = index1391 + 1 { + let array1810 : Array[String] = [] + for index1811 = 0 + index1811 < mbt_ffi_load32(iter_base + 32) + index1811 = index1811 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1391 * 8 + index1811 * 8 - let result1389 = mbt_ffi_ptr2str( + let result1809 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1390.push(result1389) + array1810.push(result1809) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1390) + Option::Some(array1810) } _ => panic() } @@ -12341,95 +17203,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1388, - allowed_extensions: lifted1392, + allowed_mime_types: lifted1808, + allowed_extensions: lifted1812, }) } 27 => { - let lifted1396 : Array[String]? = match + let lifted1816 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1394 : Array[String] = [] - for index1395 = 0 - index1395 < mbt_ffi_load32(iter_base + 16) - index1395 = index1395 + 1 { + let array1814 : Array[String] = [] + for index1815 = 0 + index1815 < mbt_ffi_load32(iter_base + 16) + index1815 = index1815 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1395 * 8 + index1815 * 8 - let result1393 = mbt_ffi_ptr2str( + let result1813 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1394.push(result1393) + array1814.push(result1813) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1394) + Option::Some(array1814) } _ => panic() } - let lifted1400 : Array[String]? = match + let lifted1820 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1398 : Array[String] = [] - for index1399 = 0 - index1399 < mbt_ffi_load32(iter_base + 28) - index1399 = index1399 + 1 { + let array1818 : Array[String] = [] + for index1819 = 0 + index1819 < mbt_ffi_load32(iter_base + 28) + index1819 = index1819 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1399 * 8 + index1819 * 8 - let result1397 = mbt_ffi_ptr2str( + let result1817 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1398.push(result1397) + array1818.push(result1817) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1398) + Option::Some(array1818) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1396, - allowed_hosts: lifted1400, + allowed_schemes: lifted1816, + allowed_hosts: lifted1820, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1401 = mbt_ffi_ptr2str( + let result1821 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1403 : Array[String] = [] - for index1404 = 0 - index1404 < mbt_ffi_load32(iter_base + 20) - index1404 = index1404 + 1 { + let array1823 : Array[String] = [] + for index1824 = 0 + index1824 < mbt_ffi_load32(iter_base + 20) + index1824 = index1824 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1404 * 8 + index1824 * 8 - let result1402 = mbt_ffi_ptr2str( + 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 + 16)) - let lifted1406 : @types.QuantityValue? = match + let lifted1826 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1405 = mbt_ffi_ptr2str( + let result1825 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -12437,17 +17299,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1405, + unit: result1825, }) } _ => panic() } - let lifted1408 : @types.QuantityValue? = match + let lifted1828 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1407 = mbt_ffi_ptr2str( + let result1827 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -12455,406 +17317,406 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1407, + unit: result1827, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1401, - allowed_suffixes: array1403, - min: lifted1406, - max: lifted1408, + base_unit: result1821, + allowed_suffixes: array1823, + min: lifted1826, + max: lifted1828, }) } 31 => { - let array1432 : Array[@types.UnionBranch] = [] - for index1433 = 0 - index1433 < mbt_ffi_load32(iter_base + 12) - index1433 = index1433 + 1 { + let array1852 : Array[@types.UnionBranch] = [] + for index1853 = 0 + index1853 < mbt_ffi_load32(iter_base + 12) + index1853 = index1853 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1433 * 92 + index1853 * 92 - let result1409 = mbt_ffi_ptr2str( + let result1829 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1418 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1838 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1410 = mbt_ffi_ptr2str( + let result1830 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1410) + @types.DiscriminatorRule::Prefix(result1830) } 1 => { - let result1411 = mbt_ffi_ptr2str( + let result1831 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1411) + @types.DiscriminatorRule::Suffix(result1831) } 2 => { - let result1412 = mbt_ffi_ptr2str( + let result1832 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1412) + @types.DiscriminatorRule::Contains(result1832) } 3 => { - let result1413 = mbt_ffi_ptr2str( + let result1833 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1413) + @types.DiscriminatorRule::Regex(result1833) } 4 => { - let result1414 = mbt_ffi_ptr2str( + let result1834 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1416 : String? = match + let lifted1836 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1415 = mbt_ffi_ptr2str( + let result1835 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1415) + Option::Some(result1835) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1414, - literal: lifted1416, + field_name: result1834, + literal: lifted1836, }) } 5 => { - let result1417 = mbt_ffi_ptr2str( + let result1837 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1417) + @types.DiscriminatorRule::FieldAbsent(result1837) } _ => panic() } - let lifted1420 : String? = match + let lifted1840 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1419 = mbt_ffi_ptr2str( + let result1839 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1419) + Option::Some(result1839) } _ => panic() } - let array1422 : Array[String] = [] - for index1423 = 0 - index1423 < mbt_ffi_load32(iter_base + 52) - index1423 = index1423 + 1 { + let array1842 : Array[String] = [] + for index1843 = 0 + index1843 < mbt_ffi_load32(iter_base + 52) + index1843 = index1843 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1423 * 8 + index1843 * 8 - let result1421 = mbt_ffi_ptr2str( + let result1841 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1422.push(result1421) + array1842.push(result1841) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1425 : Array[String] = [] - for index1426 = 0 - index1426 < mbt_ffi_load32(iter_base + 60) - index1426 = index1426 + 1 { + let array1845 : Array[String] = [] + for index1846 = 0 + index1846 < mbt_ffi_load32(iter_base + 60) + index1846 = index1846 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1426 * 8 + index1846 * 8 - let result1424 = mbt_ffi_ptr2str( + let result1844 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1425.push(result1424) + array1845.push(result1844) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1428 : String? = match + let lifted1848 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1427 = mbt_ffi_ptr2str( + let result1847 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1427) + Option::Some(result1847) } _ => panic() } - let lifted1431 : @types.Role? = match + let lifted1851 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1430 = match + let lifted1850 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1429 = mbt_ffi_ptr2str( + let result1849 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1429) + @types.Role::Other(result1849) } _ => panic() } - Option::Some(lifted1430) + Option::Some(lifted1850) } _ => panic() } - array1432.push(@types.UnionBranch::{ - tag: result1409, + array1852.push(@types.UnionBranch::{ + tag: result1829, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1418, + discriminator: lifted1838, metadata: @types.MetadataEnvelope::{ - doc: lifted1420, - aliases: array1422, - examples: array1425, - deprecated: lifted1428, - role: lifted1431, + doc: lifted1840, + aliases: array1842, + examples: array1845, + deprecated: lifted1848, + role: lifted1851, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1432, + branches: array1852, }) } 32 => { - let lifted1435 : String? = match + let lifted1855 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1434 = mbt_ffi_ptr2str( + let result1854 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1434) + Option::Some(result1854) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1435, + category: lifted1855, }) } 33 => { - let lifted1437 : String? = match + let lifted1857 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1436 = mbt_ffi_ptr2str( + let result1856 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1436) + Option::Some(result1856) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1437, + resource_name: lifted1857, }) } 34 => { - let lifted1438 : Int? = match + let lifted1858 : 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(lifted1438) + @types.SchemaTypeBody::FutureType(lifted1858) } 35 => { - let lifted1439 : Int? = match + let lifted1859 : 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(lifted1439) + @types.SchemaTypeBody::StreamType(lifted1859) } _ => panic() } - let lifted1442 : String? = match + let lifted1862 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1441 = mbt_ffi_ptr2str( + let result1861 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1441) + Option::Some(result1861) } _ => panic() } - let array1444 : Array[String] = [] - for index1445 = 0 - index1445 < mbt_ffi_load32(iter_base + 104) - index1445 = index1445 + 1 { + let array1864 : Array[String] = [] + for index1865 = 0 + index1865 < mbt_ffi_load32(iter_base + 104) + index1865 = index1865 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1445 * 8 + index1865 * 8 - let result1443 = mbt_ffi_ptr2str( + let result1863 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1444.push(result1443) + array1864.push(result1863) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1447 : Array[String] = [] - for index1448 = 0 - index1448 < mbt_ffi_load32(iter_base + 112) - index1448 = index1448 + 1 { + let array1867 : Array[String] = [] + for index1868 = 0 + index1868 < mbt_ffi_load32(iter_base + 112) + index1868 = index1868 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1448 * 8 + index1868 * 8 - let result1446 = mbt_ffi_ptr2str( + let result1866 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1447.push(result1446) + array1867.push(result1866) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1450 : String? = match + let lifted1870 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1449 = mbt_ffi_ptr2str( + let result1869 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1449) + Option::Some(result1869) } _ => panic() } - let lifted1453 : @types.Role? = match + let lifted1873 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1452 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1872 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1451 = mbt_ffi_ptr2str( + let result1871 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1451) + @types.Role::Other(result1871) } _ => panic() } - Option::Some(lifted1452) + Option::Some(lifted1872) } _ => panic() } - array1454.push(@types.SchemaTypeNode::{ - body: lifted1440, + array1874.push(@types.SchemaTypeNode::{ + body: lifted1860, metadata: @types.MetadataEnvelope::{ - doc: lifted1442, - aliases: array1444, - examples: array1447, - deprecated: lifted1450, - role: lifted1453, + doc: lifted1862, + aliases: array1864, + examples: array1867, + deprecated: lifted1870, + role: lifted1873, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1459 : Array[@types.SchemaTypeDef] = [] - for index1460 = 0 - index1460 < mbt_ffi_load32(iter_base + 60) - index1460 = index1460 + 1 { + let array1879 : Array[@types.SchemaTypeDef] = [] + for index1880 = 0 + index1880 < mbt_ffi_load32(iter_base + 60) + index1880 = index1880 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1460 * 24 + index1880 * 24 - let result1456 = mbt_ffi_ptr2str( + let result1876 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1458 : String? = match + let lifted1878 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1457 = mbt_ffi_ptr2str( + let result1877 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1457) + Option::Some(result1877) } _ => panic() } - array1459.push(@types.SchemaTypeDef::{ - id: result1456, - name: lifted1458, + array1879.push(@types.SchemaTypeDef::{ + id: result1876, + name: lifted1878, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let array1490 : Array[@types.SchemaValueNode] = [] - for index1491 = 0 - index1491 < mbt_ffi_load32(iter_base + 72) - index1491 = index1491 + 1 { + let array1910 : Array[@types.SchemaValueNode] = [] + for index1911 = 0 + index1911 < mbt_ffi_load32(iter_base + 72) + index1911 = index1911 + 1 { let iter_base = mbt_ffi_load32(iter_base + 68) + - index1491 * 32 + index1911 * 32 - let lifted1489 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1909 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -12906,29 +17768,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1461 = mbt_ffi_ptr2str( + let result1881 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1461) + @types.SchemaValueNode::StringValue(result1881) } 13 => { - let array1462 : Array[Int] = [] - for index1463 = 0 - index1463 < mbt_ffi_load32(iter_base + 12) - index1463 = index1463 + 1 { + let array1882 : Array[Int] = [] + for index1883 = 0 + index1883 < mbt_ffi_load32(iter_base + 12) + index1883 = index1883 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1463 * 4 + index1883 * 4 - array1462.push(mbt_ffi_load32(iter_base + 0)) + array1882.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1462) + @types.SchemaValueNode::RecordValue(array1882) } 14 => { - let lifted1464 : Int? = match + let lifted1884 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -12937,7 +17799,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1464, + payload: lifted1884, }) } 15 => @@ -12945,180 +17807,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1465 : Array[Bool] = [] - for index1466 = 0 - index1466 < mbt_ffi_load32(iter_base + 12) - index1466 = index1466 + 1 { + let array1885 : Array[Bool] = [] + for index1886 = 0 + index1886 < mbt_ffi_load32(iter_base + 12) + index1886 = index1886 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1466 * 1 + index1886 * 1 - array1465.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1885.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1465) + @types.SchemaValueNode::FlagsValue(array1885) } 17 => { - let array1467 : Array[Int] = [] - for index1468 = 0 - index1468 < mbt_ffi_load32(iter_base + 12) - index1468 = index1468 + 1 { + 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) + - index1468 * 4 + 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::TupleValue(array1467) + @types.SchemaValueNode::TupleValue(array1887) } 18 => { - let array1469 : Array[Int] = [] - for index1470 = 0 - index1470 < mbt_ffi_load32(iter_base + 12) - index1470 = index1470 + 1 { + let array1889 : Array[Int] = [] + for index1890 = 0 + index1890 < mbt_ffi_load32(iter_base + 12) + index1890 = index1890 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1470 * 4 + index1890 * 4 - array1469.push(mbt_ffi_load32(iter_base + 0)) + array1889.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1469) + @types.SchemaValueNode::ListValue(array1889) } 19 => { - let array1471 : Array[Int] = [] - for index1472 = 0 - index1472 < mbt_ffi_load32(iter_base + 12) - index1472 = index1472 + 1 { + let array1891 : Array[Int] = [] + for index1892 = 0 + index1892 < mbt_ffi_load32(iter_base + 12) + index1892 = index1892 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1472 * 4 + index1892 * 4 - array1471.push(mbt_ffi_load32(iter_base + 0)) + array1891.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1471) + @types.SchemaValueNode::FixedListValue(array1891) } 20 => { - let array1473 : Array[@types.MapEntry] = [] - for index1474 = 0 - index1474 < mbt_ffi_load32(iter_base + 12) - index1474 = index1474 + 1 { + let array1893 : Array[@types.MapEntry] = [] + for index1894 = 0 + index1894 < mbt_ffi_load32(iter_base + 12) + index1894 = index1894 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1474 * 8 + index1894 * 8 - array1473.push(@types.MapEntry::{ + array1893.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(array1473) + @types.SchemaValueNode::MapValue(array1893) } 21 => { - let lifted1475 : Int? = match + let lifted1895 : 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(lifted1475) + @types.SchemaValueNode::OptionValue(lifted1895) } 22 => { - let lifted1478 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1898 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1476 : Int? = match + let lifted1896 : 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(lifted1476) + @types.ResultValuePayload::OkValue(lifted1896) } 1 => { - let lifted1477 : Int? = match + let lifted1897 : 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(lifted1477) + @types.ResultValuePayload::ErrValue(lifted1897) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1478) + @types.SchemaValueNode::ResultValue(lifted1898) } 23 => { - let result1479 = mbt_ffi_ptr2str( + let result1899 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1481 : String? = match + let lifted1901 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1480 = mbt_ffi_ptr2str( + let result1900 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1480) + Option::Some(result1900) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1479, - language: lifted1481, + text: result1899, + language: lifted1901, }) } 24 => { - let result1482 = mbt_ffi_ptr2bytes( + let result1902 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1484 : String? = match + let lifted1904 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1483 = mbt_ffi_ptr2str( + let result1903 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1483) + Option::Some(result1903) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1482, - mime_type: lifted1484, + bytes: result1902, + mime_type: lifted1904, }) } 25 => { - let result1485 = mbt_ffi_ptr2str( + let result1905 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1485) + @types.SchemaValueNode::PathValue(result1905) } 26 => { - let result1486 = mbt_ffi_ptr2str( + let result1906 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1486) + @types.SchemaValueNode::UrlValue(result1906) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -13130,7 +17992,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1487 = mbt_ffi_ptr2str( + let result1907 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -13138,17 +18000,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1487, + unit: result1907, }) } 30 => { - let result1488 = mbt_ffi_ptr2str( + let result1908 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1488, + tag: result1908, body: mbt_ffi_load32(iter_base + 16), }) } @@ -13165,65 +18027,65 @@ pub fn enrich_oplog_entries( _ => panic() } - array1490.push(lifted1489) + array1910.push(lifted1909) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) - let result1492 = mbt_ffi_ptr2str( + let result1912 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 80), mbt_ffi_load32(iter_base + 84), ) - let array1494 : Array[String] = [] - for index1495 = 0 - index1495 < mbt_ffi_load32(iter_base + 92) - index1495 = index1495 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index1495 * 8 + let array1914 : Array[String] = [] + for index1915 = 0 + index1915 < mbt_ffi_load32(iter_base + 92) + index1915 = index1915 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index1915 * 8 - let result1493 = mbt_ffi_ptr2str( + let result1913 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1494.push(result1493) + array1914.push(result1913) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) - let array1509 : Array[Array[SpanData]] = [] - for index1510 = 0 - index1510 < mbt_ffi_load32(iter_base + 100) - index1510 = index1510 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 96) + index1510 * 8 + let array1929 : Array[Array[SpanData]] = [] + for index1930 = 0 + index1930 < mbt_ffi_load32(iter_base + 100) + index1930 = index1930 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 96) + index1930 * 8 - let array1507 : Array[SpanData] = [] - for index1508 = 0 - index1508 < mbt_ffi_load32(iter_base + 4) - index1508 = index1508 + 1 { + let array1927 : Array[SpanData] = [] + for index1928 = 0 + index1928 < mbt_ffi_load32(iter_base + 4) + index1928 = index1928 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index1508 * 80 + index1928 * 80 - let lifted1506 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1926 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1496 = mbt_ffi_ptr2str( + let result1916 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1498 : String? = match + let lifted1918 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1497 = mbt_ffi_ptr2str( + let result1917 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1497) + Option::Some(result1917) } _ => panic() } - let lifted1499 : UInt64? = match + let lifted1919 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -13233,117 +18095,117 @@ pub fn enrich_oplog_entries( _ => panic() } - let array1503 : Array[@context.Attribute] = [] - for index1504 = 0 - index1504 < mbt_ffi_load32(iter_base + 68) - index1504 = index1504 + 1 { + let array1923 : Array[@context.Attribute] = [] + for index1924 = 0 + index1924 < mbt_ffi_load32(iter_base + 68) + index1924 = index1924 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index1504 * 20 + index1924 * 20 - let result1500 = mbt_ffi_ptr2str( + let result1920 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1502 = match + let lifted1922 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1501 = mbt_ffi_ptr2str( + let result1921 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1501) + @context.AttributeValue::String(result1921) } _ => panic() } - array1503.push(@context.Attribute::{ - key: result1500, - value: lifted1502, + array1923.push(@context.Attribute::{ + key: result1920, + value: lifted1922, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result1496, + span_id: result1916, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted1498, - linked_context: lifted1499, - attributes: array1503, + parent: lifted1918, + linked_context: lifted1919, + attributes: array1923, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result1505 = mbt_ffi_ptr2str( + let result1925 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result1505, + span_id: result1925, }) } _ => panic() } - array1507.push(lifted1506) + array1927.push(lifted1926) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array1509.push(array1507) + array1929.push(array1927) } mbt_ffi_free(mbt_ffi_load32(iter_base + 96)) AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{ - idempotency_key: result1326, - method_name: result1327, + idempotency_key: result1676, + method_name: result1677, function_input: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1454, - defs: array1459, + type_nodes: array1874, + defs: array1879, root: mbt_ffi_load32(iter_base + 64), }, value: @types.SchemaValueTree::{ - value_nodes: array1490, + value_nodes: array1910, root: mbt_ffi_load32(iter_base + 76), }, }, - trace_id: result1492, - trace_states: array1494, - invocation_context: array1509, + trace_id: result1912, + trace_states: array1914, + invocation_context: array1929, }) } 2 => AgentInvocation::SaveSnapshot 3 => { - let result1511 = mbt_ffi_ptr2bytes( + let result1931 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result1512 = mbt_ffi_ptr2str( + let result1932 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{ snapshot: SnapshotData::{ - data: result1511, - mime_type: result1512, + data: result1931, + mime_type: result1932, }, }) } 4 => { - let result1513 = mbt_ffi_ptr2str( + let result1933 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{ - idempotency_key: result1513, + idempotency_key: result1933, }) } 5 => @@ -13358,323 +18220,1133 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - invocation: lifted1514, + invocation: lifted1934, }) } 5 => { - let lifted1849 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted2409 = match mbt_ffi_load8_u(iter_base + 24) { 0 => { - let array1641 : Array[@types.SchemaTypeNode] = [] - for index1642 = 0 - index1642 < mbt_ffi_load32(iter_base + 32) - index1642 = index1642 + 1 { + let array2131 : Array[@types.SchemaTypeNode] = [] + for index2132 = 0 + index2132 < mbt_ffi_load32(iter_base + 32) + index2132 = index2132 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1642 * 144 + index2132 * 144 - let lifted1627 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2117 = 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 + 2 => { + let lifted1941 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1936 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1935 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1935) + } + _ => panic() + } + + let lifted1938 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1937 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1937) + } + _ => panic() + } + + let lifted1940 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1939 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1939) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1936, + max: lifted1938, + unit: lifted1940, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1941) + } + 3 => { + let lifted1948 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1943 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1942 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1942) + } + _ => panic() + } + + let lifted1945 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1944 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1944) + } + _ => panic() + } + + let lifted1947 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1946 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1946) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1943, + max: lifted1945, + unit: lifted1947, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1948) + } + 4 => { + let lifted1955 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1950 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1949 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1949) + } + _ => panic() + } + + let lifted1952 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1951 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1951) + } + _ => panic() + } + + let lifted1954 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1953 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1953) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1950, + max: lifted1952, + unit: lifted1954, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1955) + } + 5 => { + let lifted1962 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1957 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1956 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1956) + } + _ => panic() + } + + let lifted1959 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1958 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1958) + } + _ => panic() + } + + let lifted1961 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1960 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1960) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1957, + max: lifted1959, + unit: lifted1961, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1962) + } + 6 => { + let lifted1969 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1964 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1963 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1963) + } + _ => panic() + } + + let lifted1966 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1965 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1965) + } + _ => panic() + } + + let lifted1968 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1967 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1967) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1964, + max: lifted1966, + unit: lifted1968, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1969) + } + 7 => { + let lifted1976 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1971 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1970 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1970) + } + _ => panic() + } + + let lifted1973 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1972 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1972) + } + _ => panic() + } + + let lifted1975 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1974 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1974) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1971, + max: lifted1973, + unit: lifted1975, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1976) + } + 8 => { + let lifted1983 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1978 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1977 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1977) + } + _ => panic() + } + + let lifted1980 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1979 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1979) + } + _ => panic() + } + + let lifted1982 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1981 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1981) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1978, + max: lifted1980, + unit: lifted1982, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1983) + } + 9 => { + let lifted1990 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1985 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1984 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1984) + } + _ => panic() + } + + let lifted1987 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1986 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1986) + } + _ => panic() + } + + let lifted1989 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1988 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1988) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1985, + max: lifted1987, + unit: lifted1989, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1990) + } + 10 => { + let lifted1997 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1992 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1991 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1991) + } + _ => panic() + } + + let lifted1994 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1993 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1993) + } + _ => panic() + } + + let lifted1996 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1995 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1995) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1992, + max: lifted1994, + unit: lifted1996, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1997) + } + 11 => { + let lifted2004 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1999 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1998 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1998) + } + _ => panic() + } + + let lifted2001 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2000 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2000) + } + _ => panic() + } + + let lifted2003 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2002 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2002) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1999, + max: lifted2001, + unit: lifted2003, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2004) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1529 : Array[@types.NamedFieldType] = [] - for index1530 = 0 - index1530 < mbt_ffi_load32(iter_base + 12) - index1530 = index1530 + 1 { + let array2019 : Array[@types.NamedFieldType] = [] + for index2020 = 0 + index2020 < mbt_ffi_load32(iter_base + 12) + index2020 = index2020 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1530 * 68 + index2020 * 68 - let result1515 = mbt_ffi_ptr2str( + let result2005 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1517 : String? = match + let lifted2007 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1516 = mbt_ffi_ptr2str( + let result2006 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1516) + Option::Some(result2006) } _ => panic() } - let array1519 : Array[String] = [] - for index1520 = 0 - index1520 < mbt_ffi_load32(iter_base + 28) - index1520 = index1520 + 1 { + let array2009 : Array[String] = [] + for index2010 = 0 + index2010 < mbt_ffi_load32(iter_base + 28) + index2010 = index2010 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1520 * 8 + index2010 * 8 - let result1518 = mbt_ffi_ptr2str( + let result2008 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1519.push(result1518) + array2009.push(result2008) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1522 : Array[String] = [] - for index1523 = 0 - index1523 < mbt_ffi_load32(iter_base + 36) - index1523 = index1523 + 1 { + let array2012 : Array[String] = [] + for index2013 = 0 + index2013 < mbt_ffi_load32(iter_base + 36) + index2013 = index2013 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1523 * 8 + index2013 * 8 - let result1521 = mbt_ffi_ptr2str( + let result2011 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1522.push(result1521) + array2012.push(result2011) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1525 : String? = match + let lifted2015 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1524 = mbt_ffi_ptr2str( + let result2014 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1524) + Option::Some(result2014) } _ => panic() } - let lifted1528 : @types.Role? = match + let lifted2018 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1527 = match + let lifted2017 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1526 = mbt_ffi_ptr2str( + let result2016 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1526) + @types.Role::Other(result2016) } _ => panic() } - Option::Some(lifted1527) + Option::Some(lifted2017) } _ => panic() } - array1529.push(@types.NamedFieldType::{ - name: result1515, + array2019.push(@types.NamedFieldType::{ + name: result2005, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1517, - aliases: array1519, - examples: array1522, - deprecated: lifted1525, - role: lifted1528, + doc: lifted2007, + aliases: array2009, + examples: array2012, + deprecated: lifted2015, + role: lifted2018, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1529) + @types.SchemaTypeBody::RecordType(array2019) } 15 => { - let array1546 : Array[@types.VariantCaseType] = [] - for index1547 = 0 - index1547 < mbt_ffi_load32(iter_base + 12) - index1547 = index1547 + 1 { + let array2036 : Array[@types.VariantCaseType] = [] + for index2037 = 0 + index2037 < mbt_ffi_load32(iter_base + 12) + index2037 = index2037 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1547 * 72 + index2037 * 72 - let result1531 = mbt_ffi_ptr2str( + let result2021 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1532 : Int? = match + let lifted2022 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1534 : String? = match + let lifted2024 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1533 = mbt_ffi_ptr2str( + let result2023 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1533) + Option::Some(result2023) } _ => panic() } - let array1536 : Array[String] = [] - for index1537 = 0 - index1537 < mbt_ffi_load32(iter_base + 32) - index1537 = index1537 + 1 { + let array2026 : Array[String] = [] + for index2027 = 0 + index2027 < mbt_ffi_load32(iter_base + 32) + index2027 = index2027 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1537 * 8 + index2027 * 8 - let result1535 = mbt_ffi_ptr2str( + let result2025 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1536.push(result1535) + array2026.push(result2025) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1539 : Array[String] = [] - for index1540 = 0 - index1540 < mbt_ffi_load32(iter_base + 40) - index1540 = index1540 + 1 { + let array2029 : Array[String] = [] + for index2030 = 0 + index2030 < mbt_ffi_load32(iter_base + 40) + index2030 = index2030 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1540 * 8 + index2030 * 8 - let result1538 = mbt_ffi_ptr2str( + let result2028 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1539.push(result1538) + array2029.push(result2028) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1542 : String? = match + let lifted2032 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1541 = mbt_ffi_ptr2str( + let result2031 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1541) + Option::Some(result2031) } _ => panic() } - let lifted1545 : @types.Role? = match + let lifted2035 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1544 = match + let lifted2034 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1543 = mbt_ffi_ptr2str( + let result2033 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1543) + @types.Role::Other(result2033) } _ => panic() } - Option::Some(lifted1544) + Option::Some(lifted2034) } _ => panic() } - array1546.push(@types.VariantCaseType::{ - name: result1531, - payload: lifted1532, + array2036.push(@types.VariantCaseType::{ + name: result2021, + payload: lifted2022, metadata: @types.MetadataEnvelope::{ - doc: lifted1534, - aliases: array1536, - examples: array1539, - deprecated: lifted1542, - role: lifted1545, + doc: lifted2024, + aliases: array2026, + examples: array2029, + deprecated: lifted2032, + role: lifted2035, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1546) + @types.SchemaTypeBody::VariantType(array2036) } 16 => { - let array1549 : Array[String] = [] - for index1550 = 0 - index1550 < mbt_ffi_load32(iter_base + 12) - index1550 = index1550 + 1 { + let array2039 : Array[String] = [] + for index2040 = 0 + index2040 < mbt_ffi_load32(iter_base + 12) + index2040 = index2040 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1550 * 8 + index2040 * 8 - let result1548 = mbt_ffi_ptr2str( + let result2038 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1549.push(result1548) + array2039.push(result2038) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1549) + @types.SchemaTypeBody::EnumType(array2039) } 17 => { - let array1552 : Array[String] = [] - for index1553 = 0 - index1553 < mbt_ffi_load32(iter_base + 12) - index1553 = index1553 + 1 { + let array2042 : Array[String] = [] + for index2043 = 0 + index2043 < mbt_ffi_load32(iter_base + 12) + index2043 = index2043 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1553 * 8 + index2043 * 8 - let result1551 = mbt_ffi_ptr2str( + let result2041 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1552.push(result1551) + array2042.push(result2041) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1552) + @types.SchemaTypeBody::FlagsType(array2042) } 18 => { - let array1554 : Array[Int] = [] - for index1555 = 0 - index1555 < mbt_ffi_load32(iter_base + 12) - index1555 = index1555 + 1 { + let array2044 : Array[Int] = [] + for index2045 = 0 + index2045 < mbt_ffi_load32(iter_base + 12) + index2045 = index2045 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1555 * 4 + index2045 * 4 - array1554.push(mbt_ffi_load32(iter_base + 0)) + array2044.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1554) + @types.SchemaTypeBody::TupleType(array2044) } 19 => @types.SchemaTypeBody::ListType( @@ -13695,14 +19367,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1556 : Int? = match + let lifted2046 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1557 : Int? = match + let lifted2047 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -13710,37 +19382,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1556, - err: lifted1557, + ok: lifted2046, + err: lifted2047, }) } 24 => { - let lifted1561 : Array[String]? = match + let lifted2051 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1559 : Array[String] = [] - for index1560 = 0 - index1560 < mbt_ffi_load32(iter_base + 16) - index1560 = index1560 + 1 { + let array2049 : Array[String] = [] + for index2050 = 0 + index2050 < mbt_ffi_load32(iter_base + 16) + index2050 = index2050 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1560 * 8 + index2050 * 8 - let result1558 = mbt_ffi_ptr2str( + let result2048 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1559.push(result1558) + array2049.push(result2048) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1559) + Option::Some(array2049) } _ => panic() } - let lifted1562 : UInt? = match + let lifted2052 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -13750,7 +19422,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1563 : UInt? = match + let lifted2053 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -13760,54 +19432,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1565 : String? = match + let lifted2055 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1564 = mbt_ffi_ptr2str( + let result2054 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1564) + Option::Some(result2054) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1561, - min_length: lifted1562, - max_length: lifted1563, - regex: lifted1565, + languages: lifted2051, + min_length: lifted2052, + max_length: lifted2053, + regex: lifted2055, }) } 25 => { - let lifted1569 : Array[String]? = match + let lifted2059 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1567 : Array[String] = [] - for index1568 = 0 - index1568 < mbt_ffi_load32(iter_base + 16) - index1568 = index1568 + 1 { + let array2057 : Array[String] = [] + for index2058 = 0 + index2058 < mbt_ffi_load32(iter_base + 16) + index2058 = index2058 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1568 * 8 + index2058 * 8 - let result1566 = mbt_ffi_ptr2str( + let result2056 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1567.push(result1566) + array2057.push(result2056) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1567) + Option::Some(array2057) } _ => panic() } - let lifted1570 : UInt? = match + let lifted2060 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -13817,7 +19489,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1571 : UInt? = match + let lifted2061 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -13828,58 +19500,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1569, - min_bytes: lifted1570, - max_bytes: lifted1571, + mime_types: lifted2059, + min_bytes: lifted2060, + max_bytes: lifted2061, }) } 26 => { - let lifted1575 : Array[String]? = match + let lifted2065 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1573 : Array[String] = [] - for index1574 = 0 - index1574 < mbt_ffi_load32(iter_base + 20) - index1574 = index1574 + 1 { + let array2063 : Array[String] = [] + for index2064 = 0 + index2064 < mbt_ffi_load32(iter_base + 20) + index2064 = index2064 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1574 * 8 + index2064 * 8 - let result1572 = mbt_ffi_ptr2str( + 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 + 16)) - Option::Some(array1573) + Option::Some(array2063) } _ => panic() } - let lifted1579 : Array[String]? = match + let lifted2069 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1577 : Array[String] = [] - for index1578 = 0 - index1578 < mbt_ffi_load32(iter_base + 32) - index1578 = index1578 + 1 { + let array2067 : Array[String] = [] + for index2068 = 0 + index2068 < mbt_ffi_load32(iter_base + 32) + index2068 = index2068 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1578 * 8 + index2068 * 8 - let result1576 = mbt_ffi_ptr2str( + let result2066 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1577.push(result1576) + array2067.push(result2066) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1577) + Option::Some(array2067) } _ => panic() } @@ -13891,95 +19563,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1575, - allowed_extensions: lifted1579, + allowed_mime_types: lifted2065, + allowed_extensions: lifted2069, }) } 27 => { - let lifted1583 : Array[String]? = match + let lifted2073 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1581 : Array[String] = [] - for index1582 = 0 - index1582 < mbt_ffi_load32(iter_base + 16) - index1582 = index1582 + 1 { + let array2071 : Array[String] = [] + for index2072 = 0 + index2072 < mbt_ffi_load32(iter_base + 16) + index2072 = index2072 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1582 * 8 + index2072 * 8 - let result1580 = mbt_ffi_ptr2str( + let result2070 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1581.push(result1580) + array2071.push(result2070) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1581) + Option::Some(array2071) } _ => panic() } - let lifted1587 : Array[String]? = match + let lifted2077 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1585 : Array[String] = [] - for index1586 = 0 - index1586 < mbt_ffi_load32(iter_base + 28) - index1586 = index1586 + 1 { + let array2075 : Array[String] = [] + for index2076 = 0 + index2076 < mbt_ffi_load32(iter_base + 28) + index2076 = index2076 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1586 * 8 + index2076 * 8 - let result1584 = mbt_ffi_ptr2str( + let result2074 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1585.push(result1584) + array2075.push(result2074) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1585) + Option::Some(array2075) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1583, - allowed_hosts: lifted1587, + allowed_schemes: lifted2073, + allowed_hosts: lifted2077, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1588 = mbt_ffi_ptr2str( + let result2078 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1590 : Array[String] = [] - for index1591 = 0 - index1591 < mbt_ffi_load32(iter_base + 20) - index1591 = index1591 + 1 { + let array2080 : Array[String] = [] + for index2081 = 0 + index2081 < mbt_ffi_load32(iter_base + 20) + index2081 = index2081 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1591 * 8 + index2081 * 8 - let result1589 = mbt_ffi_ptr2str( + let result2079 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1590.push(result1589) + array2080.push(result2079) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1593 : @types.QuantityValue? = match + let lifted2083 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1592 = mbt_ffi_ptr2str( + let result2082 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -13987,17 +19659,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1592, + unit: result2082, }) } _ => panic() } - let lifted1595 : @types.QuantityValue? = match + let lifted2085 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1594 = mbt_ffi_ptr2str( + let result2084 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -14005,406 +19677,406 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1594, + unit: result2084, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1588, - allowed_suffixes: array1590, - min: lifted1593, - max: lifted1595, + base_unit: result2078, + allowed_suffixes: array2080, + min: lifted2083, + max: lifted2085, }) } 31 => { - let array1619 : Array[@types.UnionBranch] = [] - for index1620 = 0 - index1620 < mbt_ffi_load32(iter_base + 12) - index1620 = index1620 + 1 { + let array2109 : Array[@types.UnionBranch] = [] + for index2110 = 0 + index2110 < mbt_ffi_load32(iter_base + 12) + index2110 = index2110 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1620 * 92 + index2110 * 92 - let result1596 = mbt_ffi_ptr2str( + let result2086 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1605 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted2095 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1597 = mbt_ffi_ptr2str( + let result2087 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1597) + @types.DiscriminatorRule::Prefix(result2087) } 1 => { - let result1598 = mbt_ffi_ptr2str( + let result2088 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1598) + @types.DiscriminatorRule::Suffix(result2088) } 2 => { - let result1599 = mbt_ffi_ptr2str( + let result2089 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1599) + @types.DiscriminatorRule::Contains(result2089) } 3 => { - let result1600 = mbt_ffi_ptr2str( + let result2090 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1600) + @types.DiscriminatorRule::Regex(result2090) } 4 => { - let result1601 = mbt_ffi_ptr2str( + let result2091 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1603 : String? = match + let lifted2093 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1602 = mbt_ffi_ptr2str( + let result2092 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1602) + Option::Some(result2092) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1601, - literal: lifted1603, + field_name: result2091, + literal: lifted2093, }) } 5 => { - let result1604 = mbt_ffi_ptr2str( + let result2094 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1604) + @types.DiscriminatorRule::FieldAbsent(result2094) } _ => panic() } - let lifted1607 : String? = match + let lifted2097 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1606 = mbt_ffi_ptr2str( + let result2096 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1606) + Option::Some(result2096) } _ => panic() } - let array1609 : Array[String] = [] - for index1610 = 0 - index1610 < mbt_ffi_load32(iter_base + 52) - index1610 = index1610 + 1 { + let array2099 : Array[String] = [] + for index2100 = 0 + index2100 < mbt_ffi_load32(iter_base + 52) + index2100 = index2100 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1610 * 8 + index2100 * 8 - let result1608 = mbt_ffi_ptr2str( + let result2098 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1609.push(result1608) + array2099.push(result2098) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1612 : Array[String] = [] - for index1613 = 0 - index1613 < mbt_ffi_load32(iter_base + 60) - index1613 = index1613 + 1 { + let array2102 : Array[String] = [] + for index2103 = 0 + index2103 < mbt_ffi_load32(iter_base + 60) + index2103 = index2103 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1613 * 8 + index2103 * 8 - let result1611 = mbt_ffi_ptr2str( + let result2101 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1612.push(result1611) + array2102.push(result2101) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1615 : String? = match + let lifted2105 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1614 = mbt_ffi_ptr2str( + let result2104 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1614) + Option::Some(result2104) } _ => panic() } - let lifted1618 : @types.Role? = match + let lifted2108 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1617 = match + let lifted2107 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1616 = mbt_ffi_ptr2str( + let result2106 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1616) + @types.Role::Other(result2106) } _ => panic() } - Option::Some(lifted1617) + Option::Some(lifted2107) } _ => panic() } - array1619.push(@types.UnionBranch::{ - tag: result1596, + array2109.push(@types.UnionBranch::{ + tag: result2086, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1605, + discriminator: lifted2095, metadata: @types.MetadataEnvelope::{ - doc: lifted1607, - aliases: array1609, - examples: array1612, - deprecated: lifted1615, - role: lifted1618, + doc: lifted2097, + aliases: array2099, + examples: array2102, + deprecated: lifted2105, + role: lifted2108, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1619, + branches: array2109, }) } 32 => { - let lifted1622 : String? = match + let lifted2112 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1621 = mbt_ffi_ptr2str( + let result2111 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1621) + Option::Some(result2111) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1622, + category: lifted2112, }) } 33 => { - let lifted1624 : String? = match + let lifted2114 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1623 = mbt_ffi_ptr2str( + let result2113 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1623) + Option::Some(result2113) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1624, + resource_name: lifted2114, }) } 34 => { - let lifted1625 : Int? = match + let lifted2115 : 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(lifted1625) + @types.SchemaTypeBody::FutureType(lifted2115) } 35 => { - let lifted1626 : Int? = match + let lifted2116 : 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(lifted1626) + @types.SchemaTypeBody::StreamType(lifted2116) } _ => panic() } - let lifted1629 : String? = match + let lifted2119 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1628 = mbt_ffi_ptr2str( + let result2118 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1628) + Option::Some(result2118) } _ => panic() } - let array1631 : Array[String] = [] - for index1632 = 0 - index1632 < mbt_ffi_load32(iter_base + 104) - index1632 = index1632 + 1 { + let array2121 : Array[String] = [] + for index2122 = 0 + index2122 < mbt_ffi_load32(iter_base + 104) + index2122 = index2122 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1632 * 8 + index2122 * 8 - let result1630 = mbt_ffi_ptr2str( + let result2120 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1631.push(result1630) + array2121.push(result2120) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1634 : Array[String] = [] - for index1635 = 0 - index1635 < mbt_ffi_load32(iter_base + 112) - index1635 = index1635 + 1 { + let array2124 : Array[String] = [] + for index2125 = 0 + index2125 < mbt_ffi_load32(iter_base + 112) + index2125 = index2125 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1635 * 8 + index2125 * 8 - let result1633 = mbt_ffi_ptr2str( + let result2123 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1634.push(result1633) + array2124.push(result2123) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1637 : String? = match + let lifted2127 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1636 = mbt_ffi_ptr2str( + let result2126 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1636) + Option::Some(result2126) } _ => panic() } - let lifted1640 : @types.Role? = match + let lifted2130 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1639 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted2129 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1638 = mbt_ffi_ptr2str( + let result2128 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1638) + @types.Role::Other(result2128) } _ => panic() } - Option::Some(lifted1639) + Option::Some(lifted2129) } _ => panic() } - array1641.push(@types.SchemaTypeNode::{ - body: lifted1627, + array2131.push(@types.SchemaTypeNode::{ + body: lifted2117, metadata: @types.MetadataEnvelope::{ - doc: lifted1629, - aliases: array1631, - examples: array1634, - deprecated: lifted1637, - role: lifted1640, + doc: lifted2119, + aliases: array2121, + examples: array2124, + deprecated: lifted2127, + role: lifted2130, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1646 : Array[@types.SchemaTypeDef] = [] - for index1647 = 0 - index1647 < mbt_ffi_load32(iter_base + 40) - index1647 = index1647 + 1 { + let array2136 : Array[@types.SchemaTypeDef] = [] + for index2137 = 0 + index2137 < mbt_ffi_load32(iter_base + 40) + index2137 = index2137 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1647 * 24 + index2137 * 24 - let result1643 = mbt_ffi_ptr2str( + let result2133 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1645 : String? = match + let lifted2135 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1644 = mbt_ffi_ptr2str( + let result2134 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1644) + Option::Some(result2134) } _ => panic() } - array1646.push(@types.SchemaTypeDef::{ - id: result1643, - name: lifted1645, + array2136.push(@types.SchemaTypeDef::{ + id: result2133, + name: lifted2135, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array1677 : Array[@types.SchemaValueNode] = [] - for index1678 = 0 - index1678 < mbt_ffi_load32(iter_base + 52) - index1678 = index1678 + 1 { + let array2167 : Array[@types.SchemaValueNode] = [] + for index2168 = 0 + index2168 < mbt_ffi_load32(iter_base + 52) + index2168 = index2168 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1678 * 32 + index2168 * 32 - let lifted1676 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2166 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -14456,29 +20128,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1648 = mbt_ffi_ptr2str( + let result2138 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1648) + @types.SchemaValueNode::StringValue(result2138) } 13 => { - let array1649 : Array[Int] = [] - for index1650 = 0 - index1650 < mbt_ffi_load32(iter_base + 12) - index1650 = index1650 + 1 { + let array2139 : Array[Int] = [] + for index2140 = 0 + index2140 < mbt_ffi_load32(iter_base + 12) + index2140 = index2140 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1650 * 4 + index2140 * 4 - array1649.push(mbt_ffi_load32(iter_base + 0)) + array2139.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1649) + @types.SchemaValueNode::RecordValue(array2139) } 14 => { - let lifted1651 : Int? = match + let lifted2141 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -14487,7 +20159,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1651, + payload: lifted2141, }) } 15 => @@ -14495,180 +20167,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1652 : Array[Bool] = [] - for index1653 = 0 - index1653 < mbt_ffi_load32(iter_base + 12) - index1653 = index1653 + 1 { + let array2142 : Array[Bool] = [] + for index2143 = 0 + index2143 < mbt_ffi_load32(iter_base + 12) + index2143 = index2143 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1653 * 1 + index2143 * 1 - array1652.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array2142.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1652) + @types.SchemaValueNode::FlagsValue(array2142) } 17 => { - let array1654 : Array[Int] = [] - for index1655 = 0 - index1655 < mbt_ffi_load32(iter_base + 12) - index1655 = index1655 + 1 { + let array2144 : Array[Int] = [] + for index2145 = 0 + index2145 < mbt_ffi_load32(iter_base + 12) + index2145 = index2145 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1655 * 4 + index2145 * 4 - array1654.push(mbt_ffi_load32(iter_base + 0)) + array2144.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1654) + @types.SchemaValueNode::TupleValue(array2144) } 18 => { - let array1656 : Array[Int] = [] - for index1657 = 0 - index1657 < mbt_ffi_load32(iter_base + 12) - index1657 = index1657 + 1 { + let array2146 : Array[Int] = [] + for index2147 = 0 + index2147 < mbt_ffi_load32(iter_base + 12) + index2147 = index2147 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1657 * 4 + index2147 * 4 - array1656.push(mbt_ffi_load32(iter_base + 0)) + array2146.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1656) + @types.SchemaValueNode::ListValue(array2146) } 19 => { - let array1658 : Array[Int] = [] - for index1659 = 0 - index1659 < mbt_ffi_load32(iter_base + 12) - index1659 = index1659 + 1 { + let array2148 : Array[Int] = [] + for index2149 = 0 + index2149 < mbt_ffi_load32(iter_base + 12) + index2149 = index2149 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1659 * 4 + index2149 * 4 - array1658.push(mbt_ffi_load32(iter_base + 0)) + array2148.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1658) + @types.SchemaValueNode::FixedListValue(array2148) } 20 => { - let array1660 : Array[@types.MapEntry] = [] - for index1661 = 0 - index1661 < mbt_ffi_load32(iter_base + 12) - index1661 = index1661 + 1 { + let array2150 : Array[@types.MapEntry] = [] + for index2151 = 0 + index2151 < mbt_ffi_load32(iter_base + 12) + index2151 = index2151 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1661 * 8 + index2151 * 8 - array1660.push(@types.MapEntry::{ + array2150.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(array1660) + @types.SchemaValueNode::MapValue(array2150) } 21 => { - let lifted1662 : Int? = match + let lifted2152 : 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(lifted1662) + @types.SchemaValueNode::OptionValue(lifted2152) } 22 => { - let lifted1665 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2155 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1663 : Int? = match + let lifted2153 : 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(lifted1663) + @types.ResultValuePayload::OkValue(lifted2153) } 1 => { - let lifted1664 : Int? = match + let lifted2154 : 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(lifted1664) + @types.ResultValuePayload::ErrValue(lifted2154) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1665) + @types.SchemaValueNode::ResultValue(lifted2155) } 23 => { - let result1666 = mbt_ffi_ptr2str( + let result2156 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1668 : String? = match + let lifted2158 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1667 = mbt_ffi_ptr2str( + let result2157 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1667) + Option::Some(result2157) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1666, - language: lifted1668, + text: result2156, + language: lifted2158, }) } 24 => { - let result1669 = mbt_ffi_ptr2bytes( + let result2159 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1671 : String? = match + let lifted2161 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1670 = mbt_ffi_ptr2str( + let result2160 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1670) + Option::Some(result2160) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1669, - mime_type: lifted1671, + bytes: result2159, + mime_type: lifted2161, }) } 25 => { - let result1672 = mbt_ffi_ptr2str( + let result2162 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1672) + @types.SchemaValueNode::PathValue(result2162) } 26 => { - let result1673 = mbt_ffi_ptr2str( + let result2163 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1673) + @types.SchemaValueNode::UrlValue(result2163) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -14680,7 +20352,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1674 = mbt_ffi_ptr2str( + let result2164 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -14688,17 +20360,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1674, + unit: result2164, }) } 30 => { - let result1675 = mbt_ffi_ptr2str( + let result2165 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1675, + tag: result2165, body: mbt_ffi_load32(iter_base + 16), }) } @@ -14715,336 +20387,1146 @@ pub fn enrich_oplog_entries( _ => panic() } - array1677.push(lifted1676) + array2167.push(lifted2166) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) AgentInvocationResult::AgentInitialization(AgentInvocationOutputParameters::{ output: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1641, - defs: array1646, + type_nodes: array2131, + defs: array2136, root: mbt_ffi_load32(iter_base + 44), }, value: @types.SchemaValueTree::{ - value_nodes: array1677, + value_nodes: array2167, root: mbt_ffi_load32(iter_base + 56), }, }, }) } 1 => { - let array1805 : Array[@types.SchemaTypeNode] = [] - for index1806 = 0 - index1806 < mbt_ffi_load32(iter_base + 32) - index1806 = index1806 + 1 { + let array2365 : Array[@types.SchemaTypeNode] = [] + for index2366 = 0 + index2366 < mbt_ffi_load32(iter_base + 32) + index2366 = index2366 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1806 * 144 + index2366 * 144 - let lifted1791 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2351 = 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 + 2 => { + let lifted2175 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2170 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2169 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2169) + } + _ => panic() + } + + let lifted2172 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2171 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2171) + } + _ => panic() + } + + let lifted2174 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2173 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2173) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2170, + max: lifted2172, + unit: lifted2174, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted2175) + } + 3 => { + let lifted2182 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2177 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2176 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2176) + } + _ => panic() + } + + let lifted2179 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2178 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2178) + } + _ => panic() + } + + let lifted2181 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2180 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2180) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2177, + max: lifted2179, + unit: lifted2181, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted2182) + } + 4 => { + let lifted2189 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2184 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2183 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2183) + } + _ => panic() + } + + let lifted2186 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2185 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2185) + } + _ => panic() + } + + 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() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2184, + max: lifted2186, + unit: lifted2188, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2189) + } + 5 => { + let lifted2196 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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::S64Type(lifted2196) + } + 6 => { + 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::U8Type(lifted2203) + } + 7 => { + 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::U16Type(lifted2210) + } + 8 => { + 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::U32Type(lifted2217) + } + 9 => { + 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::U64Type(lifted2224) + } + 10 => { + 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::F32Type(lifted2231) + } + 11 => { + 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::F64Type(lifted2238) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1693 : Array[@types.NamedFieldType] = [] - for index1694 = 0 - index1694 < mbt_ffi_load32(iter_base + 12) - index1694 = index1694 + 1 { + let array2253 : Array[@types.NamedFieldType] = [] + for index2254 = 0 + index2254 < mbt_ffi_load32(iter_base + 12) + index2254 = index2254 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1694 * 68 + index2254 * 68 - let result1679 = mbt_ffi_ptr2str( + let result2239 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1681 : String? = match + let lifted2241 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1680 = mbt_ffi_ptr2str( + let result2240 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1680) + Option::Some(result2240) } _ => panic() } - let array1683 : Array[String] = [] - for index1684 = 0 - index1684 < mbt_ffi_load32(iter_base + 28) - index1684 = index1684 + 1 { + let array2243 : Array[String] = [] + for index2244 = 0 + index2244 < mbt_ffi_load32(iter_base + 28) + index2244 = index2244 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1684 * 8 + index2244 * 8 - let result1682 = mbt_ffi_ptr2str( + let result2242 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1683.push(result1682) + array2243.push(result2242) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1686 : Array[String] = [] - for index1687 = 0 - index1687 < mbt_ffi_load32(iter_base + 36) - index1687 = index1687 + 1 { + let array2246 : Array[String] = [] + for index2247 = 0 + index2247 < mbt_ffi_load32(iter_base + 36) + index2247 = index2247 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1687 * 8 + index2247 * 8 - let result1685 = mbt_ffi_ptr2str( + let result2245 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1686.push(result1685) + array2246.push(result2245) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1689 : String? = match + let lifted2249 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1688 = mbt_ffi_ptr2str( + let result2248 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1688) + Option::Some(result2248) } _ => panic() } - let lifted1692 : @types.Role? = match + let lifted2252 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1691 = match + let lifted2251 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1690 = mbt_ffi_ptr2str( + let result2250 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1690) + @types.Role::Other(result2250) } _ => panic() } - Option::Some(lifted1691) + Option::Some(lifted2251) } _ => panic() } - array1693.push(@types.NamedFieldType::{ - name: result1679, + array2253.push(@types.NamedFieldType::{ + name: result2239, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1681, - aliases: array1683, - examples: array1686, - deprecated: lifted1689, - role: lifted1692, + doc: lifted2241, + aliases: array2243, + examples: array2246, + deprecated: lifted2249, + role: lifted2252, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1693) + @types.SchemaTypeBody::RecordType(array2253) } 15 => { - let array1710 : Array[@types.VariantCaseType] = [] - for index1711 = 0 - index1711 < mbt_ffi_load32(iter_base + 12) - index1711 = index1711 + 1 { + let array2270 : Array[@types.VariantCaseType] = [] + for index2271 = 0 + index2271 < mbt_ffi_load32(iter_base + 12) + index2271 = index2271 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1711 * 72 + index2271 * 72 - let result1695 = mbt_ffi_ptr2str( + let result2255 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1696 : Int? = match + let lifted2256 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1698 : String? = match + let lifted2258 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1697 = mbt_ffi_ptr2str( + let result2257 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1697) + Option::Some(result2257) } _ => panic() } - let array1700 : Array[String] = [] - for index1701 = 0 - index1701 < mbt_ffi_load32(iter_base + 32) - index1701 = index1701 + 1 { + let array2260 : Array[String] = [] + for index2261 = 0 + index2261 < mbt_ffi_load32(iter_base + 32) + index2261 = index2261 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1701 * 8 + index2261 * 8 - let result1699 = mbt_ffi_ptr2str( + let result2259 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1700.push(result1699) + array2260.push(result2259) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1703 : Array[String] = [] - for index1704 = 0 - index1704 < mbt_ffi_load32(iter_base + 40) - index1704 = index1704 + 1 { + let array2263 : Array[String] = [] + for index2264 = 0 + index2264 < mbt_ffi_load32(iter_base + 40) + index2264 = index2264 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1704 * 8 + index2264 * 8 - let result1702 = mbt_ffi_ptr2str( + let result2262 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1703.push(result1702) + array2263.push(result2262) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1706 : String? = match + let lifted2266 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1705 = mbt_ffi_ptr2str( + let result2265 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1705) + Option::Some(result2265) } _ => panic() } - let lifted1709 : @types.Role? = match + let lifted2269 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1708 = match + let lifted2268 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1707 = mbt_ffi_ptr2str( + let result2267 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1707) + @types.Role::Other(result2267) } _ => panic() } - Option::Some(lifted1708) + Option::Some(lifted2268) } _ => panic() } - array1710.push(@types.VariantCaseType::{ - name: result1695, - payload: lifted1696, + array2270.push(@types.VariantCaseType::{ + name: result2255, + payload: lifted2256, metadata: @types.MetadataEnvelope::{ - doc: lifted1698, - aliases: array1700, - examples: array1703, - deprecated: lifted1706, - role: lifted1709, + doc: lifted2258, + aliases: array2260, + examples: array2263, + deprecated: lifted2266, + role: lifted2269, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1710) + @types.SchemaTypeBody::VariantType(array2270) } 16 => { - let array1713 : Array[String] = [] - for index1714 = 0 - index1714 < mbt_ffi_load32(iter_base + 12) - index1714 = index1714 + 1 { + let array2273 : Array[String] = [] + for index2274 = 0 + index2274 < mbt_ffi_load32(iter_base + 12) + index2274 = index2274 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1714 * 8 + index2274 * 8 - let result1712 = mbt_ffi_ptr2str( + let result2272 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1713.push(result1712) + array2273.push(result2272) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1713) + @types.SchemaTypeBody::EnumType(array2273) } 17 => { - let array1716 : Array[String] = [] - for index1717 = 0 - index1717 < mbt_ffi_load32(iter_base + 12) - index1717 = index1717 + 1 { + let array2276 : Array[String] = [] + for index2277 = 0 + index2277 < mbt_ffi_load32(iter_base + 12) + index2277 = index2277 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1717 * 8 + index2277 * 8 - let result1715 = mbt_ffi_ptr2str( + let result2275 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1716.push(result1715) + array2276.push(result2275) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1716) + @types.SchemaTypeBody::FlagsType(array2276) } 18 => { - let array1718 : Array[Int] = [] - for index1719 = 0 - index1719 < mbt_ffi_load32(iter_base + 12) - index1719 = index1719 + 1 { + let array2278 : Array[Int] = [] + for index2279 = 0 + index2279 < mbt_ffi_load32(iter_base + 12) + index2279 = index2279 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1719 * 4 + index2279 * 4 - array1718.push(mbt_ffi_load32(iter_base + 0)) + array2278.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1718) + @types.SchemaTypeBody::TupleType(array2278) } 19 => @types.SchemaTypeBody::ListType( @@ -15065,14 +21547,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1720 : Int? = match + let lifted2280 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1721 : Int? = match + let lifted2281 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -15080,37 +21562,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1720, - err: lifted1721, + ok: lifted2280, + err: lifted2281, }) } 24 => { - let lifted1725 : Array[String]? = match + let lifted2285 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1723 : Array[String] = [] - for index1724 = 0 - index1724 < mbt_ffi_load32(iter_base + 16) - index1724 = index1724 + 1 { + let array2283 : Array[String] = [] + for index2284 = 0 + index2284 < mbt_ffi_load32(iter_base + 16) + index2284 = index2284 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1724 * 8 + index2284 * 8 - let result1722 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array1723) + Option::Some(array2283) } _ => panic() } - let lifted1726 : UInt? = match + let lifted2286 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -15120,7 +21602,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1727 : UInt? = match + let lifted2287 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -15130,54 +21612,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1729 : String? = match + let lifted2289 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1728 = mbt_ffi_ptr2str( + let result2288 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1728) + Option::Some(result2288) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1725, - min_length: lifted1726, - max_length: lifted1727, - regex: lifted1729, + languages: lifted2285, + min_length: lifted2286, + max_length: lifted2287, + regex: lifted2289, }) } 25 => { - let lifted1733 : Array[String]? = match + let lifted2293 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1731 : Array[String] = [] - for index1732 = 0 - index1732 < mbt_ffi_load32(iter_base + 16) - index1732 = index1732 + 1 { + let array2291 : Array[String] = [] + for index2292 = 0 + index2292 < mbt_ffi_load32(iter_base + 16) + index2292 = index2292 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1732 * 8 + index2292 * 8 - let result1730 = mbt_ffi_ptr2str( + let result2290 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1731.push(result1730) + array2291.push(result2290) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1731) + Option::Some(array2291) } _ => panic() } - let lifted1734 : UInt? = match + let lifted2294 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -15187,7 +21669,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1735 : UInt? = match + let lifted2295 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -15198,58 +21680,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1733, - min_bytes: lifted1734, - max_bytes: lifted1735, + mime_types: lifted2293, + min_bytes: lifted2294, + max_bytes: lifted2295, }) } 26 => { - let lifted1739 : Array[String]? = match + let lifted2299 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1737 : Array[String] = [] - for index1738 = 0 - index1738 < mbt_ffi_load32(iter_base + 20) - index1738 = index1738 + 1 { + let array2297 : Array[String] = [] + for index2298 = 0 + index2298 < mbt_ffi_load32(iter_base + 20) + index2298 = index2298 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1738 * 8 + index2298 * 8 - let result1736 = mbt_ffi_ptr2str( + let result2296 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1737.push(result1736) + array2297.push(result2296) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1737) + Option::Some(array2297) } _ => panic() } - let lifted1743 : Array[String]? = match + let lifted2303 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1741 : Array[String] = [] - for index1742 = 0 - index1742 < mbt_ffi_load32(iter_base + 32) - index1742 = index1742 + 1 { + let array2301 : Array[String] = [] + for index2302 = 0 + index2302 < mbt_ffi_load32(iter_base + 32) + index2302 = index2302 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1742 * 8 + index2302 * 8 - let result1740 = mbt_ffi_ptr2str( + let result2300 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1741.push(result1740) + array2301.push(result2300) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1741) + Option::Some(array2301) } _ => panic() } @@ -15261,95 +21743,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1739, - allowed_extensions: lifted1743, + allowed_mime_types: lifted2299, + allowed_extensions: lifted2303, }) } 27 => { - let lifted1747 : Array[String]? = match + let lifted2307 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1745 : Array[String] = [] - for index1746 = 0 - index1746 < mbt_ffi_load32(iter_base + 16) - index1746 = index1746 + 1 { + let array2305 : Array[String] = [] + for index2306 = 0 + index2306 < mbt_ffi_load32(iter_base + 16) + index2306 = index2306 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1746 * 8 + index2306 * 8 - let result1744 = mbt_ffi_ptr2str( + let result2304 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1745.push(result1744) + array2305.push(result2304) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1745) + Option::Some(array2305) } _ => panic() } - let lifted1751 : Array[String]? = match + let lifted2311 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1749 : Array[String] = [] - for index1750 = 0 - index1750 < mbt_ffi_load32(iter_base + 28) - index1750 = index1750 + 1 { + let array2309 : Array[String] = [] + for index2310 = 0 + index2310 < mbt_ffi_load32(iter_base + 28) + index2310 = index2310 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1750 * 8 + index2310 * 8 - let result1748 = mbt_ffi_ptr2str( + let result2308 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1749.push(result1748) + array2309.push(result2308) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1749) + Option::Some(array2309) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1747, - allowed_hosts: lifted1751, + allowed_schemes: lifted2307, + allowed_hosts: lifted2311, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1752 = mbt_ffi_ptr2str( + let result2312 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1754 : Array[String] = [] - for index1755 = 0 - index1755 < mbt_ffi_load32(iter_base + 20) - index1755 = index1755 + 1 { + let array2314 : Array[String] = [] + for index2315 = 0 + index2315 < mbt_ffi_load32(iter_base + 20) + index2315 = index2315 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1755 * 8 + index2315 * 8 - let result1753 = mbt_ffi_ptr2str( + let result2313 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1754.push(result1753) + array2314.push(result2313) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1757 : @types.QuantityValue? = match + let lifted2317 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1756 = mbt_ffi_ptr2str( + let result2316 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -15357,17 +21839,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1756, + unit: result2316, }) } _ => panic() } - let lifted1759 : @types.QuantityValue? = match + let lifted2319 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1758 = mbt_ffi_ptr2str( + let result2318 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -15375,406 +21857,406 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1758, + unit: result2318, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1752, - allowed_suffixes: array1754, - min: lifted1757, - max: lifted1759, + base_unit: result2312, + allowed_suffixes: array2314, + min: lifted2317, + max: lifted2319, }) } 31 => { - let array1783 : Array[@types.UnionBranch] = [] - for index1784 = 0 - index1784 < mbt_ffi_load32(iter_base + 12) - index1784 = index1784 + 1 { + let array2343 : Array[@types.UnionBranch] = [] + for index2344 = 0 + index2344 < mbt_ffi_load32(iter_base + 12) + index2344 = index2344 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1784 * 92 + index2344 * 92 - let result1760 = mbt_ffi_ptr2str( + let result2320 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1769 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted2329 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1761 = mbt_ffi_ptr2str( + let result2321 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1761) + @types.DiscriminatorRule::Prefix(result2321) } 1 => { - let result1762 = mbt_ffi_ptr2str( + let result2322 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1762) + @types.DiscriminatorRule::Suffix(result2322) } 2 => { - let result1763 = mbt_ffi_ptr2str( + let result2323 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1763) + @types.DiscriminatorRule::Contains(result2323) } 3 => { - let result1764 = mbt_ffi_ptr2str( + let result2324 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1764) + @types.DiscriminatorRule::Regex(result2324) } 4 => { - let result1765 = mbt_ffi_ptr2str( + let result2325 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1767 : String? = match + let lifted2327 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1766 = mbt_ffi_ptr2str( + let result2326 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1766) + Option::Some(result2326) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1765, - literal: lifted1767, + field_name: result2325, + literal: lifted2327, }) } 5 => { - let result1768 = mbt_ffi_ptr2str( + let result2328 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1768) + @types.DiscriminatorRule::FieldAbsent(result2328) } _ => panic() } - let lifted1771 : String? = match + let lifted2331 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1770 = mbt_ffi_ptr2str( + let result2330 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1770) + Option::Some(result2330) } _ => panic() } - let array1773 : Array[String] = [] - for index1774 = 0 - index1774 < mbt_ffi_load32(iter_base + 52) - index1774 = index1774 + 1 { + let array2333 : Array[String] = [] + for index2334 = 0 + index2334 < mbt_ffi_load32(iter_base + 52) + index2334 = index2334 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1774 * 8 + index2334 * 8 - let result1772 = mbt_ffi_ptr2str( + let result2332 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1773.push(result1772) + array2333.push(result2332) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1776 : Array[String] = [] - for index1777 = 0 - index1777 < mbt_ffi_load32(iter_base + 60) - index1777 = index1777 + 1 { + let array2336 : Array[String] = [] + for index2337 = 0 + index2337 < mbt_ffi_load32(iter_base + 60) + index2337 = index2337 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1777 * 8 + index2337 * 8 - let result1775 = mbt_ffi_ptr2str( + let result2335 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1776.push(result1775) + array2336.push(result2335) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1779 : String? = match + let lifted2339 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1778 = mbt_ffi_ptr2str( + let result2338 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1778) + Option::Some(result2338) } _ => panic() } - let lifted1782 : @types.Role? = match + let lifted2342 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1781 = match + let lifted2341 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1780 = mbt_ffi_ptr2str( + let result2340 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1780) + @types.Role::Other(result2340) } _ => panic() } - Option::Some(lifted1781) + Option::Some(lifted2341) } _ => panic() } - array1783.push(@types.UnionBranch::{ - tag: result1760, + array2343.push(@types.UnionBranch::{ + tag: result2320, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1769, + discriminator: lifted2329, metadata: @types.MetadataEnvelope::{ - doc: lifted1771, - aliases: array1773, - examples: array1776, - deprecated: lifted1779, - role: lifted1782, + doc: lifted2331, + aliases: array2333, + examples: array2336, + deprecated: lifted2339, + role: lifted2342, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1783, + branches: array2343, }) } 32 => { - let lifted1786 : String? = match + let lifted2346 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1785 = mbt_ffi_ptr2str( + let result2345 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1785) + Option::Some(result2345) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1786, + category: lifted2346, }) } 33 => { - let lifted1788 : String? = match + let lifted2348 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1787 = mbt_ffi_ptr2str( + let result2347 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1787) + Option::Some(result2347) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1788, + resource_name: lifted2348, }) } 34 => { - let lifted1789 : Int? = match + let lifted2349 : 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(lifted1789) + @types.SchemaTypeBody::FutureType(lifted2349) } 35 => { - let lifted1790 : Int? = match + let lifted2350 : 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(lifted1790) + @types.SchemaTypeBody::StreamType(lifted2350) } _ => panic() } - let lifted1793 : String? = match + let lifted2353 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1792 = mbt_ffi_ptr2str( + let result2352 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1792) + Option::Some(result2352) } _ => panic() } - let array1795 : Array[String] = [] - for index1796 = 0 - index1796 < mbt_ffi_load32(iter_base + 104) - index1796 = index1796 + 1 { + let array2355 : Array[String] = [] + for index2356 = 0 + index2356 < mbt_ffi_load32(iter_base + 104) + index2356 = index2356 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1796 * 8 + index2356 * 8 - let result1794 = mbt_ffi_ptr2str( + let result2354 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1795.push(result1794) + array2355.push(result2354) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1798 : Array[String] = [] - for index1799 = 0 - index1799 < mbt_ffi_load32(iter_base + 112) - index1799 = index1799 + 1 { + let array2358 : Array[String] = [] + for index2359 = 0 + index2359 < mbt_ffi_load32(iter_base + 112) + index2359 = index2359 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1799 * 8 + index2359 * 8 - let result1797 = mbt_ffi_ptr2str( + let result2357 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1798.push(result1797) + array2358.push(result2357) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1801 : String? = match + let lifted2361 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1800 = mbt_ffi_ptr2str( + let result2360 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1800) + Option::Some(result2360) } _ => panic() } - let lifted1804 : @types.Role? = match + let lifted2364 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1803 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted2363 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1802 = mbt_ffi_ptr2str( + let result2362 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1802) + @types.Role::Other(result2362) } _ => panic() } - Option::Some(lifted1803) + Option::Some(lifted2363) } _ => panic() } - array1805.push(@types.SchemaTypeNode::{ - body: lifted1791, + array2365.push(@types.SchemaTypeNode::{ + body: lifted2351, metadata: @types.MetadataEnvelope::{ - doc: lifted1793, - aliases: array1795, - examples: array1798, - deprecated: lifted1801, - role: lifted1804, + doc: lifted2353, + aliases: array2355, + examples: array2358, + deprecated: lifted2361, + role: lifted2364, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1810 : Array[@types.SchemaTypeDef] = [] - for index1811 = 0 - index1811 < mbt_ffi_load32(iter_base + 40) - index1811 = index1811 + 1 { + let array2370 : Array[@types.SchemaTypeDef] = [] + for index2371 = 0 + index2371 < mbt_ffi_load32(iter_base + 40) + index2371 = index2371 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1811 * 24 + index2371 * 24 - let result1807 = mbt_ffi_ptr2str( + let result2367 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1809 : String? = match + let lifted2369 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1808 = mbt_ffi_ptr2str( + let result2368 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1808) + Option::Some(result2368) } _ => panic() } - array1810.push(@types.SchemaTypeDef::{ - id: result1807, - name: lifted1809, + array2370.push(@types.SchemaTypeDef::{ + id: result2367, + name: lifted2369, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array1841 : Array[@types.SchemaValueNode] = [] - for index1842 = 0 - index1842 < mbt_ffi_load32(iter_base + 52) - index1842 = index1842 + 1 { + let array2401 : Array[@types.SchemaValueNode] = [] + for index2402 = 0 + index2402 < mbt_ffi_load32(iter_base + 52) + index2402 = index2402 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1842 * 32 + index2402 * 32 - let lifted1840 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2400 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -15826,29 +22308,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1812 = mbt_ffi_ptr2str( + let result2372 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1812) + @types.SchemaValueNode::StringValue(result2372) } 13 => { - let array1813 : Array[Int] = [] - for index1814 = 0 - index1814 < mbt_ffi_load32(iter_base + 12) - index1814 = index1814 + 1 { + let array2373 : Array[Int] = [] + for index2374 = 0 + index2374 < mbt_ffi_load32(iter_base + 12) + index2374 = index2374 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1814 * 4 + index2374 * 4 - array1813.push(mbt_ffi_load32(iter_base + 0)) + array2373.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1813) + @types.SchemaValueNode::RecordValue(array2373) } 14 => { - let lifted1815 : Int? = match + let lifted2375 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -15857,7 +22339,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1815, + payload: lifted2375, }) } 15 => @@ -15865,180 +22347,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1816 : Array[Bool] = [] - for index1817 = 0 - index1817 < mbt_ffi_load32(iter_base + 12) - index1817 = index1817 + 1 { + let array2376 : Array[Bool] = [] + for index2377 = 0 + index2377 < mbt_ffi_load32(iter_base + 12) + index2377 = index2377 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1817 * 1 + index2377 * 1 - array1816.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array2376.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1816) + @types.SchemaValueNode::FlagsValue(array2376) } 17 => { - let array1818 : Array[Int] = [] - for index1819 = 0 - index1819 < mbt_ffi_load32(iter_base + 12) - index1819 = index1819 + 1 { + let array2378 : Array[Int] = [] + for index2379 = 0 + index2379 < mbt_ffi_load32(iter_base + 12) + index2379 = index2379 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1819 * 4 + index2379 * 4 - array1818.push(mbt_ffi_load32(iter_base + 0)) + array2378.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1818) + @types.SchemaValueNode::TupleValue(array2378) } 18 => { - let array1820 : Array[Int] = [] - for index1821 = 0 - index1821 < mbt_ffi_load32(iter_base + 12) - index1821 = index1821 + 1 { + 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) + - index1821 * 4 + 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::ListValue(array1820) + @types.SchemaValueNode::ListValue(array2380) } 19 => { - let array1822 : Array[Int] = [] - for index1823 = 0 - index1823 < mbt_ffi_load32(iter_base + 12) - index1823 = index1823 + 1 { + let array2382 : Array[Int] = [] + for index2383 = 0 + index2383 < mbt_ffi_load32(iter_base + 12) + index2383 = index2383 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1823 * 4 + index2383 * 4 - array1822.push(mbt_ffi_load32(iter_base + 0)) + array2382.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1822) + @types.SchemaValueNode::FixedListValue(array2382) } 20 => { - let array1824 : Array[@types.MapEntry] = [] - for index1825 = 0 - index1825 < mbt_ffi_load32(iter_base + 12) - index1825 = index1825 + 1 { + let array2384 : Array[@types.MapEntry] = [] + for index2385 = 0 + index2385 < mbt_ffi_load32(iter_base + 12) + index2385 = index2385 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1825 * 8 + index2385 * 8 - array1824.push(@types.MapEntry::{ + array2384.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(array1824) + @types.SchemaValueNode::MapValue(array2384) } 21 => { - let lifted1826 : Int? = match + let lifted2386 : 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(lifted1826) + @types.SchemaValueNode::OptionValue(lifted2386) } 22 => { - let lifted1829 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2389 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1827 : Int? = match + let lifted2387 : 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(lifted1827) + @types.ResultValuePayload::OkValue(lifted2387) } 1 => { - let lifted1828 : Int? = match + let lifted2388 : 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(lifted1828) + @types.ResultValuePayload::ErrValue(lifted2388) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1829) + @types.SchemaValueNode::ResultValue(lifted2389) } 23 => { - let result1830 = mbt_ffi_ptr2str( + let result2390 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1832 : String? = match + let lifted2392 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1831 = mbt_ffi_ptr2str( + let result2391 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1831) + Option::Some(result2391) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1830, - language: lifted1832, + text: result2390, + language: lifted2392, }) } 24 => { - let result1833 = mbt_ffi_ptr2bytes( + let result2393 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1835 : String? = match + let lifted2395 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1834 = mbt_ffi_ptr2str( + let result2394 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1834) + Option::Some(result2394) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1833, - mime_type: lifted1835, + bytes: result2393, + mime_type: lifted2395, }) } 25 => { - let result1836 = mbt_ffi_ptr2str( + let result2396 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1836) + @types.SchemaValueNode::PathValue(result2396) } 26 => { - let result1837 = mbt_ffi_ptr2str( + let result2397 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1837) + @types.SchemaValueNode::UrlValue(result2397) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -16050,7 +22532,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1838 = mbt_ffi_ptr2str( + let result2398 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -16058,17 +22540,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1838, + unit: result2398, }) } 30 => { - let result1839 = mbt_ffi_ptr2str( + let result2399 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1839, + tag: result2399, body: mbt_ffi_load32(iter_base + 16), }) } @@ -16085,19 +22567,19 @@ pub fn enrich_oplog_entries( _ => panic() } - array1841.push(lifted1840) + array2401.push(lifted2400) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) AgentInvocationResult::AgentMethod(AgentInvocationOutputParameters::{ output: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1805, - defs: array1810, + type_nodes: array2365, + defs: array2370, root: mbt_ffi_load32(iter_base + 44), }, value: @types.SchemaValueTree::{ - value_nodes: array1841, + value_nodes: array2401, root: mbt_ffi_load32(iter_base + 56), }, }, @@ -16105,73 +22587,73 @@ pub fn enrich_oplog_entries( } 2 => AgentInvocationResult::ManualUpdate 3 => { - let lifted1844 : String? = match + let lifted2404 : String? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => { - let result1843 = mbt_ffi_ptr2str( + let result2403 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - Option::Some(result1843) + Option::Some(result2403) } _ => panic() } AgentInvocationResult::LoadSnapshot(FallibleResultParameters::{ - error: lifted1844, + error: lifted2404, }) } 4 => { - let result1845 = mbt_ffi_ptr2bytes( + let result2405 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - let result1846 = mbt_ffi_ptr2str( + let result2406 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) AgentInvocationResult::SaveSnapshot(SaveSnapshotResultParameters::{ snapshot: SnapshotData::{ - data: result1845, - mime_type: result1846, + data: result2405, + mime_type: result2406, }, }) } 5 => { - let lifted1848 : String? = match + let lifted2408 : String? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => { - let result1847 = mbt_ffi_ptr2str( + let result2407 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - Option::Some(result1847) + Option::Some(result2407) } _ => panic() } AgentInvocationResult::ProcessOplogEntries(FallibleResultParameters::{ - error: lifted1848, + error: lifted2408, }) } _ => panic() } - let lifted1851 : String? = match mbt_ffi_load8_u(iter_base + 60) { + let lifted2411 : String? = match mbt_ffi_load8_u(iter_base + 60) { 0 => Option::None 1 => { - let result1850 = mbt_ffi_ptr2str( + let result2410 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - Option::Some(result1850) + Option::Some(result2410) } _ => panic() } @@ -16181,8 +22663,8 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - result: lifted1849, - method_name: lifted1851, + result: lifted2409, + method_name: lifted2411, consumed_fuel: mbt_ffi_load64(iter_base + 72), component_revision: mbt_ffi_load64(iter_base + 80).reinterpret_as_uint64(), }) @@ -16195,23 +22677,23 @@ pub fn enrich_oplog_entries( }, }) 7 => { - let result1852 = mbt_ffi_ptr2str( + let result2412 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let lifted1856 : RetryPolicyState? = match + let lifted2416 : RetryPolicyState? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let array1854 : Array[StateNode] = [] - for index1855 = 0 - index1855 < mbt_ffi_load32(iter_base + 52) - index1855 = index1855 + 1 { + let array2414 : Array[StateNode] = [] + for index2415 = 0 + index2415 < mbt_ffi_load32(iter_base + 52) + index2415 = index2415 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1855 * 16 + index2415 * 16 - let lifted1853 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2413 = match mbt_ffi_load8_u(iter_base + 0) { 0 => StateNode::Counter( mbt_ffi_load32(iter_base + 4).reinterpret_as_uint(), @@ -16237,11 +22719,11 @@ pub fn enrich_oplog_entries( _ => panic() } - array1854.push(lifted1853) + array2414.push(lifted2413) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - Option::Some(RetryPolicyState::{ nodes: array1854 }) + Option::Some(RetryPolicyState::{ nodes: array2414 }) } _ => panic() } @@ -16251,10 +22733,10 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - error: result1852, + error: result2412, 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: lifted1856, + retry_policy_state: lifted2416, }) } 8 => @@ -16305,324 +22787,1134 @@ pub fn enrich_oplog_entries( begin_index: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), }) 14 => { - let lifted2229 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted2929 = match mbt_ffi_load8_u(iter_base + 24) { 0 => { - let result1857 = mbt_ffi_ptr2str( + let result2417 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array1984 : Array[@types.SchemaTypeNode] = [] - for index1985 = 0 - index1985 < mbt_ffi_load32(iter_base + 44) - index1985 = index1985 + 1 { + let array2614 : Array[@types.SchemaTypeNode] = [] + for index2615 = 0 + index2615 < mbt_ffi_load32(iter_base + 44) + index2615 = index2615 + 1 { let iter_base = mbt_ffi_load32(iter_base + 40) + - index1985 * 144 + index2615 * 144 - let lifted1970 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2600 = 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 + 2 => { + let lifted2424 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2419 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2418 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2418) + } + _ => panic() + } + + let lifted2421 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2420 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2420) + } + _ => panic() + } + + let lifted2423 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2422 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2422) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2419, + max: lifted2421, + unit: lifted2423, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted2424) + } + 3 => { + let lifted2431 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2426 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2425 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2425) + } + _ => panic() + } + + let lifted2428 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2427 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2427) + } + _ => panic() + } + + let lifted2430 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2429 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2429) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2426, + max: lifted2428, + unit: lifted2430, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted2431) + } + 4 => { + let lifted2438 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2433 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2432 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2432) + } + _ => panic() + } + + let lifted2435 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2434 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2434) + } + _ => panic() + } + + let lifted2437 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2436 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2436) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2433, + max: lifted2435, + unit: lifted2437, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2438) + } + 5 => { + let lifted2445 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2440 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2439 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2439) + } + _ => panic() + } + + let lifted2442 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2441 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2441) + } + _ => panic() + } + + let lifted2444 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2443 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2443) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2440, + max: lifted2442, + unit: lifted2444, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted2445) + } + 6 => { + let lifted2452 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2447 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2446 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2446) + } + _ => panic() + } + + let lifted2449 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2448 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2448) + } + _ => panic() + } + + let lifted2451 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2450 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2450) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2447, + max: lifted2449, + unit: lifted2451, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted2452) + } + 7 => { + let lifted2459 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2454 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2453 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2453) + } + _ => panic() + } + + let lifted2456 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2455 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2455) + } + _ => panic() + } + + let lifted2458 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2457 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2457) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2454, + max: lifted2456, + unit: lifted2458, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2459) + } + 8 => { + let lifted2466 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2461 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2460 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2460) + } + _ => panic() + } + + let lifted2463 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2462 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2462) + } + _ => panic() + } + + let lifted2465 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2464 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2464) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2461, + max: lifted2463, + unit: lifted2465, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2466) + } + 9 => { + let lifted2473 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2468 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2467 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2467) + } + _ => panic() + } + + let lifted2470 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2469 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2469) + } + _ => panic() + } + + let lifted2472 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2471 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2471) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2468, + max: lifted2470, + unit: lifted2472, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2473) + } + 10 => { + let lifted2480 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2475 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2474 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2474) + } + _ => panic() + } + + let lifted2477 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2476 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2476) + } + _ => panic() + } + + let lifted2479 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2478 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2478) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2475, + max: lifted2477, + unit: lifted2479, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2480) + } + 11 => { + let lifted2487 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2482 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2481 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2481) + } + _ => panic() + } + + let lifted2484 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2483 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2483) + } + _ => panic() + } + + let lifted2486 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2485 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2485) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2482, + max: lifted2484, + unit: lifted2486, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2487) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1872 : Array[@types.NamedFieldType] = [] - for index1873 = 0 - index1873 < mbt_ffi_load32(iter_base + 12) - index1873 = index1873 + 1 { + let array2502 : Array[@types.NamedFieldType] = [] + for index2503 = 0 + index2503 < mbt_ffi_load32(iter_base + 12) + index2503 = index2503 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1873 * 68 + index2503 * 68 - let result1858 = mbt_ffi_ptr2str( + let result2488 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1860 : String? = match + let lifted2490 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1859 = mbt_ffi_ptr2str( + let result2489 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1859) + Option::Some(result2489) } _ => panic() } - let array1862 : Array[String] = [] - for index1863 = 0 - index1863 < mbt_ffi_load32(iter_base + 28) - index1863 = index1863 + 1 { + let array2492 : Array[String] = [] + for index2493 = 0 + index2493 < mbt_ffi_load32(iter_base + 28) + index2493 = index2493 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1863 * 8 + index2493 * 8 - let result1861 = mbt_ffi_ptr2str( + let result2491 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1862.push(result1861) + array2492.push(result2491) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1865 : Array[String] = [] - for index1866 = 0 - index1866 < mbt_ffi_load32(iter_base + 36) - index1866 = index1866 + 1 { + let array2495 : Array[String] = [] + for index2496 = 0 + index2496 < mbt_ffi_load32(iter_base + 36) + index2496 = index2496 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1866 * 8 + index2496 * 8 - let result1864 = mbt_ffi_ptr2str( + let result2494 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1865.push(result1864) + array2495.push(result2494) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1868 : String? = match + let lifted2498 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1867 = mbt_ffi_ptr2str( + let result2497 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1867) + Option::Some(result2497) } _ => panic() } - let lifted1871 : @types.Role? = match + let lifted2501 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1870 = match + let lifted2500 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1869 = mbt_ffi_ptr2str( + let result2499 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1869) + @types.Role::Other(result2499) } _ => panic() } - Option::Some(lifted1870) + Option::Some(lifted2500) } _ => panic() } - array1872.push(@types.NamedFieldType::{ - name: result1858, + array2502.push(@types.NamedFieldType::{ + name: result2488, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1860, - aliases: array1862, - examples: array1865, - deprecated: lifted1868, - role: lifted1871, + doc: lifted2490, + aliases: array2492, + examples: array2495, + deprecated: lifted2498, + role: lifted2501, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1872) + @types.SchemaTypeBody::RecordType(array2502) } 15 => { - let array1889 : Array[@types.VariantCaseType] = [] - for index1890 = 0 - index1890 < mbt_ffi_load32(iter_base + 12) - index1890 = index1890 + 1 { + let array2519 : Array[@types.VariantCaseType] = [] + for index2520 = 0 + index2520 < mbt_ffi_load32(iter_base + 12) + index2520 = index2520 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1890 * 72 + index2520 * 72 - let result1874 = mbt_ffi_ptr2str( + let result2504 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1875 : Int? = match + let lifted2505 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1877 : String? = match + let lifted2507 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1876 = mbt_ffi_ptr2str( + let result2506 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1876) + Option::Some(result2506) } _ => panic() } - let array1879 : Array[String] = [] - for index1880 = 0 - index1880 < mbt_ffi_load32(iter_base + 32) - index1880 = index1880 + 1 { + let array2509 : Array[String] = [] + for index2510 = 0 + index2510 < mbt_ffi_load32(iter_base + 32) + index2510 = index2510 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1880 * 8 + index2510 * 8 - let result1878 = mbt_ffi_ptr2str( + let result2508 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1879.push(result1878) + array2509.push(result2508) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1882 : Array[String] = [] - for index1883 = 0 - index1883 < mbt_ffi_load32(iter_base + 40) - index1883 = index1883 + 1 { + let array2512 : Array[String] = [] + for index2513 = 0 + index2513 < mbt_ffi_load32(iter_base + 40) + index2513 = index2513 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1883 * 8 + index2513 * 8 - let result1881 = mbt_ffi_ptr2str( + let result2511 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1882.push(result1881) + array2512.push(result2511) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1885 : String? = match + let lifted2515 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1884 = mbt_ffi_ptr2str( + let result2514 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1884) + Option::Some(result2514) } _ => panic() } - let lifted1888 : @types.Role? = match + let lifted2518 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1887 = match + let lifted2517 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1886 = mbt_ffi_ptr2str( + let result2516 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1886) + @types.Role::Other(result2516) } _ => panic() } - Option::Some(lifted1887) + Option::Some(lifted2517) } _ => panic() } - array1889.push(@types.VariantCaseType::{ - name: result1874, - payload: lifted1875, + array2519.push(@types.VariantCaseType::{ + name: result2504, + payload: lifted2505, metadata: @types.MetadataEnvelope::{ - doc: lifted1877, - aliases: array1879, - examples: array1882, - deprecated: lifted1885, - role: lifted1888, + doc: lifted2507, + aliases: array2509, + examples: array2512, + deprecated: lifted2515, + role: lifted2518, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1889) + @types.SchemaTypeBody::VariantType(array2519) } 16 => { - let array1892 : Array[String] = [] - for index1893 = 0 - index1893 < mbt_ffi_load32(iter_base + 12) - index1893 = index1893 + 1 { + let array2522 : Array[String] = [] + for index2523 = 0 + index2523 < mbt_ffi_load32(iter_base + 12) + index2523 = index2523 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1893 * 8 + index2523 * 8 - let result1891 = mbt_ffi_ptr2str( + let result2521 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1892.push(result1891) + array2522.push(result2521) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1892) + @types.SchemaTypeBody::EnumType(array2522) } 17 => { - let array1895 : Array[String] = [] - for index1896 = 0 - index1896 < mbt_ffi_load32(iter_base + 12) - index1896 = index1896 + 1 { + let array2525 : Array[String] = [] + for index2526 = 0 + index2526 < mbt_ffi_load32(iter_base + 12) + index2526 = index2526 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1896 * 8 + index2526 * 8 - let result1894 = mbt_ffi_ptr2str( + let result2524 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1895.push(result1894) + array2525.push(result2524) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1895) + @types.SchemaTypeBody::FlagsType(array2525) } 18 => { - let array1897 : Array[Int] = [] - for index1898 = 0 - index1898 < mbt_ffi_load32(iter_base + 12) - index1898 = index1898 + 1 { + let array2527 : Array[Int] = [] + for index2528 = 0 + index2528 < mbt_ffi_load32(iter_base + 12) + index2528 = index2528 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1898 * 4 + index2528 * 4 - array1897.push(mbt_ffi_load32(iter_base + 0)) + array2527.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1897) + @types.SchemaTypeBody::TupleType(array2527) } 19 => @types.SchemaTypeBody::ListType( @@ -16643,14 +23935,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1899 : Int? = match + let lifted2529 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1900 : Int? = match + let lifted2530 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -16658,37 +23950,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1899, - err: lifted1900, + ok: lifted2529, + err: lifted2530, }) } 24 => { - let lifted1904 : Array[String]? = match + let lifted2534 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1902 : Array[String] = [] - for index1903 = 0 - index1903 < mbt_ffi_load32(iter_base + 16) - index1903 = index1903 + 1 { + let array2532 : Array[String] = [] + for index2533 = 0 + index2533 < mbt_ffi_load32(iter_base + 16) + index2533 = index2533 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1903 * 8 + index2533 * 8 - let result1901 = mbt_ffi_ptr2str( + let result2531 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1902.push(result1901) + array2532.push(result2531) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1902) + Option::Some(array2532) } _ => panic() } - let lifted1905 : UInt? = match + let lifted2535 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -16698,7 +23990,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1906 : UInt? = match + let lifted2536 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -16708,54 +24000,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1908 : String? = match + let lifted2538 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1907 = mbt_ffi_ptr2str( + let result2537 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1907) + Option::Some(result2537) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1904, - min_length: lifted1905, - max_length: lifted1906, - regex: lifted1908, + languages: lifted2534, + min_length: lifted2535, + max_length: lifted2536, + regex: lifted2538, }) } 25 => { - let lifted1912 : Array[String]? = match + 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 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) + - index1911 * 8 + index2541 * 8 - let result1909 = mbt_ffi_ptr2str( + 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 + let lifted2543 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -16765,7 +24057,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted1914 : UInt? = match + let lifted2544 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -16776,58 +24068,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1912, - min_bytes: lifted1913, - max_bytes: lifted1914, + mime_types: lifted2542, + min_bytes: lifted2543, + max_bytes: lifted2544, }) } 26 => { - let lifted1918 : Array[String]? = match + let lifted2548 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1916 : Array[String] = [] - for index1917 = 0 - index1917 < mbt_ffi_load32(iter_base + 20) - index1917 = index1917 + 1 { + let array2546 : Array[String] = [] + for index2547 = 0 + index2547 < mbt_ffi_load32(iter_base + 20) + index2547 = index2547 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1917 * 8 + index2547 * 8 - let result1915 = mbt_ffi_ptr2str( + let result2545 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1916.push(result1915) + array2546.push(result2545) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1916) + Option::Some(array2546) } _ => panic() } - let lifted1922 : Array[String]? = match + let lifted2552 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1920 : Array[String] = [] - for index1921 = 0 - index1921 < mbt_ffi_load32(iter_base + 32) - index1921 = index1921 + 1 { + let array2550 : Array[String] = [] + for index2551 = 0 + index2551 < mbt_ffi_load32(iter_base + 32) + index2551 = index2551 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1921 * 8 + index2551 * 8 - let result1919 = mbt_ffi_ptr2str( + let result2549 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1920.push(result1919) + array2550.push(result2549) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1920) + Option::Some(array2550) } _ => panic() } @@ -16839,95 +24131,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1918, - allowed_extensions: lifted1922, + allowed_mime_types: lifted2548, + allowed_extensions: lifted2552, }) } 27 => { - let lifted1926 : Array[String]? = match + let lifted2556 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1924 : Array[String] = [] - for index1925 = 0 - index1925 < mbt_ffi_load32(iter_base + 16) - index1925 = index1925 + 1 { + let array2554 : Array[String] = [] + for index2555 = 0 + index2555 < mbt_ffi_load32(iter_base + 16) + index2555 = index2555 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1925 * 8 + index2555 * 8 - let result1923 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array1924) + Option::Some(array2554) } _ => panic() } - let lifted1930 : Array[String]? = match + let lifted2560 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1928 : Array[String] = [] - for index1929 = 0 - index1929 < mbt_ffi_load32(iter_base + 28) - index1929 = index1929 + 1 { + let array2558 : Array[String] = [] + for index2559 = 0 + index2559 < mbt_ffi_load32(iter_base + 28) + index2559 = index2559 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1929 * 8 + index2559 * 8 - let result1927 = mbt_ffi_ptr2str( + 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 + 24)) - Option::Some(array1928) + Option::Some(array2558) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1926, - allowed_hosts: lifted1930, + allowed_schemes: lifted2556, + allowed_hosts: lifted2560, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1931 = mbt_ffi_ptr2str( + let result2561 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1933 : Array[String] = [] - for index1934 = 0 - index1934 < mbt_ffi_load32(iter_base + 20) - index1934 = index1934 + 1 { + let array2563 : Array[String] = [] + for index2564 = 0 + index2564 < mbt_ffi_load32(iter_base + 20) + index2564 = index2564 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1934 * 8 + index2564 * 8 - let result1932 = mbt_ffi_ptr2str( + let result2562 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1933.push(result1932) + array2563.push(result2562) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1936 : @types.QuantityValue? = match + let lifted2566 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1935 = mbt_ffi_ptr2str( + let result2565 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -16935,17 +24227,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1935, + unit: result2565, }) } _ => panic() } - let lifted1938 : @types.QuantityValue? = match + let lifted2568 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1937 = mbt_ffi_ptr2str( + let result2567 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -16953,406 +24245,406 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1937, + unit: result2567, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1931, - allowed_suffixes: array1933, - min: lifted1936, - max: lifted1938, + base_unit: result2561, + allowed_suffixes: array2563, + min: lifted2566, + max: lifted2568, }) } 31 => { - let array1962 : Array[@types.UnionBranch] = [] - for index1963 = 0 - index1963 < mbt_ffi_load32(iter_base + 12) - index1963 = index1963 + 1 { + let array2592 : Array[@types.UnionBranch] = [] + for index2593 = 0 + index2593 < mbt_ffi_load32(iter_base + 12) + index2593 = index2593 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1963 * 92 + index2593 * 92 - let result1939 = mbt_ffi_ptr2str( + let result2569 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1948 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted2578 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1940 = mbt_ffi_ptr2str( + let result2570 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1940) + @types.DiscriminatorRule::Prefix(result2570) } 1 => { - let result1941 = mbt_ffi_ptr2str( + let result2571 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1941) + @types.DiscriminatorRule::Suffix(result2571) } 2 => { - let result1942 = mbt_ffi_ptr2str( + let result2572 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1942) + @types.DiscriminatorRule::Contains(result2572) } 3 => { - let result1943 = mbt_ffi_ptr2str( + let result2573 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1943) + @types.DiscriminatorRule::Regex(result2573) } 4 => { - let result1944 = mbt_ffi_ptr2str( + let result2574 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1946 : String? = match + let lifted2576 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1945 = mbt_ffi_ptr2str( + let result2575 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1945) + Option::Some(result2575) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1944, - literal: lifted1946, + field_name: result2574, + literal: lifted2576, }) } 5 => { - let result1947 = mbt_ffi_ptr2str( + let result2577 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1947) + @types.DiscriminatorRule::FieldAbsent(result2577) } _ => panic() } - let lifted1950 : String? = match + let lifted2580 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1949 = mbt_ffi_ptr2str( + let result2579 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1949) + Option::Some(result2579) } _ => panic() } - let array1952 : Array[String] = [] - for index1953 = 0 - index1953 < mbt_ffi_load32(iter_base + 52) - index1953 = index1953 + 1 { + let array2582 : Array[String] = [] + for index2583 = 0 + index2583 < mbt_ffi_load32(iter_base + 52) + index2583 = index2583 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1953 * 8 + index2583 * 8 - let result1951 = mbt_ffi_ptr2str( + let result2581 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1952.push(result1951) + array2582.push(result2581) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1955 : Array[String] = [] - for index1956 = 0 - index1956 < mbt_ffi_load32(iter_base + 60) - index1956 = index1956 + 1 { + let array2585 : Array[String] = [] + for index2586 = 0 + index2586 < mbt_ffi_load32(iter_base + 60) + index2586 = index2586 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1956 * 8 + index2586 * 8 - let result1954 = mbt_ffi_ptr2str( + let result2584 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1955.push(result1954) + array2585.push(result2584) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1958 : String? = match + let lifted2588 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1957 = mbt_ffi_ptr2str( + let result2587 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1957) + Option::Some(result2587) } _ => panic() } - let lifted1961 : @types.Role? = match + let lifted2591 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1960 = match + let lifted2590 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1959 = mbt_ffi_ptr2str( + let result2589 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1959) + @types.Role::Other(result2589) } _ => panic() } - Option::Some(lifted1960) + Option::Some(lifted2590) } _ => panic() } - array1962.push(@types.UnionBranch::{ - tag: result1939, + array2592.push(@types.UnionBranch::{ + tag: result2569, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1948, + discriminator: lifted2578, metadata: @types.MetadataEnvelope::{ - doc: lifted1950, - aliases: array1952, - examples: array1955, - deprecated: lifted1958, - role: lifted1961, + doc: lifted2580, + aliases: array2582, + examples: array2585, + deprecated: lifted2588, + role: lifted2591, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1962, + branches: array2592, }) } 32 => { - let lifted1965 : String? = match + let lifted2595 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1964 = mbt_ffi_ptr2str( + let result2594 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1964) + Option::Some(result2594) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1965, + category: lifted2595, }) } 33 => { - let lifted1967 : String? = match + let lifted2597 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1966 = mbt_ffi_ptr2str( + let result2596 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1966) + Option::Some(result2596) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1967, + resource_name: lifted2597, }) } 34 => { - let lifted1968 : Int? = match + let lifted2598 : 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(lifted1968) + @types.SchemaTypeBody::FutureType(lifted2598) } 35 => { - let lifted1969 : Int? = match + let lifted2599 : 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(lifted1969) + @types.SchemaTypeBody::StreamType(lifted2599) } _ => panic() } - let lifted1972 : String? = match + let lifted2602 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1971 = mbt_ffi_ptr2str( + let result2601 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1971) + Option::Some(result2601) } _ => panic() } - let array1974 : Array[String] = [] - for index1975 = 0 - index1975 < mbt_ffi_load32(iter_base + 104) - index1975 = index1975 + 1 { + let array2604 : Array[String] = [] + for index2605 = 0 + index2605 < mbt_ffi_load32(iter_base + 104) + index2605 = index2605 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1975 * 8 + index2605 * 8 - let result1973 = mbt_ffi_ptr2str( + let result2603 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1974.push(result1973) + array2604.push(result2603) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1977 : Array[String] = [] - for index1978 = 0 - index1978 < mbt_ffi_load32(iter_base + 112) - index1978 = index1978 + 1 { + let array2607 : Array[String] = [] + for index2608 = 0 + index2608 < mbt_ffi_load32(iter_base + 112) + index2608 = index2608 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1978 * 8 + index2608 * 8 - let result1976 = mbt_ffi_ptr2str( + let result2606 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1977.push(result1976) + array2607.push(result2606) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1980 : String? = match + let lifted2610 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1979 = mbt_ffi_ptr2str( + let result2609 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1979) + Option::Some(result2609) } _ => panic() } - let lifted1983 : @types.Role? = match + let lifted2613 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1982 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted2612 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1981 = mbt_ffi_ptr2str( + let result2611 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1981) + @types.Role::Other(result2611) } _ => panic() } - Option::Some(lifted1982) + Option::Some(lifted2612) } _ => panic() } - array1984.push(@types.SchemaTypeNode::{ - body: lifted1970, + array2614.push(@types.SchemaTypeNode::{ + body: lifted2600, metadata: @types.MetadataEnvelope::{ - doc: lifted1972, - aliases: array1974, - examples: array1977, - deprecated: lifted1980, - role: lifted1983, + doc: lifted2602, + aliases: array2604, + examples: array2607, + deprecated: lifted2610, + role: lifted2613, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let array1989 : Array[@types.SchemaTypeDef] = [] - for index1990 = 0 - index1990 < mbt_ffi_load32(iter_base + 52) - index1990 = index1990 + 1 { + let array2619 : Array[@types.SchemaTypeDef] = [] + for index2620 = 0 + index2620 < mbt_ffi_load32(iter_base + 52) + index2620 = index2620 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1990 * 24 + index2620 * 24 - let result1986 = mbt_ffi_ptr2str( + let result2616 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1988 : String? = match + let lifted2618 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1987 = mbt_ffi_ptr2str( + let result2617 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1987) + Option::Some(result2617) } _ => panic() } - array1989.push(@types.SchemaTypeDef::{ - id: result1986, - name: lifted1988, + array2619.push(@types.SchemaTypeDef::{ + id: result2616, + name: lifted2618, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array2020 : Array[@types.SchemaValueNode] = [] - for index2021 = 0 - index2021 < mbt_ffi_load32(iter_base + 64) - index2021 = index2021 + 1 { + let array2650 : Array[@types.SchemaValueNode] = [] + for index2651 = 0 + index2651 < mbt_ffi_load32(iter_base + 64) + index2651 = index2651 + 1 { let iter_base = mbt_ffi_load32(iter_base + 60) + - index2021 * 32 + index2651 * 32 - let lifted2019 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2649 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -17404,29 +24696,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1991 = mbt_ffi_ptr2str( + let result2621 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1991) + @types.SchemaValueNode::StringValue(result2621) } 13 => { - let array1992 : Array[Int] = [] - for index1993 = 0 - index1993 < mbt_ffi_load32(iter_base + 12) - index1993 = index1993 + 1 { + let array2622 : Array[Int] = [] + for index2623 = 0 + index2623 < mbt_ffi_load32(iter_base + 12) + index2623 = index2623 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1993 * 4 + index2623 * 4 - array1992.push(mbt_ffi_load32(iter_base + 0)) + array2622.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1992) + @types.SchemaValueNode::RecordValue(array2622) } 14 => { - let lifted1994 : Int? = match + let lifted2624 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -17435,7 +24727,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1994, + payload: lifted2624, }) } 15 => @@ -17443,180 +24735,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1995 : Array[Bool] = [] - for index1996 = 0 - index1996 < mbt_ffi_load32(iter_base + 12) - index1996 = index1996 + 1 { + let array2625 : Array[Bool] = [] + for index2626 = 0 + index2626 < mbt_ffi_load32(iter_base + 12) + index2626 = index2626 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1996 * 1 + index2626 * 1 - array1995.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array2625.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1995) + @types.SchemaValueNode::FlagsValue(array2625) } 17 => { - let array1997 : Array[Int] = [] - for index1998 = 0 - index1998 < mbt_ffi_load32(iter_base + 12) - index1998 = index1998 + 1 { + let array2627 : Array[Int] = [] + for index2628 = 0 + index2628 < mbt_ffi_load32(iter_base + 12) + index2628 = index2628 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1998 * 4 + index2628 * 4 - array1997.push(mbt_ffi_load32(iter_base + 0)) + array2627.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1997) + @types.SchemaValueNode::TupleValue(array2627) } 18 => { - let array1999 : Array[Int] = [] - for index2000 = 0 - index2000 < mbt_ffi_load32(iter_base + 12) - index2000 = index2000 + 1 { + let array2629 : Array[Int] = [] + for index2630 = 0 + index2630 < mbt_ffi_load32(iter_base + 12) + index2630 = index2630 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2000 * 4 + index2630 * 4 - array1999.push(mbt_ffi_load32(iter_base + 0)) + array2629.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1999) + @types.SchemaValueNode::ListValue(array2629) } 19 => { - let array2001 : Array[Int] = [] - for index2002 = 0 - index2002 < mbt_ffi_load32(iter_base + 12) - index2002 = index2002 + 1 { + let array2631 : Array[Int] = [] + for index2632 = 0 + index2632 < mbt_ffi_load32(iter_base + 12) + index2632 = index2632 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2002 * 4 + index2632 * 4 - array2001.push(mbt_ffi_load32(iter_base + 0)) + array2631.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array2001) + @types.SchemaValueNode::FixedListValue(array2631) } 20 => { - let array2003 : Array[@types.MapEntry] = [] - for index2004 = 0 - index2004 < mbt_ffi_load32(iter_base + 12) - index2004 = index2004 + 1 { + let array2633 : Array[@types.MapEntry] = [] + for index2634 = 0 + index2634 < mbt_ffi_load32(iter_base + 12) + index2634 = index2634 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2004 * 8 + index2634 * 8 - array2003.push(@types.MapEntry::{ + array2633.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(array2003) + @types.SchemaValueNode::MapValue(array2633) } 21 => { - let lifted2005 : Int? = match + let lifted2635 : 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(lifted2005) + @types.SchemaValueNode::OptionValue(lifted2635) } 22 => { - let lifted2008 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2638 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted2006 : Int? = match + let lifted2636 : 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(lifted2006) + @types.ResultValuePayload::OkValue(lifted2636) } 1 => { - let lifted2007 : Int? = match + let lifted2637 : 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(lifted2007) + @types.ResultValuePayload::ErrValue(lifted2637) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted2008) + @types.SchemaValueNode::ResultValue(lifted2638) } 23 => { - let result2009 = mbt_ffi_ptr2str( + let result2639 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2011 : String? = match + let lifted2641 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result2010 = mbt_ffi_ptr2str( + let result2640 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result2010) + Option::Some(result2640) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result2009, - language: lifted2011, + text: result2639, + language: lifted2641, }) } 24 => { - let result2012 = mbt_ffi_ptr2bytes( + let result2642 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2014 : String? = match + let lifted2644 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result2013 = mbt_ffi_ptr2str( + let result2643 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result2013) + Option::Some(result2643) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result2012, - mime_type: lifted2014, + bytes: result2642, + mime_type: lifted2644, }) } 25 => { - let result2015 = mbt_ffi_ptr2str( + let result2645 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result2015) + @types.SchemaValueNode::PathValue(result2645) } 26 => { - let result2016 = mbt_ffi_ptr2str( + let result2646 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result2016) + @types.SchemaValueNode::UrlValue(result2646) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -17628,7 +24920,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result2017 = mbt_ffi_ptr2str( + let result2647 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -17636,17 +24928,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result2017, + unit: result2647, }) } 30 => { - let result2018 = mbt_ffi_ptr2str( + let result2648 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result2018, + tag: result2648, body: mbt_ffi_load32(iter_base + 16), }) } @@ -17663,65 +24955,65 @@ pub fn enrich_oplog_entries( _ => panic() } - array2020.push(lifted2019) + array2650.push(lifted2649) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) - let result2022 = mbt_ffi_ptr2str( + let result2652 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 72), mbt_ffi_load32(iter_base + 76), ) - let array2024 : Array[String] = [] - for index2025 = 0 - index2025 < mbt_ffi_load32(iter_base + 84) - index2025 = index2025 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index2025 * 8 + let array2654 : Array[String] = [] + for index2655 = 0 + index2655 < mbt_ffi_load32(iter_base + 84) + index2655 = index2655 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 80) + index2655 * 8 - let result2023 = mbt_ffi_ptr2str( + let result2653 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2024.push(result2023) + array2654.push(result2653) } mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) - let array2039 : Array[Array[SpanData]] = [] - for index2040 = 0 - index2040 < mbt_ffi_load32(iter_base + 92) - index2040 = index2040 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index2040 * 8 + let array2669 : Array[Array[SpanData]] = [] + for index2670 = 0 + index2670 < mbt_ffi_load32(iter_base + 92) + index2670 = index2670 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index2670 * 8 - let array2037 : Array[SpanData] = [] - for index2038 = 0 - index2038 < mbt_ffi_load32(iter_base + 4) - index2038 = index2038 + 1 { + let array2667 : Array[SpanData] = [] + for index2668 = 0 + index2668 < mbt_ffi_load32(iter_base + 4) + index2668 = index2668 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index2038 * 80 + index2668 * 80 - let lifted2036 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2666 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result2026 = mbt_ffi_ptr2str( + let result2656 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2028 : String? = match + let lifted2658 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result2027 = mbt_ffi_ptr2str( + let result2657 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result2027) + Option::Some(result2657) } _ => panic() } - let lifted2029 : UInt64? = match + let lifted2659 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -17731,411 +25023,1221 @@ pub fn enrich_oplog_entries( _ => panic() } - let array2033 : Array[@context.Attribute] = [] - for index2034 = 0 - index2034 < mbt_ffi_load32(iter_base + 68) - index2034 = index2034 + 1 { + let array2663 : Array[@context.Attribute] = [] + for index2664 = 0 + index2664 < mbt_ffi_load32(iter_base + 68) + index2664 = index2664 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index2034 * 20 + index2664 * 20 - let result2030 = mbt_ffi_ptr2str( + let result2660 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted2032 = match + let lifted2662 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result2031 = mbt_ffi_ptr2str( + let result2661 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result2031) + @context.AttributeValue::String(result2661) } _ => panic() } - array2033.push(@context.Attribute::{ - key: result2030, - value: lifted2032, + array2663.push(@context.Attribute::{ + key: result2660, + value: lifted2662, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result2026, + span_id: result2656, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted2028, - linked_context: lifted2029, - attributes: array2033, + parent: lifted2658, + linked_context: lifted2659, + attributes: array2663, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result2035 = mbt_ffi_ptr2str( + let result2665 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result2035, + span_id: result2665, }) } _ => panic() } - array2037.push(lifted2036) + array2667.push(lifted2666) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array2039.push(array2037) + array2669.push(array2667) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) AgentInvocation::AgentInitialization(AgentInitializationParameters::{ - idempotency_key: result1857, + idempotency_key: result2417, constructor_parameters: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1984, - defs: array1989, + type_nodes: array2614, + defs: array2619, root: mbt_ffi_load32(iter_base + 56), }, value: @types.SchemaValueTree::{ - value_nodes: array2020, + value_nodes: array2650, root: mbt_ffi_load32(iter_base + 68), }, }, - trace_id: result2022, - trace_states: array2024, - invocation_context: array2039, + trace_id: result2652, + trace_states: array2654, + invocation_context: array2669, }) } 1 => { - let result2041 = mbt_ffi_ptr2str( + let result2671 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result2042 = mbt_ffi_ptr2str( + let result2672 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let array2169 : Array[@types.SchemaTypeNode] = [] - for index2170 = 0 - index2170 < mbt_ffi_load32(iter_base + 52) - index2170 = index2170 + 1 { + let array2869 : Array[@types.SchemaTypeNode] = [] + for index2870 = 0 + index2870 < mbt_ffi_load32(iter_base + 52) + index2870 = index2870 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index2170 * 144 + index2870 * 144 - let lifted2155 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2855 = 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 + 2 => { + let lifted2679 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2674 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2673 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2673) + } + _ => panic() + } + + let lifted2676 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2675 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2675) + } + _ => panic() + } + + let lifted2678 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2677 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2677) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2674, + max: lifted2676, + unit: lifted2678, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted2679) + } + 3 => { + let lifted2686 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2681 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2680 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2680) + } + _ => panic() + } + + let lifted2683 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2682 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2682) + } + _ => panic() + } + + let lifted2685 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2684 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2684) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2681, + max: lifted2683, + unit: lifted2685, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted2686) + } + 4 => { + let lifted2693 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2688 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2687 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2687) + } + _ => panic() + } + + let lifted2690 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2689 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2689) + } + _ => panic() + } + + let lifted2692 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2691 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2691) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2688, + max: lifted2690, + unit: lifted2692, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2693) + } + 5 => { + let lifted2700 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2695 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2694 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2694) + } + _ => panic() + } + + let lifted2697 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2696 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2696) + } + _ => panic() + } + + let lifted2699 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2698 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2698) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2695, + max: lifted2697, + unit: lifted2699, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted2700) + } + 6 => { + let lifted2707 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2702 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2701 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2701) + } + _ => panic() + } + + let lifted2704 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2703 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2703) + } + _ => panic() + } + + let lifted2706 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2705 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2705) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2702, + max: lifted2704, + unit: lifted2706, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted2707) + } + 7 => { + let lifted2714 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2709 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2708 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2708) + } + _ => panic() + } + + let lifted2711 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2710 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2710) + } + _ => panic() + } + + let lifted2713 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2712 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2712) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2709, + max: lifted2711, + unit: lifted2713, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2714) + } + 8 => { + let lifted2721 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2716 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2715 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2715) + } + _ => panic() + } + + let lifted2718 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2717 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2717) + } + _ => panic() + } + + let lifted2720 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2719 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2719) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2716, + max: lifted2718, + unit: lifted2720, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2721) + } + 9 => { + let lifted2728 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2723 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2722 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2722) + } + _ => panic() + } + + let lifted2725 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2724 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2724) + } + _ => panic() + } + + let lifted2727 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2726 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2726) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2723, + max: lifted2725, + unit: lifted2727, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2728) + } + 10 => { + let lifted2735 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2730 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2729 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2729) + } + _ => panic() + } + + let lifted2732 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2731 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2731) + } + _ => panic() + } + + let lifted2734 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2733 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2733) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2730, + max: lifted2732, + unit: lifted2734, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2735) + } + 11 => { + let lifted2742 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2737 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2736 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2736) + } + _ => panic() + } + + let lifted2739 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2738 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2738) + } + _ => panic() + } + + let lifted2741 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2740 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2740) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2737, + max: lifted2739, + unit: lifted2741, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2742) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array2057 : Array[@types.NamedFieldType] = [] - for index2058 = 0 - index2058 < mbt_ffi_load32(iter_base + 12) - index2058 = index2058 + 1 { + let array2757 : Array[@types.NamedFieldType] = [] + for index2758 = 0 + index2758 < mbt_ffi_load32(iter_base + 12) + index2758 = index2758 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2058 * 68 + index2758 * 68 - let result2043 = mbt_ffi_ptr2str( + let result2743 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted2045 : String? = match + let lifted2745 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result2044 = mbt_ffi_ptr2str( + let result2744 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result2044) + Option::Some(result2744) } _ => panic() } - let array2047 : Array[String] = [] - for index2048 = 0 - index2048 < mbt_ffi_load32(iter_base + 28) - index2048 = index2048 + 1 { + let array2747 : Array[String] = [] + for index2748 = 0 + index2748 < mbt_ffi_load32(iter_base + 28) + index2748 = index2748 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index2048 * 8 + index2748 * 8 - let result2046 = mbt_ffi_ptr2str( + let result2746 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2047.push(result2046) + array2747.push(result2746) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array2050 : Array[String] = [] - for index2051 = 0 - index2051 < mbt_ffi_load32(iter_base + 36) - index2051 = index2051 + 1 { + let array2750 : Array[String] = [] + for index2751 = 0 + index2751 < mbt_ffi_load32(iter_base + 36) + index2751 = index2751 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index2051 * 8 + index2751 * 8 - let result2049 = mbt_ffi_ptr2str( + let result2749 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2050.push(result2049) + array2750.push(result2749) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted2053 : String? = match + let lifted2753 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result2052 = mbt_ffi_ptr2str( + let result2752 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result2052) + Option::Some(result2752) } _ => panic() } - let lifted2056 : @types.Role? = match + let lifted2756 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted2055 = match + let lifted2755 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result2054 = mbt_ffi_ptr2str( + let result2754 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result2054) + @types.Role::Other(result2754) } _ => panic() } - Option::Some(lifted2055) + Option::Some(lifted2755) } _ => panic() } - array2057.push(@types.NamedFieldType::{ - name: result2043, + array2757.push(@types.NamedFieldType::{ + name: result2743, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted2045, - aliases: array2047, - examples: array2050, - deprecated: lifted2053, - role: lifted2056, + doc: lifted2745, + aliases: array2747, + examples: array2750, + deprecated: lifted2753, + role: lifted2756, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array2057) + @types.SchemaTypeBody::RecordType(array2757) } 15 => { - let array2074 : Array[@types.VariantCaseType] = [] - for index2075 = 0 - index2075 < mbt_ffi_load32(iter_base + 12) - index2075 = index2075 + 1 { + let array2774 : Array[@types.VariantCaseType] = [] + for index2775 = 0 + index2775 < mbt_ffi_load32(iter_base + 12) + index2775 = index2775 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2075 * 72 + index2775 * 72 - let result2059 = mbt_ffi_ptr2str( + let result2759 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted2060 : Int? = match + let lifted2760 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted2062 : String? = match + let lifted2762 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result2061 = mbt_ffi_ptr2str( + let result2761 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result2061) + Option::Some(result2761) } _ => panic() } - let array2064 : Array[String] = [] - for index2065 = 0 - index2065 < mbt_ffi_load32(iter_base + 32) - index2065 = index2065 + 1 { + let array2764 : Array[String] = [] + for index2765 = 0 + index2765 < mbt_ffi_load32(iter_base + 32) + index2765 = index2765 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index2065 * 8 + index2765 * 8 - let result2063 = mbt_ffi_ptr2str( + let result2763 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2064.push(result2063) + array2764.push(result2763) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array2067 : Array[String] = [] - for index2068 = 0 - index2068 < mbt_ffi_load32(iter_base + 40) - index2068 = index2068 + 1 { + let array2767 : Array[String] = [] + for index2768 = 0 + index2768 < mbt_ffi_load32(iter_base + 40) + index2768 = index2768 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index2068 * 8 + index2768 * 8 - let result2066 = mbt_ffi_ptr2str( + let result2766 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2067.push(result2066) + array2767.push(result2766) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted2070 : String? = match + let lifted2770 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result2069 = mbt_ffi_ptr2str( + let result2769 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result2069) + Option::Some(result2769) } _ => panic() } - let lifted2073 : @types.Role? = match + let lifted2773 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted2072 = match + let lifted2772 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result2071 = mbt_ffi_ptr2str( + let result2771 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result2071) + @types.Role::Other(result2771) } _ => panic() } - Option::Some(lifted2072) + Option::Some(lifted2772) } _ => panic() } - array2074.push(@types.VariantCaseType::{ - name: result2059, - payload: lifted2060, + array2774.push(@types.VariantCaseType::{ + name: result2759, + payload: lifted2760, metadata: @types.MetadataEnvelope::{ - doc: lifted2062, - aliases: array2064, - examples: array2067, - deprecated: lifted2070, - role: lifted2073, + doc: lifted2762, + aliases: array2764, + examples: array2767, + deprecated: lifted2770, + role: lifted2773, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array2074) + @types.SchemaTypeBody::VariantType(array2774) } 16 => { - let array2077 : Array[String] = [] - for index2078 = 0 - index2078 < mbt_ffi_load32(iter_base + 12) - index2078 = index2078 + 1 { + let array2777 : Array[String] = [] + for index2778 = 0 + index2778 < mbt_ffi_load32(iter_base + 12) + index2778 = index2778 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2078 * 8 + index2778 * 8 - let result2076 = mbt_ffi_ptr2str( + let result2776 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2077.push(result2076) + array2777.push(result2776) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array2077) + @types.SchemaTypeBody::EnumType(array2777) } 17 => { - let array2080 : Array[String] = [] - for index2081 = 0 - index2081 < mbt_ffi_load32(iter_base + 12) - index2081 = index2081 + 1 { + let array2780 : Array[String] = [] + for index2781 = 0 + index2781 < mbt_ffi_load32(iter_base + 12) + index2781 = index2781 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2081 * 8 + index2781 * 8 - let result2079 = mbt_ffi_ptr2str( + let result2779 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2080.push(result2079) + array2780.push(result2779) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array2080) + @types.SchemaTypeBody::FlagsType(array2780) } 18 => { - let array2082 : Array[Int] = [] - for index2083 = 0 - index2083 < mbt_ffi_load32(iter_base + 12) - index2083 = index2083 + 1 { + let array2782 : Array[Int] = [] + for index2783 = 0 + index2783 < mbt_ffi_load32(iter_base + 12) + index2783 = index2783 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2083 * 4 + index2783 * 4 - array2082.push(mbt_ffi_load32(iter_base + 0)) + array2782.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array2082) + @types.SchemaTypeBody::TupleType(array2782) } 19 => @types.SchemaTypeBody::ListType( @@ -18156,14 +26258,14 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted2084 : Int? = match + let lifted2784 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted2085 : Int? = match + let lifted2785 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -18171,37 +26273,37 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted2084, - err: lifted2085, + ok: lifted2784, + err: lifted2785, }) } 24 => { - let lifted2089 : Array[String]? = match + let lifted2789 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array2087 : Array[String] = [] - for index2088 = 0 - index2088 < mbt_ffi_load32(iter_base + 16) - index2088 = index2088 + 1 { + let array2787 : Array[String] = [] + for index2788 = 0 + index2788 < mbt_ffi_load32(iter_base + 16) + index2788 = index2788 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index2088 * 8 + index2788 * 8 - let result2086 = mbt_ffi_ptr2str( + let result2786 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2087.push(result2086) + array2787.push(result2786) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array2087) + Option::Some(array2787) } _ => panic() } - let lifted2090 : UInt? = match + let lifted2790 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -18211,7 +26313,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted2091 : UInt? = match + let lifted2791 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -18221,54 +26323,54 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted2093 : String? = match + let lifted2793 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result2092 = mbt_ffi_ptr2str( + let result2792 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result2092) + Option::Some(result2792) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted2089, - min_length: lifted2090, - max_length: lifted2091, - regex: lifted2093, + languages: lifted2789, + min_length: lifted2790, + max_length: lifted2791, + regex: lifted2793, }) } 25 => { - let lifted2097 : Array[String]? = match + let lifted2797 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array2095 : Array[String] = [] - for index2096 = 0 - index2096 < mbt_ffi_load32(iter_base + 16) - index2096 = index2096 + 1 { + let array2795 : Array[String] = [] + for index2796 = 0 + index2796 < mbt_ffi_load32(iter_base + 16) + index2796 = index2796 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index2096 * 8 + index2796 * 8 - let result2094 = mbt_ffi_ptr2str( + let result2794 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2095.push(result2094) + array2795.push(result2794) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array2095) + Option::Some(array2795) } _ => panic() } - let lifted2098 : UInt? = match + let lifted2798 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -18278,7 +26380,7 @@ pub fn enrich_oplog_entries( _ => panic() } - let lifted2099 : UInt? = match + let lifted2799 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -18289,58 +26391,58 @@ pub fn enrich_oplog_entries( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted2097, - min_bytes: lifted2098, - max_bytes: lifted2099, + mime_types: lifted2797, + min_bytes: lifted2798, + max_bytes: lifted2799, }) } 26 => { - let lifted2103 : Array[String]? = match + let lifted2803 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array2101 : Array[String] = [] - for index2102 = 0 - index2102 < mbt_ffi_load32(iter_base + 20) - index2102 = index2102 + 1 { + let array2801 : Array[String] = [] + for index2802 = 0 + index2802 < mbt_ffi_load32(iter_base + 20) + index2802 = index2802 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index2102 * 8 + index2802 * 8 - let result2100 = mbt_ffi_ptr2str( + let result2800 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2101.push(result2100) + array2801.push(result2800) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array2101) + Option::Some(array2801) } _ => panic() } - let lifted2107 : Array[String]? = match + let lifted2807 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array2105 : Array[String] = [] - for index2106 = 0 - index2106 < mbt_ffi_load32(iter_base + 32) - index2106 = index2106 + 1 { + let array2805 : Array[String] = [] + for index2806 = 0 + index2806 < mbt_ffi_load32(iter_base + 32) + index2806 = index2806 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index2106 * 8 + index2806 * 8 - let result2104 = mbt_ffi_ptr2str( + let result2804 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2105.push(result2104) + array2805.push(result2804) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array2105) + Option::Some(array2805) } _ => panic() } @@ -18352,95 +26454,95 @@ pub fn enrich_oplog_entries( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted2103, - allowed_extensions: lifted2107, + allowed_mime_types: lifted2803, + allowed_extensions: lifted2807, }) } 27 => { - let lifted2111 : Array[String]? = match + let lifted2811 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array2109 : Array[String] = [] - for index2110 = 0 - index2110 < mbt_ffi_load32(iter_base + 16) - index2110 = index2110 + 1 { + let array2809 : Array[String] = [] + for index2810 = 0 + index2810 < mbt_ffi_load32(iter_base + 16) + index2810 = index2810 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index2110 * 8 + index2810 * 8 - let result2108 = mbt_ffi_ptr2str( + let result2808 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2109.push(result2108) + array2809.push(result2808) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array2109) + Option::Some(array2809) } _ => panic() } - let lifted2115 : Array[String]? = match + let lifted2815 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array2113 : Array[String] = [] - for index2114 = 0 - index2114 < mbt_ffi_load32(iter_base + 28) - index2114 = index2114 + 1 { + let array2813 : Array[String] = [] + for index2814 = 0 + index2814 < mbt_ffi_load32(iter_base + 28) + index2814 = index2814 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index2114 * 8 + index2814 * 8 - let result2112 = mbt_ffi_ptr2str( + let result2812 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2113.push(result2112) + array2813.push(result2812) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array2113) + Option::Some(array2813) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted2111, - allowed_hosts: lifted2115, + allowed_schemes: lifted2811, + allowed_hosts: lifted2815, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result2116 = mbt_ffi_ptr2str( + let result2816 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array2118 : Array[String] = [] - for index2119 = 0 - index2119 < mbt_ffi_load32(iter_base + 20) - index2119 = index2119 + 1 { + let array2818 : Array[String] = [] + for index2819 = 0 + index2819 < mbt_ffi_load32(iter_base + 20) + index2819 = index2819 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index2119 * 8 + index2819 * 8 - let result2117 = mbt_ffi_ptr2str( + 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 + 16)) - let lifted2121 : @types.QuantityValue? = match + let lifted2821 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result2120 = mbt_ffi_ptr2str( + let result2820 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -18448,17 +26550,17 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result2120, + unit: result2820, }) } _ => panic() } - let lifted2123 : @types.QuantityValue? = match + let lifted2823 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result2122 = mbt_ffi_ptr2str( + let result2822 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -18466,406 +26568,406 @@ pub fn enrich_oplog_entries( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result2122, + unit: result2822, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result2116, - allowed_suffixes: array2118, - min: lifted2121, - max: lifted2123, + base_unit: result2816, + allowed_suffixes: array2818, + min: lifted2821, + max: lifted2823, }) } 31 => { - let array2147 : Array[@types.UnionBranch] = [] - for index2148 = 0 - index2148 < mbt_ffi_load32(iter_base + 12) - index2148 = index2148 + 1 { + let array2847 : Array[@types.UnionBranch] = [] + for index2848 = 0 + index2848 < mbt_ffi_load32(iter_base + 12) + index2848 = index2848 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2148 * 92 + index2848 * 92 - let result2124 = mbt_ffi_ptr2str( + let result2824 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted2133 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted2833 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result2125 = mbt_ffi_ptr2str( + let result2825 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result2125) + @types.DiscriminatorRule::Prefix(result2825) } 1 => { - let result2126 = mbt_ffi_ptr2str( + let result2826 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result2126) + @types.DiscriminatorRule::Suffix(result2826) } 2 => { - let result2127 = mbt_ffi_ptr2str( + let result2827 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result2127) + @types.DiscriminatorRule::Contains(result2827) } 3 => { - let result2128 = mbt_ffi_ptr2str( + let result2828 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result2128) + @types.DiscriminatorRule::Regex(result2828) } 4 => { - let result2129 = mbt_ffi_ptr2str( + let result2829 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted2131 : String? = match + let lifted2831 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result2130 = mbt_ffi_ptr2str( + let result2830 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result2130) + Option::Some(result2830) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result2129, - literal: lifted2131, + field_name: result2829, + literal: lifted2831, }) } 5 => { - let result2132 = mbt_ffi_ptr2str( + let result2832 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result2132) + @types.DiscriminatorRule::FieldAbsent(result2832) } _ => panic() } - let lifted2135 : String? = match + let lifted2835 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result2134 = mbt_ffi_ptr2str( + let result2834 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result2134) + Option::Some(result2834) } _ => panic() } - let array2137 : Array[String] = [] - for index2138 = 0 - index2138 < mbt_ffi_load32(iter_base + 52) - index2138 = index2138 + 1 { + let array2837 : Array[String] = [] + for index2838 = 0 + index2838 < mbt_ffi_load32(iter_base + 52) + index2838 = index2838 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index2138 * 8 + index2838 * 8 - let result2136 = mbt_ffi_ptr2str( + let result2836 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2137.push(result2136) + array2837.push(result2836) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array2140 : Array[String] = [] - for index2141 = 0 - index2141 < mbt_ffi_load32(iter_base + 60) - index2141 = index2141 + 1 { + let array2840 : Array[String] = [] + for index2841 = 0 + index2841 < mbt_ffi_load32(iter_base + 60) + index2841 = index2841 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index2141 * 8 + index2841 * 8 - let result2139 = mbt_ffi_ptr2str( + let result2839 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2140.push(result2139) + array2840.push(result2839) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted2143 : String? = match + let lifted2843 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result2142 = mbt_ffi_ptr2str( + let result2842 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result2142) + Option::Some(result2842) } _ => panic() } - let lifted2146 : @types.Role? = match + let lifted2846 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted2145 = match + let lifted2845 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result2144 = mbt_ffi_ptr2str( + let result2844 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result2144) + @types.Role::Other(result2844) } _ => panic() } - Option::Some(lifted2145) + Option::Some(lifted2845) } _ => panic() } - array2147.push(@types.UnionBranch::{ - tag: result2124, + array2847.push(@types.UnionBranch::{ + tag: result2824, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted2133, + discriminator: lifted2833, metadata: @types.MetadataEnvelope::{ - doc: lifted2135, - aliases: array2137, - examples: array2140, - deprecated: lifted2143, - role: lifted2146, + doc: lifted2835, + aliases: array2837, + examples: array2840, + deprecated: lifted2843, + role: lifted2846, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array2147, + branches: array2847, }) } 32 => { - let lifted2150 : String? = match + let lifted2850 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result2149 = mbt_ffi_ptr2str( + let result2849 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result2149) + Option::Some(result2849) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted2150, + category: lifted2850, }) } 33 => { - let lifted2152 : String? = match + let lifted2852 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result2151 = mbt_ffi_ptr2str( + let result2851 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result2151) + Option::Some(result2851) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted2152, + resource_name: lifted2852, }) } 34 => { - let lifted2153 : Int? = match + let lifted2853 : 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(lifted2153) + @types.SchemaTypeBody::FutureType(lifted2853) } 35 => { - let lifted2154 : Int? = match + let lifted2854 : 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(lifted2154) + @types.SchemaTypeBody::StreamType(lifted2854) } _ => panic() } - let lifted2157 : String? = match + let lifted2857 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result2156 = mbt_ffi_ptr2str( + let result2856 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result2156) + Option::Some(result2856) } _ => panic() } - let array2159 : Array[String] = [] - for index2160 = 0 - index2160 < mbt_ffi_load32(iter_base + 104) - index2160 = index2160 + 1 { + let array2859 : Array[String] = [] + for index2860 = 0 + index2860 < mbt_ffi_load32(iter_base + 104) + index2860 = index2860 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index2160 * 8 + index2860 * 8 - let result2158 = mbt_ffi_ptr2str( + let result2858 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2159.push(result2158) + array2859.push(result2858) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array2162 : Array[String] = [] - for index2163 = 0 - index2163 < mbt_ffi_load32(iter_base + 112) - index2163 = index2163 + 1 { + let array2862 : Array[String] = [] + for index2863 = 0 + index2863 < mbt_ffi_load32(iter_base + 112) + index2863 = index2863 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index2163 * 8 + index2863 * 8 - let result2161 = mbt_ffi_ptr2str( + let result2861 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2162.push(result2161) + array2862.push(result2861) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted2165 : String? = match + let lifted2865 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result2164 = mbt_ffi_ptr2str( + let result2864 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result2164) + Option::Some(result2864) } _ => panic() } - let lifted2168 : @types.Role? = match + let lifted2868 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted2167 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted2867 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result2166 = mbt_ffi_ptr2str( + let result2866 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result2166) + @types.Role::Other(result2866) } _ => panic() } - Option::Some(lifted2167) + Option::Some(lifted2867) } _ => panic() } - array2169.push(@types.SchemaTypeNode::{ - body: lifted2155, + array2869.push(@types.SchemaTypeNode::{ + body: lifted2855, metadata: @types.MetadataEnvelope::{ - doc: lifted2157, - aliases: array2159, - examples: array2162, - deprecated: lifted2165, - role: lifted2168, + doc: lifted2857, + aliases: array2859, + examples: array2862, + deprecated: lifted2865, + role: lifted2868, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array2174 : Array[@types.SchemaTypeDef] = [] - for index2175 = 0 - index2175 < mbt_ffi_load32(iter_base + 60) - index2175 = index2175 + 1 { + let array2874 : Array[@types.SchemaTypeDef] = [] + for index2875 = 0 + index2875 < mbt_ffi_load32(iter_base + 60) + index2875 = index2875 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index2175 * 24 + index2875 * 24 - let result2171 = mbt_ffi_ptr2str( + let result2871 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted2173 : String? = match + let lifted2873 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result2172 = mbt_ffi_ptr2str( + let result2872 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result2172) + Option::Some(result2872) } _ => panic() } - array2174.push(@types.SchemaTypeDef::{ - id: result2171, - name: lifted2173, + array2874.push(@types.SchemaTypeDef::{ + id: result2871, + name: lifted2873, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let array2205 : Array[@types.SchemaValueNode] = [] - for index2206 = 0 - index2206 < mbt_ffi_load32(iter_base + 72) - index2206 = index2206 + 1 { + let array2905 : Array[@types.SchemaValueNode] = [] + for index2906 = 0 + index2906 < mbt_ffi_load32(iter_base + 72) + index2906 = index2906 + 1 { let iter_base = mbt_ffi_load32(iter_base + 68) + - index2206 * 32 + index2906 * 32 - let lifted2204 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2904 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -18917,29 +27019,29 @@ pub fn enrich_oplog_entries( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result2176 = mbt_ffi_ptr2str( + let result2876 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result2176) + @types.SchemaValueNode::StringValue(result2876) } 13 => { - let array2177 : Array[Int] = [] - for index2178 = 0 - index2178 < mbt_ffi_load32(iter_base + 12) - index2178 = index2178 + 1 { + let array2877 : Array[Int] = [] + for index2878 = 0 + index2878 < mbt_ffi_load32(iter_base + 12) + index2878 = index2878 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2178 * 4 + index2878 * 4 - array2177.push(mbt_ffi_load32(iter_base + 0)) + array2877.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array2177) + @types.SchemaValueNode::RecordValue(array2877) } 14 => { - let lifted2179 : Int? = match + let lifted2879 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -18948,7 +27050,7 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted2179, + payload: lifted2879, }) } 15 => @@ -18956,180 +27058,180 @@ pub fn enrich_oplog_entries( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array2180 : Array[Bool] = [] - for index2181 = 0 - index2181 < mbt_ffi_load32(iter_base + 12) - index2181 = index2181 + 1 { + let array2880 : Array[Bool] = [] + for index2881 = 0 + index2881 < mbt_ffi_load32(iter_base + 12) + index2881 = index2881 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2181 * 1 + index2881 * 1 - array2180.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array2880.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array2180) + @types.SchemaValueNode::FlagsValue(array2880) } 17 => { - let array2182 : Array[Int] = [] - for index2183 = 0 - index2183 < mbt_ffi_load32(iter_base + 12) - index2183 = index2183 + 1 { + let array2882 : Array[Int] = [] + for index2883 = 0 + index2883 < mbt_ffi_load32(iter_base + 12) + index2883 = index2883 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2183 * 4 + index2883 * 4 - array2182.push(mbt_ffi_load32(iter_base + 0)) + array2882.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array2182) + @types.SchemaValueNode::TupleValue(array2882) } 18 => { - let array2184 : Array[Int] = [] - for index2185 = 0 - index2185 < mbt_ffi_load32(iter_base + 12) - index2185 = index2185 + 1 { + let array2884 : Array[Int] = [] + for index2885 = 0 + index2885 < mbt_ffi_load32(iter_base + 12) + index2885 = index2885 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2185 * 4 + index2885 * 4 - array2184.push(mbt_ffi_load32(iter_base + 0)) + array2884.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array2184) + @types.SchemaValueNode::ListValue(array2884) } 19 => { - let array2186 : Array[Int] = [] - for index2187 = 0 - index2187 < mbt_ffi_load32(iter_base + 12) - index2187 = index2187 + 1 { + 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) + - index2187 * 4 + 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::FixedListValue(array2186) + @types.SchemaValueNode::FixedListValue(array2886) } 20 => { - let array2188 : Array[@types.MapEntry] = [] - for index2189 = 0 - index2189 < mbt_ffi_load32(iter_base + 12) - index2189 = index2189 + 1 { + let array2888 : Array[@types.MapEntry] = [] + for index2889 = 0 + index2889 < mbt_ffi_load32(iter_base + 12) + index2889 = index2889 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2189 * 8 + index2889 * 8 - array2188.push(@types.MapEntry::{ + array2888.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(array2188) + @types.SchemaValueNode::MapValue(array2888) } 21 => { - let lifted2190 : Int? = match + let lifted2890 : 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(lifted2190) + @types.SchemaValueNode::OptionValue(lifted2890) } 22 => { - let lifted2193 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2893 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted2191 : Int? = match + let lifted2891 : 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(lifted2191) + @types.ResultValuePayload::OkValue(lifted2891) } 1 => { - let lifted2192 : Int? = match + let lifted2892 : 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(lifted2192) + @types.ResultValuePayload::ErrValue(lifted2892) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted2193) + @types.SchemaValueNode::ResultValue(lifted2893) } 23 => { - let result2194 = mbt_ffi_ptr2str( + let result2894 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2196 : String? = match + let lifted2896 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result2195 = mbt_ffi_ptr2str( + let result2895 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result2195) + Option::Some(result2895) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result2194, - language: lifted2196, + text: result2894, + language: lifted2896, }) } 24 => { - let result2197 = mbt_ffi_ptr2bytes( + let result2897 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2199 : String? = match + let lifted2899 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result2198 = mbt_ffi_ptr2str( + let result2898 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result2198) + Option::Some(result2898) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result2197, - mime_type: lifted2199, + bytes: result2897, + mime_type: lifted2899, }) } 25 => { - let result2200 = mbt_ffi_ptr2str( + let result2900 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result2200) + @types.SchemaValueNode::PathValue(result2900) } 26 => { - let result2201 = mbt_ffi_ptr2str( + let result2901 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result2201) + @types.SchemaValueNode::UrlValue(result2901) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -19141,7 +27243,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result2202 = mbt_ffi_ptr2str( + let result2902 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -19149,17 +27251,17 @@ pub fn enrich_oplog_entries( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result2202, + unit: result2902, }) } 30 => { - let result2203 = mbt_ffi_ptr2str( + let result2903 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result2203, + tag: result2903, body: mbt_ffi_load32(iter_base + 16), }) } @@ -19176,65 +27278,65 @@ pub fn enrich_oplog_entries( _ => panic() } - array2205.push(lifted2204) + array2905.push(lifted2904) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) - let result2207 = mbt_ffi_ptr2str( + let result2907 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 80), mbt_ffi_load32(iter_base + 84), ) - let array2209 : Array[String] = [] - for index2210 = 0 - index2210 < mbt_ffi_load32(iter_base + 92) - index2210 = index2210 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index2210 * 8 + let array2909 : Array[String] = [] + for index2910 = 0 + index2910 < mbt_ffi_load32(iter_base + 92) + index2910 = index2910 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index2910 * 8 - let result2208 = mbt_ffi_ptr2str( + let result2908 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array2209.push(result2208) + array2909.push(result2908) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) - let array2224 : Array[Array[SpanData]] = [] - for index2225 = 0 - index2225 < mbt_ffi_load32(iter_base + 100) - index2225 = index2225 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 96) + index2225 * 8 + let array2924 : Array[Array[SpanData]] = [] + for index2925 = 0 + index2925 < mbt_ffi_load32(iter_base + 100) + index2925 = index2925 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 96) + index2925 * 8 - let array2222 : Array[SpanData] = [] - for index2223 = 0 - index2223 < mbt_ffi_load32(iter_base + 4) - index2223 = index2223 + 1 { + let array2922 : Array[SpanData] = [] + for index2923 = 0 + index2923 < mbt_ffi_load32(iter_base + 4) + index2923 = index2923 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index2223 * 80 + index2923 * 80 - let lifted2221 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2921 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result2211 = mbt_ffi_ptr2str( + let result2911 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2213 : String? = match + let lifted2913 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result2212 = mbt_ffi_ptr2str( + let result2912 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result2212) + Option::Some(result2912) } _ => panic() } - let lifted2214 : UInt64? = match + let lifted2914 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -19244,117 +27346,117 @@ pub fn enrich_oplog_entries( _ => panic() } - let array2218 : Array[@context.Attribute] = [] - for index2219 = 0 - index2219 < mbt_ffi_load32(iter_base + 68) - index2219 = index2219 + 1 { + let array2918 : Array[@context.Attribute] = [] + for index2919 = 0 + index2919 < mbt_ffi_load32(iter_base + 68) + index2919 = index2919 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index2219 * 20 + index2919 * 20 - let result2215 = mbt_ffi_ptr2str( + let result2915 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted2217 = match + let lifted2917 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result2216 = mbt_ffi_ptr2str( + let result2916 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result2216) + @context.AttributeValue::String(result2916) } _ => panic() } - array2218.push(@context.Attribute::{ - key: result2215, - value: lifted2217, + array2918.push(@context.Attribute::{ + key: result2915, + value: lifted2917, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result2211, + span_id: result2911, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted2213, - linked_context: lifted2214, - attributes: array2218, + parent: lifted2913, + linked_context: lifted2914, + attributes: array2918, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result2220 = mbt_ffi_ptr2str( + let result2920 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result2220, + span_id: result2920, }) } _ => panic() } - array2222.push(lifted2221) + array2922.push(lifted2921) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array2224.push(array2222) + array2924.push(array2922) } mbt_ffi_free(mbt_ffi_load32(iter_base + 96)) AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{ - idempotency_key: result2041, - method_name: result2042, + idempotency_key: result2671, + method_name: result2672, function_input: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array2169, - defs: array2174, + type_nodes: array2869, + defs: array2874, root: mbt_ffi_load32(iter_base + 64), }, value: @types.SchemaValueTree::{ - value_nodes: array2205, + value_nodes: array2905, root: mbt_ffi_load32(iter_base + 76), }, }, - trace_id: result2207, - trace_states: array2209, - invocation_context: array2224, + trace_id: result2907, + trace_states: array2909, + invocation_context: array2924, }) } 2 => AgentInvocation::SaveSnapshot 3 => { - let result2226 = mbt_ffi_ptr2bytes( + let result2926 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result2227 = mbt_ffi_ptr2str( + let result2927 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{ snapshot: SnapshotData::{ - data: result2226, - mime_type: result2227, + data: result2926, + mime_type: result2927, }, }) } 4 => { - let result2228 = mbt_ffi_ptr2str( + let result2928 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{ - idempotency_key: result2228, + idempotency_key: result2928, }) } 5 => @@ -19369,26 +27471,26 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - invocation: lifted2229, + invocation: lifted2929, }) } 15 => { - let lifted2232 = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2932 = match mbt_ffi_load8_u(iter_base + 32) { 0 => UpdateDescription::AutoUpdate 1 => { - let result2230 = mbt_ffi_ptr2bytes( + let result2930 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - let result2231 = mbt_ffi_ptr2str( + let result2931 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) UpdateDescription::SnapshotBased(@host.Snapshot::{ - payload: result2230, - mime_type: result2231, + payload: result2930, + mime_type: result2931, }) } _ => panic() @@ -19400,47 +27502,47 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, target_revision: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - description: lifted2232, + description: lifted2932, }) } 16 => { - let array2239 : Array[PluginInstallationDescription] = [] - for index2240 = 0 - index2240 < mbt_ffi_load32(iter_base + 44) - index2240 = index2240 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index2240 * 48 + let array2939 : Array[PluginInstallationDescription] = [] + for index2940 = 0 + index2940 < mbt_ffi_load32(iter_base + 44) + index2940 = index2940 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 40) + index2940 * 48 - let result2233 = mbt_ffi_ptr2str( + let result2933 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - let result2234 = mbt_ffi_ptr2str( + let result2934 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - let array2237 : Array[(String, String)] = [] - for index2238 = 0 - index2238 < mbt_ffi_load32(iter_base + 40) - index2238 = index2238 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + index2238 * 16 + let array2937 : Array[(String, String)] = [] + for index2938 = 0 + index2938 < mbt_ffi_load32(iter_base + 40) + index2938 = index2938 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + index2938 * 16 - let result2235 = mbt_ffi_ptr2str( + let result2935 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result2236 = mbt_ffi_ptr2str( + let result2936 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array2237.push((result2235, result2236)) + array2937.push((result2935, result2936)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - array2239.push(PluginInstallationDescription::{ + array2939.push(PluginInstallationDescription::{ environment_plugin_grant_id: EnvironmentPluginGrantId::{ uuid: @types.Uuid::{ high_bits: mbt_ffi_load64(iter_base + 0).reinterpret_as_uint64(), @@ -19448,9 +27550,9 @@ pub fn enrich_oplog_entries( }, }, plugin_priority: mbt_ffi_load32(iter_base + 16), - plugin_name: result2233, - plugin_version: result2234, - parameters: array2237, + plugin_name: result2933, + plugin_version: result2934, + parameters: array2937, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) @@ -19462,19 +27564,19 @@ pub fn enrich_oplog_entries( }, 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: array2239, + new_active_plugins: array2939, }) } 17 => { - let lifted2242 : String? = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2942 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result2241 = mbt_ffi_ptr2str( + let result2941 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result2241) + Option::Some(result2941) } _ => panic() } @@ -19485,7 +27587,7 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, target_revision: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - details: lifted2242, + details: lifted2942, }) } 18 => @@ -19505,12 +27607,12 @@ pub fn enrich_oplog_entries( delta: mbt_ffi_load64(iter_base + 24), }) 20 => { - let result2243 = mbt_ffi_ptr2str( + let result2943 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result2244 = mbt_ffi_ptr2str( + let result2944 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) @@ -19521,17 +27623,17 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, id: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - name: result2243, - owner: result2244, + name: result2943, + owner: result2944, }) } 21 => { - let result2245 = mbt_ffi_ptr2str( + let result2945 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result2246 = mbt_ffi_ptr2str( + let result2946 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) @@ -19542,17 +27644,17 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, id: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - name: result2245, - owner: result2246, + name: result2945, + owner: result2946, }) } 22 => { - let result2247 = mbt_ffi_ptr2str( + let result2947 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - let result2248 = mbt_ffi_ptr2str( + let result2948 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) @@ -19563,8 +27665,8 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, level: LogLevel::from(mbt_ffi_load8_u(iter_base + 24)), - context: result2247, - message: result2248, + context: result2947, + message: result2948, }) } 23 => @@ -19575,33 +27677,33 @@ pub fn enrich_oplog_entries( }, }) 24 => { - let result2249 = mbt_ffi_ptr2str( + let result2949 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - let result2250 = mbt_ffi_ptr2str( + let result2950 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - let array2253 : Array[(String, String)] = [] - for index2254 = 0 - index2254 < mbt_ffi_load32(iter_base + 64) - index2254 = index2254 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 60) + index2254 * 16 + let array2953 : Array[(String, String)] = [] + for index2954 = 0 + index2954 < mbt_ffi_load32(iter_base + 64) + index2954 = index2954 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 60) + index2954 * 16 - let result2251 = mbt_ffi_ptr2str( + let result2951 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result2252 = mbt_ffi_ptr2str( + let result2952 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array2253.push((result2251, result2252)) + array2953.push((result2951, result2952)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) @@ -19618,40 +27720,40 @@ pub fn enrich_oplog_entries( }, }, plugin_priority: mbt_ffi_load32(iter_base + 40), - plugin_name: result2249, - plugin_version: result2250, - parameters: array2253, + plugin_name: result2949, + plugin_version: result2950, + parameters: array2953, }, }) } 25 => { - let result2255 = mbt_ffi_ptr2str( + let result2955 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - let result2256 = mbt_ffi_ptr2str( + let result2956 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - let array2259 : Array[(String, String)] = [] - for index2260 = 0 - index2260 < mbt_ffi_load32(iter_base + 64) - index2260 = index2260 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 60) + index2260 * 16 + let array2959 : Array[(String, String)] = [] + for index2960 = 0 + index2960 < mbt_ffi_load32(iter_base + 64) + index2960 = index2960 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 60) + index2960 * 16 - let result2257 = mbt_ffi_ptr2str( + let result2957 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result2258 = mbt_ffi_ptr2str( + let result2958 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array2259.push((result2257, result2258)) + array2959.push((result2957, result2958)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) @@ -19668,9 +27770,9 @@ pub fn enrich_oplog_entries( }, }, plugin_priority: mbt_ffi_load32(iter_base + 40), - plugin_name: result2255, - plugin_version: result2256, - parameters: array2259, + plugin_name: result2955, + plugin_version: result2956, + parameters: array2959, }, }) } @@ -19686,7 +27788,7 @@ pub fn enrich_oplog_entries( }, }) 27 => { - let result2261 = mbt_ffi_ptr2str( + let result2961 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) @@ -19696,67 +27798,67 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - idempotency_key: result2261, + idempotency_key: result2961, }) } 28 => { - let result2262 = mbt_ffi_ptr2str( + let result2962 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let lifted2264 : String? = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2964 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result2263 = mbt_ffi_ptr2str( + let result2963 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result2263) + Option::Some(result2963) } _ => panic() } - let lifted2266 : String? = match mbt_ffi_load8_u(iter_base + 44) { + let lifted2966 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result2265 = mbt_ffi_ptr2str( + let result2965 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result2265) + Option::Some(result2965) } _ => panic() } - let array2270 : Array[@context.Attribute] = [] - for index2271 = 0 - index2271 < mbt_ffi_load32(iter_base + 60) - index2271 = index2271 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + index2271 * 20 + let array2970 : Array[@context.Attribute] = [] + for index2971 = 0 + index2971 < mbt_ffi_load32(iter_base + 60) + index2971 = index2971 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + index2971 * 20 - let result2267 = mbt_ffi_ptr2str( + let result2967 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted2269 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2969 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result2268 = mbt_ffi_ptr2str( + let result2968 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result2268) + @context.AttributeValue::String(result2968) } _ => panic() } - array2270.push(@context.Attribute::{ - key: result2267, - value: lifted2269, + array2970.push(@context.Attribute::{ + key: result2967, + value: lifted2969, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) @@ -19766,14 +27868,14 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - span_id: result2262, - parent: lifted2264, - linked_context_id: lifted2266, - attributes: array2270, + span_id: result2962, + parent: lifted2964, + linked_context_id: lifted2966, + attributes: array2970, }) } 29 => { - let result2272 = mbt_ffi_ptr2str( + let result2972 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) @@ -19783,28 +27885,28 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - span_id: result2272, + span_id: result2972, }) } 30 => { - let result2273 = mbt_ffi_ptr2str( + let result2973 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let result2274 = mbt_ffi_ptr2str( + let result2974 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let lifted2276 = match mbt_ffi_load8_u(iter_base + 40) { + let lifted2976 = match mbt_ffi_load8_u(iter_base + 40) { 0 => { - let result2275 = mbt_ffi_ptr2str( + let result2975 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - @context.AttributeValue::String(result2275) + @context.AttributeValue::String(result2975) } _ => panic() } @@ -19814,13 +27916,13 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - span_id: result2273, - key: result2274, - value: lifted2276, + span_id: result2973, + key: result2974, + value: lifted2976, }) } 31 => { - let lifted2277 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted2977 = match mbt_ffi_load8_u(iter_base + 24) { 0 => @host.PersistenceLevel::PersistNothing 1 => @host.PersistenceLevel::PersistRemoteSideEffects 2 => @host.PersistenceLevel::Smart @@ -19832,11 +27934,11 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - persistence_level: lifted2277, + persistence_level: lifted2977, }) } 32 => { - let result2278 = mbt_ffi_ptr2str( + let result2978 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) @@ -19846,7 +27948,7 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - transaction_id: result2278, + transaction_id: result2978, }) } 33 => @@ -19882,12 +27984,12 @@ pub fn enrich_oplog_entries( begin_index: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), }) 37 => { - let result2279 = mbt_ffi_ptr2bytes( + let result2979 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let result2280 = mbt_ffi_ptr2str( + let result2980 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) @@ -19897,41 +27999,41 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - data: SnapshotData::{ data: result2279, mime_type: result2280 }, + data: SnapshotData::{ data: result2979, mime_type: result2980 }, }) } 38 => { - let result2281 = mbt_ffi_ptr2str( + let result2981 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - let result2282 = mbt_ffi_ptr2str( + let result2982 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - let array2285 : Array[(String, String)] = [] - for index2286 = 0 - index2286 < mbt_ffi_load32(iter_base + 64) - index2286 = index2286 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 60) + index2286 * 16 + let array2985 : Array[(String, String)] = [] + for index2986 = 0 + index2986 < mbt_ffi_load32(iter_base + 64) + index2986 = index2986 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 60) + index2986 * 16 - let result2283 = mbt_ffi_ptr2str( + let result2983 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result2284 = mbt_ffi_ptr2str( + let result2984 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array2285.push((result2283, result2284)) + array2985.push((result2983, result2984)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) - let result2287 = mbt_ffi_ptr2str( + let result2987 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 88), mbt_ffi_load32(iter_base + 92), ) @@ -19949,9 +28051,9 @@ pub fn enrich_oplog_entries( }, }, plugin_priority: mbt_ffi_load32(iter_base + 40), - plugin_name: result2281, - plugin_version: result2282, - parameters: array2285, + plugin_name: result2981, + plugin_version: result2982, + parameters: array2985, }, target_agent_id: @types.AgentId::{ component_id: @types.ComponentId::{ @@ -19960,7 +28062,7 @@ pub fn enrich_oplog_entries( low_bits: mbt_ffi_load64(iter_base + 80).reinterpret_as_uint64(), }, }, - agent_id: result2287, + agent_id: result2987, }, confirmed_up_to: mbt_ffi_load64(iter_base + 96).reinterpret_as_uint64(), sending_up_to: mbt_ffi_load64(iter_base + 104).reinterpret_as_uint64(), @@ -19968,32 +28070,32 @@ pub fn enrich_oplog_entries( }) } 39 => { - let result2288 = mbt_ffi_ptr2str( + let result2988 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let array2320 : Array[@retry.PredicateNode] = [] - for index2321 = 0 - index2321 < mbt_ffi_load32(iter_base + 40) - index2321 = index2321 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + index2321 * 32 + let array3020 : Array[@retry.PredicateNode] = [] + for index3021 = 0 + index3021 < mbt_ffi_load32(iter_base + 40) + index3021 = index3021 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + index3021 * 32 - let lifted2319 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted3019 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result2289 = mbt_ffi_ptr2str( + let result2989 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2291 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2991 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2290 = mbt_ffi_ptr2str( + let result2990 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2290) + @retry.PredicateValue::Text(result2990) } 1 => @retry.PredicateValue::Integer( @@ -20007,24 +28109,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropEq(@retry.PropertyComparison::{ - property_name: result2289, - value: lifted2291, + property_name: result2989, + value: lifted2991, }) } 1 => { - let result2292 = mbt_ffi_ptr2str( + let result2992 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2294 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2994 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2293 = mbt_ffi_ptr2str( + let result2993 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2293) + @retry.PredicateValue::Text(result2993) } 1 => @retry.PredicateValue::Integer( @@ -20038,24 +28140,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{ - property_name: result2292, - value: lifted2294, + property_name: result2992, + value: lifted2994, }) } 2 => { - let result2295 = mbt_ffi_ptr2str( + let result2995 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2297 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2997 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2296 = mbt_ffi_ptr2str( + let result2996 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2296) + @retry.PredicateValue::Text(result2996) } 1 => @retry.PredicateValue::Integer( @@ -20069,24 +28171,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropGt(@retry.PropertyComparison::{ - property_name: result2295, - value: lifted2297, + property_name: result2995, + value: lifted2997, }) } 3 => { - let result2298 = mbt_ffi_ptr2str( + let result2998 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2300 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted3000 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2299 = mbt_ffi_ptr2str( + let result2999 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2299) + @retry.PredicateValue::Text(result2999) } 1 => @retry.PredicateValue::Integer( @@ -20100,24 +28202,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropGte(@retry.PropertyComparison::{ - property_name: result2298, - value: lifted2300, + property_name: result2998, + value: lifted3000, }) } 4 => { - let result2301 = mbt_ffi_ptr2str( + let result3001 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2303 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted3003 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2302 = mbt_ffi_ptr2str( + let result3002 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2302) + @retry.PredicateValue::Text(result3002) } 1 => @retry.PredicateValue::Integer( @@ -20131,24 +28233,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropLt(@retry.PropertyComparison::{ - property_name: result2301, - value: lifted2303, + property_name: result3001, + value: lifted3003, }) } 5 => { - let result2304 = mbt_ffi_ptr2str( + let result3004 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2306 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted3006 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2305 = mbt_ffi_ptr2str( + let result3005 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2305) + @retry.PredicateValue::Text(result3005) } 1 => @retry.PredicateValue::Integer( @@ -20162,39 +28264,39 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropLte(@retry.PropertyComparison::{ - property_name: result2304, - value: lifted2306, + property_name: result3004, + value: lifted3006, }) } 6 => { - let result2307 = mbt_ffi_ptr2str( + let result3007 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateNode::PropExists(result2307) + @retry.PredicateNode::PropExists(result3007) } 7 => { - let result2308 = mbt_ffi_ptr2str( + let result3008 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array2311 : Array[@retry.PredicateValue] = [] - for index2312 = 0 - index2312 < mbt_ffi_load32(iter_base + 20) - index2312 = index2312 + 1 { + let array3011 : Array[@retry.PredicateValue] = [] + for index3012 = 0 + index3012 < mbt_ffi_load32(iter_base + 20) + index3012 = index3012 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index2312 * 16 + index3012 * 16 - let lifted2310 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted3010 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result2309 = mbt_ffi_ptr2str( + let result3009 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateValue::Text(result2309) + @retry.PredicateValue::Text(result3009) } 1 => @retry.PredicateValue::Integer( @@ -20207,61 +28309,61 @@ pub fn enrich_oplog_entries( _ => panic() } - array2311.push(lifted2310) + array3011.push(lifted3010) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{ - property_name: result2308, - values: array2311, + property_name: result3008, + values: array3011, }) } 8 => { - let result2313 = mbt_ffi_ptr2str( + let result3013 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result2314 = mbt_ffi_ptr2str( + let result3014 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{ - property_name: result2313, - pattern: result2314, + property_name: result3013, + pattern: result3014, }) } 9 => { - let result2315 = mbt_ffi_ptr2str( + let result3015 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result2316 = mbt_ffi_ptr2str( + let result3016 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{ - property_name: result2315, - pattern: result2316, + property_name: result3015, + pattern: result3016, }) } 10 => { - let result2317 = mbt_ffi_ptr2str( + let result3017 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result2318 = mbt_ffi_ptr2str( + let result3018 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropContains(@retry.PropertyPattern::{ - property_name: result2317, - pattern: result2318, + property_name: result3017, + pattern: result3018, }) } 11 => @@ -20285,17 +28387,17 @@ pub fn enrich_oplog_entries( _ => panic() } - array2320.push(lifted2319) + array3020.push(lifted3019) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array2356 : Array[@retry.PolicyNode] = [] - for index2357 = 0 - index2357 < mbt_ffi_load32(iter_base + 48) - index2357 = index2357 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 44) + index2357 * 32 + let array3056 : Array[@retry.PolicyNode] = [] + for index3057 = 0 + index3057 < mbt_ffi_load32(iter_base + 48) + index3057 = index3057 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 44) + index3057 * 32 - let lifted2355 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted3055 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @retry.PolicyNode::Periodic( mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), @@ -20339,28 +28441,28 @@ pub fn enrich_oplog_entries( inner: mbt_ffi_load32(iter_base + 16), }) 10 => { - let array2353 : Array[@retry.PredicateNode] = [] - for index2354 = 0 - index2354 < mbt_ffi_load32(iter_base + 12) - index2354 = index2354 + 1 { + let array3053 : Array[@retry.PredicateNode] = [] + for index3054 = 0 + index3054 < mbt_ffi_load32(iter_base + 12) + index3054 = index3054 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index2354 * 32 + index3054 * 32 - let lifted2352 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted3052 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result2322 = mbt_ffi_ptr2str( + let result3022 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2324 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted3024 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2323 = mbt_ffi_ptr2str( + let result3023 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2323) + @retry.PredicateValue::Text(result3023) } 1 => @retry.PredicateValue::Integer( @@ -20374,24 +28476,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropEq(@retry.PropertyComparison::{ - property_name: result2322, - value: lifted2324, + property_name: result3022, + value: lifted3024, }) } 1 => { - let result2325 = mbt_ffi_ptr2str( + let result3025 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2327 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted3027 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2326 = mbt_ffi_ptr2str( + let result3026 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2326) + @retry.PredicateValue::Text(result3026) } 1 => @retry.PredicateValue::Integer( @@ -20405,24 +28507,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{ - property_name: result2325, - value: lifted2327, + property_name: result3025, + value: lifted3027, }) } 2 => { - let result2328 = mbt_ffi_ptr2str( + let result3028 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2330 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted3030 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2329 = mbt_ffi_ptr2str( + let result3029 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2329) + @retry.PredicateValue::Text(result3029) } 1 => @retry.PredicateValue::Integer( @@ -20436,24 +28538,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropGt(@retry.PropertyComparison::{ - property_name: result2328, - value: lifted2330, + property_name: result3028, + value: lifted3030, }) } 3 => { - let result2331 = mbt_ffi_ptr2str( + let result3031 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2333 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted3033 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2332 = mbt_ffi_ptr2str( + let result3032 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2332) + @retry.PredicateValue::Text(result3032) } 1 => @retry.PredicateValue::Integer( @@ -20467,24 +28569,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropGte(@retry.PropertyComparison::{ - property_name: result2331, - value: lifted2333, + property_name: result3031, + value: lifted3033, }) } 4 => { - let result2334 = mbt_ffi_ptr2str( + let result3034 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2336 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted3036 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2335 = mbt_ffi_ptr2str( + let result3035 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2335) + @retry.PredicateValue::Text(result3035) } 1 => @retry.PredicateValue::Integer( @@ -20498,24 +28600,24 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropLt(@retry.PropertyComparison::{ - property_name: result2334, - value: lifted2336, + property_name: result3034, + value: lifted3036, }) } 5 => { - let result2337 = mbt_ffi_ptr2str( + let result3037 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted2339 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted3039 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result2338 = mbt_ffi_ptr2str( + let result3038 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result2338) + @retry.PredicateValue::Text(result3038) } 1 => @retry.PredicateValue::Integer( @@ -20529,40 +28631,40 @@ pub fn enrich_oplog_entries( } @retry.PredicateNode::PropLte(@retry.PropertyComparison::{ - property_name: result2337, - value: lifted2339, + property_name: result3037, + value: lifted3039, }) } 6 => { - let result2340 = mbt_ffi_ptr2str( + let result3040 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateNode::PropExists(result2340) + @retry.PredicateNode::PropExists(result3040) } 7 => { - let result2341 = mbt_ffi_ptr2str( + let result3041 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array2344 : Array[@retry.PredicateValue] = [] - for index2345 = 0 - index2345 < mbt_ffi_load32(iter_base + 20) - index2345 = index2345 + 1 { + let array3044 : Array[@retry.PredicateValue] = [] + for index3045 = 0 + index3045 < mbt_ffi_load32(iter_base + 20) + index3045 = index3045 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index2345 * 16 + index3045 * 16 - let lifted2343 = match + let lifted3043 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result2342 = mbt_ffi_ptr2str( + let result3042 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateValue::Text(result2342) + @retry.PredicateValue::Text(result3042) } 1 => @retry.PredicateValue::Integer( @@ -20575,61 +28677,61 @@ pub fn enrich_oplog_entries( _ => panic() } - array2344.push(lifted2343) + array3044.push(lifted3043) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{ - property_name: result2341, - values: array2344, + property_name: result3041, + values: array3044, }) } 8 => { - let result2346 = mbt_ffi_ptr2str( + let result3046 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result2347 = mbt_ffi_ptr2str( + let result3047 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{ - property_name: result2346, - pattern: result2347, + property_name: result3046, + pattern: result3047, }) } 9 => { - let result2348 = mbt_ffi_ptr2str( + let result3048 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result2349 = mbt_ffi_ptr2str( + let result3049 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{ - property_name: result2348, - pattern: result2349, + property_name: result3048, + pattern: result3049, }) } 10 => { - let result2350 = mbt_ffi_ptr2str( + let result3050 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result2351 = mbt_ffi_ptr2str( + let result3051 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropContains(@retry.PropertyPattern::{ - property_name: result2350, - pattern: result2351, + property_name: result3050, + pattern: result3051, }) } 11 => @@ -20655,12 +28757,12 @@ pub fn enrich_oplog_entries( _ => panic() } - array2353.push(lifted2352) + array3053.push(lifted3052) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @retry.PolicyNode::FilteredOn(@retry.FilteredConfig::{ - predicate: @retry.RetryPredicate::{ nodes: array2353 }, + predicate: @retry.RetryPredicate::{ nodes: array3053 }, inner: mbt_ffi_load32(iter_base + 16), }) } @@ -20688,7 +28790,7 @@ pub fn enrich_oplog_entries( _ => panic() } - array2356.push(lifted2355) + array3056.push(lifted3055) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) @@ -20698,15 +28800,15 @@ pub fn enrich_oplog_entries( nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, policy: @retry.NamedRetryPolicy::{ - name: result2288, + name: result2988, priority: mbt_ffi_load32(iter_base + 32).reinterpret_as_uint(), - predicate: @retry.RetryPredicate::{ nodes: array2320 }, - policy: @retry.RetryPolicy::{ nodes: array2356 }, + predicate: @retry.RetryPredicate::{ nodes: array3020 }, + policy: @retry.RetryPolicy::{ nodes: array3056 }, }, }) } 40 => { - let result2358 = mbt_ffi_ptr2str( + let result3058 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) @@ -20716,11 +28818,11 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - name: result2358, + name: result3058, }) } 41 => { - let lifted2359 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted3059 = match mbt_ffi_load8_u(iter_base + 24) { 0 => PublicQueuedCardEvent::Install(PublicQueuedCardEventCard::{ card_id: @types.CardId::{ @@ -20747,11 +28849,11 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - event: lifted2359, + event: lifted3059, }) } 42 => { - let lifted2360 : UInt64? = match mbt_ffi_load8_u(iter_base + 24) { + let lifted3060 : UInt64? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => Option::Some( @@ -20765,7 +28867,7 @@ pub fn enrich_oplog_entries( seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - queued_event_index: lifted2360, + queued_event_index: lifted3060, card_id: @types.CardId::{ uuid: @types.Uuid::{ high_bits: mbt_ffi_load64(iter_base + 40).reinterpret_as_uint64(), @@ -20806,23 +28908,23 @@ pub fn enrich_oplog_entries( _ => panic() } - array2362.push(lifted2361) + array3062.push(lifted3061) } mbt_ffi_free(mbt_ffi_load32(return_area + 4)) - Result::Ok(array2362) + Result::Ok(array3062) } 1 => { - let result2364 = mbt_ffi_ptr2str( + let result3064 = mbt_ffi_ptr2str( mbt_ffi_load32(return_area + 4), mbt_ffi_load32(return_area + 8), ) - Result::Err(result2364) + Result::Err(result3064) } _ => panic() } - let ret = lifted2365 + let ret = lifted3065 mbt_ffi_free(ptr) mbt_ffi_free(address458) mbt_ffi_free(return_area) @@ -20855,17 +28957,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { let return_area = mbt_ffi_malloc(12) wasmImportMethodGetOplogGetNext(handle, return_area) - let lifted1903 : Array[PublicOplogEntry]? = match + let lifted2603 : Array[PublicOplogEntry]? = match mbt_ffi_load8_u(return_area + 0) { 0 => Option::None 1 => { - let array1901 : Array[PublicOplogEntry] = [] - for index1902 = 0 - index1902 < mbt_ffi_load32(return_area + 8) - index1902 = index1902 + 1 { - let iter_base = mbt_ffi_load32(return_area + 4) + index1902 * 208 + let array2601 : Array[PublicOplogEntry] = [] + for index2602 = 0 + index2602 < mbt_ffi_load32(return_area + 8) + index2602 = index2602 + 1 { + let iter_base = mbt_ffi_load32(return_area + 4) + index2602 * 208 - let lifted1900 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2600 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { let result = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), @@ -20965,11 +29067,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } mbt_ffi_free(mbt_ffi_load32(iter_base + 152)) - let array178 : Array[LocalAgentConfigEntry] = [] - for index179 = 0 - index179 < mbt_ffi_load32(iter_base + 164) - index179 = index179 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 160) + index179 * 40 + let array248 : Array[LocalAgentConfigEntry] = [] + for index249 = 0 + index249 < mbt_ffi_load32(iter_base + 164) + index249 = index249 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 160) + index249 * 40 let array12 : Array[String] = [] for index13 = 0 @@ -20986,314 +29088,1125 @@ 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), ) 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 + 2 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 array28 : Array[@types.NamedFieldType] = [] - for index29 = 0 - index29 < mbt_ffi_load32(iter_base + 12) - index29 = index29 + 1 { + 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) + - index29 * 68 + index99 * 68 - let result14 = mbt_ffi_ptr2str( + let result84 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted16 : String? = match + let lifted86 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result15 = mbt_ffi_ptr2str( + 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 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) + - index19 * 8 + index89 * 8 - let result17 = mbt_ffi_ptr2str( + 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 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) + - index22 * 8 + index92 * 8 - let result20 = mbt_ffi_ptr2str( + 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 + let lifted94 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result23 = mbt_ffi_ptr2str( + 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 + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result25 = mbt_ffi_ptr2str( + 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, + array98.push(@types.NamedFieldType::{ + name: result84, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted16, - aliases: array18, - examples: array21, - deprecated: lifted24, - role: lifted27, + 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 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) + - index46 * 72 + index116 * 72 - let result30 = mbt_ffi_ptr2str( + let result100 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted31 : Int? = match + let lifted101 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted33 : String? = match + let lifted103 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result32 = mbt_ffi_ptr2str( + 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 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) + - index36 * 8 + index106 * 8 - let result34 = mbt_ffi_ptr2str( + 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 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) + - index39 * 8 + index109 * 8 - let result37 = mbt_ffi_ptr2str( + 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 + let lifted111 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result40 = mbt_ffi_ptr2str( + 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 + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result42 = mbt_ffi_ptr2str( + 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, + array115.push(@types.VariantCaseType::{ + name: result100, + payload: lifted101, metadata: @types.MetadataEnvelope::{ - doc: lifted33, - aliases: array35, - examples: array38, - deprecated: lifted41, - role: lifted44, + 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 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) + - index49 * 8 + index119 * 8 - let result47 = mbt_ffi_ptr2str( + 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 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) + - index52 * 8 + index122 * 8 - let result50 = mbt_ffi_ptr2str( + 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 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) + - index54 * 4 + 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 => @types.SchemaTypeBody::ListType( @@ -21314,13 +30227,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted56 : Int? = match + let lifted126 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -21328,37 +30242,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted55, - err: lifted56, + ok: lifted125, + err: lifted126, }) } 24 => { - let lifted60 : Array[String]? = match + 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 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) + - index59 * 8 + index129 * 8 - let result57 = mbt_ffi_ptr2str( + 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 + let lifted131 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -21368,7 +30282,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted62 : UInt? = match + let lifted132 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -21378,54 +30292,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted64 : String? = match + let lifted134 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result63 = mbt_ffi_ptr2str( + 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, + languages: lifted130, + min_length: lifted131, + max_length: lifted132, + regex: lifted134, }) } 25 => { - let lifted68 : Array[String]? = match + 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 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) + - index67 * 8 + index137 * 8 - let result65 = mbt_ffi_ptr2str( + 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 + let lifted139 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -21435,7 +30349,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted70 : UInt? = match + let lifted140 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -21446,58 +30360,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted68, - min_bytes: lifted69, - max_bytes: lifted70, + mime_types: lifted138, + min_bytes: lifted139, + max_bytes: lifted140, }) } 26 => { - let lifted74 : Array[String]? = match + 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 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) + - index73 * 8 + index143 * 8 - let result71 = mbt_ffi_ptr2str( + 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 + 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 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) + - index77 * 8 + index147 * 8 - let result75 = mbt_ffi_ptr2str( + 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() } @@ -21509,95 +30423,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted74, - allowed_extensions: lifted78, + allowed_mime_types: lifted144, + allowed_extensions: lifted148, }) } 27 => { - let lifted82 : Array[String]? = match + 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 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) + - index81 * 8 + index151 * 8 - let result79 = mbt_ffi_ptr2str( + 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 + 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 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) + - index85 * 8 + index155 * 8 - let result83 = mbt_ffi_ptr2str( + 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, + allowed_schemes: lifted152, + allowed_hosts: lifted156, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result87 = mbt_ffi_ptr2str( + 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 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) + - index90 * 8 + index160 * 8 - let result88 = mbt_ffi_ptr2str( + 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 + let lifted162 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result91 = mbt_ffi_ptr2str( + let result161 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -21605,17 +30519,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result91, + unit: result161, }) } _ => panic() } - let lifted94 : @types.QuantityValue? = match + let lifted164 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result93 = mbt_ffi_ptr2str( + let result163 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -21623,401 +30537,401 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result93, + unit: result163, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result87, - allowed_suffixes: array89, - min: lifted92, - max: lifted94, + 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 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) + - index119 * 92 + index189 * 92 - let result95 = mbt_ffi_ptr2str( + 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( + 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( + 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( + 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( + 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( + let result170 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted102 : String? = match + let lifted172 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result101 = mbt_ffi_ptr2str( + 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, + field_name: result170, + literal: lifted172, }) } 5 => { - let result103 = mbt_ffi_ptr2str( + 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 + let lifted176 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result105 = mbt_ffi_ptr2str( + 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 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) + - index109 * 8 + index179 * 8 - let result107 = mbt_ffi_ptr2str( + 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 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) + - index112 * 8 + index182 * 8 - let result110 = mbt_ffi_ptr2str( + 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 + let lifted184 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result113 = mbt_ffi_ptr2str( + 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 + let lifted187 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted116 = match + let lifted186 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result115 = mbt_ffi_ptr2str( + 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, + array188.push(@types.UnionBranch::{ + tag: result165, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted104, + discriminator: lifted174, metadata: @types.MetadataEnvelope::{ - doc: lifted106, - aliases: array108, - examples: array111, - deprecated: lifted114, - role: lifted117, + 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, + branches: array188, }) } 32 => { - let lifted121 : String? = match + let lifted191 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result120 = mbt_ffi_ptr2str( + let result190 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result120) + Option::Some(result190) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted121, + category: lifted191, }) } 33 => { - let lifted123 : String? = match + let lifted193 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result122 = mbt_ffi_ptr2str( + 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, + resource_name: lifted193, }) } 34 => { - let lifted124 : Int? = match + let lifted194 : 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(lifted124) + @types.SchemaTypeBody::FutureType(lifted194) } 35 => { - let lifted125 : Int? = match + let lifted195 : 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(lifted125) + @types.SchemaTypeBody::StreamType(lifted195) } _ => panic() } - let lifted128 : String? = match + let lifted198 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result127 = mbt_ffi_ptr2str( + 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( + 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( + 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 + let lifted206 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result135 = mbt_ffi_ptr2str( + 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 + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result137 = mbt_ffi_ptr2str( + 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, + array210.push(@types.SchemaTypeNode::{ + body: lifted196, metadata: @types.MetadataEnvelope::{ - doc: lifted128, - aliases: array130, - examples: array133, - deprecated: lifted136, - role: lifted139, + 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( + 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( + 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, + 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 array176 : Array[@types.SchemaValueNode] = [] - for index177 = 0 - index177 < mbt_ffi_load32(iter_base + 32) - index177 = index177 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + index177 * 32 + let array246 : Array[@types.SchemaValueNode] = [] + for index247 = 0 + index247 < mbt_ffi_load32(iter_base + 32) + index247 = index247 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + index247 * 32 - let lifted175 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted245 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -22069,29 +30983,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result147 = mbt_ffi_ptr2str( + 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 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) + - index149 * 4 + 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 + let lifted220 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -22100,7 +31014,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted150, + payload: lifted220, }) } 15 => @@ -22108,180 +31022,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array151 : Array[Bool] = [] - for index152 = 0 - index152 < mbt_ffi_load32(iter_base + 12) - index152 = 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) + - index152 * 1 + 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 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) + - index154 * 4 + 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 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) + - index156 * 4 + 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 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) + - index158 * 4 + 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 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) + - index160 * 8 + index230 * 8 - array159.push(@types.MapEntry::{ + 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 + let lifted231 : 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(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 + let lifted232 : 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(lifted162) + @types.ResultValuePayload::OkValue(lifted232) } 1 => { - let lifted163 : Int? = match + let lifted233 : 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(lifted163) + @types.ResultValuePayload::ErrValue(lifted233) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted164) + @types.SchemaValueNode::ResultValue(lifted234) } 23 => { - let result165 = mbt_ffi_ptr2str( + let result235 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted167 : String? = match + let lifted237 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result166 = mbt_ffi_ptr2str( + 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, + text: result235, + language: lifted237, }) } 24 => { - let result168 = mbt_ffi_ptr2bytes( + let result238 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted170 : String? = match + let lifted240 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result169 = mbt_ffi_ptr2str( + 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, + bytes: result238, + mime_type: lifted240, }) } 25 => { - let result171 = mbt_ffi_ptr2str( + 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( + 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 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -22293,7 +31207,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result173 = mbt_ffi_ptr2str( + let result243 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -22301,17 +31215,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result173, + unit: result243, }) } 30 => { - let result174 = mbt_ffi_ptr2str( + let result244 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result174, + tag: result244, body: mbt_ffi_load32(iter_base + 16), }) } @@ -22328,20 +31242,20 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array176.push(lifted175) + array246.push(lifted245) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - array178.push(LocalAgentConfigEntry::{ + array248.push(LocalAgentConfigEntry::{ path: array12, value: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array140, - defs: array145, + type_nodes: array210, + defs: array215, root: mbt_ffi_load32(iter_base + 24), }, value: @types.SchemaValueTree::{ - value_nodes: array176, + value_nodes: array246, root: mbt_ffi_load32(iter_base + 36), }, }, @@ -22349,7 +31263,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } mbt_ffi_free(mbt_ffi_load32(iter_base + 160)) - let lifted180 : @types.Uuid? = match + let lifted250 : @types.Uuid? = match mbt_ffi_load8_u(iter_base + 168) { 0 => Option::None 1 => @@ -22393,8 +31307,8 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { 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: array178, - original_phantom_id: lifted180, + local_agent_config: array248, + original_phantom_id: lifted250, 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(), @@ -22402,7 +31316,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }) } 1 => { - let lifted181 : UInt64? = match mbt_ffi_load8_u(iter_base + 24) { + let lifted251 : UInt64? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => Option::Some( @@ -22411,326 +31325,1136 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let result182 = mbt_ffi_ptr2str( + let result252 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let lifted347 : @types.TypedSchemaValue? = match + let lifted487 : @types.TypedSchemaValue? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => { - let array309 : Array[@types.SchemaTypeNode] = [] - for index310 = 0 - index310 < mbt_ffi_load32(iter_base + 56) - index310 = index310 + 1 { + let array449 : Array[@types.SchemaTypeNode] = [] + for index450 = 0 + index450 < mbt_ffi_load32(iter_base + 56) + index450 = index450 + 1 { let iter_base = mbt_ffi_load32(iter_base + 52) + - index310 * 144 + index450 * 144 - let lifted295 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted435 = 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 + 2 => { + let lifted259 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted254 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted253 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted253) + } + _ => panic() + } + + let lifted256 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted255 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted255) + } + _ => panic() + } + + let lifted258 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result257 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result257) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted254, + max: lifted256, + unit: lifted258, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted259) + } + 3 => { + let lifted266 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted261 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted260 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted260) + } + _ => panic() + } + + let lifted263 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted262 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted262) + } + _ => panic() + } + + let lifted265 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result264 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result264) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted261, + max: lifted263, + unit: lifted265, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted266) + } + 4 => { + let lifted273 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted268 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted267 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted267) + } + _ => panic() + } + + let lifted270 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted269 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted269) + } + _ => panic() + } + + let lifted272 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result271 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result271) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted268, + max: lifted270, + unit: lifted272, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted273) + } + 5 => { + let lifted280 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted275 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted274 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted274) + } + _ => panic() + } + + let lifted277 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted276 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted276) + } + _ => panic() + } + + let lifted279 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result278 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result278) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted275, + max: lifted277, + unit: lifted279, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted280) + } + 6 => { + let lifted287 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted282 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted281 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted281) + } + _ => panic() + } + + let lifted284 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted283 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted283) + } + _ => panic() + } + + let lifted286 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result285 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result285) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted282, + max: lifted284, + unit: lifted286, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted287) + } + 7 => { + let lifted294 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted289 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted288 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted288) + } + _ => panic() + } + + let lifted291 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted290 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted290) + } + _ => panic() + } + + let lifted293 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result292 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result292) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted289, + max: lifted291, + unit: lifted293, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted294) + } + 8 => { + let lifted301 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted296 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted295 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted295) + } + _ => panic() + } + + let lifted298 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted297 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted297) + } + _ => panic() + } + + let lifted300 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result299 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result299) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted296, + max: lifted298, + unit: lifted300, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted301) + } + 9 => { + let lifted308 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted303 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted302 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted302) + } + _ => panic() + } + + let lifted305 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted304 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted304) + } + _ => panic() + } + + let lifted307 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result306 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result306) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted303, + max: lifted305, + unit: lifted307, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted308) + } + 10 => { + let lifted315 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted310 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted309 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted309) + } + _ => panic() + } + + let lifted312 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted311 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted311) + } + _ => panic() + } + + let lifted314 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result313 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result313) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted310, + max: lifted312, + unit: lifted314, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted315) + } + 11 => { + let lifted322 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted317 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted316 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted316) + } + _ => panic() + } + + let lifted319 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted318 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted318) + } + _ => panic() + } + + let lifted321 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result320 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result320) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted317, + max: lifted319, + unit: lifted321, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted322) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array197 : Array[@types.NamedFieldType] = [] - for index198 = 0 - index198 < mbt_ffi_load32(iter_base + 12) - index198 = index198 + 1 { + let array337 : Array[@types.NamedFieldType] = [] + for index338 = 0 + index338 < mbt_ffi_load32(iter_base + 12) + index338 = index338 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index198 * 68 + index338 * 68 - let result183 = mbt_ffi_ptr2str( + let result323 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted185 : String? = match + let lifted325 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result184 = mbt_ffi_ptr2str( + let result324 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result184) + Option::Some(result324) } _ => panic() } - let array187 : Array[String] = [] - for index188 = 0 - index188 < mbt_ffi_load32(iter_base + 28) - index188 = index188 + 1 { + let array327 : Array[String] = [] + for index328 = 0 + index328 < mbt_ffi_load32(iter_base + 28) + index328 = index328 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index188 * 8 + index328 * 8 - let result186 = mbt_ffi_ptr2str( + let result326 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array187.push(result186) + array327.push(result326) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array190 : Array[String] = [] - for index191 = 0 - index191 < mbt_ffi_load32(iter_base + 36) - index191 = index191 + 1 { + let array330 : Array[String] = [] + for index331 = 0 + index331 < mbt_ffi_load32(iter_base + 36) + index331 = index331 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index191 * 8 + index331 * 8 - let result189 = mbt_ffi_ptr2str( + let result329 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array190.push(result189) + array330.push(result329) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted193 : String? = match + let lifted333 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result192 = mbt_ffi_ptr2str( + let result332 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result192) + Option::Some(result332) } _ => panic() } - let lifted196 : @types.Role? = match + let lifted336 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted195 = match + let lifted335 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result194 = mbt_ffi_ptr2str( + let result334 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result194) + @types.Role::Other(result334) } _ => panic() } - Option::Some(lifted195) + Option::Some(lifted335) } _ => panic() } - array197.push(@types.NamedFieldType::{ - name: result183, + array337.push(@types.NamedFieldType::{ + name: result323, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted185, - aliases: array187, - examples: array190, - deprecated: lifted193, - role: lifted196, + doc: lifted325, + aliases: array327, + examples: array330, + deprecated: lifted333, + role: lifted336, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array197) + @types.SchemaTypeBody::RecordType(array337) } 15 => { - let array214 : Array[@types.VariantCaseType] = [] - for index215 = 0 - index215 < mbt_ffi_load32(iter_base + 12) - index215 = index215 + 1 { + let array354 : Array[@types.VariantCaseType] = [] + for index355 = 0 + index355 < mbt_ffi_load32(iter_base + 12) + index355 = index355 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index215 * 72 + index355 * 72 - let result199 = mbt_ffi_ptr2str( + let result339 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted200 : Int? = match + let lifted340 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted202 : String? = match + let lifted342 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result201 = mbt_ffi_ptr2str( + let result341 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result201) + Option::Some(result341) } _ => panic() } - let array204 : Array[String] = [] - for index205 = 0 - index205 < mbt_ffi_load32(iter_base + 32) - index205 = index205 + 1 { + let array344 : Array[String] = [] + for index345 = 0 + index345 < mbt_ffi_load32(iter_base + 32) + index345 = index345 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index205 * 8 + index345 * 8 - let result203 = mbt_ffi_ptr2str( + let result343 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array204.push(result203) + array344.push(result343) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array207 : Array[String] = [] - for index208 = 0 - index208 < mbt_ffi_load32(iter_base + 40) - index208 = index208 + 1 { + let array347 : Array[String] = [] + for index348 = 0 + index348 < mbt_ffi_load32(iter_base + 40) + index348 = index348 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index208 * 8 + index348 * 8 - let result206 = mbt_ffi_ptr2str( + let result346 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array207.push(result206) + array347.push(result346) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted210 : String? = match + let lifted350 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result209 = mbt_ffi_ptr2str( + let result349 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result209) + Option::Some(result349) } _ => panic() } - let lifted213 : @types.Role? = match + let lifted353 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted212 = match + let lifted352 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result211 = mbt_ffi_ptr2str( + let result351 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result211) + @types.Role::Other(result351) } _ => panic() } - Option::Some(lifted212) + Option::Some(lifted352) } _ => panic() } - array214.push(@types.VariantCaseType::{ - name: result199, - payload: lifted200, + array354.push(@types.VariantCaseType::{ + name: result339, + payload: lifted340, metadata: @types.MetadataEnvelope::{ - doc: lifted202, - aliases: array204, - examples: array207, - deprecated: lifted210, - role: lifted213, + doc: lifted342, + aliases: array344, + examples: array347, + deprecated: lifted350, + role: lifted353, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array214) + @types.SchemaTypeBody::VariantType(array354) } 16 => { - let array217 : Array[String] = [] - for index218 = 0 - index218 < mbt_ffi_load32(iter_base + 12) - index218 = index218 + 1 { + let array357 : Array[String] = [] + for index358 = 0 + index358 < mbt_ffi_load32(iter_base + 12) + index358 = index358 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index218 * 8 + index358 * 8 - let result216 = mbt_ffi_ptr2str( + let result356 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array217.push(result216) + array357.push(result356) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array217) + @types.SchemaTypeBody::EnumType(array357) } 17 => { - let array220 : Array[String] = [] - for index221 = 0 - index221 < mbt_ffi_load32(iter_base + 12) - index221 = index221 + 1 { + let array360 : Array[String] = [] + for index361 = 0 + index361 < mbt_ffi_load32(iter_base + 12) + index361 = index361 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index221 * 8 + index361 * 8 - let result219 = mbt_ffi_ptr2str( + let result359 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array220.push(result219) + array360.push(result359) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array220) + @types.SchemaTypeBody::FlagsType(array360) } 18 => { - let array222 : Array[Int] = [] - for index223 = 0 - index223 < mbt_ffi_load32(iter_base + 12) - index223 = index223 + 1 { + 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) + - index223 * 4 + index363 * 4 - array222.push(mbt_ffi_load32(iter_base + 0)) + array362.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array222) + @types.SchemaTypeBody::TupleType(array362) } 19 => @types.SchemaTypeBody::ListType( @@ -22751,14 +32475,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted224 : Int? = match + let lifted364 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted225 : Int? = match + let lifted365 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -22766,37 +32490,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted224, - err: lifted225, + ok: lifted364, + err: lifted365, }) } 24 => { - let lifted229 : Array[String]? = match + let lifted369 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array227 : Array[String] = [] - for index228 = 0 - index228 < mbt_ffi_load32(iter_base + 16) - index228 = index228 + 1 { + let array367 : Array[String] = [] + for index368 = 0 + index368 < mbt_ffi_load32(iter_base + 16) + index368 = index368 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index228 * 8 + index368 * 8 - let result226 = mbt_ffi_ptr2str( + let result366 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array227.push(result226) + array367.push(result366) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array227) + Option::Some(array367) } _ => panic() } - let lifted230 : UInt? = match + let lifted370 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -22806,7 +32530,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted231 : UInt? = match + let lifted371 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -22816,54 +32540,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted233 : String? = match + let lifted373 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result232 = mbt_ffi_ptr2str( + let result372 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result232) + Option::Some(result372) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted229, - min_length: lifted230, - max_length: lifted231, - regex: lifted233, + languages: lifted369, + min_length: lifted370, + max_length: lifted371, + regex: lifted373, }) } 25 => { - let lifted237 : Array[String]? = match + let lifted377 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array235 : Array[String] = [] - for index236 = 0 - index236 < mbt_ffi_load32(iter_base + 16) - index236 = index236 + 1 { + let array375 : Array[String] = [] + for index376 = 0 + index376 < mbt_ffi_load32(iter_base + 16) + index376 = index376 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index236 * 8 + index376 * 8 - let result234 = mbt_ffi_ptr2str( + let result374 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array235.push(result234) + array375.push(result374) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array235) + Option::Some(array375) } _ => panic() } - let lifted238 : UInt? = match + let lifted378 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -22873,7 +32597,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted239 : UInt? = match + let lifted379 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -22884,58 +32608,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted237, - min_bytes: lifted238, - max_bytes: lifted239, + mime_types: lifted377, + min_bytes: lifted378, + max_bytes: lifted379, }) } 26 => { - let lifted243 : Array[String]? = match + let lifted383 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array241 : Array[String] = [] - for index242 = 0 - index242 < mbt_ffi_load32(iter_base + 20) - index242 = index242 + 1 { + let array381 : Array[String] = [] + for index382 = 0 + index382 < mbt_ffi_load32(iter_base + 20) + index382 = index382 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index242 * 8 + index382 * 8 - let result240 = mbt_ffi_ptr2str( + let result380 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array241.push(result240) + array381.push(result380) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array241) + Option::Some(array381) } _ => panic() } - let lifted247 : Array[String]? = match + let lifted387 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array245 : Array[String] = [] - for index246 = 0 - index246 < mbt_ffi_load32(iter_base + 32) - index246 = index246 + 1 { + let array385 : Array[String] = [] + for index386 = 0 + index386 < mbt_ffi_load32(iter_base + 32) + index386 = index386 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index246 * 8 + index386 * 8 - let result244 = mbt_ffi_ptr2str( + let result384 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array245.push(result244) + array385.push(result384) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array245) + Option::Some(array385) } _ => panic() } @@ -22947,95 +32671,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted243, - allowed_extensions: lifted247, + allowed_mime_types: lifted383, + allowed_extensions: lifted387, }) } 27 => { - let lifted251 : Array[String]? = match + let lifted391 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array249 : Array[String] = [] - for index250 = 0 - index250 < mbt_ffi_load32(iter_base + 16) - index250 = index250 + 1 { + let array389 : Array[String] = [] + for index390 = 0 + index390 < mbt_ffi_load32(iter_base + 16) + index390 = index390 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index250 * 8 + index390 * 8 - let result248 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array249) + Option::Some(array389) } _ => panic() } - let lifted255 : Array[String]? = match + let lifted395 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array253 : Array[String] = [] - for index254 = 0 - index254 < mbt_ffi_load32(iter_base + 28) - index254 = index254 + 1 { + let array393 : Array[String] = [] + for index394 = 0 + index394 < mbt_ffi_load32(iter_base + 28) + index394 = index394 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index254 * 8 + index394 * 8 - let result252 = mbt_ffi_ptr2str( + let result392 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array253.push(result252) + array393.push(result392) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array253) + Option::Some(array393) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted251, - allowed_hosts: lifted255, + allowed_schemes: lifted391, + allowed_hosts: lifted395, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result256 = mbt_ffi_ptr2str( + let result396 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array258 : Array[String] = [] - for index259 = 0 - index259 < mbt_ffi_load32(iter_base + 20) - index259 = index259 + 1 { + let array398 : Array[String] = [] + for index399 = 0 + index399 < mbt_ffi_load32(iter_base + 20) + index399 = index399 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index259 * 8 + index399 * 8 - let result257 = mbt_ffi_ptr2str( + let result397 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array258.push(result257) + array398.push(result397) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted261 : @types.QuantityValue? = match + let lifted401 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result260 = mbt_ffi_ptr2str( + let result400 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -23043,17 +32767,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result260, + unit: result400, }) } _ => panic() } - let lifted263 : @types.QuantityValue? = match + let lifted403 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result262 = mbt_ffi_ptr2str( + let result402 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -23061,404 +32785,404 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result262, + unit: result402, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result256, - allowed_suffixes: array258, - min: lifted261, - max: lifted263, + base_unit: result396, + allowed_suffixes: array398, + min: lifted401, + max: lifted403, }) } 31 => { - let array287 : Array[@types.UnionBranch] = [] - for index288 = 0 - index288 < mbt_ffi_load32(iter_base + 12) - index288 = index288 + 1 { + let array427 : Array[@types.UnionBranch] = [] + for index428 = 0 + index428 < mbt_ffi_load32(iter_base + 12) + index428 = index428 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index288 * 92 + index428 * 92 - let result264 = mbt_ffi_ptr2str( + let result404 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted273 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted413 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result265 = mbt_ffi_ptr2str( + let result405 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result265) + @types.DiscriminatorRule::Prefix(result405) } 1 => { - let result266 = mbt_ffi_ptr2str( + let result406 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result266) + @types.DiscriminatorRule::Suffix(result406) } 2 => { - let result267 = mbt_ffi_ptr2str( + let result407 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result267) + @types.DiscriminatorRule::Contains(result407) } 3 => { - let result268 = mbt_ffi_ptr2str( + let result408 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result268) + @types.DiscriminatorRule::Regex(result408) } 4 => { - let result269 = mbt_ffi_ptr2str( + let result409 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted271 : String? = match + let lifted411 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result270 = mbt_ffi_ptr2str( + let result410 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result270) + Option::Some(result410) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result269, - literal: lifted271, + field_name: result409, + literal: lifted411, }) } 5 => { - let result272 = mbt_ffi_ptr2str( + let result412 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result272) + @types.DiscriminatorRule::FieldAbsent(result412) } _ => panic() } - let lifted275 : String? = match + let lifted415 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result274 = mbt_ffi_ptr2str( + let result414 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result274) + Option::Some(result414) } _ => panic() } - let array277 : Array[String] = [] - for index278 = 0 - index278 < mbt_ffi_load32(iter_base + 52) - index278 = index278 + 1 { + let array417 : Array[String] = [] + for index418 = 0 + index418 < mbt_ffi_load32(iter_base + 52) + index418 = index418 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index278 * 8 + index418 * 8 - let result276 = mbt_ffi_ptr2str( + let result416 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array277.push(result276) + array417.push(result416) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array280 : Array[String] = [] - for index281 = 0 - index281 < mbt_ffi_load32(iter_base + 60) - index281 = index281 + 1 { + let array420 : Array[String] = [] + for index421 = 0 + index421 < mbt_ffi_load32(iter_base + 60) + index421 = index421 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index281 * 8 + index421 * 8 - let result279 = mbt_ffi_ptr2str( + let result419 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array280.push(result279) + array420.push(result419) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted283 : String? = match + let lifted423 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result282 = mbt_ffi_ptr2str( + let result422 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result282) + Option::Some(result422) } _ => panic() } - let lifted286 : @types.Role? = match + let lifted426 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted285 = match + let lifted425 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result284 = mbt_ffi_ptr2str( + let result424 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result284) + @types.Role::Other(result424) } _ => panic() } - Option::Some(lifted285) + Option::Some(lifted425) } _ => panic() } - array287.push(@types.UnionBranch::{ - tag: result264, + array427.push(@types.UnionBranch::{ + tag: result404, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted273, + discriminator: lifted413, metadata: @types.MetadataEnvelope::{ - doc: lifted275, - aliases: array277, - examples: array280, - deprecated: lifted283, - role: lifted286, + doc: lifted415, + aliases: array417, + examples: array420, + deprecated: lifted423, + role: lifted426, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array287, + branches: array427, }) } 32 => { - let lifted290 : String? = match + let lifted430 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result289 = mbt_ffi_ptr2str( + let result429 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result289) + Option::Some(result429) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted290, + category: lifted430, }) } 33 => { - let lifted292 : String? = match + let lifted432 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result291 = mbt_ffi_ptr2str( + let result431 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result291) + Option::Some(result431) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted292, + resource_name: lifted432, }) } 34 => { - let lifted293 : Int? = match + let lifted433 : 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(lifted293) + @types.SchemaTypeBody::FutureType(lifted433) } 35 => { - let lifted294 : Int? = match + let lifted434 : 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(lifted294) + @types.SchemaTypeBody::StreamType(lifted434) } _ => panic() } - let lifted297 : String? = match + let lifted437 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result296 = mbt_ffi_ptr2str( + let result436 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result296) + Option::Some(result436) } _ => panic() } - let array299 : Array[String] = [] - for index300 = 0 - index300 < mbt_ffi_load32(iter_base + 104) - index300 = index300 + 1 { + let array439 : Array[String] = [] + for index440 = 0 + index440 < mbt_ffi_load32(iter_base + 104) + index440 = index440 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index300 * 8 + index440 * 8 - let result298 = mbt_ffi_ptr2str( + let result438 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array299.push(result298) + array439.push(result438) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array302 : Array[String] = [] - for index303 = 0 - index303 < mbt_ffi_load32(iter_base + 112) - index303 = index303 + 1 { + let array442 : Array[String] = [] + for index443 = 0 + index443 < mbt_ffi_load32(iter_base + 112) + index443 = index443 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index303 * 8 + index443 * 8 - let result301 = mbt_ffi_ptr2str( + let result441 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array302.push(result301) + array442.push(result441) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted305 : String? = match + let lifted445 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result304 = mbt_ffi_ptr2str( + let result444 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result304) + Option::Some(result444) } _ => panic() } - let lifted308 : @types.Role? = match + let lifted448 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted307 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted447 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result306 = mbt_ffi_ptr2str( + let result446 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result306) + @types.Role::Other(result446) } _ => panic() } - Option::Some(lifted307) + Option::Some(lifted447) } _ => panic() } - array309.push(@types.SchemaTypeNode::{ - body: lifted295, + array449.push(@types.SchemaTypeNode::{ + body: lifted435, metadata: @types.MetadataEnvelope::{ - doc: lifted297, - aliases: array299, - examples: array302, - deprecated: lifted305, - role: lifted308, + doc: lifted437, + aliases: array439, + examples: array442, + deprecated: lifted445, + role: lifted448, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 52)) - let array314 : Array[@types.SchemaTypeDef] = [] - for index315 = 0 - index315 < mbt_ffi_load32(iter_base + 64) - index315 = index315 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 60) + index315 * 24 + let array454 : Array[@types.SchemaTypeDef] = [] + for index455 = 0 + index455 < mbt_ffi_load32(iter_base + 64) + index455 = index455 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 60) + index455 * 24 - let result311 = mbt_ffi_ptr2str( + let result451 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted313 : String? = match + let lifted453 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result312 = mbt_ffi_ptr2str( + let result452 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result312) + Option::Some(result452) } _ => panic() } - array314.push(@types.SchemaTypeDef::{ - id: result311, - name: lifted313, + array454.push(@types.SchemaTypeDef::{ + id: result451, + name: lifted453, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) - let array345 : Array[@types.SchemaValueNode] = [] - for index346 = 0 - index346 < mbt_ffi_load32(iter_base + 76) - index346 = index346 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 72) + index346 * 32 + let array485 : Array[@types.SchemaValueNode] = [] + for index486 = 0 + index486 < mbt_ffi_load32(iter_base + 76) + index486 = index486 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 72) + index486 * 32 - let lifted344 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted484 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -23510,29 +33234,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result316 = mbt_ffi_ptr2str( + let result456 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result316) + @types.SchemaValueNode::StringValue(result456) } 13 => { - let array317 : Array[Int] = [] - for index318 = 0 - index318 < mbt_ffi_load32(iter_base + 12) - index318 = index318 + 1 { + 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) + - index318 * 4 + 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::RecordValue(array317) + @types.SchemaValueNode::RecordValue(array457) } 14 => { - let lifted319 : Int? = match + let lifted459 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -23541,7 +33265,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted319, + payload: lifted459, }) } 15 => @@ -23549,180 +33273,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array320 : Array[Bool] = [] - for index321 = 0 - index321 < mbt_ffi_load32(iter_base + 12) - index321 = index321 + 1 { + let array460 : Array[Bool] = [] + for index461 = 0 + index461 < mbt_ffi_load32(iter_base + 12) + index461 = index461 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index321 * 1 + index461 * 1 - array320.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array460.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array320) + @types.SchemaValueNode::FlagsValue(array460) } 17 => { - let array322 : Array[Int] = [] - for index323 = 0 - index323 < mbt_ffi_load32(iter_base + 12) - index323 = index323 + 1 { + let array462 : Array[Int] = [] + for index463 = 0 + index463 < mbt_ffi_load32(iter_base + 12) + index463 = index463 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index323 * 4 + index463 * 4 - array322.push(mbt_ffi_load32(iter_base + 0)) + array462.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array322) + @types.SchemaValueNode::TupleValue(array462) } 18 => { - let array324 : Array[Int] = [] - for index325 = 0 - index325 < mbt_ffi_load32(iter_base + 12) - index325 = index325 + 1 { + let array464 : Array[Int] = [] + for index465 = 0 + index465 < mbt_ffi_load32(iter_base + 12) + index465 = index465 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index325 * 4 + index465 * 4 - array324.push(mbt_ffi_load32(iter_base + 0)) + array464.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array324) + @types.SchemaValueNode::ListValue(array464) } 19 => { - let array326 : Array[Int] = [] - for index327 = 0 - index327 < mbt_ffi_load32(iter_base + 12) - index327 = index327 + 1 { + let array466 : Array[Int] = [] + for index467 = 0 + index467 < mbt_ffi_load32(iter_base + 12) + index467 = index467 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index327 * 4 + index467 * 4 - array326.push(mbt_ffi_load32(iter_base + 0)) + array466.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array326) + @types.SchemaValueNode::FixedListValue(array466) } 20 => { - let array328 : Array[@types.MapEntry] = [] - for index329 = 0 - index329 < mbt_ffi_load32(iter_base + 12) - index329 = index329 + 1 { + let array468 : Array[@types.MapEntry] = [] + for index469 = 0 + index469 < mbt_ffi_load32(iter_base + 12) + index469 = index469 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index329 * 8 + index469 * 8 - array328.push(@types.MapEntry::{ + array468.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(array328) + @types.SchemaValueNode::MapValue(array468) } 21 => { - let lifted330 : Int? = match + let lifted470 : 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(lifted330) + @types.SchemaValueNode::OptionValue(lifted470) } 22 => { - let lifted333 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted473 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted331 : Int? = match + let lifted471 : 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(lifted331) + @types.ResultValuePayload::OkValue(lifted471) } 1 => { - let lifted332 : Int? = match + let lifted472 : 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(lifted332) + @types.ResultValuePayload::ErrValue(lifted472) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted333) + @types.SchemaValueNode::ResultValue(lifted473) } 23 => { - let result334 = mbt_ffi_ptr2str( + let result474 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted336 : String? = match + let lifted476 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result335 = mbt_ffi_ptr2str( + let result475 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result335) + Option::Some(result475) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result334, - language: lifted336, + text: result474, + language: lifted476, }) } 24 => { - let result337 = mbt_ffi_ptr2bytes( + let result477 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted339 : String? = match + let lifted479 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result338 = mbt_ffi_ptr2str( + let result478 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result338) + Option::Some(result478) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result337, - mime_type: lifted339, + bytes: result477, + mime_type: lifted479, }) } 25 => { - let result340 = mbt_ffi_ptr2str( + let result480 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result340) + @types.SchemaValueNode::PathValue(result480) } 26 => { - let result341 = mbt_ffi_ptr2str( + let result481 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result341) + @types.SchemaValueNode::UrlValue(result481) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -23734,7 +33458,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result342 = mbt_ffi_ptr2str( + let result482 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -23742,17 +33466,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result342, + unit: result482, }) } 30 => { - let result343 = mbt_ffi_ptr2str( + let result483 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result343, + tag: result483, body: mbt_ffi_load32(iter_base + 16), }) } @@ -23769,18 +33493,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array345.push(lifted344) + array485.push(lifted484) } mbt_ffi_free(mbt_ffi_load32(iter_base + 72)) Option::Some(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array309, - defs: array314, + type_nodes: array449, + defs: array454, root: mbt_ffi_load32(iter_base + 68), }, value: @types.SchemaValueTree::{ - value_nodes: array345, + value_nodes: array485, root: mbt_ffi_load32(iter_base + 80), }, }) @@ -23788,13 +33512,13 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted350 = match mbt_ffi_load8_u(iter_base + 88) { + let lifted490 = match mbt_ffi_load8_u(iter_base + 88) { 0 => WrappedFunctionType::ReadLocal 1 => WrappedFunctionType::WriteLocal 2 => WrappedFunctionType::ReadRemote 3 => WrappedFunctionType::WriteRemote 4 => { - let lifted348 : UInt64? = match + let lifted488 : UInt64? = match mbt_ffi_load8_u(iter_base + 96) { 0 => Option::None 1 => @@ -23804,10 +33528,10 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - WrappedFunctionType::WriteRemoteBatched(lifted348) + WrappedFunctionType::WriteRemoteBatched(lifted488) } 5 => { - let lifted349 : UInt64? = match + let lifted489 : UInt64? = match mbt_ffi_load8_u(iter_base + 96) { 0 => Option::None 1 => @@ -23817,7 +33541,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - WrappedFunctionType::WriteRemoteTransaction(lifted349) + WrappedFunctionType::WriteRemoteTransaction(lifted489) } _ => panic() } @@ -23827,328 +33551,1138 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - parent_start_index: lifted181, - function_name: result182, - request: lifted347, - durable_function_type: lifted350, + parent_start_index: lifted251, + function_name: result252, + request: lifted487, + durable_function_type: lifted490, }) } 2 => { - let lifted515 : @types.TypedSchemaValue? = match + let lifted725 : @types.TypedSchemaValue? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let array477 : Array[@types.SchemaTypeNode] = [] - for index478 = 0 - index478 < mbt_ffi_load32(iter_base + 40) - index478 = index478 + 1 { + let array687 : Array[@types.SchemaTypeNode] = [] + for index688 = 0 + index688 < mbt_ffi_load32(iter_base + 40) + index688 = index688 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index478 * 144 + index688 * 144 - let lifted463 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted673 = 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 + 2 => { + let lifted497 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted492 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted491 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted491) + } + _ => panic() + } + + let lifted494 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted493 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted493) + } + _ => panic() + } + + let lifted496 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result495 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result495) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted492, + max: lifted494, + unit: lifted496, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted497) + } + 3 => { + 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 lifted498 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted498) + } + _ => panic() + } + + let lifted501 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted500 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_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 lifted503 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result502 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result502) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted499, + max: lifted501, + unit: lifted503, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted504) + } + 4 => { + 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 lifted505 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted505) + } + _ => panic() + } + + let lifted508 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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 lifted510 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result509 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result509) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted506, + max: lifted508, + unit: lifted510, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted511) + } + 5 => { + let lifted518 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted513 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted512 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted512) + } + _ => panic() + } + + let lifted515 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted514 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted514) + } + _ => panic() + } + + let lifted517 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result516 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result516) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted513, + max: lifted515, + unit: lifted517, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted518) + } + 6 => { + let lifted525 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted520 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted519 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted519) + } + _ => panic() + } + + let lifted522 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted521 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted521) + } + _ => panic() + } + + let lifted524 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result523 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result523) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted520, + max: lifted522, + unit: lifted524, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted525) + } + 7 => { + let lifted532 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted527 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted526 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted526) + } + _ => panic() + } + + let lifted529 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted528 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted528) + } + _ => panic() + } + + let lifted531 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result530 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result530) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted527, + max: lifted529, + unit: lifted531, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted532) + } + 8 => { + let lifted539 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted534 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted533 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted533) + } + _ => panic() + } + + let lifted536 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted535 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted535) + } + _ => panic() + } + + let lifted538 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result537 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result537) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted534, + max: lifted536, + unit: lifted538, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted539) + } + 9 => { + let lifted546 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted541 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted540 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted540) + } + _ => panic() + } + + let lifted543 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted542 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted542) + } + _ => panic() + } + + let lifted545 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result544 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result544) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted541, + max: lifted543, + unit: lifted545, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted546) + } + 10 => { + let lifted553 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted548 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted547 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted547) + } + _ => panic() + } + + let lifted550 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted549 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted549) + } + _ => panic() + } + + let lifted552 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result551 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result551) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted548, + max: lifted550, + unit: lifted552, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted553) + } + 11 => { + let lifted560 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted555 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted554 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted554) + } + _ => panic() + } + + let lifted557 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted556 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted556) + } + _ => panic() + } + + let lifted559 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result558 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result558) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted555, + max: lifted557, + unit: lifted559, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted560) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array365 : Array[@types.NamedFieldType] = [] - for index366 = 0 - index366 < mbt_ffi_load32(iter_base + 12) - index366 = index366 + 1 { + let array575 : Array[@types.NamedFieldType] = [] + for index576 = 0 + index576 < mbt_ffi_load32(iter_base + 12) + index576 = index576 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index366 * 68 + index576 * 68 - let result351 = mbt_ffi_ptr2str( + let result561 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted353 : String? = match + let lifted563 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result352 = mbt_ffi_ptr2str( + let result562 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result352) + Option::Some(result562) } _ => panic() } - let array355 : Array[String] = [] - for index356 = 0 - index356 < mbt_ffi_load32(iter_base + 28) - index356 = index356 + 1 { + let array565 : Array[String] = [] + for index566 = 0 + index566 < mbt_ffi_load32(iter_base + 28) + index566 = index566 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index356 * 8 + index566 * 8 - let result354 = mbt_ffi_ptr2str( + let result564 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array355.push(result354) + array565.push(result564) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array358 : Array[String] = [] - for index359 = 0 - index359 < mbt_ffi_load32(iter_base + 36) - index359 = index359 + 1 { + let array568 : Array[String] = [] + for index569 = 0 + index569 < mbt_ffi_load32(iter_base + 36) + index569 = index569 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index359 * 8 + index569 * 8 - let result357 = mbt_ffi_ptr2str( + let result567 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array358.push(result357) + array568.push(result567) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted361 : String? = match + let lifted571 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result360 = mbt_ffi_ptr2str( + let result570 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result360) + Option::Some(result570) } _ => panic() } - let lifted364 : @types.Role? = match + let lifted574 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted363 = match + let lifted573 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result362 = mbt_ffi_ptr2str( + let result572 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result362) + @types.Role::Other(result572) } _ => panic() } - Option::Some(lifted363) + Option::Some(lifted573) } _ => panic() } - array365.push(@types.NamedFieldType::{ - name: result351, + array575.push(@types.NamedFieldType::{ + name: result561, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted353, - aliases: array355, - examples: array358, - deprecated: lifted361, - role: lifted364, + doc: lifted563, + aliases: array565, + examples: array568, + deprecated: lifted571, + role: lifted574, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array365) + @types.SchemaTypeBody::RecordType(array575) } 15 => { - let array382 : Array[@types.VariantCaseType] = [] - for index383 = 0 - index383 < mbt_ffi_load32(iter_base + 12) - index383 = index383 + 1 { + let array592 : Array[@types.VariantCaseType] = [] + for index593 = 0 + index593 < mbt_ffi_load32(iter_base + 12) + index593 = index593 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index383 * 72 + index593 * 72 - let result367 = mbt_ffi_ptr2str( + let result577 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted368 : Int? = match + let lifted578 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted370 : String? = match + let lifted580 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result369 = mbt_ffi_ptr2str( + let result579 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result369) + Option::Some(result579) } _ => panic() } - let array372 : Array[String] = [] - for index373 = 0 - index373 < mbt_ffi_load32(iter_base + 32) - index373 = index373 + 1 { + let array582 : Array[String] = [] + for index583 = 0 + index583 < mbt_ffi_load32(iter_base + 32) + index583 = index583 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index373 * 8 + index583 * 8 - let result371 = mbt_ffi_ptr2str( + let result581 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array372.push(result371) + array582.push(result581) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array375 : Array[String] = [] - for index376 = 0 - index376 < mbt_ffi_load32(iter_base + 40) - index376 = index376 + 1 { + let array585 : Array[String] = [] + for index586 = 0 + index586 < mbt_ffi_load32(iter_base + 40) + index586 = index586 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index376 * 8 + index586 * 8 - let result374 = mbt_ffi_ptr2str( + let result584 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array375.push(result374) + array585.push(result584) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted378 : String? = match + let lifted588 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result377 = mbt_ffi_ptr2str( + let result587 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result377) + Option::Some(result587) } _ => panic() } - let lifted381 : @types.Role? = match + let lifted591 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted380 = match + let lifted590 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result379 = mbt_ffi_ptr2str( + let result589 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result379) + @types.Role::Other(result589) } _ => panic() } - Option::Some(lifted380) + Option::Some(lifted590) } _ => panic() } - array382.push(@types.VariantCaseType::{ - name: result367, - payload: lifted368, + array592.push(@types.VariantCaseType::{ + name: result577, + payload: lifted578, metadata: @types.MetadataEnvelope::{ - doc: lifted370, - aliases: array372, - examples: array375, - deprecated: lifted378, - role: lifted381, + doc: lifted580, + aliases: array582, + examples: array585, + deprecated: lifted588, + role: lifted591, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array382) + @types.SchemaTypeBody::VariantType(array592) } 16 => { - let array385 : Array[String] = [] - for index386 = 0 - index386 < mbt_ffi_load32(iter_base + 12) - index386 = index386 + 1 { + let array595 : Array[String] = [] + for index596 = 0 + index596 < mbt_ffi_load32(iter_base + 12) + index596 = index596 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index386 * 8 + index596 * 8 - let result384 = mbt_ffi_ptr2str( + let result594 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array385.push(result384) + array595.push(result594) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array385) + @types.SchemaTypeBody::EnumType(array595) } 17 => { - let array388 : Array[String] = [] - for index389 = 0 - index389 < mbt_ffi_load32(iter_base + 12) - index389 = index389 + 1 { + let array598 : Array[String] = [] + for index599 = 0 + index599 < mbt_ffi_load32(iter_base + 12) + index599 = index599 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index389 * 8 + index599 * 8 - let result387 = mbt_ffi_ptr2str( + let result597 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array388.push(result387) + array598.push(result597) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array388) + @types.SchemaTypeBody::FlagsType(array598) } 18 => { - let array390 : Array[Int] = [] - for index391 = 0 - index391 < mbt_ffi_load32(iter_base + 12) - index391 = index391 + 1 { + let array600 : Array[Int] = [] + for index601 = 0 + index601 < mbt_ffi_load32(iter_base + 12) + index601 = index601 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index391 * 4 + index601 * 4 - array390.push(mbt_ffi_load32(iter_base + 0)) + array600.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array390) + @types.SchemaTypeBody::TupleType(array600) } 19 => @types.SchemaTypeBody::ListType( @@ -24169,14 +34703,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted392 : Int? = match + let lifted602 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted393 : Int? = match + let lifted603 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -24184,37 +34718,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted392, - err: lifted393, + ok: lifted602, + err: lifted603, }) } 24 => { - let lifted397 : Array[String]? = match + let lifted607 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array395 : Array[String] = [] - for index396 = 0 - index396 < mbt_ffi_load32(iter_base + 16) - index396 = index396 + 1 { + let array605 : Array[String] = [] + for index606 = 0 + index606 < mbt_ffi_load32(iter_base + 16) + index606 = index606 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index396 * 8 + index606 * 8 - let result394 = mbt_ffi_ptr2str( + let result604 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array395.push(result394) + array605.push(result604) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array395) + Option::Some(array605) } _ => panic() } - let lifted398 : UInt? = match + let lifted608 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -24224,7 +34758,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted399 : UInt? = match + let lifted609 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -24234,54 +34768,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted401 : String? = match + let lifted611 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result400 = mbt_ffi_ptr2str( + let result610 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result400) + Option::Some(result610) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted397, - min_length: lifted398, - max_length: lifted399, - regex: lifted401, + languages: lifted607, + min_length: lifted608, + max_length: lifted609, + regex: lifted611, }) } 25 => { - let lifted405 : Array[String]? = match + let lifted615 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array403 : Array[String] = [] - for index404 = 0 - index404 < mbt_ffi_load32(iter_base + 16) - index404 = index404 + 1 { + let array613 : Array[String] = [] + for index614 = 0 + index614 < mbt_ffi_load32(iter_base + 16) + index614 = index614 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index404 * 8 + index614 * 8 - let result402 = mbt_ffi_ptr2str( + let result612 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array403.push(result402) + array613.push(result612) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array403) + Option::Some(array613) } _ => panic() } - let lifted406 : UInt? = match + let lifted616 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -24291,7 +34825,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted407 : UInt? = match + let lifted617 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -24302,58 +34836,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted405, - min_bytes: lifted406, - max_bytes: lifted407, + mime_types: lifted615, + min_bytes: lifted616, + max_bytes: lifted617, }) } 26 => { - let lifted411 : Array[String]? = match + let lifted621 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array409 : Array[String] = [] - for index410 = 0 - index410 < mbt_ffi_load32(iter_base + 20) - index410 = index410 + 1 { + let array619 : Array[String] = [] + for index620 = 0 + index620 < mbt_ffi_load32(iter_base + 20) + index620 = index620 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index410 * 8 + index620 * 8 - let result408 = mbt_ffi_ptr2str( + let result618 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array409.push(result408) + array619.push(result618) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array409) + Option::Some(array619) } _ => panic() } - let lifted415 : Array[String]? = match + let lifted625 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array413 : Array[String] = [] - for index414 = 0 - index414 < mbt_ffi_load32(iter_base + 32) - index414 = index414 + 1 { + let array623 : Array[String] = [] + for index624 = 0 + index624 < mbt_ffi_load32(iter_base + 32) + index624 = index624 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index414 * 8 + index624 * 8 - let result412 = mbt_ffi_ptr2str( + let result622 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array413.push(result412) + array623.push(result622) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array413) + Option::Some(array623) } _ => panic() } @@ -24365,95 +34899,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted411, - allowed_extensions: lifted415, + allowed_mime_types: lifted621, + allowed_extensions: lifted625, }) } 27 => { - let lifted419 : Array[String]? = match + let lifted629 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array417 : Array[String] = [] - for index418 = 0 - index418 < mbt_ffi_load32(iter_base + 16) - index418 = index418 + 1 { + let array627 : Array[String] = [] + for index628 = 0 + index628 < mbt_ffi_load32(iter_base + 16) + index628 = index628 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index418 * 8 + index628 * 8 - let result416 = mbt_ffi_ptr2str( + let result626 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array417.push(result416) + array627.push(result626) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array417) + Option::Some(array627) } _ => panic() } - let lifted423 : Array[String]? = match + let lifted633 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array421 : Array[String] = [] - for index422 = 0 - index422 < mbt_ffi_load32(iter_base + 28) - index422 = index422 + 1 { + let array631 : Array[String] = [] + for index632 = 0 + index632 < mbt_ffi_load32(iter_base + 28) + index632 = index632 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index422 * 8 + index632 * 8 - let result420 = mbt_ffi_ptr2str( + let result630 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array421.push(result420) + array631.push(result630) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array421) + Option::Some(array631) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted419, - allowed_hosts: lifted423, + allowed_schemes: lifted629, + allowed_hosts: lifted633, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result424 = mbt_ffi_ptr2str( + let result634 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array426 : Array[String] = [] - for index427 = 0 - index427 < mbt_ffi_load32(iter_base + 20) - index427 = index427 + 1 { + let array636 : Array[String] = [] + for index637 = 0 + index637 < mbt_ffi_load32(iter_base + 20) + index637 = index637 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index427 * 8 + index637 * 8 - let result425 = mbt_ffi_ptr2str( + let result635 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array426.push(result425) + array636.push(result635) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted429 : @types.QuantityValue? = match + let lifted639 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result428 = mbt_ffi_ptr2str( + let result638 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -24461,17 +34995,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result428, + unit: result638, }) } _ => panic() } - let lifted431 : @types.QuantityValue? = match + let lifted641 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result430 = mbt_ffi_ptr2str( + let result640 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -24479,404 +35013,404 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result430, + unit: result640, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result424, - allowed_suffixes: array426, - min: lifted429, - max: lifted431, + base_unit: result634, + allowed_suffixes: array636, + min: lifted639, + max: lifted641, }) } 31 => { - let array455 : Array[@types.UnionBranch] = [] - for index456 = 0 - index456 < mbt_ffi_load32(iter_base + 12) - index456 = index456 + 1 { + let array665 : Array[@types.UnionBranch] = [] + for index666 = 0 + index666 < mbt_ffi_load32(iter_base + 12) + index666 = index666 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index456 * 92 + index666 * 92 - let result432 = mbt_ffi_ptr2str( + let result642 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted441 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted651 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result433 = mbt_ffi_ptr2str( + let result643 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result433) + @types.DiscriminatorRule::Prefix(result643) } 1 => { - let result434 = mbt_ffi_ptr2str( + let result644 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result434) + @types.DiscriminatorRule::Suffix(result644) } 2 => { - let result435 = mbt_ffi_ptr2str( + let result645 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result435) + @types.DiscriminatorRule::Contains(result645) } 3 => { - let result436 = mbt_ffi_ptr2str( + let result646 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result436) + @types.DiscriminatorRule::Regex(result646) } 4 => { - let result437 = mbt_ffi_ptr2str( + let result647 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted439 : String? = match + let lifted649 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result438 = mbt_ffi_ptr2str( + let result648 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result438) + Option::Some(result648) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result437, - literal: lifted439, + field_name: result647, + literal: lifted649, }) } 5 => { - let result440 = mbt_ffi_ptr2str( + let result650 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result440) + @types.DiscriminatorRule::FieldAbsent(result650) } _ => panic() } - let lifted443 : String? = match + let lifted653 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result442 = mbt_ffi_ptr2str( + let result652 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result442) + Option::Some(result652) } _ => panic() } - let array445 : Array[String] = [] - for index446 = 0 - index446 < mbt_ffi_load32(iter_base + 52) - index446 = index446 + 1 { + let array655 : Array[String] = [] + for index656 = 0 + index656 < mbt_ffi_load32(iter_base + 52) + index656 = index656 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index446 * 8 + index656 * 8 - let result444 = mbt_ffi_ptr2str( + let result654 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array445.push(result444) + array655.push(result654) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array448 : Array[String] = [] - for index449 = 0 - index449 < mbt_ffi_load32(iter_base + 60) - index449 = index449 + 1 { + let array658 : Array[String] = [] + for index659 = 0 + index659 < mbt_ffi_load32(iter_base + 60) + index659 = index659 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index449 * 8 + index659 * 8 - let result447 = mbt_ffi_ptr2str( + let result657 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array448.push(result447) + array658.push(result657) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted451 : String? = match + let lifted661 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result450 = mbt_ffi_ptr2str( + let result660 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result450) + Option::Some(result660) } _ => panic() } - let lifted454 : @types.Role? = match + let lifted664 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted453 = match + let lifted663 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result452 = mbt_ffi_ptr2str( + let result662 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result452) + @types.Role::Other(result662) } _ => panic() } - Option::Some(lifted453) + Option::Some(lifted663) } _ => panic() } - array455.push(@types.UnionBranch::{ - tag: result432, + array665.push(@types.UnionBranch::{ + tag: result642, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted441, + discriminator: lifted651, metadata: @types.MetadataEnvelope::{ - doc: lifted443, - aliases: array445, - examples: array448, - deprecated: lifted451, - role: lifted454, + doc: lifted653, + aliases: array655, + examples: array658, + deprecated: lifted661, + role: lifted664, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array455, + branches: array665, }) } 32 => { - let lifted458 : String? = match + let lifted668 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result457 = mbt_ffi_ptr2str( + let result667 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result457) + Option::Some(result667) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted458, + category: lifted668, }) } 33 => { - let lifted460 : String? = match + let lifted670 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result459 = mbt_ffi_ptr2str( + 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::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted460, + resource_name: lifted670, }) } 34 => { - let lifted461 : Int? = match + let lifted671 : 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(lifted461) + @types.SchemaTypeBody::FutureType(lifted671) } 35 => { - let lifted462 : Int? = match + let lifted672 : 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(lifted462) + @types.SchemaTypeBody::StreamType(lifted672) } _ => panic() } - let lifted465 : String? = match + let lifted675 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result464 = mbt_ffi_ptr2str( + let result674 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result464) + Option::Some(result674) } _ => panic() } - let array467 : Array[String] = [] - for index468 = 0 - index468 < mbt_ffi_load32(iter_base + 104) - index468 = index468 + 1 { + let array677 : Array[String] = [] + for index678 = 0 + index678 < mbt_ffi_load32(iter_base + 104) + index678 = index678 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index468 * 8 + index678 * 8 - let result466 = mbt_ffi_ptr2str( + let result676 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array467.push(result466) + array677.push(result676) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array470 : Array[String] = [] - for index471 = 0 - index471 < mbt_ffi_load32(iter_base + 112) - index471 = index471 + 1 { + let array680 : Array[String] = [] + for index681 = 0 + index681 < mbt_ffi_load32(iter_base + 112) + index681 = index681 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index471 * 8 + index681 * 8 - let result469 = mbt_ffi_ptr2str( + let result679 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array470.push(result469) + array680.push(result679) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted473 : String? = match + let lifted683 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result472 = mbt_ffi_ptr2str( + let result682 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result472) + Option::Some(result682) } _ => panic() } - let lifted476 : @types.Role? = match + let lifted686 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted475 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted685 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result474 = mbt_ffi_ptr2str( + let result684 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result474) + @types.Role::Other(result684) } _ => panic() } - Option::Some(lifted475) + Option::Some(lifted685) } _ => panic() } - array477.push(@types.SchemaTypeNode::{ - body: lifted463, + array687.push(@types.SchemaTypeNode::{ + body: lifted673, metadata: @types.MetadataEnvelope::{ - doc: lifted465, - aliases: array467, - examples: array470, - deprecated: lifted473, - role: lifted476, + doc: lifted675, + aliases: array677, + examples: array680, + deprecated: lifted683, + role: lifted686, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array482 : Array[@types.SchemaTypeDef] = [] - for index483 = 0 - index483 < mbt_ffi_load32(iter_base + 48) - index483 = index483 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 44) + index483 * 24 + let array692 : Array[@types.SchemaTypeDef] = [] + for index693 = 0 + index693 < mbt_ffi_load32(iter_base + 48) + index693 = index693 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 44) + index693 * 24 - let result479 = mbt_ffi_ptr2str( + let result689 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted481 : String? = match + let lifted691 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result480 = mbt_ffi_ptr2str( + let result690 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result480) + Option::Some(result690) } _ => panic() } - array482.push(@types.SchemaTypeDef::{ - id: result479, - name: lifted481, + array692.push(@types.SchemaTypeDef::{ + id: result689, + name: lifted691, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) - let array513 : Array[@types.SchemaValueNode] = [] - for index514 = 0 - index514 < mbt_ffi_load32(iter_base + 60) - index514 = index514 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + index514 * 32 + let array723 : Array[@types.SchemaValueNode] = [] + for index724 = 0 + index724 < mbt_ffi_load32(iter_base + 60) + index724 = index724 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + index724 * 32 - let lifted512 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted722 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -24928,29 +35462,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result484 = mbt_ffi_ptr2str( + let result694 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result484) + @types.SchemaValueNode::StringValue(result694) } 13 => { - let array485 : Array[Int] = [] - for index486 = 0 - index486 < mbt_ffi_load32(iter_base + 12) - index486 = index486 + 1 { + let array695 : Array[Int] = [] + for index696 = 0 + index696 < mbt_ffi_load32(iter_base + 12) + index696 = index696 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index486 * 4 + index696 * 4 - array485.push(mbt_ffi_load32(iter_base + 0)) + array695.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array485) + @types.SchemaValueNode::RecordValue(array695) } 14 => { - let lifted487 : Int? = match + let lifted697 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -24959,7 +35493,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted487, + payload: lifted697, }) } 15 => @@ -24967,180 +35501,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array488 : Array[Bool] = [] - for index489 = 0 - index489 < mbt_ffi_load32(iter_base + 12) - index489 = index489 + 1 { + let array698 : Array[Bool] = [] + for index699 = 0 + index699 < mbt_ffi_load32(iter_base + 12) + index699 = index699 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index489 * 1 + index699 * 1 - array488.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array698.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array488) + @types.SchemaValueNode::FlagsValue(array698) } 17 => { - let array490 : Array[Int] = [] - for index491 = 0 - index491 < mbt_ffi_load32(iter_base + 12) - index491 = index491 + 1 { + let array700 : Array[Int] = [] + for index701 = 0 + index701 < mbt_ffi_load32(iter_base + 12) + index701 = index701 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index491 * 4 + index701 * 4 - array490.push(mbt_ffi_load32(iter_base + 0)) + array700.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array490) + @types.SchemaValueNode::TupleValue(array700) } 18 => { - let array492 : Array[Int] = [] - for index493 = 0 - index493 < mbt_ffi_load32(iter_base + 12) - index493 = index493 + 1 { + 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) + - index493 * 4 + 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::ListValue(array492) + @types.SchemaValueNode::ListValue(array702) } 19 => { - let array494 : Array[Int] = [] - for index495 = 0 - index495 < mbt_ffi_load32(iter_base + 12) - index495 = index495 + 1 { + 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) + - index495 * 4 + 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::FixedListValue(array494) + @types.SchemaValueNode::FixedListValue(array704) } 20 => { - let array496 : Array[@types.MapEntry] = [] - for index497 = 0 - index497 < mbt_ffi_load32(iter_base + 12) - index497 = index497 + 1 { + let array706 : Array[@types.MapEntry] = [] + for index707 = 0 + index707 < mbt_ffi_load32(iter_base + 12) + index707 = index707 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index497 * 8 + index707 * 8 - array496.push(@types.MapEntry::{ + array706.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(array496) + @types.SchemaValueNode::MapValue(array706) } 21 => { - let lifted498 : Int? = match + let lifted708 : 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(lifted498) + @types.SchemaValueNode::OptionValue(lifted708) } 22 => { - let lifted501 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted711 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted499 : Int? = match + let lifted709 : 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(lifted499) + @types.ResultValuePayload::OkValue(lifted709) } 1 => { - let lifted500 : Int? = match + let lifted710 : 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(lifted500) + @types.ResultValuePayload::ErrValue(lifted710) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted501) + @types.SchemaValueNode::ResultValue(lifted711) } 23 => { - let result502 = mbt_ffi_ptr2str( + let result712 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted504 : String? = match + let lifted714 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result503 = mbt_ffi_ptr2str( + let result713 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result503) + Option::Some(result713) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result502, - language: lifted504, + text: result712, + language: lifted714, }) } 24 => { - let result505 = mbt_ffi_ptr2bytes( + let result715 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted507 : String? = match + let lifted717 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result506 = mbt_ffi_ptr2str( + let result716 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result506) + Option::Some(result716) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result505, - mime_type: lifted507, + bytes: result715, + mime_type: lifted717, }) } 25 => { - let result508 = mbt_ffi_ptr2str( + let result718 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result508) + @types.SchemaValueNode::PathValue(result718) } 26 => { - let result509 = mbt_ffi_ptr2str( + let result719 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result509) + @types.SchemaValueNode::UrlValue(result719) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -25152,7 +35686,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result510 = mbt_ffi_ptr2str( + let result720 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -25160,17 +35694,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result510, + unit: result720, }) } 30 => { - let result511 = mbt_ffi_ptr2str( + let result721 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result511, + tag: result721, body: mbt_ffi_load32(iter_base + 16), }) } @@ -25187,18 +35721,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array513.push(lifted512) + array723.push(lifted722) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) Option::Some(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array477, - defs: array482, + type_nodes: array687, + defs: array692, root: mbt_ffi_load32(iter_base + 52), }, value: @types.SchemaValueTree::{ - value_nodes: array513, + value_nodes: array723, root: mbt_ffi_load32(iter_base + 64), }, }) @@ -25212,326 +35746,1136 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, start_index: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - response: lifted515, + response: lifted725, forced_commit: mbt_ffi_load8_u(iter_base + 68) != 0, }) } 3 => { - let lifted680 : @types.TypedSchemaValue? = match + let lifted960 : @types.TypedSchemaValue? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let array642 : Array[@types.SchemaTypeNode] = [] - for index643 = 0 - index643 < mbt_ffi_load32(iter_base + 40) - index643 = index643 + 1 { + let array922 : Array[@types.SchemaTypeNode] = [] + for index923 = 0 + index923 < mbt_ffi_load32(iter_base + 40) + index923 = index923 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index643 * 144 + index923 * 144 - let lifted628 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted908 = 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 + 2 => { + let lifted732 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted727 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted726 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted726) + } + _ => panic() + } + + let lifted729 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted728 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted728) + } + _ => panic() + } + + let lifted731 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result730 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result730) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted727, + max: lifted729, + unit: lifted731, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted732) + } + 3 => { + let lifted739 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted734 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted733 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted733) + } + _ => panic() + } + + let lifted736 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted735 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted735) + } + _ => panic() + } + + let lifted738 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result737 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result737) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted734, + max: lifted736, + unit: lifted738, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted739) + } + 4 => { + let lifted746 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted741 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted740 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted740) + } + _ => panic() + } + + let lifted743 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted742 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted742) + } + _ => panic() + } + + let lifted745 : 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), + ) + + Option::Some(result744) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted741, + max: lifted743, + unit: lifted745, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted746) + } + 5 => { + let lifted753 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted748 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted747 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted747) + } + _ => panic() + } + + let lifted750 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted749 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted749) + } + _ => panic() + } + + let lifted752 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result751 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result751) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted748, + max: lifted750, + unit: lifted752, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted753) + } + 6 => { + let lifted760 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted755 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted754 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted754) + } + _ => panic() + } + + let lifted757 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted756 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted756) + } + _ => panic() + } + + let lifted759 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result758 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result758) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted755, + max: lifted757, + unit: lifted759, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted760) + } + 7 => { + let lifted767 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted762 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted761 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted761) + } + _ => panic() + } + + let lifted764 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted763 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted763) + } + _ => panic() + } + + let lifted766 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result765 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result765) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted762, + max: lifted764, + unit: lifted766, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted767) + } + 8 => { + let lifted774 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted769 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted768 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted768) + } + _ => panic() + } + + let lifted771 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted770 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted770) + } + _ => panic() + } + + let lifted773 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result772 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result772) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted769, + max: lifted771, + unit: lifted773, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted774) + } + 9 => { + let lifted781 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted776 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted775 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted775) + } + _ => panic() + } + + let lifted778 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted777 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted777) + } + _ => panic() + } + + let lifted780 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result779 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result779) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted776, + max: lifted778, + unit: lifted780, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted781) + } + 10 => { + let lifted788 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted783 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted782 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted782) + } + _ => panic() + } + + let lifted785 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted784 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted784) + } + _ => panic() + } + + let lifted787 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result786 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result786) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted783, + max: lifted785, + unit: lifted787, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted788) + } + 11 => { + let lifted795 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted790 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted789 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted789) + } + _ => panic() + } + + let lifted792 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted791 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted791) + } + _ => panic() + } + + let lifted794 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result793 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result793) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted790, + max: lifted792, + unit: lifted794, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted795) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array530 : Array[@types.NamedFieldType] = [] - for index531 = 0 - index531 < mbt_ffi_load32(iter_base + 12) - index531 = index531 + 1 { + let array810 : Array[@types.NamedFieldType] = [] + for index811 = 0 + index811 < mbt_ffi_load32(iter_base + 12) + index811 = index811 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index531 * 68 + index811 * 68 - let result516 = mbt_ffi_ptr2str( + let result796 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted518 : String? = match + let lifted798 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result517 = mbt_ffi_ptr2str( + let result797 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result517) + Option::Some(result797) } _ => panic() } - let array520 : Array[String] = [] - for index521 = 0 - index521 < mbt_ffi_load32(iter_base + 28) - index521 = index521 + 1 { + let array800 : Array[String] = [] + for index801 = 0 + index801 < mbt_ffi_load32(iter_base + 28) + index801 = index801 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index521 * 8 + index801 * 8 - let result519 = mbt_ffi_ptr2str( + let result799 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array520.push(result519) + array800.push(result799) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array523 : Array[String] = [] - for index524 = 0 - index524 < mbt_ffi_load32(iter_base + 36) - index524 = index524 + 1 { + let array803 : Array[String] = [] + for index804 = 0 + index804 < mbt_ffi_load32(iter_base + 36) + index804 = index804 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index524 * 8 + index804 * 8 - let result522 = mbt_ffi_ptr2str( + 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 + 32)) - let lifted526 : String? = match + let lifted806 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result525 = mbt_ffi_ptr2str( + let result805 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result525) + Option::Some(result805) } _ => panic() } - let lifted529 : @types.Role? = match + let lifted809 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted528 = match + let lifted808 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result527 = mbt_ffi_ptr2str( + let result807 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result527) + @types.Role::Other(result807) } _ => panic() } - Option::Some(lifted528) + Option::Some(lifted808) } _ => panic() } - array530.push(@types.NamedFieldType::{ - name: result516, + array810.push(@types.NamedFieldType::{ + name: result796, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted518, - aliases: array520, - examples: array523, - deprecated: lifted526, - role: lifted529, + doc: lifted798, + aliases: array800, + examples: array803, + deprecated: lifted806, + role: lifted809, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array530) + @types.SchemaTypeBody::RecordType(array810) } 15 => { - let array547 : Array[@types.VariantCaseType] = [] - for index548 = 0 - index548 < mbt_ffi_load32(iter_base + 12) - index548 = index548 + 1 { + let array827 : Array[@types.VariantCaseType] = [] + for index828 = 0 + index828 < mbt_ffi_load32(iter_base + 12) + index828 = index828 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index548 * 72 + index828 * 72 - let result532 = mbt_ffi_ptr2str( + let result812 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted533 : Int? = match + let lifted813 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted535 : String? = match + let lifted815 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result534 = mbt_ffi_ptr2str( + let result814 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result534) + Option::Some(result814) } _ => panic() } - let array537 : Array[String] = [] - for index538 = 0 - index538 < mbt_ffi_load32(iter_base + 32) - index538 = index538 + 1 { + let array817 : Array[String] = [] + for index818 = 0 + index818 < mbt_ffi_load32(iter_base + 32) + index818 = index818 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index538 * 8 + index818 * 8 - let result536 = mbt_ffi_ptr2str( + let result816 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array537.push(result536) + array817.push(result816) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array540 : Array[String] = [] - for index541 = 0 - index541 < mbt_ffi_load32(iter_base + 40) - index541 = index541 + 1 { + let array820 : Array[String] = [] + for index821 = 0 + index821 < mbt_ffi_load32(iter_base + 40) + index821 = index821 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index541 * 8 + index821 * 8 - let result539 = mbt_ffi_ptr2str( + 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 + 36)) - let lifted543 : String? = match + let lifted823 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result542 = mbt_ffi_ptr2str( + let result822 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result542) + Option::Some(result822) } _ => panic() } - let lifted546 : @types.Role? = match + let lifted826 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted545 = match + let lifted825 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result544 = mbt_ffi_ptr2str( + let result824 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result544) + @types.Role::Other(result824) } _ => panic() } - Option::Some(lifted545) + Option::Some(lifted825) } _ => panic() } - array547.push(@types.VariantCaseType::{ - name: result532, - payload: lifted533, + array827.push(@types.VariantCaseType::{ + name: result812, + payload: lifted813, metadata: @types.MetadataEnvelope::{ - doc: lifted535, - aliases: array537, - examples: array540, - deprecated: lifted543, - role: lifted546, + doc: lifted815, + aliases: array817, + examples: array820, + deprecated: lifted823, + role: lifted826, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array547) + @types.SchemaTypeBody::VariantType(array827) } 16 => { - let array550 : Array[String] = [] - for index551 = 0 - index551 < mbt_ffi_load32(iter_base + 12) - index551 = index551 + 1 { + let array830 : Array[String] = [] + for index831 = 0 + index831 < mbt_ffi_load32(iter_base + 12) + index831 = index831 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index551 * 8 + index831 * 8 - let result549 = mbt_ffi_ptr2str( + let result829 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array550.push(result549) + array830.push(result829) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array550) + @types.SchemaTypeBody::EnumType(array830) } 17 => { - let array553 : Array[String] = [] - for index554 = 0 - index554 < mbt_ffi_load32(iter_base + 12) - index554 = index554 + 1 { + 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) + - index554 * 8 + index834 * 8 - let result552 = mbt_ffi_ptr2str( + 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::FlagsType(array553) + @types.SchemaTypeBody::FlagsType(array833) } 18 => { - let array555 : Array[Int] = [] - for index556 = 0 - index556 < mbt_ffi_load32(iter_base + 12) - index556 = index556 + 1 { + let array835 : Array[Int] = [] + for index836 = 0 + index836 < mbt_ffi_load32(iter_base + 12) + index836 = index836 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index556 * 4 + index836 * 4 - array555.push(mbt_ffi_load32(iter_base + 0)) + array835.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array555) + @types.SchemaTypeBody::TupleType(array835) } 19 => @types.SchemaTypeBody::ListType( @@ -25552,14 +36896,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted557 : Int? = match + let lifted837 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted558 : Int? = match + let lifted838 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -25567,37 +36911,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted557, - err: lifted558, + ok: lifted837, + err: lifted838, }) } 24 => { - let lifted562 : Array[String]? = match + let lifted842 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array560 : Array[String] = [] - for index561 = 0 - index561 < mbt_ffi_load32(iter_base + 16) - index561 = index561 + 1 { + let array840 : Array[String] = [] + for index841 = 0 + index841 < mbt_ffi_load32(iter_base + 16) + index841 = index841 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index561 * 8 + index841 * 8 - let result559 = mbt_ffi_ptr2str( + let result839 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array560.push(result559) + array840.push(result839) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array560) + Option::Some(array840) } _ => panic() } - let lifted563 : UInt? = match + let lifted843 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -25607,7 +36951,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted564 : UInt? = match + let lifted844 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -25617,54 +36961,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted566 : String? = match + let lifted846 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result565 = mbt_ffi_ptr2str( + let result845 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result565) + Option::Some(result845) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted562, - min_length: lifted563, - max_length: lifted564, - regex: lifted566, + languages: lifted842, + min_length: lifted843, + max_length: lifted844, + regex: lifted846, }) } 25 => { - let lifted570 : Array[String]? = match + let lifted850 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array568 : Array[String] = [] - for index569 = 0 - index569 < mbt_ffi_load32(iter_base + 16) - index569 = index569 + 1 { + let array848 : Array[String] = [] + for index849 = 0 + index849 < mbt_ffi_load32(iter_base + 16) + index849 = index849 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index569 * 8 + index849 * 8 - let result567 = mbt_ffi_ptr2str( + let result847 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array568.push(result567) + array848.push(result847) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array568) + Option::Some(array848) } _ => panic() } - let lifted571 : UInt? = match + let lifted851 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -25674,7 +37018,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted572 : UInt? = match + let lifted852 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -25685,58 +37029,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted570, - min_bytes: lifted571, - max_bytes: lifted572, + mime_types: lifted850, + min_bytes: lifted851, + max_bytes: lifted852, }) } 26 => { - let lifted576 : Array[String]? = match + let lifted856 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array574 : Array[String] = [] - for index575 = 0 - index575 < mbt_ffi_load32(iter_base + 20) - index575 = index575 + 1 { + let array854 : Array[String] = [] + for index855 = 0 + index855 < mbt_ffi_load32(iter_base + 20) + index855 = index855 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index575 * 8 + index855 * 8 - let result573 = mbt_ffi_ptr2str( + let result853 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array574.push(result573) + array854.push(result853) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array574) + Option::Some(array854) } _ => panic() } - let lifted580 : Array[String]? = match + let lifted860 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array578 : Array[String] = [] - for index579 = 0 - index579 < mbt_ffi_load32(iter_base + 32) - index579 = index579 + 1 { + let array858 : Array[String] = [] + for index859 = 0 + index859 < mbt_ffi_load32(iter_base + 32) + index859 = index859 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index579 * 8 + index859 * 8 - let result577 = mbt_ffi_ptr2str( + let result857 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array578.push(result577) + array858.push(result857) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array578) + Option::Some(array858) } _ => panic() } @@ -25748,95 +37092,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted576, - allowed_extensions: lifted580, + allowed_mime_types: lifted856, + allowed_extensions: lifted860, }) } 27 => { - let lifted584 : Array[String]? = match + let lifted864 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array582 : Array[String] = [] - for index583 = 0 - index583 < mbt_ffi_load32(iter_base + 16) - index583 = index583 + 1 { + let array862 : Array[String] = [] + for index863 = 0 + index863 < mbt_ffi_load32(iter_base + 16) + index863 = index863 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index583 * 8 + index863 * 8 - let result581 = mbt_ffi_ptr2str( + let result861 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array582.push(result581) + array862.push(result861) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array582) + Option::Some(array862) } _ => panic() } - let lifted588 : Array[String]? = match + let lifted868 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array586 : Array[String] = [] - for index587 = 0 - index587 < mbt_ffi_load32(iter_base + 28) - index587 = index587 + 1 { + let array866 : Array[String] = [] + for index867 = 0 + index867 < mbt_ffi_load32(iter_base + 28) + index867 = index867 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index587 * 8 + index867 * 8 - let result585 = mbt_ffi_ptr2str( + let result865 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array586.push(result585) + array866.push(result865) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array586) + Option::Some(array866) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted584, - allowed_hosts: lifted588, + allowed_schemes: lifted864, + allowed_hosts: lifted868, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result589 = mbt_ffi_ptr2str( + let result869 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array591 : Array[String] = [] - for index592 = 0 - index592 < mbt_ffi_load32(iter_base + 20) - index592 = index592 + 1 { + let array871 : Array[String] = [] + for index872 = 0 + index872 < mbt_ffi_load32(iter_base + 20) + index872 = index872 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index592 * 8 + index872 * 8 - let result590 = mbt_ffi_ptr2str( + let result870 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array591.push(result590) + array871.push(result870) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted594 : @types.QuantityValue? = match + let lifted874 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result593 = mbt_ffi_ptr2str( + let result873 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -25844,17 +37188,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result593, + unit: result873, }) } _ => panic() } - let lifted596 : @types.QuantityValue? = match + let lifted876 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result595 = mbt_ffi_ptr2str( + let result875 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -25862,404 +37206,404 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result595, + unit: result875, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result589, - allowed_suffixes: array591, - min: lifted594, - max: lifted596, + base_unit: result869, + allowed_suffixes: array871, + min: lifted874, + max: lifted876, }) } 31 => { - let array620 : Array[@types.UnionBranch] = [] - for index621 = 0 - index621 < mbt_ffi_load32(iter_base + 12) - index621 = index621 + 1 { + let array900 : Array[@types.UnionBranch] = [] + for index901 = 0 + index901 < mbt_ffi_load32(iter_base + 12) + index901 = index901 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index621 * 92 + index901 * 92 - let result597 = mbt_ffi_ptr2str( + let result877 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted606 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted886 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result598 = mbt_ffi_ptr2str( + let result878 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result598) + @types.DiscriminatorRule::Prefix(result878) } 1 => { - let result599 = mbt_ffi_ptr2str( + let result879 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result599) + @types.DiscriminatorRule::Suffix(result879) } 2 => { - let result600 = mbt_ffi_ptr2str( + let result880 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result600) + @types.DiscriminatorRule::Contains(result880) } 3 => { - let result601 = mbt_ffi_ptr2str( + let result881 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result601) + @types.DiscriminatorRule::Regex(result881) } 4 => { - let result602 = mbt_ffi_ptr2str( + let result882 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted604 : String? = match + let lifted884 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result603 = mbt_ffi_ptr2str( + let result883 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result603) + Option::Some(result883) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result602, - literal: lifted604, + field_name: result882, + literal: lifted884, }) } 5 => { - let result605 = mbt_ffi_ptr2str( + let result885 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result605) + @types.DiscriminatorRule::FieldAbsent(result885) } _ => panic() } - let lifted608 : String? = match + let lifted888 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result607 = mbt_ffi_ptr2str( + let result887 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result607) + Option::Some(result887) } _ => panic() } - let array610 : Array[String] = [] - for index611 = 0 - index611 < mbt_ffi_load32(iter_base + 52) - index611 = index611 + 1 { + let array890 : Array[String] = [] + for index891 = 0 + index891 < mbt_ffi_load32(iter_base + 52) + index891 = index891 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index611 * 8 + index891 * 8 - let result609 = mbt_ffi_ptr2str( + let result889 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array610.push(result609) + array890.push(result889) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array613 : Array[String] = [] - for index614 = 0 - index614 < mbt_ffi_load32(iter_base + 60) - index614 = index614 + 1 { + let array893 : Array[String] = [] + for index894 = 0 + index894 < mbt_ffi_load32(iter_base + 60) + index894 = index894 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index614 * 8 + index894 * 8 - let result612 = mbt_ffi_ptr2str( + 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 + 56)) - let lifted616 : String? = match + let lifted896 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result615 = mbt_ffi_ptr2str( + let result895 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result615) + Option::Some(result895) } _ => panic() } - let lifted619 : @types.Role? = match + let lifted899 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted618 = match + let lifted898 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result617 = mbt_ffi_ptr2str( + let result897 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result617) + @types.Role::Other(result897) } _ => panic() } - Option::Some(lifted618) + Option::Some(lifted898) } _ => panic() } - array620.push(@types.UnionBranch::{ - tag: result597, + array900.push(@types.UnionBranch::{ + tag: result877, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted606, + discriminator: lifted886, metadata: @types.MetadataEnvelope::{ - doc: lifted608, - aliases: array610, - examples: array613, - deprecated: lifted616, - role: lifted619, + doc: lifted888, + aliases: array890, + examples: array893, + deprecated: lifted896, + role: lifted899, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array620, + branches: array900, }) } 32 => { - let lifted623 : String? = match + let lifted903 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result622 = mbt_ffi_ptr2str( + let result902 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result622) + Option::Some(result902) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted623, + category: lifted903, }) } 33 => { - let lifted625 : String? = match + let lifted905 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result624 = mbt_ffi_ptr2str( + let result904 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result624) + Option::Some(result904) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted625, + resource_name: lifted905, }) } 34 => { - let lifted626 : Int? = match + let lifted906 : 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(lifted626) + @types.SchemaTypeBody::FutureType(lifted906) } 35 => { - let lifted627 : Int? = match + let lifted907 : 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(lifted627) + @types.SchemaTypeBody::StreamType(lifted907) } _ => panic() } - let lifted630 : String? = match + let lifted910 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result629 = mbt_ffi_ptr2str( + let result909 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result629) + Option::Some(result909) } _ => panic() } - let array632 : Array[String] = [] - for index633 = 0 - index633 < mbt_ffi_load32(iter_base + 104) - index633 = index633 + 1 { + let array912 : Array[String] = [] + for index913 = 0 + index913 < mbt_ffi_load32(iter_base + 104) + index913 = index913 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index633 * 8 + index913 * 8 - let result631 = mbt_ffi_ptr2str( + let result911 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array632.push(result631) + array912.push(result911) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array635 : Array[String] = [] - for index636 = 0 - index636 < mbt_ffi_load32(iter_base + 112) - index636 = index636 + 1 { + let array915 : Array[String] = [] + for index916 = 0 + index916 < mbt_ffi_load32(iter_base + 112) + index916 = index916 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index636 * 8 + index916 * 8 - let result634 = mbt_ffi_ptr2str( + 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 + 108)) - let lifted638 : String? = match + let lifted918 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result637 = mbt_ffi_ptr2str( + let result917 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result637) + Option::Some(result917) } _ => panic() } - let lifted641 : @types.Role? = match + let lifted921 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted640 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted920 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result639 = mbt_ffi_ptr2str( + let result919 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result639) + @types.Role::Other(result919) } _ => panic() } - Option::Some(lifted640) + Option::Some(lifted920) } _ => panic() } - array642.push(@types.SchemaTypeNode::{ - body: lifted628, + array922.push(@types.SchemaTypeNode::{ + body: lifted908, metadata: @types.MetadataEnvelope::{ - doc: lifted630, - aliases: array632, - examples: array635, - deprecated: lifted638, - role: lifted641, + doc: lifted910, + aliases: array912, + examples: array915, + deprecated: lifted918, + role: lifted921, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array647 : Array[@types.SchemaTypeDef] = [] - for index648 = 0 - index648 < mbt_ffi_load32(iter_base + 48) - index648 = index648 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 44) + index648 * 24 + let array927 : Array[@types.SchemaTypeDef] = [] + for index928 = 0 + index928 < mbt_ffi_load32(iter_base + 48) + index928 = index928 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 44) + index928 * 24 - let result644 = mbt_ffi_ptr2str( + let result924 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted646 : String? = match + let lifted926 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result645 = mbt_ffi_ptr2str( + let result925 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result645) + Option::Some(result925) } _ => panic() } - array647.push(@types.SchemaTypeDef::{ - id: result644, - name: lifted646, + array927.push(@types.SchemaTypeDef::{ + id: result924, + name: lifted926, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) - let array678 : Array[@types.SchemaValueNode] = [] - for index679 = 0 - index679 < mbt_ffi_load32(iter_base + 60) - index679 = index679 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + index679 * 32 + let array958 : Array[@types.SchemaValueNode] = [] + for index959 = 0 + index959 < mbt_ffi_load32(iter_base + 60) + index959 = index959 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + index959 * 32 - let lifted677 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted957 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -26311,29 +37655,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result649 = mbt_ffi_ptr2str( + let result929 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result649) + @types.SchemaValueNode::StringValue(result929) } 13 => { - let array650 : Array[Int] = [] - for index651 = 0 - index651 < mbt_ffi_load32(iter_base + 12) - index651 = index651 + 1 { + let array930 : Array[Int] = [] + for index931 = 0 + index931 < mbt_ffi_load32(iter_base + 12) + index931 = index931 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index651 * 4 + index931 * 4 - array650.push(mbt_ffi_load32(iter_base + 0)) + array930.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array650) + @types.SchemaValueNode::RecordValue(array930) } 14 => { - let lifted652 : Int? = match + let lifted932 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -26342,7 +37686,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted652, + payload: lifted932, }) } 15 => @@ -26350,180 +37694,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array653 : Array[Bool] = [] - for index654 = 0 - index654 < mbt_ffi_load32(iter_base + 12) - index654 = index654 + 1 { + let array933 : Array[Bool] = [] + for index934 = 0 + index934 < mbt_ffi_load32(iter_base + 12) + index934 = index934 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index654 * 1 + index934 * 1 - array653.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array933.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array653) + @types.SchemaValueNode::FlagsValue(array933) } 17 => { - let array655 : Array[Int] = [] - for index656 = 0 - index656 < mbt_ffi_load32(iter_base + 12) - index656 = index656 + 1 { + let array935 : Array[Int] = [] + for index936 = 0 + index936 < mbt_ffi_load32(iter_base + 12) + index936 = index936 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index656 * 4 + index936 * 4 - array655.push(mbt_ffi_load32(iter_base + 0)) + array935.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array655) + @types.SchemaValueNode::TupleValue(array935) } 18 => { - let array657 : Array[Int] = [] - for index658 = 0 - index658 < mbt_ffi_load32(iter_base + 12) - index658 = index658 + 1 { + let array937 : Array[Int] = [] + for index938 = 0 + index938 < mbt_ffi_load32(iter_base + 12) + index938 = index938 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index658 * 4 + index938 * 4 - array657.push(mbt_ffi_load32(iter_base + 0)) + array937.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array657) + @types.SchemaValueNode::ListValue(array937) } 19 => { - let array659 : Array[Int] = [] - for index660 = 0 - index660 < mbt_ffi_load32(iter_base + 12) - index660 = index660 + 1 { + let array939 : Array[Int] = [] + for index940 = 0 + index940 < mbt_ffi_load32(iter_base + 12) + index940 = index940 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index660 * 4 + index940 * 4 - array659.push(mbt_ffi_load32(iter_base + 0)) + array939.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array659) + @types.SchemaValueNode::FixedListValue(array939) } 20 => { - let array661 : Array[@types.MapEntry] = [] - for index662 = 0 - index662 < mbt_ffi_load32(iter_base + 12) - index662 = index662 + 1 { + let array941 : Array[@types.MapEntry] = [] + for index942 = 0 + index942 < mbt_ffi_load32(iter_base + 12) + index942 = index942 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index662 * 8 + index942 * 8 - array661.push(@types.MapEntry::{ + array941.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(array661) + @types.SchemaValueNode::MapValue(array941) } 21 => { - let lifted663 : Int? = match + let lifted943 : 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(lifted663) + @types.SchemaValueNode::OptionValue(lifted943) } 22 => { - let lifted666 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted946 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted664 : Int? = match + let lifted944 : 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(lifted664) + @types.ResultValuePayload::OkValue(lifted944) } 1 => { - let lifted665 : Int? = match + let lifted945 : 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(lifted665) + @types.ResultValuePayload::ErrValue(lifted945) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted666) + @types.SchemaValueNode::ResultValue(lifted946) } 23 => { - let result667 = mbt_ffi_ptr2str( + let result947 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted669 : String? = match + let lifted949 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result668 = mbt_ffi_ptr2str( + let result948 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result668) + Option::Some(result948) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result667, - language: lifted669, + text: result947, + language: lifted949, }) } 24 => { - let result670 = mbt_ffi_ptr2bytes( + let result950 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted672 : String? = match + let lifted952 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result671 = mbt_ffi_ptr2str( + 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::BinaryValue(@types.BinaryValuePayload::{ - bytes: result670, - mime_type: lifted672, + bytes: result950, + mime_type: lifted952, }) } 25 => { - let result673 = mbt_ffi_ptr2str( + let result953 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result673) + @types.SchemaValueNode::PathValue(result953) } 26 => { - let result674 = mbt_ffi_ptr2str( + let result954 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result674) + @types.SchemaValueNode::UrlValue(result954) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -26535,7 +37879,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result675 = mbt_ffi_ptr2str( + let result955 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -26543,17 +37887,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result675, + unit: result955, }) } 30 => { - let result676 = mbt_ffi_ptr2str( + let result956 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result676, + tag: result956, body: mbt_ffi_load32(iter_base + 16), }) } @@ -26570,18 +37914,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array678.push(lifted677) + array958.push(lifted957) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) Option::Some(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array642, - defs: array647, + type_nodes: array922, + defs: array927, root: mbt_ffi_load32(iter_base + 52), }, value: @types.SchemaValueTree::{ - value_nodes: array678, + value_nodes: array958, root: mbt_ffi_load32(iter_base + 64), }, }) @@ -26595,328 +37939,1138 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, start_index: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - partial: lifted680, + partial: lifted960, }) } 4 => { - let lifted1053 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted1473 = match mbt_ffi_load8_u(iter_base + 24) { 0 => { - let result681 = mbt_ffi_ptr2str( + let result961 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array808 : Array[@types.SchemaTypeNode] = [] - for index809 = 0 - index809 < mbt_ffi_load32(iter_base + 44) - index809 = index809 + 1 { + let array1158 : Array[@types.SchemaTypeNode] = [] + for index1159 = 0 + index1159 < mbt_ffi_load32(iter_base + 44) + index1159 = index1159 + 1 { let iter_base = mbt_ffi_load32(iter_base + 40) + - index809 * 144 + index1159 * 144 - let lifted794 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1144 = 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 + 2 => { + let lifted968 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted963 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted962 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted962) + } + _ => panic() + } + + let lifted965 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted964 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted964) + } + _ => panic() + } + + let lifted967 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result966 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result966) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted963, + max: lifted965, + unit: lifted967, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted968) + } + 3 => { + let lifted975 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted970 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted969 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted969) + } + _ => panic() + } + + let lifted972 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted971 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted971) + } + _ => panic() + } + + let lifted974 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result973 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result973) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted970, + max: lifted972, + unit: lifted974, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted975) + } + 4 => { + let lifted982 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted977 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted976 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted976) + } + _ => panic() + } + + let lifted979 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted978 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted978) + } + _ => panic() + } + + let lifted981 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result980 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result980) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted977, + max: lifted979, + unit: lifted981, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted982) + } + 5 => { + let lifted989 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted984 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted983 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted983) + } + _ => panic() + } + + let lifted986 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted985 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted985) + } + _ => panic() + } + + let lifted988 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result987 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result987) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted984, + max: lifted986, + unit: lifted988, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted989) + } + 6 => { + let lifted996 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted991 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted990 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted990) + } + _ => panic() + } + + let lifted993 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted992 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted992) + } + _ => panic() + } + + let lifted995 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result994 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result994) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted991, + max: lifted993, + unit: lifted995, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted996) + } + 7 => { + let lifted1003 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted998 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted997 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted997) + } + _ => panic() + } + + let lifted1000 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted999 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted999) + } + _ => panic() + } + + let lifted1002 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1001 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1001) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted998, + max: lifted1000, + unit: lifted1002, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1003) + } + 8 => { + let lifted1010 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1005 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1004 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1004) + } + _ => panic() + } + + let lifted1007 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1006 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1006) + } + _ => panic() + } + + let lifted1009 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1008 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1008) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1005, + max: lifted1007, + unit: lifted1009, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1010) + } + 9 => { + let lifted1017 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1012 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1011 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1011) + } + _ => panic() + } + + let lifted1014 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1013 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1013) + } + _ => panic() + } + + let lifted1016 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1015 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1015) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1012, + max: lifted1014, + unit: lifted1016, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1017) + } + 10 => { + let lifted1024 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1019 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1018 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1018) + } + _ => panic() + } + + let lifted1021 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1020 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1020) + } + _ => panic() + } + + let lifted1023 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1022 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1022) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1019, + max: lifted1021, + unit: lifted1023, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1024) + } + 11 => { + let lifted1031 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1026 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1025 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1025) + } + _ => panic() + } + + let lifted1028 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1027 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1027) + } + _ => panic() + } + + let lifted1030 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1029 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1029) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1026, + max: lifted1028, + unit: lifted1030, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1031) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array696 : Array[@types.NamedFieldType] = [] - for index697 = 0 - index697 < mbt_ffi_load32(iter_base + 12) - index697 = index697 + 1 { + let array1046 : Array[@types.NamedFieldType] = [] + for index1047 = 0 + index1047 < mbt_ffi_load32(iter_base + 12) + index1047 = index1047 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index697 * 68 + index1047 * 68 - let result682 = mbt_ffi_ptr2str( + let result1032 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted684 : String? = match + let lifted1034 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result683 = mbt_ffi_ptr2str( + let result1033 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result683) + Option::Some(result1033) } _ => panic() } - let array686 : Array[String] = [] - for index687 = 0 - index687 < mbt_ffi_load32(iter_base + 28) - index687 = index687 + 1 { + let array1036 : Array[String] = [] + for index1037 = 0 + index1037 < mbt_ffi_load32(iter_base + 28) + index1037 = index1037 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index687 * 8 + index1037 * 8 - let result685 = mbt_ffi_ptr2str( + let result1035 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array686.push(result685) + array1036.push(result1035) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array689 : Array[String] = [] - for index690 = 0 - index690 < mbt_ffi_load32(iter_base + 36) - index690 = index690 + 1 { + let array1039 : Array[String] = [] + for index1040 = 0 + index1040 < mbt_ffi_load32(iter_base + 36) + index1040 = index1040 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index690 * 8 + index1040 * 8 - let result688 = mbt_ffi_ptr2str( + let result1038 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array689.push(result688) + array1039.push(result1038) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted692 : String? = match + let lifted1042 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result691 = mbt_ffi_ptr2str( + let result1041 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result691) + Option::Some(result1041) } _ => panic() } - let lifted695 : @types.Role? = match + let lifted1045 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted694 = match + let lifted1044 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result693 = mbt_ffi_ptr2str( + let result1043 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result693) + @types.Role::Other(result1043) } _ => panic() } - Option::Some(lifted694) + Option::Some(lifted1044) } _ => panic() } - array696.push(@types.NamedFieldType::{ - name: result682, + array1046.push(@types.NamedFieldType::{ + name: result1032, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted684, - aliases: array686, - examples: array689, - deprecated: lifted692, - role: lifted695, + doc: lifted1034, + aliases: array1036, + examples: array1039, + deprecated: lifted1042, + role: lifted1045, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array696) + @types.SchemaTypeBody::RecordType(array1046) } 15 => { - let array713 : Array[@types.VariantCaseType] = [] - for index714 = 0 - index714 < mbt_ffi_load32(iter_base + 12) - index714 = index714 + 1 { + let array1063 : Array[@types.VariantCaseType] = [] + for index1064 = 0 + index1064 < mbt_ffi_load32(iter_base + 12) + index1064 = index1064 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index714 * 72 + index1064 * 72 - let result698 = mbt_ffi_ptr2str( + let result1048 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted699 : Int? = match + let lifted1049 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted701 : String? = match + let lifted1051 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result700 = mbt_ffi_ptr2str( + let result1050 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result700) + Option::Some(result1050) } _ => panic() } - let array703 : Array[String] = [] - for index704 = 0 - index704 < mbt_ffi_load32(iter_base + 32) - index704 = index704 + 1 { + let array1053 : Array[String] = [] + for index1054 = 0 + index1054 < mbt_ffi_load32(iter_base + 32) + index1054 = index1054 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index704 * 8 + index1054 * 8 - let result702 = mbt_ffi_ptr2str( + let result1052 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array703.push(result702) + array1053.push(result1052) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array706 : Array[String] = [] - for index707 = 0 - index707 < mbt_ffi_load32(iter_base + 40) - index707 = index707 + 1 { + let array1056 : Array[String] = [] + for index1057 = 0 + index1057 < mbt_ffi_load32(iter_base + 40) + index1057 = index1057 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index707 * 8 + index1057 * 8 - let result705 = mbt_ffi_ptr2str( + let result1055 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array706.push(result705) + array1056.push(result1055) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted709 : String? = match + let lifted1059 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result708 = mbt_ffi_ptr2str( + let result1058 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result708) + Option::Some(result1058) } _ => panic() } - let lifted712 : @types.Role? = match + let lifted1062 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted711 = match + let lifted1061 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result710 = mbt_ffi_ptr2str( + let result1060 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result710) + @types.Role::Other(result1060) } _ => panic() } - Option::Some(lifted711) + Option::Some(lifted1061) } _ => panic() } - array713.push(@types.VariantCaseType::{ - name: result698, - payload: lifted699, + array1063.push(@types.VariantCaseType::{ + name: result1048, + payload: lifted1049, metadata: @types.MetadataEnvelope::{ - doc: lifted701, - aliases: array703, - examples: array706, - deprecated: lifted709, - role: lifted712, + doc: lifted1051, + aliases: array1053, + examples: array1056, + deprecated: lifted1059, + role: lifted1062, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array713) + @types.SchemaTypeBody::VariantType(array1063) } 16 => { - let array716 : Array[String] = [] - for index717 = 0 - index717 < mbt_ffi_load32(iter_base + 12) - index717 = index717 + 1 { + let array1066 : Array[String] = [] + for index1067 = 0 + index1067 < mbt_ffi_load32(iter_base + 12) + index1067 = index1067 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index717 * 8 + index1067 * 8 - let result715 = mbt_ffi_ptr2str( + let result1065 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array716.push(result715) + array1066.push(result1065) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array716) + @types.SchemaTypeBody::EnumType(array1066) } 17 => { - let array719 : Array[String] = [] - for index720 = 0 - index720 < mbt_ffi_load32(iter_base + 12) - index720 = index720 + 1 { + let array1069 : Array[String] = [] + for index1070 = 0 + index1070 < mbt_ffi_load32(iter_base + 12) + index1070 = index1070 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index720 * 8 + index1070 * 8 - let result718 = mbt_ffi_ptr2str( + let result1068 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array719.push(result718) + array1069.push(result1068) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array719) + @types.SchemaTypeBody::FlagsType(array1069) } 18 => { - let array721 : Array[Int] = [] - for index722 = 0 - index722 < mbt_ffi_load32(iter_base + 12) - index722 = index722 + 1 { + let array1071 : Array[Int] = [] + for index1072 = 0 + index1072 < mbt_ffi_load32(iter_base + 12) + index1072 = index1072 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index722 * 4 + index1072 * 4 - array721.push(mbt_ffi_load32(iter_base + 0)) + array1071.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array721) + @types.SchemaTypeBody::TupleType(array1071) } 19 => @types.SchemaTypeBody::ListType( @@ -26937,14 +39091,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted723 : Int? = match + let lifted1073 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted724 : Int? = match + let lifted1074 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -26952,37 +39106,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted723, - err: lifted724, + ok: lifted1073, + err: lifted1074, }) } 24 => { - let lifted728 : Array[String]? = match + let lifted1078 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array726 : Array[String] = [] - for index727 = 0 - index727 < mbt_ffi_load32(iter_base + 16) - index727 = index727 + 1 { + 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) + - index727 * 8 + index1077 * 8 - let result725 = mbt_ffi_ptr2str( + let result1075 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array726.push(result725) + array1076.push(result1075) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array726) + Option::Some(array1076) } _ => panic() } - let lifted729 : UInt? = match + let lifted1079 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -26992,7 +39146,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted730 : UInt? = match + let lifted1080 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -27002,54 +39156,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted732 : String? = match + let lifted1082 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result731 = mbt_ffi_ptr2str( + let result1081 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result731) + Option::Some(result1081) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted728, - min_length: lifted729, - max_length: lifted730, - regex: lifted732, + languages: lifted1078, + min_length: lifted1079, + max_length: lifted1080, + regex: lifted1082, }) } 25 => { - let lifted736 : Array[String]? = match + let lifted1086 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array734 : Array[String] = [] - for index735 = 0 - index735 < mbt_ffi_load32(iter_base + 16) - index735 = index735 + 1 { + let array1084 : Array[String] = [] + for index1085 = 0 + index1085 < mbt_ffi_load32(iter_base + 16) + index1085 = index1085 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index735 * 8 + index1085 * 8 - let result733 = mbt_ffi_ptr2str( + let result1083 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array734.push(result733) + array1084.push(result1083) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array734) + Option::Some(array1084) } _ => panic() } - let lifted737 : UInt? = match + let lifted1087 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -27059,7 +39213,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted738 : UInt? = match + let lifted1088 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -27070,58 +39224,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted736, - min_bytes: lifted737, - max_bytes: lifted738, + mime_types: lifted1086, + min_bytes: lifted1087, + max_bytes: lifted1088, }) } 26 => { - let lifted742 : Array[String]? = match + let lifted1092 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array740 : Array[String] = [] - for index741 = 0 - index741 < mbt_ffi_load32(iter_base + 20) - index741 = index741 + 1 { + let array1090 : Array[String] = [] + for index1091 = 0 + index1091 < mbt_ffi_load32(iter_base + 20) + index1091 = index1091 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index741 * 8 + index1091 * 8 - let result739 = mbt_ffi_ptr2str( + let result1089 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array740.push(result739) + array1090.push(result1089) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array740) + Option::Some(array1090) } _ => panic() } - let lifted746 : Array[String]? = match + let lifted1096 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array744 : Array[String] = [] - for index745 = 0 - index745 < mbt_ffi_load32(iter_base + 32) - index745 = index745 + 1 { + let array1094 : Array[String] = [] + for index1095 = 0 + index1095 < mbt_ffi_load32(iter_base + 32) + index1095 = index1095 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index745 * 8 + index1095 * 8 - let result743 = mbt_ffi_ptr2str( + 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 + 28)) - Option::Some(array744) + Option::Some(array1094) } _ => panic() } @@ -27133,95 +39287,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted742, - allowed_extensions: lifted746, + allowed_mime_types: lifted1092, + allowed_extensions: lifted1096, }) } 27 => { - let lifted750 : Array[String]? = match + let lifted1100 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array748 : Array[String] = [] - for index749 = 0 - index749 < mbt_ffi_load32(iter_base + 16) - index749 = index749 + 1 { + let array1098 : Array[String] = [] + for index1099 = 0 + index1099 < mbt_ffi_load32(iter_base + 16) + index1099 = index1099 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index749 * 8 + index1099 * 8 - let result747 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array748) + Option::Some(array1098) } _ => panic() } - let lifted754 : Array[String]? = match + let lifted1104 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array752 : Array[String] = [] - for index753 = 0 - index753 < mbt_ffi_load32(iter_base + 28) - index753 = index753 + 1 { + let array1102 : Array[String] = [] + for index1103 = 0 + index1103 < mbt_ffi_load32(iter_base + 28) + index1103 = index1103 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index753 * 8 + index1103 * 8 - let result751 = mbt_ffi_ptr2str( + 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 + 24)) - Option::Some(array752) + Option::Some(array1102) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted750, - allowed_hosts: lifted754, + allowed_schemes: lifted1100, + allowed_hosts: lifted1104, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result755 = mbt_ffi_ptr2str( + let result1105 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array757 : Array[String] = [] - for index758 = 0 - index758 < mbt_ffi_load32(iter_base + 20) - index758 = index758 + 1 { + let array1107 : Array[String] = [] + for index1108 = 0 + index1108 < mbt_ffi_load32(iter_base + 20) + index1108 = index1108 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index758 * 8 + index1108 * 8 - let result756 = mbt_ffi_ptr2str( + let result1106 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array757.push(result756) + array1107.push(result1106) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted760 : @types.QuantityValue? = match + let lifted1110 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result759 = mbt_ffi_ptr2str( + let result1109 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -27229,17 +39383,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result759, + unit: result1109, }) } _ => panic() } - let lifted762 : @types.QuantityValue? = match + let lifted1112 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result761 = mbt_ffi_ptr2str( + let result1111 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -27247,404 +39401,406 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result761, + unit: result1111, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result755, - allowed_suffixes: array757, - min: lifted760, - max: lifted762, + base_unit: result1105, + allowed_suffixes: array1107, + min: lifted1110, + max: lifted1112, }) } 31 => { - let array786 : Array[@types.UnionBranch] = [] - for index787 = 0 - index787 < mbt_ffi_load32(iter_base + 12) - index787 = index787 + 1 { + let array1136 : Array[@types.UnionBranch] = [] + for index1137 = 0 + index1137 < mbt_ffi_load32(iter_base + 12) + index1137 = index1137 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index787 * 92 + index1137 * 92 - let result763 = mbt_ffi_ptr2str( + let result1113 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted772 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1122 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result764 = mbt_ffi_ptr2str( + let result1114 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result764) + @types.DiscriminatorRule::Prefix(result1114) } 1 => { - let result765 = mbt_ffi_ptr2str( + let result1115 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result765) + @types.DiscriminatorRule::Suffix(result1115) } 2 => { - let result766 = mbt_ffi_ptr2str( + let result1116 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result766) + @types.DiscriminatorRule::Contains(result1116) } 3 => { - let result767 = mbt_ffi_ptr2str( + let result1117 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result767) + @types.DiscriminatorRule::Regex(result1117) } 4 => { - let result768 = mbt_ffi_ptr2str( + let result1118 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted770 : String? = match + let lifted1120 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result769 = mbt_ffi_ptr2str( + let result1119 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result769) + Option::Some(result1119) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result768, - literal: lifted770, + field_name: result1118, + literal: lifted1120, }) } 5 => { - let result771 = mbt_ffi_ptr2str( + let result1121 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result771) + @types.DiscriminatorRule::FieldAbsent(result1121) } _ => panic() } - let lifted774 : String? = match + let lifted1124 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result773 = mbt_ffi_ptr2str( + let result1123 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result773) + Option::Some(result1123) } _ => panic() } - let array776 : Array[String] = [] - for index777 = 0 - index777 < mbt_ffi_load32(iter_base + 52) - index777 = index777 + 1 { + let array1126 : Array[String] = [] + for index1127 = 0 + index1127 < mbt_ffi_load32(iter_base + 52) + index1127 = index1127 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index777 * 8 + index1127 * 8 - let result775 = mbt_ffi_ptr2str( + let result1125 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array776.push(result775) + array1126.push(result1125) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array779 : Array[String] = [] - for index780 = 0 - index780 < mbt_ffi_load32(iter_base + 60) - index780 = index780 + 1 { + let array1129 : Array[String] = [] + for index1130 = 0 + index1130 < mbt_ffi_load32(iter_base + 60) + index1130 = index1130 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index780 * 8 + index1130 * 8 - let result778 = mbt_ffi_ptr2str( + let result1128 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array779.push(result778) + array1129.push(result1128) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted782 : String? = match + let lifted1132 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result781 = mbt_ffi_ptr2str( + let result1131 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result781) + Option::Some(result1131) } _ => panic() } - let lifted785 : @types.Role? = match + let lifted1135 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted784 = match + let lifted1134 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result783 = mbt_ffi_ptr2str( + let result1133 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result783) + @types.Role::Other(result1133) } _ => panic() } - Option::Some(lifted784) + Option::Some(lifted1134) } _ => panic() } - array786.push(@types.UnionBranch::{ - tag: result763, + array1136.push(@types.UnionBranch::{ + tag: result1113, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted772, + discriminator: lifted1122, metadata: @types.MetadataEnvelope::{ - doc: lifted774, - aliases: array776, - examples: array779, - deprecated: lifted782, - role: lifted785, + doc: lifted1124, + aliases: array1126, + examples: array1129, + deprecated: lifted1132, + role: lifted1135, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array786, + branches: array1136, }) } 32 => { - let lifted789 : String? = match + let lifted1139 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result788 = mbt_ffi_ptr2str( + let result1138 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result788) + Option::Some(result1138) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted789, + category: lifted1139, }) } 33 => { - let lifted791 : String? = match + let lifted1141 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result790 = mbt_ffi_ptr2str( + let result1140 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result790) + Option::Some(result1140) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted791, + resource_name: lifted1141, }) } 34 => { - let lifted792 : Int? = match + let lifted1142 : 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(lifted792) + @types.SchemaTypeBody::FutureType(lifted1142) } 35 => { - let lifted793 : Int? = match + let lifted1143 : 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(lifted793) + @types.SchemaTypeBody::StreamType(lifted1143) } _ => panic() } - let lifted796 : String? = match + let lifted1146 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result795 = mbt_ffi_ptr2str( + let result1145 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result795) + Option::Some(result1145) } _ => panic() } - let array798 : Array[String] = [] - for index799 = 0 - index799 < mbt_ffi_load32(iter_base + 104) - index799 = index799 + 1 { + let array1148 : Array[String] = [] + for index1149 = 0 + index1149 < mbt_ffi_load32(iter_base + 104) + index1149 = index1149 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index799 * 8 + index1149 * 8 - let result797 = mbt_ffi_ptr2str( + let result1147 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array798.push(result797) + array1148.push(result1147) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array801 : Array[String] = [] - for index802 = 0 - index802 < mbt_ffi_load32(iter_base + 112) - index802 = index802 + 1 { + let array1151 : Array[String] = [] + for index1152 = 0 + index1152 < mbt_ffi_load32(iter_base + 112) + index1152 = index1152 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index802 * 8 + index1152 * 8 - let result800 = mbt_ffi_ptr2str( + let result1150 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array801.push(result800) + array1151.push(result1150) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted804 : String? = match + let lifted1154 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result803 = mbt_ffi_ptr2str( + let result1153 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result803) + Option::Some(result1153) } _ => panic() } - let lifted807 : @types.Role? = match + let lifted1157 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted806 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1156 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result805 = mbt_ffi_ptr2str( + let result1155 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result805) + @types.Role::Other(result1155) } _ => panic() } - Option::Some(lifted806) + Option::Some(lifted1156) } _ => panic() } - array808.push(@types.SchemaTypeNode::{ - body: lifted794, + array1158.push(@types.SchemaTypeNode::{ + body: lifted1144, metadata: @types.MetadataEnvelope::{ - doc: lifted796, - aliases: array798, - examples: array801, - deprecated: lifted804, - role: lifted807, + doc: lifted1146, + aliases: array1148, + examples: array1151, + deprecated: lifted1154, + role: lifted1157, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let array813 : Array[@types.SchemaTypeDef] = [] - for index814 = 0 - index814 < mbt_ffi_load32(iter_base + 52) - index814 = index814 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 48) + index814 * 24 + let array1163 : Array[@types.SchemaTypeDef] = [] + for index1164 = 0 + index1164 < mbt_ffi_load32(iter_base + 52) + index1164 = index1164 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 48) + + index1164 * 24 - let result810 = mbt_ffi_ptr2str( + let result1160 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted812 : String? = match + let lifted1162 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result811 = mbt_ffi_ptr2str( + let result1161 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result811) + Option::Some(result1161) } _ => panic() } - array813.push(@types.SchemaTypeDef::{ - id: result810, - name: lifted812, + array1163.push(@types.SchemaTypeDef::{ + id: result1160, + name: lifted1162, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array844 : Array[@types.SchemaValueNode] = [] - for index845 = 0 - index845 < mbt_ffi_load32(iter_base + 64) - index845 = index845 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 60) + index845 * 32 + let array1194 : Array[@types.SchemaValueNode] = [] + for index1195 = 0 + index1195 < mbt_ffi_load32(iter_base + 64) + index1195 = index1195 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 60) + + index1195 * 32 - let lifted843 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1193 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -27696,29 +39852,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result815 = mbt_ffi_ptr2str( + let result1165 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result815) + @types.SchemaValueNode::StringValue(result1165) } 13 => { - let array816 : Array[Int] = [] - for index817 = 0 - index817 < mbt_ffi_load32(iter_base + 12) - index817 = index817 + 1 { + let array1166 : Array[Int] = [] + for index1167 = 0 + index1167 < mbt_ffi_load32(iter_base + 12) + index1167 = index1167 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index817 * 4 + index1167 * 4 - array816.push(mbt_ffi_load32(iter_base + 0)) + array1166.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array816) + @types.SchemaValueNode::RecordValue(array1166) } 14 => { - let lifted818 : Int? = match + let lifted1168 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -27727,7 +39883,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted818, + payload: lifted1168, }) } 15 => @@ -27735,180 +39891,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array819 : Array[Bool] = [] - for index820 = 0 - index820 < mbt_ffi_load32(iter_base + 12) - index820 = index820 + 1 { + let array1169 : Array[Bool] = [] + for index1170 = 0 + index1170 < mbt_ffi_load32(iter_base + 12) + index1170 = index1170 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index820 * 1 + index1170 * 1 - array819.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1169.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array819) + @types.SchemaValueNode::FlagsValue(array1169) } 17 => { - let array821 : Array[Int] = [] - for index822 = 0 - index822 < mbt_ffi_load32(iter_base + 12) - index822 = index822 + 1 { + let array1171 : Array[Int] = [] + for index1172 = 0 + index1172 < mbt_ffi_load32(iter_base + 12) + index1172 = index1172 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index822 * 4 + index1172 * 4 - array821.push(mbt_ffi_load32(iter_base + 0)) + array1171.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array821) + @types.SchemaValueNode::TupleValue(array1171) } 18 => { - let array823 : Array[Int] = [] - for index824 = 0 - index824 < mbt_ffi_load32(iter_base + 12) - index824 = index824 + 1 { + let array1173 : Array[Int] = [] + for index1174 = 0 + index1174 < mbt_ffi_load32(iter_base + 12) + index1174 = index1174 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index824 * 4 + index1174 * 4 - array823.push(mbt_ffi_load32(iter_base + 0)) + array1173.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array823) + @types.SchemaValueNode::ListValue(array1173) } 19 => { - let array825 : Array[Int] = [] - for index826 = 0 - index826 < mbt_ffi_load32(iter_base + 12) - index826 = index826 + 1 { + 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) + - index826 * 4 + 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::FixedListValue(array825) + @types.SchemaValueNode::FixedListValue(array1175) } 20 => { - let array827 : Array[@types.MapEntry] = [] - for index828 = 0 - index828 < mbt_ffi_load32(iter_base + 12) - index828 = index828 + 1 { + let array1177 : Array[@types.MapEntry] = [] + for index1178 = 0 + index1178 < mbt_ffi_load32(iter_base + 12) + index1178 = index1178 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index828 * 8 + index1178 * 8 - array827.push(@types.MapEntry::{ + array1177.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(array827) + @types.SchemaValueNode::MapValue(array1177) } 21 => { - let lifted829 : Int? = match + let lifted1179 : 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(lifted829) + @types.SchemaValueNode::OptionValue(lifted1179) } 22 => { - let lifted832 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1182 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted830 : Int? = match + let lifted1180 : 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(lifted830) + @types.ResultValuePayload::OkValue(lifted1180) } 1 => { - let lifted831 : Int? = match + let lifted1181 : 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(lifted831) + @types.ResultValuePayload::ErrValue(lifted1181) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted832) + @types.SchemaValueNode::ResultValue(lifted1182) } 23 => { - let result833 = mbt_ffi_ptr2str( + let result1183 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted835 : String? = match + let lifted1185 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result834 = mbt_ffi_ptr2str( + let result1184 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result834) + Option::Some(result1184) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result833, - language: lifted835, + text: result1183, + language: lifted1185, }) } 24 => { - let result836 = mbt_ffi_ptr2bytes( + let result1186 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted838 : String? = match + let lifted1188 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result837 = mbt_ffi_ptr2str( + let result1187 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result837) + Option::Some(result1187) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result836, - mime_type: lifted838, + bytes: result1186, + mime_type: lifted1188, }) } 25 => { - let result839 = mbt_ffi_ptr2str( + let result1189 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result839) + @types.SchemaValueNode::PathValue(result1189) } 26 => { - let result840 = mbt_ffi_ptr2str( + let result1190 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result840) + @types.SchemaValueNode::UrlValue(result1190) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -27920,7 +40076,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result841 = mbt_ffi_ptr2str( + let result1191 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -27928,17 +40084,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result841, + unit: result1191, }) } 30 => { - let result842 = mbt_ffi_ptr2str( + let result1192 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result842, + tag: result1192, body: mbt_ffi_load32(iter_base + 16), }) } @@ -27955,65 +40111,65 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array844.push(lifted843) + array1194.push(lifted1193) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) - let result846 = mbt_ffi_ptr2str( + let result1196 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 72), mbt_ffi_load32(iter_base + 76), ) - let array848 : Array[String] = [] - for index849 = 0 - index849 < mbt_ffi_load32(iter_base + 84) - index849 = index849 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index849 * 8 + let array1198 : Array[String] = [] + for index1199 = 0 + index1199 < mbt_ffi_load32(iter_base + 84) + index1199 = index1199 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 80) + index1199 * 8 - let result847 = mbt_ffi_ptr2str( + let result1197 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array848.push(result847) + array1198.push(result1197) } mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) - let array863 : Array[Array[SpanData]] = [] - for index864 = 0 - index864 < mbt_ffi_load32(iter_base + 92) - index864 = index864 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index864 * 8 + let array1213 : Array[Array[SpanData]] = [] + for index1214 = 0 + index1214 < mbt_ffi_load32(iter_base + 92) + index1214 = index1214 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index1214 * 8 - let array861 : Array[SpanData] = [] - for index862 = 0 - index862 < mbt_ffi_load32(iter_base + 4) - index862 = index862 + 1 { + let array1211 : Array[SpanData] = [] + for index1212 = 0 + index1212 < mbt_ffi_load32(iter_base + 4) + index1212 = index1212 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index862 * 80 + index1212 * 80 - let lifted860 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1210 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result850 = mbt_ffi_ptr2str( + let result1200 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted852 : String? = match + let lifted1202 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result851 = mbt_ffi_ptr2str( + let result1201 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result851) + Option::Some(result1201) } _ => panic() } - let lifted853 : UInt64? = match + let lifted1203 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -28023,410 +40179,1221 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let array857 : Array[@context.Attribute] = [] - for index858 = 0 - index858 < mbt_ffi_load32(iter_base + 68) - index858 = index858 + 1 { + let array1207 : Array[@context.Attribute] = [] + for index1208 = 0 + index1208 < mbt_ffi_load32(iter_base + 68) + index1208 = index1208 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index858 * 20 + index1208 * 20 - let result854 = mbt_ffi_ptr2str( + let result1204 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted856 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1206 = match + mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result855 = mbt_ffi_ptr2str( + let result1205 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result855) + @context.AttributeValue::String(result1205) } _ => panic() } - array857.push(@context.Attribute::{ - key: result854, - value: lifted856, + array1207.push(@context.Attribute::{ + key: result1204, + value: lifted1206, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result850, + span_id: result1200, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted852, - linked_context: lifted853, - attributes: array857, + parent: lifted1202, + linked_context: lifted1203, + attributes: array1207, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result859 = mbt_ffi_ptr2str( + let result1209 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result859, + span_id: result1209, }) } _ => panic() } - array861.push(lifted860) + array1211.push(lifted1210) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array863.push(array861) + array1213.push(array1211) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) AgentInvocation::AgentInitialization(AgentInitializationParameters::{ - idempotency_key: result681, + idempotency_key: result961, constructor_parameters: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array808, - defs: array813, + type_nodes: array1158, + defs: array1163, root: mbt_ffi_load32(iter_base + 56), }, value: @types.SchemaValueTree::{ - value_nodes: array844, + value_nodes: array1194, root: mbt_ffi_load32(iter_base + 68), }, }, - trace_id: result846, - trace_states: array848, - invocation_context: array863, + trace_id: result1196, + trace_states: array1198, + invocation_context: array1213, }) } 1 => { - let result865 = mbt_ffi_ptr2str( + let result1215 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result866 = mbt_ffi_ptr2str( + let result1216 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let array993 : Array[@types.SchemaTypeNode] = [] - for index994 = 0 - index994 < mbt_ffi_load32(iter_base + 52) - index994 = index994 + 1 { + let array1413 : Array[@types.SchemaTypeNode] = [] + for index1414 = 0 + index1414 < mbt_ffi_load32(iter_base + 52) + index1414 = index1414 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index994 * 144 + index1414 * 144 - let lifted979 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1399 = 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 + 2 => { + let lifted1223 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1218 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1217 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1217) + } + _ => panic() + } + + let lifted1220 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1219 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1219) + } + _ => panic() + } + + let lifted1222 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1221 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1221) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1218, + max: lifted1220, + unit: lifted1222, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1223) + } + 3 => { + let lifted1230 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1225 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1224 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1224) + } + _ => panic() + } + + let lifted1227 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1226 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1226) + } + _ => panic() + } + + let lifted1229 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1228 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1228) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1225, + max: lifted1227, + unit: lifted1229, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1230) + } + 4 => { + let lifted1237 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1232 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1231 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1231) + } + _ => panic() + } + + let lifted1234 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1233 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1233) + } + _ => panic() + } + + let lifted1236 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1235 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1235) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1232, + max: lifted1234, + unit: lifted1236, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1237) + } + 5 => { + let lifted1244 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1239 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1238 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1238) + } + _ => panic() + } + + let lifted1241 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1240 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1240) + } + _ => panic() + } + + let lifted1243 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1242 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1242) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1239, + max: lifted1241, + unit: lifted1243, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1244) + } + 6 => { + let lifted1251 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1246 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1245 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1245) + } + _ => panic() + } + + let lifted1248 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1247 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1247) + } + _ => panic() + } + + let lifted1250 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1249 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1249) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1246, + max: lifted1248, + unit: lifted1250, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1251) + } + 7 => { + let lifted1258 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1253 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1252 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1252) + } + _ => panic() + } + + let lifted1255 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1254 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1254) + } + _ => panic() + } + + let lifted1257 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1256 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1256) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1253, + max: lifted1255, + unit: lifted1257, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1258) + } + 8 => { + let lifted1265 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1260 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1259 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1259) + } + _ => panic() + } + + let lifted1262 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1261 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1261) + } + _ => panic() + } + + let lifted1264 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1263 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1263) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1260, + max: lifted1262, + unit: lifted1264, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1265) + } + 9 => { + let lifted1272 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1267 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1266 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1266) + } + _ => panic() + } + + let lifted1269 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1268 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1268) + } + _ => panic() + } + + let lifted1271 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1270 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1270) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1267, + max: lifted1269, + unit: lifted1271, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1272) + } + 10 => { + let lifted1279 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1274 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1273 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1273) + } + _ => panic() + } + + let lifted1276 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1275 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1275) + } + _ => panic() + } + + let lifted1278 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1277 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1277) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1274, + max: lifted1276, + unit: lifted1278, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1279) + } + 11 => { + let lifted1286 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1281 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1280 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1280) + } + _ => panic() + } + + let lifted1283 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1282 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1282) + } + _ => panic() + } + + let lifted1285 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1284 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1284) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1281, + max: lifted1283, + unit: lifted1285, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1286) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array881 : Array[@types.NamedFieldType] = [] - for index882 = 0 - index882 < mbt_ffi_load32(iter_base + 12) - index882 = index882 + 1 { + let array1301 : Array[@types.NamedFieldType] = [] + for index1302 = 0 + index1302 < mbt_ffi_load32(iter_base + 12) + index1302 = index1302 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index882 * 68 + index1302 * 68 - let result867 = mbt_ffi_ptr2str( + let result1287 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted869 : String? = match + let lifted1289 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result868 = mbt_ffi_ptr2str( + let result1288 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result868) + Option::Some(result1288) } _ => panic() } - let array871 : Array[String] = [] - for index872 = 0 - index872 < mbt_ffi_load32(iter_base + 28) - index872 = index872 + 1 { + let array1291 : Array[String] = [] + for index1292 = 0 + index1292 < mbt_ffi_load32(iter_base + 28) + index1292 = index1292 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index872 * 8 + index1292 * 8 - let result870 = mbt_ffi_ptr2str( + let result1290 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array871.push(result870) + array1291.push(result1290) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array874 : Array[String] = [] - for index875 = 0 - index875 < mbt_ffi_load32(iter_base + 36) - index875 = index875 + 1 { + let array1294 : Array[String] = [] + for index1295 = 0 + index1295 < mbt_ffi_load32(iter_base + 36) + index1295 = index1295 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index875 * 8 + index1295 * 8 - let result873 = mbt_ffi_ptr2str( + let result1293 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array874.push(result873) + array1294.push(result1293) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted877 : String? = match + let lifted1297 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result876 = mbt_ffi_ptr2str( + let result1296 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result876) + Option::Some(result1296) } _ => panic() } - let lifted880 : @types.Role? = match + let lifted1300 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted879 = match + let lifted1299 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result878 = mbt_ffi_ptr2str( + let result1298 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result878) + @types.Role::Other(result1298) } _ => panic() } - Option::Some(lifted879) + Option::Some(lifted1299) } _ => panic() } - array881.push(@types.NamedFieldType::{ - name: result867, + array1301.push(@types.NamedFieldType::{ + name: result1287, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted869, - aliases: array871, - examples: array874, - deprecated: lifted877, - role: lifted880, + doc: lifted1289, + aliases: array1291, + examples: array1294, + deprecated: lifted1297, + role: lifted1300, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array881) + @types.SchemaTypeBody::RecordType(array1301) } 15 => { - let array898 : Array[@types.VariantCaseType] = [] - for index899 = 0 - index899 < mbt_ffi_load32(iter_base + 12) - index899 = index899 + 1 { + let array1318 : Array[@types.VariantCaseType] = [] + for index1319 = 0 + index1319 < mbt_ffi_load32(iter_base + 12) + index1319 = index1319 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index899 * 72 + index1319 * 72 - let result883 = mbt_ffi_ptr2str( + let result1303 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted884 : Int? = match + let lifted1304 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted886 : String? = match + let lifted1306 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result885 = mbt_ffi_ptr2str( + let result1305 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result885) + Option::Some(result1305) } _ => panic() } - let array888 : Array[String] = [] - for index889 = 0 - index889 < mbt_ffi_load32(iter_base + 32) - index889 = index889 + 1 { + let array1308 : Array[String] = [] + for index1309 = 0 + index1309 < mbt_ffi_load32(iter_base + 32) + index1309 = index1309 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index889 * 8 + index1309 * 8 - let result887 = mbt_ffi_ptr2str( + let result1307 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array888.push(result887) + array1308.push(result1307) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array891 : Array[String] = [] - for index892 = 0 - index892 < mbt_ffi_load32(iter_base + 40) - index892 = index892 + 1 { + let array1311 : Array[String] = [] + for index1312 = 0 + index1312 < mbt_ffi_load32(iter_base + 40) + index1312 = index1312 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index892 * 8 + index1312 * 8 - let result890 = mbt_ffi_ptr2str( + let result1310 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array891.push(result890) + array1311.push(result1310) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted894 : String? = match + let lifted1314 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result893 = mbt_ffi_ptr2str( + let result1313 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result893) + Option::Some(result1313) } _ => panic() } - let lifted897 : @types.Role? = match + let lifted1317 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted896 = match + let lifted1316 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result895 = mbt_ffi_ptr2str( + let result1315 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result895) + @types.Role::Other(result1315) } _ => panic() } - Option::Some(lifted896) + Option::Some(lifted1316) } _ => panic() } - array898.push(@types.VariantCaseType::{ - name: result883, - payload: lifted884, + array1318.push(@types.VariantCaseType::{ + name: result1303, + payload: lifted1304, metadata: @types.MetadataEnvelope::{ - doc: lifted886, - aliases: array888, - examples: array891, - deprecated: lifted894, - role: lifted897, + doc: lifted1306, + aliases: array1308, + examples: array1311, + deprecated: lifted1314, + role: lifted1317, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array898) + @types.SchemaTypeBody::VariantType(array1318) } 16 => { - let array901 : Array[String] = [] - for index902 = 0 - index902 < mbt_ffi_load32(iter_base + 12) - index902 = index902 + 1 { + let array1321 : Array[String] = [] + for index1322 = 0 + index1322 < mbt_ffi_load32(iter_base + 12) + index1322 = index1322 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index902 * 8 + index1322 * 8 - let result900 = mbt_ffi_ptr2str( + let result1320 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array901.push(result900) + array1321.push(result1320) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array901) + @types.SchemaTypeBody::EnumType(array1321) } 17 => { - let array904 : Array[String] = [] - for index905 = 0 - index905 < mbt_ffi_load32(iter_base + 12) - index905 = index905 + 1 { + let array1324 : Array[String] = [] + for index1325 = 0 + index1325 < mbt_ffi_load32(iter_base + 12) + index1325 = index1325 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index905 * 8 + index1325 * 8 - let result903 = mbt_ffi_ptr2str( + let result1323 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array904.push(result903) + array1324.push(result1323) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array904) + @types.SchemaTypeBody::FlagsType(array1324) } 18 => { - let array906 : Array[Int] = [] - for index907 = 0 - index907 < mbt_ffi_load32(iter_base + 12) - index907 = index907 + 1 { + let array1326 : Array[Int] = [] + for index1327 = 0 + index1327 < mbt_ffi_load32(iter_base + 12) + index1327 = index1327 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index907 * 4 + index1327 * 4 - array906.push(mbt_ffi_load32(iter_base + 0)) + array1326.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array906) + @types.SchemaTypeBody::TupleType(array1326) } 19 => @types.SchemaTypeBody::ListType( @@ -28447,14 +41414,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted908 : Int? = match + let lifted1328 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted909 : Int? = match + let lifted1329 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -28462,37 +41429,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted908, - err: lifted909, + ok: lifted1328, + err: lifted1329, }) } 24 => { - let lifted913 : Array[String]? = match + let lifted1333 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array911 : Array[String] = [] - for index912 = 0 - index912 < mbt_ffi_load32(iter_base + 16) - index912 = index912 + 1 { + let array1331 : Array[String] = [] + for index1332 = 0 + index1332 < mbt_ffi_load32(iter_base + 16) + index1332 = index1332 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index912 * 8 + index1332 * 8 - let result910 = mbt_ffi_ptr2str( + let result1330 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array911.push(result910) + array1331.push(result1330) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array911) + Option::Some(array1331) } _ => panic() } - let lifted914 : UInt? = match + let lifted1334 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -28502,7 +41469,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted915 : UInt? = match + let lifted1335 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -28512,54 +41479,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted917 : String? = match + let lifted1337 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result916 = mbt_ffi_ptr2str( + let result1336 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result916) + Option::Some(result1336) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted913, - min_length: lifted914, - max_length: lifted915, - regex: lifted917, + languages: lifted1333, + min_length: lifted1334, + max_length: lifted1335, + regex: lifted1337, }) } 25 => { - let lifted921 : Array[String]? = match + let lifted1341 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array919 : Array[String] = [] - for index920 = 0 - index920 < mbt_ffi_load32(iter_base + 16) - index920 = index920 + 1 { + let array1339 : Array[String] = [] + for index1340 = 0 + index1340 < mbt_ffi_load32(iter_base + 16) + index1340 = index1340 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index920 * 8 + index1340 * 8 - let result918 = mbt_ffi_ptr2str( + let result1338 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array919.push(result918) + array1339.push(result1338) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array919) + Option::Some(array1339) } _ => panic() } - let lifted922 : UInt? = match + let lifted1342 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -28569,7 +41536,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted923 : UInt? = match + let lifted1343 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -28580,58 +41547,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted921, - min_bytes: lifted922, - max_bytes: lifted923, + mime_types: lifted1341, + min_bytes: lifted1342, + max_bytes: lifted1343, }) } 26 => { - let lifted927 : Array[String]? = match + let lifted1347 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array925 : Array[String] = [] - for index926 = 0 - index926 < mbt_ffi_load32(iter_base + 20) - index926 = index926 + 1 { + let array1345 : Array[String] = [] + for index1346 = 0 + index1346 < mbt_ffi_load32(iter_base + 20) + index1346 = index1346 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index926 * 8 + index1346 * 8 - let result924 = mbt_ffi_ptr2str( + let result1344 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array925.push(result924) + array1345.push(result1344) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array925) + Option::Some(array1345) } _ => panic() } - let lifted931 : Array[String]? = match + let lifted1351 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array929 : Array[String] = [] - for index930 = 0 - index930 < mbt_ffi_load32(iter_base + 32) - index930 = index930 + 1 { + let array1349 : Array[String] = [] + for index1350 = 0 + index1350 < mbt_ffi_load32(iter_base + 32) + index1350 = index1350 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index930 * 8 + index1350 * 8 - let result928 = mbt_ffi_ptr2str( + let result1348 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array929.push(result928) + array1349.push(result1348) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array929) + Option::Some(array1349) } _ => panic() } @@ -28643,95 +41610,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted927, - allowed_extensions: lifted931, + allowed_mime_types: lifted1347, + allowed_extensions: lifted1351, }) } 27 => { - let lifted935 : Array[String]? = match + let lifted1355 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array933 : Array[String] = [] - for index934 = 0 - index934 < mbt_ffi_load32(iter_base + 16) - index934 = index934 + 1 { + let array1353 : Array[String] = [] + for index1354 = 0 + index1354 < mbt_ffi_load32(iter_base + 16) + index1354 = index1354 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index934 * 8 + index1354 * 8 - let result932 = mbt_ffi_ptr2str( + let result1352 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array933.push(result932) + array1353.push(result1352) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array933) + Option::Some(array1353) } _ => panic() } - let lifted939 : Array[String]? = match + let lifted1359 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array937 : Array[String] = [] - for index938 = 0 - index938 < mbt_ffi_load32(iter_base + 28) - index938 = index938 + 1 { + let array1357 : Array[String] = [] + for index1358 = 0 + index1358 < mbt_ffi_load32(iter_base + 28) + index1358 = index1358 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index938 * 8 + index1358 * 8 - let result936 = mbt_ffi_ptr2str( + let result1356 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array937.push(result936) + array1357.push(result1356) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array937) + Option::Some(array1357) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted935, - allowed_hosts: lifted939, + allowed_schemes: lifted1355, + allowed_hosts: lifted1359, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result940 = mbt_ffi_ptr2str( + let result1360 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array942 : Array[String] = [] - for index943 = 0 - index943 < mbt_ffi_load32(iter_base + 20) - index943 = index943 + 1 { + let array1362 : Array[String] = [] + for index1363 = 0 + index1363 < mbt_ffi_load32(iter_base + 20) + index1363 = index1363 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index943 * 8 + index1363 * 8 - let result941 = mbt_ffi_ptr2str( + 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 + 16)) - let lifted945 : @types.QuantityValue? = match + let lifted1365 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result944 = mbt_ffi_ptr2str( + let result1364 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -28739,17 +41706,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result944, + unit: result1364, }) } _ => panic() } - let lifted947 : @types.QuantityValue? = match + let lifted1367 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result946 = mbt_ffi_ptr2str( + let result1366 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -28757,405 +41724,406 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result946, + unit: result1366, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result940, - allowed_suffixes: array942, - min: lifted945, - max: lifted947, + base_unit: result1360, + allowed_suffixes: array1362, + min: lifted1365, + max: lifted1367, }) } 31 => { - let array971 : Array[@types.UnionBranch] = [] - for index972 = 0 - index972 < mbt_ffi_load32(iter_base + 12) - index972 = index972 + 1 { + let array1391 : Array[@types.UnionBranch] = [] + for index1392 = 0 + index1392 < mbt_ffi_load32(iter_base + 12) + index1392 = index1392 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index972 * 92 + index1392 * 92 - let result948 = mbt_ffi_ptr2str( + let result1368 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted957 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1377 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result949 = mbt_ffi_ptr2str( + let result1369 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result949) + @types.DiscriminatorRule::Prefix(result1369) } 1 => { - let result950 = mbt_ffi_ptr2str( + let result1370 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result950) + @types.DiscriminatorRule::Suffix(result1370) } 2 => { - let result951 = mbt_ffi_ptr2str( + let result1371 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result951) + @types.DiscriminatorRule::Contains(result1371) } 3 => { - let result952 = mbt_ffi_ptr2str( + let result1372 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result952) + @types.DiscriminatorRule::Regex(result1372) } 4 => { - let result953 = mbt_ffi_ptr2str( + let result1373 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted955 : String? = match + let lifted1375 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result954 = mbt_ffi_ptr2str( + let result1374 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result954) + Option::Some(result1374) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result953, - literal: lifted955, + field_name: result1373, + literal: lifted1375, }) } 5 => { - let result956 = mbt_ffi_ptr2str( + let result1376 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result956) + @types.DiscriminatorRule::FieldAbsent(result1376) } _ => panic() } - let lifted959 : String? = match + let lifted1379 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result958 = mbt_ffi_ptr2str( + let result1378 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result958) + Option::Some(result1378) } _ => panic() } - let array961 : Array[String] = [] - for index962 = 0 - index962 < mbt_ffi_load32(iter_base + 52) - index962 = index962 + 1 { + let array1381 : Array[String] = [] + for index1382 = 0 + index1382 < mbt_ffi_load32(iter_base + 52) + index1382 = index1382 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index962 * 8 + index1382 * 8 - let result960 = mbt_ffi_ptr2str( + let result1380 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array961.push(result960) + array1381.push(result1380) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array964 : Array[String] = [] - for index965 = 0 - index965 < mbt_ffi_load32(iter_base + 60) - index965 = index965 + 1 { + let array1384 : Array[String] = [] + for index1385 = 0 + index1385 < mbt_ffi_load32(iter_base + 60) + index1385 = index1385 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index965 * 8 + index1385 * 8 - let result963 = mbt_ffi_ptr2str( + let result1383 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array964.push(result963) + array1384.push(result1383) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted967 : String? = match + let lifted1387 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result966 = mbt_ffi_ptr2str( + let result1386 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result966) + Option::Some(result1386) } _ => panic() } - let lifted970 : @types.Role? = match + let lifted1390 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted969 = match + let lifted1389 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result968 = mbt_ffi_ptr2str( + let result1388 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result968) + @types.Role::Other(result1388) } _ => panic() } - Option::Some(lifted969) + Option::Some(lifted1389) } _ => panic() } - array971.push(@types.UnionBranch::{ - tag: result948, + array1391.push(@types.UnionBranch::{ + tag: result1368, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted957, + discriminator: lifted1377, metadata: @types.MetadataEnvelope::{ - doc: lifted959, - aliases: array961, - examples: array964, - deprecated: lifted967, - role: lifted970, + doc: lifted1379, + aliases: array1381, + examples: array1384, + deprecated: lifted1387, + role: lifted1390, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array971, + branches: array1391, }) } 32 => { - let lifted974 : String? = match + let lifted1394 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result973 = mbt_ffi_ptr2str( + let result1393 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result973) + Option::Some(result1393) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted974, + category: lifted1394, }) } 33 => { - let lifted976 : String? = match + let lifted1396 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result975 = mbt_ffi_ptr2str( + let result1395 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result975) + Option::Some(result1395) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted976, + resource_name: lifted1396, }) } 34 => { - let lifted977 : Int? = match + let lifted1397 : 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(lifted977) + @types.SchemaTypeBody::FutureType(lifted1397) } 35 => { - let lifted978 : Int? = match + let lifted1398 : 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(lifted978) + @types.SchemaTypeBody::StreamType(lifted1398) } _ => panic() } - let lifted981 : String? = match + let lifted1401 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result980 = mbt_ffi_ptr2str( + let result1400 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result980) + Option::Some(result1400) } _ => panic() } - let array983 : Array[String] = [] - for index984 = 0 - index984 < mbt_ffi_load32(iter_base + 104) - index984 = index984 + 1 { + let array1403 : Array[String] = [] + for index1404 = 0 + index1404 < mbt_ffi_load32(iter_base + 104) + index1404 = index1404 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index984 * 8 + index1404 * 8 - let result982 = mbt_ffi_ptr2str( + let result1402 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array983.push(result982) + array1403.push(result1402) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array986 : Array[String] = [] - for index987 = 0 - index987 < mbt_ffi_load32(iter_base + 112) - index987 = index987 + 1 { + let array1406 : Array[String] = [] + for index1407 = 0 + index1407 < mbt_ffi_load32(iter_base + 112) + index1407 = index1407 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index987 * 8 + index1407 * 8 - let result985 = mbt_ffi_ptr2str( + let result1405 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array986.push(result985) + array1406.push(result1405) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted989 : String? = match + let lifted1409 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result988 = mbt_ffi_ptr2str( + let result1408 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result988) + Option::Some(result1408) } _ => panic() } - let lifted992 : @types.Role? = match + let lifted1412 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted991 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1411 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result990 = mbt_ffi_ptr2str( + let result1410 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result990) + @types.Role::Other(result1410) } _ => panic() } - Option::Some(lifted991) + Option::Some(lifted1411) } _ => panic() } - array993.push(@types.SchemaTypeNode::{ - body: lifted979, + array1413.push(@types.SchemaTypeNode::{ + body: lifted1399, metadata: @types.MetadataEnvelope::{ - doc: lifted981, - aliases: array983, - examples: array986, - deprecated: lifted989, - role: lifted992, + doc: lifted1401, + aliases: array1403, + examples: array1406, + deprecated: lifted1409, + role: lifted1412, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array998 : Array[@types.SchemaTypeDef] = [] - for index999 = 0 - index999 < mbt_ffi_load32(iter_base + 60) - index999 = index999 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + index999 * 24 + let array1418 : Array[@types.SchemaTypeDef] = [] + for index1419 = 0 + index1419 < mbt_ffi_load32(iter_base + 60) + index1419 = index1419 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + + index1419 * 24 - let result995 = mbt_ffi_ptr2str( + let result1415 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted997 : String? = match + let lifted1417 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result996 = mbt_ffi_ptr2str( + let result1416 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result996) + Option::Some(result1416) } _ => panic() } - array998.push(@types.SchemaTypeDef::{ - id: result995, - name: lifted997, + array1418.push(@types.SchemaTypeDef::{ + id: result1415, + name: lifted1417, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let array1029 : Array[@types.SchemaValueNode] = [] - for index1030 = 0 - index1030 < mbt_ffi_load32(iter_base + 72) - index1030 = index1030 + 1 { + let array1449 : Array[@types.SchemaValueNode] = [] + for index1450 = 0 + index1450 < mbt_ffi_load32(iter_base + 72) + index1450 = index1450 + 1 { let iter_base = mbt_ffi_load32(iter_base + 68) + - index1030 * 32 + index1450 * 32 - let lifted1028 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1448 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -29207,29 +42175,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1000 = mbt_ffi_ptr2str( + let result1420 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1000) + @types.SchemaValueNode::StringValue(result1420) } 13 => { - let array1001 : Array[Int] = [] - for index1002 = 0 - index1002 < mbt_ffi_load32(iter_base + 12) - index1002 = index1002 + 1 { + let array1421 : Array[Int] = [] + for index1422 = 0 + index1422 < mbt_ffi_load32(iter_base + 12) + index1422 = index1422 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1002 * 4 + index1422 * 4 - array1001.push(mbt_ffi_load32(iter_base + 0)) + array1421.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1001) + @types.SchemaValueNode::RecordValue(array1421) } 14 => { - let lifted1003 : Int? = match + let lifted1423 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -29238,7 +42206,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1003, + payload: lifted1423, }) } 15 => @@ -29246,180 +42214,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1004 : Array[Bool] = [] - for index1005 = 0 - index1005 < mbt_ffi_load32(iter_base + 12) - index1005 = index1005 + 1 { + let array1424 : Array[Bool] = [] + for index1425 = 0 + index1425 < mbt_ffi_load32(iter_base + 12) + index1425 = index1425 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1005 * 1 + index1425 * 1 - array1004.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1424.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1004) + @types.SchemaValueNode::FlagsValue(array1424) } 17 => { - let array1006 : Array[Int] = [] - for index1007 = 0 - index1007 < mbt_ffi_load32(iter_base + 12) - index1007 = index1007 + 1 { + 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) + - index1007 * 4 + 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::TupleValue(array1006) + @types.SchemaValueNode::TupleValue(array1426) } 18 => { - let array1008 : Array[Int] = [] - for index1009 = 0 - index1009 < mbt_ffi_load32(iter_base + 12) - index1009 = index1009 + 1 { + let array1428 : Array[Int] = [] + for index1429 = 0 + index1429 < mbt_ffi_load32(iter_base + 12) + index1429 = index1429 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1009 * 4 + index1429 * 4 - array1008.push(mbt_ffi_load32(iter_base + 0)) + array1428.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1008) + @types.SchemaValueNode::ListValue(array1428) } 19 => { - let array1010 : Array[Int] = [] - for index1011 = 0 - index1011 < mbt_ffi_load32(iter_base + 12) - index1011 = index1011 + 1 { + let array1430 : Array[Int] = [] + for index1431 = 0 + index1431 < mbt_ffi_load32(iter_base + 12) + index1431 = index1431 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1011 * 4 + index1431 * 4 - array1010.push(mbt_ffi_load32(iter_base + 0)) + array1430.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1010) + @types.SchemaValueNode::FixedListValue(array1430) } 20 => { - let array1012 : Array[@types.MapEntry] = [] - for index1013 = 0 - index1013 < mbt_ffi_load32(iter_base + 12) - index1013 = index1013 + 1 { + let array1432 : Array[@types.MapEntry] = [] + for index1433 = 0 + index1433 < mbt_ffi_load32(iter_base + 12) + index1433 = index1433 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1013 * 8 + index1433 * 8 - array1012.push(@types.MapEntry::{ + array1432.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(array1012) + @types.SchemaValueNode::MapValue(array1432) } 21 => { - let lifted1014 : Int? = match + let lifted1434 : 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(lifted1014) + @types.SchemaValueNode::OptionValue(lifted1434) } 22 => { - let lifted1017 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1437 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1015 : Int? = match + let lifted1435 : 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(lifted1015) + @types.ResultValuePayload::OkValue(lifted1435) } 1 => { - let lifted1016 : Int? = match + let lifted1436 : 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(lifted1016) + @types.ResultValuePayload::ErrValue(lifted1436) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1017) + @types.SchemaValueNode::ResultValue(lifted1437) } 23 => { - let result1018 = mbt_ffi_ptr2str( + let result1438 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1020 : String? = match + let lifted1440 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1019 = mbt_ffi_ptr2str( + let result1439 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1019) + Option::Some(result1439) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1018, - language: lifted1020, + text: result1438, + language: lifted1440, }) } 24 => { - let result1021 = mbt_ffi_ptr2bytes( + let result1441 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1023 : String? = match + let lifted1443 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1022 = mbt_ffi_ptr2str( + let result1442 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1022) + Option::Some(result1442) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1021, - mime_type: lifted1023, + bytes: result1441, + mime_type: lifted1443, }) } 25 => { - let result1024 = mbt_ffi_ptr2str( + let result1444 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1024) + @types.SchemaValueNode::PathValue(result1444) } 26 => { - let result1025 = mbt_ffi_ptr2str( + let result1445 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1025) + @types.SchemaValueNode::UrlValue(result1445) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -29431,7 +42399,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1026 = mbt_ffi_ptr2str( + let result1446 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -29439,17 +42407,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1026, + unit: result1446, }) } 30 => { - let result1027 = mbt_ffi_ptr2str( + let result1447 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1027, + tag: result1447, body: mbt_ffi_load32(iter_base + 16), }) } @@ -29466,65 +42434,65 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1029.push(lifted1028) + array1449.push(lifted1448) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) - let result1031 = mbt_ffi_ptr2str( + let result1451 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 80), mbt_ffi_load32(iter_base + 84), ) - let array1033 : Array[String] = [] - for index1034 = 0 - index1034 < mbt_ffi_load32(iter_base + 92) - index1034 = index1034 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index1034 * 8 + let array1453 : Array[String] = [] + for index1454 = 0 + index1454 < mbt_ffi_load32(iter_base + 92) + index1454 = index1454 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index1454 * 8 - let result1032 = mbt_ffi_ptr2str( + let result1452 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1033.push(result1032) + array1453.push(result1452) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) - let array1048 : Array[Array[SpanData]] = [] - for index1049 = 0 - index1049 < mbt_ffi_load32(iter_base + 100) - index1049 = index1049 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 96) + index1049 * 8 + let array1468 : Array[Array[SpanData]] = [] + for index1469 = 0 + index1469 < mbt_ffi_load32(iter_base + 100) + index1469 = index1469 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 96) + index1469 * 8 - let array1046 : Array[SpanData] = [] - for index1047 = 0 - index1047 < mbt_ffi_load32(iter_base + 4) - index1047 = index1047 + 1 { + let array1466 : Array[SpanData] = [] + for index1467 = 0 + index1467 < mbt_ffi_load32(iter_base + 4) + index1467 = index1467 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index1047 * 80 + index1467 * 80 - let lifted1045 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1465 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1035 = mbt_ffi_ptr2str( + let result1455 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1037 : String? = match + let lifted1457 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1036 = mbt_ffi_ptr2str( + let result1456 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1036) + Option::Some(result1456) } _ => panic() } - let lifted1038 : UInt64? = match + let lifted1458 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -29534,117 +42502,117 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let array1042 : Array[@context.Attribute] = [] - for index1043 = 0 - index1043 < mbt_ffi_load32(iter_base + 68) - index1043 = index1043 + 1 { + let array1462 : Array[@context.Attribute] = [] + for index1463 = 0 + index1463 < mbt_ffi_load32(iter_base + 68) + index1463 = index1463 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index1043 * 20 + index1463 * 20 - let result1039 = mbt_ffi_ptr2str( + let result1459 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1041 = match + let lifted1461 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1040 = mbt_ffi_ptr2str( + let result1460 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1040) + @context.AttributeValue::String(result1460) } _ => panic() } - array1042.push(@context.Attribute::{ - key: result1039, - value: lifted1041, + array1462.push(@context.Attribute::{ + key: result1459, + value: lifted1461, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result1035, + span_id: result1455, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted1037, - linked_context: lifted1038, - attributes: array1042, + parent: lifted1457, + linked_context: lifted1458, + attributes: array1462, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result1044 = mbt_ffi_ptr2str( + let result1464 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result1044, + span_id: result1464, }) } _ => panic() } - array1046.push(lifted1045) + array1466.push(lifted1465) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array1048.push(array1046) + array1468.push(array1466) } mbt_ffi_free(mbt_ffi_load32(iter_base + 96)) AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{ - idempotency_key: result865, - method_name: result866, + idempotency_key: result1215, + method_name: result1216, function_input: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array993, - defs: array998, + type_nodes: array1413, + defs: array1418, root: mbt_ffi_load32(iter_base + 64), }, value: @types.SchemaValueTree::{ - value_nodes: array1029, + value_nodes: array1449, root: mbt_ffi_load32(iter_base + 76), }, }, - trace_id: result1031, - trace_states: array1033, - invocation_context: array1048, + trace_id: result1451, + trace_states: array1453, + invocation_context: array1468, }) } 2 => AgentInvocation::SaveSnapshot 3 => { - let result1050 = mbt_ffi_ptr2bytes( + let result1470 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result1051 = mbt_ffi_ptr2str( + let result1471 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{ snapshot: SnapshotData::{ - data: result1050, - mime_type: result1051, + data: result1470, + mime_type: result1471, }, }) } 4 => { - let result1052 = mbt_ffi_ptr2str( + let result1472 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{ - idempotency_key: result1052, + idempotency_key: result1472, }) } 5 => @@ -29659,323 +42627,1133 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - invocation: lifted1053, + invocation: lifted1473, }) } 5 => { - let lifted1388 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted1948 = match mbt_ffi_load8_u(iter_base + 24) { 0 => { - let array1180 : Array[@types.SchemaTypeNode] = [] - for index1181 = 0 - index1181 < mbt_ffi_load32(iter_base + 32) - index1181 = index1181 + 1 { + let array1670 : Array[@types.SchemaTypeNode] = [] + for index1671 = 0 + index1671 < mbt_ffi_load32(iter_base + 32) + index1671 = index1671 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1181 * 144 + index1671 * 144 - let lifted1166 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1656 = 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 + 2 => { + let lifted1480 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1475 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1474 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1474) + } + _ => panic() + } + + let lifted1477 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1476 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1476) + } + _ => panic() + } + + let lifted1479 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1478 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1478) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1475, + max: lifted1477, + unit: lifted1479, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1480) + } + 3 => { + let lifted1487 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1482 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1481 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1481) + } + _ => panic() + } + + let lifted1484 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1483 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1483) + } + _ => panic() + } + + let lifted1486 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1485 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1485) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1482, + max: lifted1484, + unit: lifted1486, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1487) + } + 4 => { + let lifted1494 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1489 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1488 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1488) + } + _ => panic() + } + + let lifted1491 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1490 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1490) + } + _ => panic() + } + + let lifted1493 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1492 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1492) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1489, + max: lifted1491, + unit: lifted1493, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1494) + } + 5 => { + let lifted1501 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1496 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1495 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1495) + } + _ => panic() + } + + let lifted1498 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1497 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1497) + } + _ => panic() + } + + let lifted1500 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1499 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1499) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1496, + max: lifted1498, + unit: lifted1500, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1501) + } + 6 => { + let lifted1508 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1503 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1502 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1502) + } + _ => panic() + } + + let lifted1505 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1504 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1504) + } + _ => panic() + } + + let lifted1507 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1506 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1506) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1503, + max: lifted1505, + unit: lifted1507, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1508) + } + 7 => { + let lifted1515 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1510 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1509 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1509) + } + _ => panic() + } + + let lifted1512 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1511 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1511) + } + _ => panic() + } + + let lifted1514 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1513 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1513) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1510, + max: lifted1512, + unit: lifted1514, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1515) + } + 8 => { + let lifted1522 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1517 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1516 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1516) + } + _ => panic() + } + + let lifted1519 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1518 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1518) + } + _ => panic() + } + + let lifted1521 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1520 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1520) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1517, + max: lifted1519, + unit: lifted1521, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1522) + } + 9 => { + let lifted1529 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1524 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1523 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1523) + } + _ => panic() + } + + let lifted1526 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1525 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1525) + } + _ => panic() + } + + let lifted1528 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1527 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1527) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1524, + max: lifted1526, + unit: lifted1528, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1529) + } + 10 => { + let lifted1536 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1531 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1530 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1530) + } + _ => panic() + } + + let lifted1533 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1532 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1532) + } + _ => panic() + } + + let lifted1535 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1534 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1534) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1531, + max: lifted1533, + unit: lifted1535, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1536) + } + 11 => { + let lifted1543 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1538 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1537 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1537) + } + _ => panic() + } + + let lifted1540 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1539 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1539) + } + _ => panic() + } + + let lifted1542 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1541 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1541) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1538, + max: lifted1540, + unit: lifted1542, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1543) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1068 : Array[@types.NamedFieldType] = [] - for index1069 = 0 - index1069 < mbt_ffi_load32(iter_base + 12) - index1069 = index1069 + 1 { + let array1558 : Array[@types.NamedFieldType] = [] + for index1559 = 0 + index1559 < mbt_ffi_load32(iter_base + 12) + index1559 = index1559 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1069 * 68 + index1559 * 68 - let result1054 = mbt_ffi_ptr2str( + let result1544 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1056 : String? = match + let lifted1546 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1055 = mbt_ffi_ptr2str( + let result1545 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1055) + Option::Some(result1545) } _ => panic() } - let array1058 : Array[String] = [] - for index1059 = 0 - index1059 < mbt_ffi_load32(iter_base + 28) - index1059 = index1059 + 1 { + let array1548 : Array[String] = [] + for index1549 = 0 + index1549 < mbt_ffi_load32(iter_base + 28) + index1549 = index1549 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1059 * 8 + index1549 * 8 - let result1057 = mbt_ffi_ptr2str( + let result1547 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1058.push(result1057) + array1548.push(result1547) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1061 : Array[String] = [] - for index1062 = 0 - index1062 < mbt_ffi_load32(iter_base + 36) - index1062 = index1062 + 1 { + let array1551 : Array[String] = [] + for index1552 = 0 + index1552 < mbt_ffi_load32(iter_base + 36) + index1552 = index1552 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1062 * 8 + index1552 * 8 - let result1060 = mbt_ffi_ptr2str( + let result1550 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1061.push(result1060) + array1551.push(result1550) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1064 : String? = match + let lifted1554 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1063 = mbt_ffi_ptr2str( + let result1553 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1063) + Option::Some(result1553) } _ => panic() } - let lifted1067 : @types.Role? = match + let lifted1557 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1066 = match + let lifted1556 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1065 = mbt_ffi_ptr2str( + let result1555 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1065) + @types.Role::Other(result1555) } _ => panic() } - Option::Some(lifted1066) + Option::Some(lifted1556) } _ => panic() } - array1068.push(@types.NamedFieldType::{ - name: result1054, + array1558.push(@types.NamedFieldType::{ + name: result1544, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1056, - aliases: array1058, - examples: array1061, - deprecated: lifted1064, - role: lifted1067, + doc: lifted1546, + aliases: array1548, + examples: array1551, + deprecated: lifted1554, + role: lifted1557, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1068) + @types.SchemaTypeBody::RecordType(array1558) } 15 => { - let array1085 : Array[@types.VariantCaseType] = [] - for index1086 = 0 - index1086 < mbt_ffi_load32(iter_base + 12) - index1086 = index1086 + 1 { + let array1575 : Array[@types.VariantCaseType] = [] + for index1576 = 0 + index1576 < mbt_ffi_load32(iter_base + 12) + index1576 = index1576 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1086 * 72 + index1576 * 72 - let result1070 = mbt_ffi_ptr2str( + let result1560 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1071 : Int? = match + let lifted1561 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1073 : String? = match + let lifted1563 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1072 = mbt_ffi_ptr2str( + let result1562 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1072) + Option::Some(result1562) } _ => panic() } - let array1075 : Array[String] = [] - for index1076 = 0 - index1076 < mbt_ffi_load32(iter_base + 32) - index1076 = index1076 + 1 { + let array1565 : Array[String] = [] + for index1566 = 0 + index1566 < mbt_ffi_load32(iter_base + 32) + index1566 = index1566 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1076 * 8 + index1566 * 8 - let result1074 = mbt_ffi_ptr2str( + let result1564 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1075.push(result1074) + array1565.push(result1564) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1078 : Array[String] = [] - for index1079 = 0 - index1079 < mbt_ffi_load32(iter_base + 40) - index1079 = index1079 + 1 { + let array1568 : Array[String] = [] + for index1569 = 0 + index1569 < mbt_ffi_load32(iter_base + 40) + index1569 = index1569 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1079 * 8 + index1569 * 8 - let result1077 = mbt_ffi_ptr2str( + let result1567 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1078.push(result1077) + array1568.push(result1567) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1081 : String? = match + let lifted1571 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1080 = mbt_ffi_ptr2str( + let result1570 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1080) + Option::Some(result1570) } _ => panic() } - let lifted1084 : @types.Role? = match + let lifted1574 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1083 = match + let lifted1573 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1082 = mbt_ffi_ptr2str( + let result1572 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1082) + @types.Role::Other(result1572) } _ => panic() } - Option::Some(lifted1083) + Option::Some(lifted1573) } _ => panic() } - array1085.push(@types.VariantCaseType::{ - name: result1070, - payload: lifted1071, + array1575.push(@types.VariantCaseType::{ + name: result1560, + payload: lifted1561, metadata: @types.MetadataEnvelope::{ - doc: lifted1073, - aliases: array1075, - examples: array1078, - deprecated: lifted1081, - role: lifted1084, + doc: lifted1563, + aliases: array1565, + examples: array1568, + deprecated: lifted1571, + role: lifted1574, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1085) + @types.SchemaTypeBody::VariantType(array1575) } 16 => { - let array1088 : Array[String] = [] - for index1089 = 0 - index1089 < mbt_ffi_load32(iter_base + 12) - index1089 = index1089 + 1 { + let array1578 : Array[String] = [] + for index1579 = 0 + index1579 < mbt_ffi_load32(iter_base + 12) + index1579 = index1579 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1089 * 8 + index1579 * 8 - let result1087 = mbt_ffi_ptr2str( + let result1577 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1088.push(result1087) + array1578.push(result1577) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1088) + @types.SchemaTypeBody::EnumType(array1578) } 17 => { - let array1091 : Array[String] = [] - for index1092 = 0 - index1092 < mbt_ffi_load32(iter_base + 12) - index1092 = index1092 + 1 { + let array1581 : Array[String] = [] + for index1582 = 0 + index1582 < mbt_ffi_load32(iter_base + 12) + index1582 = index1582 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1092 * 8 + index1582 * 8 - let result1090 = mbt_ffi_ptr2str( + let result1580 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1091.push(result1090) + array1581.push(result1580) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1091) + @types.SchemaTypeBody::FlagsType(array1581) } 18 => { - let array1093 : Array[Int] = [] - for index1094 = 0 - index1094 < mbt_ffi_load32(iter_base + 12) - index1094 = index1094 + 1 { + let array1583 : Array[Int] = [] + for index1584 = 0 + index1584 < mbt_ffi_load32(iter_base + 12) + index1584 = index1584 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1094 * 4 + index1584 * 4 - array1093.push(mbt_ffi_load32(iter_base + 0)) + array1583.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1093) + @types.SchemaTypeBody::TupleType(array1583) } 19 => @types.SchemaTypeBody::ListType( @@ -29996,14 +43774,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1095 : Int? = match + let lifted1585 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1096 : Int? = match + let lifted1586 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -30011,37 +43789,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1095, - err: lifted1096, + ok: lifted1585, + err: lifted1586, }) } 24 => { - let lifted1100 : Array[String]? = match + let lifted1590 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1098 : Array[String] = [] - for index1099 = 0 - index1099 < mbt_ffi_load32(iter_base + 16) - index1099 = index1099 + 1 { + let array1588 : Array[String] = [] + for index1589 = 0 + index1589 < mbt_ffi_load32(iter_base + 16) + index1589 = index1589 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1099 * 8 + index1589 * 8 - let result1097 = mbt_ffi_ptr2str( + let result1587 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1098.push(result1097) + array1588.push(result1587) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1098) + Option::Some(array1588) } _ => panic() } - let lifted1101 : UInt? = match + let lifted1591 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -30051,7 +43829,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1102 : UInt? = match + let lifted1592 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -30061,54 +43839,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1104 : String? = match + let lifted1594 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1103 = mbt_ffi_ptr2str( + let result1593 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1103) + Option::Some(result1593) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1100, - min_length: lifted1101, - max_length: lifted1102, - regex: lifted1104, + languages: lifted1590, + min_length: lifted1591, + max_length: lifted1592, + regex: lifted1594, }) } 25 => { - let lifted1108 : Array[String]? = match + let lifted1598 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1106 : Array[String] = [] - for index1107 = 0 - index1107 < mbt_ffi_load32(iter_base + 16) - index1107 = index1107 + 1 { + let array1596 : Array[String] = [] + for index1597 = 0 + index1597 < mbt_ffi_load32(iter_base + 16) + index1597 = index1597 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1107 * 8 + index1597 * 8 - let result1105 = mbt_ffi_ptr2str( + let result1595 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1106.push(result1105) + array1596.push(result1595) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1106) + Option::Some(array1596) } _ => panic() } - let lifted1109 : UInt? = match + let lifted1599 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -30118,7 +43896,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1110 : UInt? = match + let lifted1600 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -30129,58 +43907,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1108, - min_bytes: lifted1109, - max_bytes: lifted1110, + mime_types: lifted1598, + min_bytes: lifted1599, + max_bytes: lifted1600, }) } 26 => { - let lifted1114 : Array[String]? = match + let lifted1604 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1112 : Array[String] = [] - for index1113 = 0 - index1113 < mbt_ffi_load32(iter_base + 20) - index1113 = index1113 + 1 { + let array1602 : Array[String] = [] + for index1603 = 0 + index1603 < mbt_ffi_load32(iter_base + 20) + index1603 = index1603 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1113 * 8 + index1603 * 8 - let result1111 = mbt_ffi_ptr2str( + 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 + 16)) - Option::Some(array1112) + Option::Some(array1602) } _ => panic() } - let lifted1118 : Array[String]? = match + let lifted1608 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1116 : Array[String] = [] - for index1117 = 0 - index1117 < mbt_ffi_load32(iter_base + 32) - index1117 = index1117 + 1 { + let array1606 : Array[String] = [] + for index1607 = 0 + index1607 < mbt_ffi_load32(iter_base + 32) + index1607 = index1607 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1117 * 8 + index1607 * 8 - let result1115 = mbt_ffi_ptr2str( + let result1605 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1116.push(result1115) + array1606.push(result1605) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1116) + Option::Some(array1606) } _ => panic() } @@ -30192,95 +43970,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1114, - allowed_extensions: lifted1118, + allowed_mime_types: lifted1604, + allowed_extensions: lifted1608, }) } 27 => { - let lifted1122 : Array[String]? = match + let lifted1612 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1120 : Array[String] = [] - for index1121 = 0 - index1121 < mbt_ffi_load32(iter_base + 16) - index1121 = index1121 + 1 { + let array1610 : Array[String] = [] + for index1611 = 0 + index1611 < mbt_ffi_load32(iter_base + 16) + index1611 = index1611 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1121 * 8 + index1611 * 8 - let result1119 = mbt_ffi_ptr2str( + let result1609 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1120.push(result1119) + array1610.push(result1609) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1120) + Option::Some(array1610) } _ => panic() } - let lifted1126 : Array[String]? = match + let lifted1616 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1124 : Array[String] = [] - for index1125 = 0 - index1125 < mbt_ffi_load32(iter_base + 28) - index1125 = index1125 + 1 { + let array1614 : Array[String] = [] + for index1615 = 0 + index1615 < mbt_ffi_load32(iter_base + 28) + index1615 = index1615 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1125 * 8 + index1615 * 8 - let result1123 = mbt_ffi_ptr2str( + let result1613 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1124.push(result1123) + array1614.push(result1613) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1124) + Option::Some(array1614) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1122, - allowed_hosts: lifted1126, + allowed_schemes: lifted1612, + allowed_hosts: lifted1616, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1127 = mbt_ffi_ptr2str( + let result1617 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1129 : Array[String] = [] - for index1130 = 0 - index1130 < mbt_ffi_load32(iter_base + 20) - index1130 = index1130 + 1 { + let array1619 : Array[String] = [] + for index1620 = 0 + index1620 < mbt_ffi_load32(iter_base + 20) + index1620 = index1620 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1130 * 8 + index1620 * 8 - let result1128 = mbt_ffi_ptr2str( + let result1618 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1129.push(result1128) + array1619.push(result1618) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1132 : @types.QuantityValue? = match + let lifted1622 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1131 = mbt_ffi_ptr2str( + let result1621 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -30288,17 +44066,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1131, + unit: result1621, }) } _ => panic() } - let lifted1134 : @types.QuantityValue? = match + let lifted1624 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1133 = mbt_ffi_ptr2str( + let result1623 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -30306,406 +44084,406 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1133, + unit: result1623, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1127, - allowed_suffixes: array1129, - min: lifted1132, - max: lifted1134, + base_unit: result1617, + allowed_suffixes: array1619, + min: lifted1622, + max: lifted1624, }) } 31 => { - let array1158 : Array[@types.UnionBranch] = [] - for index1159 = 0 - index1159 < mbt_ffi_load32(iter_base + 12) - index1159 = index1159 + 1 { + let array1648 : Array[@types.UnionBranch] = [] + for index1649 = 0 + index1649 < mbt_ffi_load32(iter_base + 12) + index1649 = index1649 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1159 * 92 + index1649 * 92 - let result1135 = mbt_ffi_ptr2str( + let result1625 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1144 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1634 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1136 = mbt_ffi_ptr2str( + let result1626 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1136) + @types.DiscriminatorRule::Prefix(result1626) } 1 => { - let result1137 = mbt_ffi_ptr2str( + let result1627 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1137) + @types.DiscriminatorRule::Suffix(result1627) } 2 => { - let result1138 = mbt_ffi_ptr2str( + let result1628 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1138) + @types.DiscriminatorRule::Contains(result1628) } 3 => { - let result1139 = mbt_ffi_ptr2str( + let result1629 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1139) + @types.DiscriminatorRule::Regex(result1629) } 4 => { - let result1140 = mbt_ffi_ptr2str( + let result1630 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1142 : String? = match + let lifted1632 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1141 = mbt_ffi_ptr2str( + let result1631 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1141) + Option::Some(result1631) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1140, - literal: lifted1142, + field_name: result1630, + literal: lifted1632, }) } 5 => { - let result1143 = mbt_ffi_ptr2str( + let result1633 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1143) + @types.DiscriminatorRule::FieldAbsent(result1633) } _ => panic() } - let lifted1146 : String? = match + let lifted1636 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1145 = mbt_ffi_ptr2str( + let result1635 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1145) + Option::Some(result1635) } _ => panic() } - let array1148 : Array[String] = [] - for index1149 = 0 - index1149 < mbt_ffi_load32(iter_base + 52) - index1149 = index1149 + 1 { + let array1638 : Array[String] = [] + for index1639 = 0 + index1639 < mbt_ffi_load32(iter_base + 52) + index1639 = index1639 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1149 * 8 + index1639 * 8 - let result1147 = mbt_ffi_ptr2str( + let result1637 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1148.push(result1147) + array1638.push(result1637) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1151 : Array[String] = [] - for index1152 = 0 - index1152 < mbt_ffi_load32(iter_base + 60) - index1152 = index1152 + 1 { + let array1641 : Array[String] = [] + for index1642 = 0 + index1642 < mbt_ffi_load32(iter_base + 60) + index1642 = index1642 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1152 * 8 + index1642 * 8 - let result1150 = mbt_ffi_ptr2str( + let result1640 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1151.push(result1150) + array1641.push(result1640) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1154 : String? = match + let lifted1644 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1153 = mbt_ffi_ptr2str( + let result1643 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1153) + Option::Some(result1643) } _ => panic() } - let lifted1157 : @types.Role? = match + let lifted1647 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1156 = match + let lifted1646 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1155 = mbt_ffi_ptr2str( + let result1645 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1155) + @types.Role::Other(result1645) } _ => panic() } - Option::Some(lifted1156) + Option::Some(lifted1646) } _ => panic() } - array1158.push(@types.UnionBranch::{ - tag: result1135, + array1648.push(@types.UnionBranch::{ + tag: result1625, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1144, + discriminator: lifted1634, metadata: @types.MetadataEnvelope::{ - doc: lifted1146, - aliases: array1148, - examples: array1151, - deprecated: lifted1154, - role: lifted1157, + doc: lifted1636, + aliases: array1638, + examples: array1641, + deprecated: lifted1644, + role: lifted1647, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1158, + branches: array1648, }) } 32 => { - let lifted1161 : String? = match + let lifted1651 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1160 = mbt_ffi_ptr2str( + let result1650 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1160) + Option::Some(result1650) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1161, + category: lifted1651, }) } 33 => { - let lifted1163 : String? = match + let lifted1653 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1162 = mbt_ffi_ptr2str( + let result1652 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1162) + Option::Some(result1652) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1163, + resource_name: lifted1653, }) } 34 => { - let lifted1164 : Int? = match + let lifted1654 : 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(lifted1164) + @types.SchemaTypeBody::FutureType(lifted1654) } 35 => { - let lifted1165 : Int? = match + let lifted1655 : 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(lifted1165) + @types.SchemaTypeBody::StreamType(lifted1655) } _ => panic() } - let lifted1168 : String? = match + let lifted1658 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1167 = mbt_ffi_ptr2str( + let result1657 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1167) + Option::Some(result1657) } _ => panic() } - let array1170 : Array[String] = [] - for index1171 = 0 - index1171 < mbt_ffi_load32(iter_base + 104) - index1171 = index1171 + 1 { + let array1660 : Array[String] = [] + for index1661 = 0 + index1661 < mbt_ffi_load32(iter_base + 104) + index1661 = index1661 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1171 * 8 + index1661 * 8 - let result1169 = mbt_ffi_ptr2str( + let result1659 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1170.push(result1169) + array1660.push(result1659) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1173 : Array[String] = [] - for index1174 = 0 - index1174 < mbt_ffi_load32(iter_base + 112) - index1174 = index1174 + 1 { + let array1663 : Array[String] = [] + for index1664 = 0 + index1664 < mbt_ffi_load32(iter_base + 112) + index1664 = index1664 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1174 * 8 + index1664 * 8 - let result1172 = mbt_ffi_ptr2str( + let result1662 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1173.push(result1172) + array1663.push(result1662) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1176 : String? = match + let lifted1666 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1175 = mbt_ffi_ptr2str( + let result1665 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1175) + Option::Some(result1665) } _ => panic() } - let lifted1179 : @types.Role? = match + let lifted1669 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1178 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1668 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1177 = mbt_ffi_ptr2str( + let result1667 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1177) + @types.Role::Other(result1667) } _ => panic() } - Option::Some(lifted1178) + Option::Some(lifted1668) } _ => panic() } - array1180.push(@types.SchemaTypeNode::{ - body: lifted1166, + array1670.push(@types.SchemaTypeNode::{ + body: lifted1656, metadata: @types.MetadataEnvelope::{ - doc: lifted1168, - aliases: array1170, - examples: array1173, - deprecated: lifted1176, - role: lifted1179, + doc: lifted1658, + aliases: array1660, + examples: array1663, + deprecated: lifted1666, + role: lifted1669, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1185 : Array[@types.SchemaTypeDef] = [] - for index1186 = 0 - index1186 < mbt_ffi_load32(iter_base + 40) - index1186 = index1186 + 1 { + let array1675 : Array[@types.SchemaTypeDef] = [] + for index1676 = 0 + index1676 < mbt_ffi_load32(iter_base + 40) + index1676 = index1676 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1186 * 24 + index1676 * 24 - let result1182 = mbt_ffi_ptr2str( + let result1672 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1184 : String? = match + let lifted1674 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1183 = mbt_ffi_ptr2str( + let result1673 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1183) + Option::Some(result1673) } _ => panic() } - array1185.push(@types.SchemaTypeDef::{ - id: result1182, - name: lifted1184, + array1675.push(@types.SchemaTypeDef::{ + id: result1672, + name: lifted1674, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array1216 : Array[@types.SchemaValueNode] = [] - for index1217 = 0 - index1217 < mbt_ffi_load32(iter_base + 52) - index1217 = index1217 + 1 { + let array1706 : Array[@types.SchemaValueNode] = [] + for index1707 = 0 + index1707 < mbt_ffi_load32(iter_base + 52) + index1707 = index1707 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1217 * 32 + index1707 * 32 - let lifted1215 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1705 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -30757,29 +44535,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1187 = mbt_ffi_ptr2str( + let result1677 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1187) + @types.SchemaValueNode::StringValue(result1677) } 13 => { - let array1188 : Array[Int] = [] - for index1189 = 0 - index1189 < mbt_ffi_load32(iter_base + 12) - index1189 = index1189 + 1 { + let array1678 : Array[Int] = [] + for index1679 = 0 + index1679 < mbt_ffi_load32(iter_base + 12) + index1679 = index1679 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1189 * 4 + index1679 * 4 - array1188.push(mbt_ffi_load32(iter_base + 0)) + array1678.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1188) + @types.SchemaValueNode::RecordValue(array1678) } 14 => { - let lifted1190 : Int? = match + let lifted1680 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -30788,7 +44566,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1190, + payload: lifted1680, }) } 15 => @@ -30796,180 +44574,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1191 : Array[Bool] = [] - for index1192 = 0 - index1192 < mbt_ffi_load32(iter_base + 12) - index1192 = index1192 + 1 { + let array1681 : Array[Bool] = [] + for index1682 = 0 + index1682 < mbt_ffi_load32(iter_base + 12) + index1682 = index1682 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1192 * 1 + index1682 * 1 - array1191.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1681.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1191) + @types.SchemaValueNode::FlagsValue(array1681) } 17 => { - let array1193 : Array[Int] = [] - for index1194 = 0 - index1194 < mbt_ffi_load32(iter_base + 12) - index1194 = index1194 + 1 { + let array1683 : Array[Int] = [] + for index1684 = 0 + index1684 < mbt_ffi_load32(iter_base + 12) + index1684 = index1684 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1194 * 4 + index1684 * 4 - array1193.push(mbt_ffi_load32(iter_base + 0)) + array1683.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1193) + @types.SchemaValueNode::TupleValue(array1683) } 18 => { - let array1195 : Array[Int] = [] - for index1196 = 0 - index1196 < mbt_ffi_load32(iter_base + 12) - index1196 = index1196 + 1 { + let array1685 : Array[Int] = [] + for index1686 = 0 + index1686 < mbt_ffi_load32(iter_base + 12) + index1686 = index1686 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1196 * 4 + index1686 * 4 - array1195.push(mbt_ffi_load32(iter_base + 0)) + array1685.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1195) + @types.SchemaValueNode::ListValue(array1685) } 19 => { - let array1197 : Array[Int] = [] - for index1198 = 0 - index1198 < mbt_ffi_load32(iter_base + 12) - index1198 = index1198 + 1 { + let array1687 : Array[Int] = [] + for index1688 = 0 + index1688 < mbt_ffi_load32(iter_base + 12) + index1688 = index1688 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1198 * 4 + index1688 * 4 - array1197.push(mbt_ffi_load32(iter_base + 0)) + array1687.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1197) + @types.SchemaValueNode::FixedListValue(array1687) } 20 => { - let array1199 : Array[@types.MapEntry] = [] - for index1200 = 0 - index1200 < mbt_ffi_load32(iter_base + 12) - index1200 = index1200 + 1 { + let array1689 : Array[@types.MapEntry] = [] + for index1690 = 0 + index1690 < mbt_ffi_load32(iter_base + 12) + index1690 = index1690 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1200 * 8 + index1690 * 8 - array1199.push(@types.MapEntry::{ + array1689.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(array1199) + @types.SchemaValueNode::MapValue(array1689) } 21 => { - let lifted1201 : Int? = match + let lifted1691 : 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(lifted1201) + @types.SchemaValueNode::OptionValue(lifted1691) } 22 => { - let lifted1204 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1694 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1202 : Int? = match + let lifted1692 : 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(lifted1202) + @types.ResultValuePayload::OkValue(lifted1692) } 1 => { - let lifted1203 : Int? = match + let lifted1693 : 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(lifted1203) + @types.ResultValuePayload::ErrValue(lifted1693) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1204) + @types.SchemaValueNode::ResultValue(lifted1694) } 23 => { - let result1205 = mbt_ffi_ptr2str( + let result1695 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1207 : String? = match + let lifted1697 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1206 = mbt_ffi_ptr2str( + let result1696 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1206) + Option::Some(result1696) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1205, - language: lifted1207, + text: result1695, + language: lifted1697, }) } 24 => { - let result1208 = mbt_ffi_ptr2bytes( + let result1698 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1210 : String? = match + let lifted1700 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1209 = mbt_ffi_ptr2str( + let result1699 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1209) + Option::Some(result1699) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1208, - mime_type: lifted1210, + bytes: result1698, + mime_type: lifted1700, }) } 25 => { - let result1211 = mbt_ffi_ptr2str( + let result1701 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1211) + @types.SchemaValueNode::PathValue(result1701) } 26 => { - let result1212 = mbt_ffi_ptr2str( + let result1702 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1212) + @types.SchemaValueNode::UrlValue(result1702) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -30981,7 +44759,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1213 = mbt_ffi_ptr2str( + let result1703 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -30989,17 +44767,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1213, + unit: result1703, }) } 30 => { - let result1214 = mbt_ffi_ptr2str( + let result1704 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1214, + tag: result1704, body: mbt_ffi_load32(iter_base + 16), }) } @@ -31016,336 +44794,1146 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1216.push(lifted1215) + array1706.push(lifted1705) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) AgentInvocationResult::AgentInitialization(AgentInvocationOutputParameters::{ output: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1180, - defs: array1185, + type_nodes: array1670, + defs: array1675, root: mbt_ffi_load32(iter_base + 44), }, value: @types.SchemaValueTree::{ - value_nodes: array1216, + value_nodes: array1706, root: mbt_ffi_load32(iter_base + 56), }, }, }) } 1 => { - let array1344 : Array[@types.SchemaTypeNode] = [] - for index1345 = 0 - index1345 < mbt_ffi_load32(iter_base + 32) - index1345 = index1345 + 1 { + let array1904 : Array[@types.SchemaTypeNode] = [] + for index1905 = 0 + index1905 < mbt_ffi_load32(iter_base + 32) + index1905 = index1905 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1345 * 144 + index1905 * 144 - let lifted1330 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1890 = 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 + 2 => { + let lifted1714 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1709 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1708 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1708) + } + _ => panic() + } + + let lifted1711 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1710 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1710) + } + _ => panic() + } + + let lifted1713 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1712 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1712) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1709, + max: lifted1711, + unit: lifted1713, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1714) + } + 3 => { + 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::S16Type(lifted1721) + } + 4 => { + 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::S32Type(lifted1728) + } + 5 => { + 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::S64Type(lifted1735) + } + 6 => { + 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::U8Type(lifted1742) + } + 7 => { + 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::U16Type(lifted1749) + } + 8 => { + 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::U32Type(lifted1756) + } + 9 => { + 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::U64Type(lifted1763) + } + 10 => { + 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::F32Type(lifted1770) + } + 11 => { + 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::F64Type(lifted1777) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1232 : Array[@types.NamedFieldType] = [] - for index1233 = 0 - index1233 < mbt_ffi_load32(iter_base + 12) - index1233 = index1233 + 1 { + let array1792 : Array[@types.NamedFieldType] = [] + for index1793 = 0 + index1793 < mbt_ffi_load32(iter_base + 12) + index1793 = index1793 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1233 * 68 + index1793 * 68 - let result1218 = mbt_ffi_ptr2str( + let result1778 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1220 : String? = match + let lifted1780 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1219 = mbt_ffi_ptr2str( + let result1779 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1219) + Option::Some(result1779) } _ => panic() } - let array1222 : Array[String] = [] - for index1223 = 0 - index1223 < mbt_ffi_load32(iter_base + 28) - index1223 = index1223 + 1 { + let array1782 : Array[String] = [] + for index1783 = 0 + index1783 < mbt_ffi_load32(iter_base + 28) + index1783 = index1783 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1223 * 8 + index1783 * 8 - let result1221 = mbt_ffi_ptr2str( + let result1781 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1222.push(result1221) + array1782.push(result1781) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1225 : Array[String] = [] - for index1226 = 0 - index1226 < mbt_ffi_load32(iter_base + 36) - index1226 = index1226 + 1 { + let array1785 : Array[String] = [] + for index1786 = 0 + index1786 < mbt_ffi_load32(iter_base + 36) + index1786 = index1786 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1226 * 8 + index1786 * 8 - let result1224 = mbt_ffi_ptr2str( + let result1784 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1225.push(result1224) + array1785.push(result1784) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1228 : String? = match + let lifted1788 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1227 = mbt_ffi_ptr2str( + let result1787 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1227) + Option::Some(result1787) } _ => panic() } - let lifted1231 : @types.Role? = match + let lifted1791 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1230 = match + let lifted1790 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1229 = mbt_ffi_ptr2str( + let result1789 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1229) + @types.Role::Other(result1789) } _ => panic() } - Option::Some(lifted1230) + Option::Some(lifted1790) } _ => panic() } - array1232.push(@types.NamedFieldType::{ - name: result1218, + array1792.push(@types.NamedFieldType::{ + name: result1778, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1220, - aliases: array1222, - examples: array1225, - deprecated: lifted1228, - role: lifted1231, + doc: lifted1780, + aliases: array1782, + examples: array1785, + deprecated: lifted1788, + role: lifted1791, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1232) + @types.SchemaTypeBody::RecordType(array1792) } 15 => { - let array1249 : Array[@types.VariantCaseType] = [] - for index1250 = 0 - index1250 < mbt_ffi_load32(iter_base + 12) - index1250 = index1250 + 1 { + let array1809 : Array[@types.VariantCaseType] = [] + for index1810 = 0 + index1810 < mbt_ffi_load32(iter_base + 12) + index1810 = index1810 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1250 * 72 + index1810 * 72 - let result1234 = mbt_ffi_ptr2str( + let result1794 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1235 : Int? = match + let lifted1795 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1237 : String? = match + let lifted1797 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1236 = mbt_ffi_ptr2str( + let result1796 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1236) + Option::Some(result1796) } _ => panic() } - let array1239 : Array[String] = [] - for index1240 = 0 - index1240 < mbt_ffi_load32(iter_base + 32) - index1240 = index1240 + 1 { + let array1799 : Array[String] = [] + for index1800 = 0 + index1800 < mbt_ffi_load32(iter_base + 32) + index1800 = index1800 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1240 * 8 + index1800 * 8 - let result1238 = mbt_ffi_ptr2str( + let result1798 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1239.push(result1238) + array1799.push(result1798) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1242 : Array[String] = [] - for index1243 = 0 - index1243 < mbt_ffi_load32(iter_base + 40) - index1243 = index1243 + 1 { + let array1802 : Array[String] = [] + for index1803 = 0 + index1803 < mbt_ffi_load32(iter_base + 40) + index1803 = index1803 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1243 * 8 + index1803 * 8 - let result1241 = mbt_ffi_ptr2str( + let result1801 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1242.push(result1241) + array1802.push(result1801) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1245 : String? = match + let lifted1805 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1244 = mbt_ffi_ptr2str( + let result1804 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1244) + Option::Some(result1804) } _ => panic() } - let lifted1248 : @types.Role? = match + let lifted1808 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1247 = match + let lifted1807 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1246 = mbt_ffi_ptr2str( + let result1806 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1246) + @types.Role::Other(result1806) } _ => panic() } - Option::Some(lifted1247) + Option::Some(lifted1807) } _ => panic() } - array1249.push(@types.VariantCaseType::{ - name: result1234, - payload: lifted1235, + array1809.push(@types.VariantCaseType::{ + name: result1794, + payload: lifted1795, metadata: @types.MetadataEnvelope::{ - doc: lifted1237, - aliases: array1239, - examples: array1242, - deprecated: lifted1245, - role: lifted1248, + doc: lifted1797, + aliases: array1799, + examples: array1802, + deprecated: lifted1805, + role: lifted1808, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1249) + @types.SchemaTypeBody::VariantType(array1809) } 16 => { - let array1252 : Array[String] = [] - for index1253 = 0 - index1253 < mbt_ffi_load32(iter_base + 12) - index1253 = index1253 + 1 { + let array1812 : Array[String] = [] + for index1813 = 0 + index1813 < mbt_ffi_load32(iter_base + 12) + index1813 = index1813 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1253 * 8 + index1813 * 8 - let result1251 = mbt_ffi_ptr2str( + let result1811 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1252.push(result1251) + array1812.push(result1811) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1252) + @types.SchemaTypeBody::EnumType(array1812) } 17 => { - let array1255 : Array[String] = [] - for index1256 = 0 - index1256 < mbt_ffi_load32(iter_base + 12) - index1256 = index1256 + 1 { + let array1815 : Array[String] = [] + for index1816 = 0 + index1816 < mbt_ffi_load32(iter_base + 12) + index1816 = index1816 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1256 * 8 + index1816 * 8 - let result1254 = mbt_ffi_ptr2str( + let result1814 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1255.push(result1254) + array1815.push(result1814) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1255) + @types.SchemaTypeBody::FlagsType(array1815) } 18 => { - let array1257 : Array[Int] = [] - for index1258 = 0 - index1258 < mbt_ffi_load32(iter_base + 12) - index1258 = index1258 + 1 { + let array1817 : Array[Int] = [] + for index1818 = 0 + index1818 < mbt_ffi_load32(iter_base + 12) + index1818 = index1818 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1258 * 4 + index1818 * 4 - array1257.push(mbt_ffi_load32(iter_base + 0)) + array1817.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1257) + @types.SchemaTypeBody::TupleType(array1817) } 19 => @types.SchemaTypeBody::ListType( @@ -31366,14 +45954,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1259 : Int? = match + let lifted1819 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1260 : Int? = match + let lifted1820 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -31381,37 +45969,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1259, - err: lifted1260, + ok: lifted1819, + err: lifted1820, }) } 24 => { - let lifted1264 : Array[String]? = match + let lifted1824 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1262 : Array[String] = [] - for index1263 = 0 - index1263 < mbt_ffi_load32(iter_base + 16) - index1263 = index1263 + 1 { + let array1822 : Array[String] = [] + for index1823 = 0 + index1823 < mbt_ffi_load32(iter_base + 16) + index1823 = index1823 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1263 * 8 + index1823 * 8 - let result1261 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array1262) + Option::Some(array1822) } _ => panic() } - let lifted1265 : UInt? = match + let lifted1825 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -31421,7 +46009,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1266 : UInt? = match + let lifted1826 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -31431,54 +46019,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1268 : String? = match + let lifted1828 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1267 = mbt_ffi_ptr2str( + let result1827 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1267) + Option::Some(result1827) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1264, - min_length: lifted1265, - max_length: lifted1266, - regex: lifted1268, + languages: lifted1824, + min_length: lifted1825, + max_length: lifted1826, + regex: lifted1828, }) } 25 => { - let lifted1272 : Array[String]? = match + let lifted1832 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1270 : Array[String] = [] - for index1271 = 0 - index1271 < mbt_ffi_load32(iter_base + 16) - index1271 = index1271 + 1 { + let array1830 : Array[String] = [] + for index1831 = 0 + index1831 < mbt_ffi_load32(iter_base + 16) + index1831 = index1831 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1271 * 8 + index1831 * 8 - let result1269 = mbt_ffi_ptr2str( + let result1829 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1270.push(result1269) + array1830.push(result1829) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1270) + Option::Some(array1830) } _ => panic() } - let lifted1273 : UInt? = match + let lifted1833 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -31488,7 +46076,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1274 : UInt? = match + let lifted1834 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -31499,58 +46087,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1272, - min_bytes: lifted1273, - max_bytes: lifted1274, + mime_types: lifted1832, + min_bytes: lifted1833, + max_bytes: lifted1834, }) } 26 => { - let lifted1278 : Array[String]? = match + let lifted1838 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1276 : Array[String] = [] - for index1277 = 0 - index1277 < mbt_ffi_load32(iter_base + 20) - index1277 = index1277 + 1 { + let array1836 : Array[String] = [] + for index1837 = 0 + index1837 < mbt_ffi_load32(iter_base + 20) + index1837 = index1837 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1277 * 8 + index1837 * 8 - let result1275 = mbt_ffi_ptr2str( + let result1835 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1276.push(result1275) + array1836.push(result1835) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1276) + Option::Some(array1836) } _ => panic() } - let lifted1282 : Array[String]? = match + let lifted1842 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1280 : Array[String] = [] - for index1281 = 0 - index1281 < mbt_ffi_load32(iter_base + 32) - index1281 = index1281 + 1 { + let array1840 : Array[String] = [] + for index1841 = 0 + index1841 < mbt_ffi_load32(iter_base + 32) + index1841 = index1841 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1281 * 8 + index1841 * 8 - let result1279 = mbt_ffi_ptr2str( + let result1839 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1280.push(result1279) + array1840.push(result1839) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1280) + Option::Some(array1840) } _ => panic() } @@ -31562,95 +46150,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1278, - allowed_extensions: lifted1282, + allowed_mime_types: lifted1838, + allowed_extensions: lifted1842, }) } 27 => { - let lifted1286 : Array[String]? = match + let lifted1846 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1284 : Array[String] = [] - for index1285 = 0 - index1285 < mbt_ffi_load32(iter_base + 16) - index1285 = index1285 + 1 { + let array1844 : Array[String] = [] + for index1845 = 0 + index1845 < mbt_ffi_load32(iter_base + 16) + index1845 = index1845 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1285 * 8 + index1845 * 8 - let result1283 = mbt_ffi_ptr2str( + let result1843 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1284.push(result1283) + array1844.push(result1843) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1284) + Option::Some(array1844) } _ => panic() } - let lifted1290 : Array[String]? = match + let lifted1850 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1288 : Array[String] = [] - for index1289 = 0 - index1289 < mbt_ffi_load32(iter_base + 28) - index1289 = index1289 + 1 { + let array1848 : Array[String] = [] + for index1849 = 0 + index1849 < mbt_ffi_load32(iter_base + 28) + index1849 = index1849 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1289 * 8 + index1849 * 8 - let result1287 = mbt_ffi_ptr2str( + let result1847 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1288.push(result1287) + array1848.push(result1847) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1288) + Option::Some(array1848) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1286, - allowed_hosts: lifted1290, + allowed_schemes: lifted1846, + allowed_hosts: lifted1850, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1291 = mbt_ffi_ptr2str( + let result1851 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1293 : Array[String] = [] - for index1294 = 0 - index1294 < mbt_ffi_load32(iter_base + 20) - index1294 = index1294 + 1 { + let array1853 : Array[String] = [] + for index1854 = 0 + index1854 < mbt_ffi_load32(iter_base + 20) + index1854 = index1854 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1294 * 8 + index1854 * 8 - let result1292 = mbt_ffi_ptr2str( + let result1852 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1293.push(result1292) + array1853.push(result1852) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1296 : @types.QuantityValue? = match + let lifted1856 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1295 = mbt_ffi_ptr2str( + let result1855 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -31658,17 +46246,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1295, + unit: result1855, }) } _ => panic() } - let lifted1298 : @types.QuantityValue? = match + let lifted1858 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1297 = mbt_ffi_ptr2str( + let result1857 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -31676,406 +46264,406 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1297, + unit: result1857, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1291, - allowed_suffixes: array1293, - min: lifted1296, - max: lifted1298, + base_unit: result1851, + allowed_suffixes: array1853, + min: lifted1856, + max: lifted1858, }) } 31 => { - let array1322 : Array[@types.UnionBranch] = [] - for index1323 = 0 - index1323 < mbt_ffi_load32(iter_base + 12) - index1323 = index1323 + 1 { + let array1882 : Array[@types.UnionBranch] = [] + for index1883 = 0 + index1883 < mbt_ffi_load32(iter_base + 12) + index1883 = index1883 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1323 * 92 + index1883 * 92 - let result1299 = mbt_ffi_ptr2str( + let result1859 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1308 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1868 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1300 = mbt_ffi_ptr2str( + let result1860 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1300) + @types.DiscriminatorRule::Prefix(result1860) } 1 => { - let result1301 = mbt_ffi_ptr2str( + let result1861 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1301) + @types.DiscriminatorRule::Suffix(result1861) } 2 => { - let result1302 = mbt_ffi_ptr2str( + let result1862 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1302) + @types.DiscriminatorRule::Contains(result1862) } 3 => { - let result1303 = mbt_ffi_ptr2str( + let result1863 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1303) + @types.DiscriminatorRule::Regex(result1863) } 4 => { - let result1304 = mbt_ffi_ptr2str( + let result1864 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1306 : String? = match + let lifted1866 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1305 = mbt_ffi_ptr2str( + let result1865 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1305) + Option::Some(result1865) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1304, - literal: lifted1306, + field_name: result1864, + literal: lifted1866, }) } 5 => { - let result1307 = mbt_ffi_ptr2str( + let result1867 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1307) + @types.DiscriminatorRule::FieldAbsent(result1867) } _ => panic() } - let lifted1310 : String? = match + let lifted1870 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1309 = mbt_ffi_ptr2str( + let result1869 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1309) + Option::Some(result1869) } _ => panic() } - let array1312 : Array[String] = [] - for index1313 = 0 - index1313 < mbt_ffi_load32(iter_base + 52) - index1313 = index1313 + 1 { + let array1872 : Array[String] = [] + for index1873 = 0 + index1873 < mbt_ffi_load32(iter_base + 52) + index1873 = index1873 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1313 * 8 + index1873 * 8 - let result1311 = mbt_ffi_ptr2str( + let result1871 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1312.push(result1311) + array1872.push(result1871) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1315 : Array[String] = [] - for index1316 = 0 - index1316 < mbt_ffi_load32(iter_base + 60) - index1316 = index1316 + 1 { + let array1875 : Array[String] = [] + for index1876 = 0 + index1876 < mbt_ffi_load32(iter_base + 60) + index1876 = index1876 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1316 * 8 + index1876 * 8 - let result1314 = mbt_ffi_ptr2str( + let result1874 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1315.push(result1314) + array1875.push(result1874) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1318 : String? = match + let lifted1878 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1317 = mbt_ffi_ptr2str( + let result1877 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1317) + Option::Some(result1877) } _ => panic() } - let lifted1321 : @types.Role? = match + let lifted1881 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1320 = match + let lifted1880 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1319 = mbt_ffi_ptr2str( + let result1879 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1319) + @types.Role::Other(result1879) } _ => panic() } - Option::Some(lifted1320) + Option::Some(lifted1880) } _ => panic() } - array1322.push(@types.UnionBranch::{ - tag: result1299, + array1882.push(@types.UnionBranch::{ + tag: result1859, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1308, + discriminator: lifted1868, metadata: @types.MetadataEnvelope::{ - doc: lifted1310, - aliases: array1312, - examples: array1315, - deprecated: lifted1318, - role: lifted1321, + doc: lifted1870, + aliases: array1872, + examples: array1875, + deprecated: lifted1878, + role: lifted1881, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1322, + branches: array1882, }) } 32 => { - let lifted1325 : String? = match + let lifted1885 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1324 = mbt_ffi_ptr2str( + let result1884 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1324) + Option::Some(result1884) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1325, + category: lifted1885, }) } 33 => { - let lifted1327 : String? = match + let lifted1887 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1326 = mbt_ffi_ptr2str( + let result1886 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1326) + Option::Some(result1886) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1327, + resource_name: lifted1887, }) } 34 => { - let lifted1328 : Int? = match + let lifted1888 : 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(lifted1328) + @types.SchemaTypeBody::FutureType(lifted1888) } 35 => { - let lifted1329 : Int? = match + let lifted1889 : 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(lifted1329) + @types.SchemaTypeBody::StreamType(lifted1889) } _ => panic() } - let lifted1332 : String? = match + let lifted1892 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1331 = mbt_ffi_ptr2str( + let result1891 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1331) + Option::Some(result1891) } _ => panic() } - let array1334 : Array[String] = [] - for index1335 = 0 - index1335 < mbt_ffi_load32(iter_base + 104) - index1335 = index1335 + 1 { + let array1894 : Array[String] = [] + for index1895 = 0 + index1895 < mbt_ffi_load32(iter_base + 104) + index1895 = index1895 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1335 * 8 + index1895 * 8 - let result1333 = mbt_ffi_ptr2str( + let result1893 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1334.push(result1333) + array1894.push(result1893) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1337 : Array[String] = [] - for index1338 = 0 - index1338 < mbt_ffi_load32(iter_base + 112) - index1338 = index1338 + 1 { + let array1897 : Array[String] = [] + for index1898 = 0 + index1898 < mbt_ffi_load32(iter_base + 112) + index1898 = index1898 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1338 * 8 + index1898 * 8 - let result1336 = mbt_ffi_ptr2str( + let result1896 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1337.push(result1336) + array1897.push(result1896) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1340 : String? = match + let lifted1900 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1339 = mbt_ffi_ptr2str( + let result1899 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1339) + Option::Some(result1899) } _ => panic() } - let lifted1343 : @types.Role? = match + let lifted1903 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1342 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1902 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1341 = mbt_ffi_ptr2str( + let result1901 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1341) + @types.Role::Other(result1901) } _ => panic() } - Option::Some(lifted1342) + Option::Some(lifted1902) } _ => panic() } - array1344.push(@types.SchemaTypeNode::{ - body: lifted1330, + array1904.push(@types.SchemaTypeNode::{ + body: lifted1890, metadata: @types.MetadataEnvelope::{ - doc: lifted1332, - aliases: array1334, - examples: array1337, - deprecated: lifted1340, - role: lifted1343, + doc: lifted1892, + aliases: array1894, + examples: array1897, + deprecated: lifted1900, + role: lifted1903, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1349 : Array[@types.SchemaTypeDef] = [] - for index1350 = 0 - index1350 < mbt_ffi_load32(iter_base + 40) - index1350 = index1350 + 1 { + let array1909 : Array[@types.SchemaTypeDef] = [] + for index1910 = 0 + index1910 < mbt_ffi_load32(iter_base + 40) + index1910 = index1910 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1350 * 24 + index1910 * 24 - let result1346 = mbt_ffi_ptr2str( + let result1906 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1348 : String? = match + let lifted1908 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1347 = mbt_ffi_ptr2str( + let result1907 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1347) + Option::Some(result1907) } _ => panic() } - array1349.push(@types.SchemaTypeDef::{ - id: result1346, - name: lifted1348, + array1909.push(@types.SchemaTypeDef::{ + id: result1906, + name: lifted1908, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array1380 : Array[@types.SchemaValueNode] = [] - for index1381 = 0 - index1381 < mbt_ffi_load32(iter_base + 52) - index1381 = index1381 + 1 { + let array1940 : Array[@types.SchemaValueNode] = [] + for index1941 = 0 + index1941 < mbt_ffi_load32(iter_base + 52) + index1941 = index1941 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1381 * 32 + index1941 * 32 - let lifted1379 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1939 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -32127,29 +46715,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1351 = mbt_ffi_ptr2str( + let result1911 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1351) + @types.SchemaValueNode::StringValue(result1911) } 13 => { - let array1352 : Array[Int] = [] - for index1353 = 0 - index1353 < mbt_ffi_load32(iter_base + 12) - index1353 = index1353 + 1 { + let array1912 : Array[Int] = [] + for index1913 = 0 + index1913 < mbt_ffi_load32(iter_base + 12) + index1913 = index1913 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1353 * 4 + index1913 * 4 - array1352.push(mbt_ffi_load32(iter_base + 0)) + array1912.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1352) + @types.SchemaValueNode::RecordValue(array1912) } 14 => { - let lifted1354 : Int? = match + let lifted1914 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -32158,7 +46746,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1354, + payload: lifted1914, }) } 15 => @@ -32166,180 +46754,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1355 : Array[Bool] = [] - for index1356 = 0 - index1356 < mbt_ffi_load32(iter_base + 12) - index1356 = index1356 + 1 { + let array1915 : Array[Bool] = [] + for index1916 = 0 + index1916 < mbt_ffi_load32(iter_base + 12) + index1916 = index1916 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1356 * 1 + index1916 * 1 - array1355.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1915.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1355) + @types.SchemaValueNode::FlagsValue(array1915) } 17 => { - let array1357 : Array[Int] = [] - for index1358 = 0 - index1358 < mbt_ffi_load32(iter_base + 12) - index1358 = index1358 + 1 { + let array1917 : Array[Int] = [] + for index1918 = 0 + index1918 < mbt_ffi_load32(iter_base + 12) + index1918 = index1918 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1358 * 4 + index1918 * 4 - array1357.push(mbt_ffi_load32(iter_base + 0)) + array1917.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1357) + @types.SchemaValueNode::TupleValue(array1917) } 18 => { - let array1359 : Array[Int] = [] - for index1360 = 0 - index1360 < mbt_ffi_load32(iter_base + 12) - index1360 = index1360 + 1 { + 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) + - index1360 * 4 + 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::ListValue(array1359) + @types.SchemaValueNode::ListValue(array1919) } 19 => { - let array1361 : Array[Int] = [] - for index1362 = 0 - index1362 < mbt_ffi_load32(iter_base + 12) - index1362 = index1362 + 1 { + let array1921 : Array[Int] = [] + for index1922 = 0 + index1922 < mbt_ffi_load32(iter_base + 12) + index1922 = index1922 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1362 * 4 + index1922 * 4 - array1361.push(mbt_ffi_load32(iter_base + 0)) + array1921.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1361) + @types.SchemaValueNode::FixedListValue(array1921) } 20 => { - let array1363 : Array[@types.MapEntry] = [] - for index1364 = 0 - index1364 < mbt_ffi_load32(iter_base + 12) - index1364 = index1364 + 1 { + let array1923 : Array[@types.MapEntry] = [] + for index1924 = 0 + index1924 < mbt_ffi_load32(iter_base + 12) + index1924 = index1924 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1364 * 8 + index1924 * 8 - array1363.push(@types.MapEntry::{ + array1923.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(array1363) + @types.SchemaValueNode::MapValue(array1923) } 21 => { - let lifted1365 : Int? = match + let lifted1925 : 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(lifted1365) + @types.SchemaValueNode::OptionValue(lifted1925) } 22 => { - let lifted1368 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1928 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1366 : Int? = match + let lifted1926 : 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(lifted1366) + @types.ResultValuePayload::OkValue(lifted1926) } 1 => { - let lifted1367 : Int? = match + let lifted1927 : 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(lifted1367) + @types.ResultValuePayload::ErrValue(lifted1927) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1368) + @types.SchemaValueNode::ResultValue(lifted1928) } 23 => { - let result1369 = mbt_ffi_ptr2str( + let result1929 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1371 : String? = match + let lifted1931 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1370 = mbt_ffi_ptr2str( + let result1930 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1370) + Option::Some(result1930) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1369, - language: lifted1371, + text: result1929, + language: lifted1931, }) } 24 => { - let result1372 = mbt_ffi_ptr2bytes( + let result1932 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1374 : String? = match + let lifted1934 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1373 = mbt_ffi_ptr2str( + let result1933 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1373) + Option::Some(result1933) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1372, - mime_type: lifted1374, + bytes: result1932, + mime_type: lifted1934, }) } 25 => { - let result1375 = mbt_ffi_ptr2str( + let result1935 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1375) + @types.SchemaValueNode::PathValue(result1935) } 26 => { - let result1376 = mbt_ffi_ptr2str( + let result1936 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1376) + @types.SchemaValueNode::UrlValue(result1936) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -32351,7 +46939,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1377 = mbt_ffi_ptr2str( + let result1937 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -32359,17 +46947,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1377, + unit: result1937, }) } 30 => { - let result1378 = mbt_ffi_ptr2str( + let result1938 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1378, + tag: result1938, body: mbt_ffi_load32(iter_base + 16), }) } @@ -32386,19 +46974,19 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1380.push(lifted1379) + array1940.push(lifted1939) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) AgentInvocationResult::AgentMethod(AgentInvocationOutputParameters::{ output: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1344, - defs: array1349, + type_nodes: array1904, + defs: array1909, root: mbt_ffi_load32(iter_base + 44), }, value: @types.SchemaValueTree::{ - value_nodes: array1380, + value_nodes: array1940, root: mbt_ffi_load32(iter_base + 56), }, }, @@ -32406,73 +46994,73 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => AgentInvocationResult::ManualUpdate 3 => { - let lifted1383 : String? = match + let lifted1943 : String? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => { - let result1382 = mbt_ffi_ptr2str( + let result1942 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - Option::Some(result1382) + Option::Some(result1942) } _ => panic() } AgentInvocationResult::LoadSnapshot(FallibleResultParameters::{ - error: lifted1383, + error: lifted1943, }) } 4 => { - let result1384 = mbt_ffi_ptr2bytes( + let result1944 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - let result1385 = mbt_ffi_ptr2str( + let result1945 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) AgentInvocationResult::SaveSnapshot(SaveSnapshotResultParameters::{ snapshot: SnapshotData::{ - data: result1384, - mime_type: result1385, + data: result1944, + mime_type: result1945, }, }) } 5 => { - let lifted1387 : String? = match + let lifted1947 : String? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => { - let result1386 = mbt_ffi_ptr2str( + let result1946 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - Option::Some(result1386) + Option::Some(result1946) } _ => panic() } AgentInvocationResult::ProcessOplogEntries(FallibleResultParameters::{ - error: lifted1387, + error: lifted1947, }) } _ => panic() } - let lifted1390 : String? = match mbt_ffi_load8_u(iter_base + 60) { + let lifted1950 : String? = match mbt_ffi_load8_u(iter_base + 60) { 0 => Option::None 1 => { - let result1389 = mbt_ffi_ptr2str( + let result1949 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - Option::Some(result1389) + Option::Some(result1949) } _ => panic() } @@ -32482,8 +47070,8 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - result: lifted1388, - method_name: lifted1390, + result: lifted1948, + method_name: lifted1950, consumed_fuel: mbt_ffi_load64(iter_base + 72), component_revision: mbt_ffi_load64(iter_base + 80).reinterpret_as_uint64(), }) @@ -32496,23 +47084,23 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }, }) 7 => { - let result1391 = mbt_ffi_ptr2str( + let result1951 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let lifted1395 : RetryPolicyState? = match + let lifted1955 : RetryPolicyState? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let array1393 : Array[StateNode] = [] - for index1394 = 0 - index1394 < mbt_ffi_load32(iter_base + 52) - index1394 = index1394 + 1 { + let array1953 : Array[StateNode] = [] + for index1954 = 0 + index1954 < mbt_ffi_load32(iter_base + 52) + index1954 = index1954 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1394 * 16 + index1954 * 16 - let lifted1392 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1952 = match mbt_ffi_load8_u(iter_base + 0) { 0 => StateNode::Counter( mbt_ffi_load32(iter_base + 4).reinterpret_as_uint(), @@ -32538,11 +47126,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1393.push(lifted1392) + array1953.push(lifted1952) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - Option::Some(RetryPolicyState::{ nodes: array1393 }) + Option::Some(RetryPolicyState::{ nodes: array1953 }) } _ => panic() } @@ -32552,10 +47140,10 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - error: result1391, + error: result1951, 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: lifted1395, + retry_policy_state: lifted1955, }) } 8 => @@ -32606,324 +47194,1134 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { begin_index: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), }) 14 => { - let lifted1768 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted2468 = match mbt_ffi_load8_u(iter_base + 24) { 0 => { - let result1396 = mbt_ffi_ptr2str( + let result1956 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array1523 : Array[@types.SchemaTypeNode] = [] - for index1524 = 0 - index1524 < mbt_ffi_load32(iter_base + 44) - index1524 = index1524 + 1 { + let array2153 : Array[@types.SchemaTypeNode] = [] + for index2154 = 0 + index2154 < mbt_ffi_load32(iter_base + 44) + index2154 = index2154 + 1 { let iter_base = mbt_ffi_load32(iter_base + 40) + - index1524 * 144 + index2154 * 144 - let lifted1509 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2139 = 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 + 2 => { + let lifted1963 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1958 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1957 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1957) + } + _ => panic() + } + + let lifted1960 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1959 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1959) + } + _ => panic() + } + + let lifted1962 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1961 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1961) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1958, + max: lifted1960, + unit: lifted1962, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1963) + } + 3 => { + let lifted1970 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1965 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1964 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1964) + } + _ => panic() + } + + let lifted1967 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1966 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1966) + } + _ => panic() + } + + let lifted1969 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1968 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1968) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1965, + max: lifted1967, + unit: lifted1969, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1970) + } + 4 => { + let lifted1977 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1972 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1971 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1971) + } + _ => panic() + } + + let lifted1974 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1973 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1973) + } + _ => panic() + } + + let lifted1976 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1975 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1975) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1972, + max: lifted1974, + unit: lifted1976, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1977) + } + 5 => { + let lifted1984 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1979 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1978 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1978) + } + _ => panic() + } + + let lifted1981 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1980 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1980) + } + _ => panic() + } + + let lifted1983 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1982 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1982) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1979, + max: lifted1981, + unit: lifted1983, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1984) + } + 6 => { + let lifted1991 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1986 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1985 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1985) + } + _ => panic() + } + + let lifted1988 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1987 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1987) + } + _ => panic() + } + + let lifted1990 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1989 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1989) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1986, + max: lifted1988, + unit: lifted1990, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1991) + } + 7 => { + let lifted1998 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1993 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1992 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1992) + } + _ => panic() + } + + let lifted1995 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1994 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1994) + } + _ => panic() + } + + let lifted1997 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1996 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1996) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1993, + max: lifted1995, + unit: lifted1997, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1998) + } + 8 => { + let lifted2005 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2000 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1999 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1999) + } + _ => panic() + } + + let lifted2002 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2001 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2001) + } + _ => panic() + } + + let lifted2004 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2003 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2003) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2000, + max: lifted2002, + unit: lifted2004, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2005) + } + 9 => { + let lifted2012 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2007 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2006 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2006) + } + _ => panic() + } + + let lifted2009 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2008 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2008) + } + _ => panic() + } + + let lifted2011 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2010 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2010) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2007, + max: lifted2009, + unit: lifted2011, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2012) + } + 10 => { + let lifted2019 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2014 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2013 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2013) + } + _ => panic() + } + + let lifted2016 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2015 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2015) + } + _ => panic() + } + + let lifted2018 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2017 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2017) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2014, + max: lifted2016, + unit: lifted2018, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2019) + } + 11 => { + let lifted2026 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2021 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2020 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2020) + } + _ => panic() + } + + let lifted2023 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2022 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2022) + } + _ => panic() + } + + let lifted2025 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2024 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2024) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2021, + max: lifted2023, + unit: lifted2025, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2026) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1411 : Array[@types.NamedFieldType] = [] - for index1412 = 0 - index1412 < mbt_ffi_load32(iter_base + 12) - index1412 = index1412 + 1 { + let array2041 : Array[@types.NamedFieldType] = [] + for index2042 = 0 + index2042 < mbt_ffi_load32(iter_base + 12) + index2042 = index2042 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1412 * 68 + index2042 * 68 - let result1397 = mbt_ffi_ptr2str( + let result2027 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1399 : String? = match + let lifted2029 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1398 = mbt_ffi_ptr2str( + let result2028 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1398) + Option::Some(result2028) } _ => panic() } - let array1401 : Array[String] = [] - for index1402 = 0 - index1402 < mbt_ffi_load32(iter_base + 28) - index1402 = index1402 + 1 { + let array2031 : Array[String] = [] + for index2032 = 0 + index2032 < mbt_ffi_load32(iter_base + 28) + index2032 = index2032 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1402 * 8 + index2032 * 8 - let result1400 = mbt_ffi_ptr2str( + let result2030 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1401.push(result1400) + array2031.push(result2030) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1404 : Array[String] = [] - for index1405 = 0 - index1405 < mbt_ffi_load32(iter_base + 36) - index1405 = index1405 + 1 { + let array2034 : Array[String] = [] + for index2035 = 0 + index2035 < mbt_ffi_load32(iter_base + 36) + index2035 = index2035 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1405 * 8 + index2035 * 8 - let result1403 = mbt_ffi_ptr2str( + let result2033 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1404.push(result1403) + array2034.push(result2033) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1407 : String? = match + let lifted2037 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1406 = mbt_ffi_ptr2str( + let result2036 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1406) + Option::Some(result2036) } _ => panic() } - let lifted1410 : @types.Role? = match + let lifted2040 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1409 = match + let lifted2039 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1408 = mbt_ffi_ptr2str( + let result2038 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1408) + @types.Role::Other(result2038) } _ => panic() } - Option::Some(lifted1409) + Option::Some(lifted2039) } _ => panic() } - array1411.push(@types.NamedFieldType::{ - name: result1397, + array2041.push(@types.NamedFieldType::{ + name: result2027, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1399, - aliases: array1401, - examples: array1404, - deprecated: lifted1407, - role: lifted1410, + doc: lifted2029, + aliases: array2031, + examples: array2034, + deprecated: lifted2037, + role: lifted2040, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1411) + @types.SchemaTypeBody::RecordType(array2041) } 15 => { - let array1428 : Array[@types.VariantCaseType] = [] - for index1429 = 0 - index1429 < mbt_ffi_load32(iter_base + 12) - index1429 = index1429 + 1 { + let array2058 : Array[@types.VariantCaseType] = [] + for index2059 = 0 + index2059 < mbt_ffi_load32(iter_base + 12) + index2059 = index2059 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1429 * 72 + index2059 * 72 - let result1413 = mbt_ffi_ptr2str( + let result2043 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1414 : Int? = match + let lifted2044 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1416 : String? = match + let lifted2046 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1415 = mbt_ffi_ptr2str( + let result2045 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1415) + Option::Some(result2045) } _ => panic() } - let array1418 : Array[String] = [] - for index1419 = 0 - index1419 < mbt_ffi_load32(iter_base + 32) - index1419 = index1419 + 1 { + let array2048 : Array[String] = [] + for index2049 = 0 + index2049 < mbt_ffi_load32(iter_base + 32) + index2049 = index2049 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1419 * 8 + index2049 * 8 - let result1417 = mbt_ffi_ptr2str( + let result2047 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1418.push(result1417) + array2048.push(result2047) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1421 : Array[String] = [] - for index1422 = 0 - index1422 < mbt_ffi_load32(iter_base + 40) - index1422 = index1422 + 1 { + let array2051 : Array[String] = [] + for index2052 = 0 + index2052 < mbt_ffi_load32(iter_base + 40) + index2052 = index2052 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1422 * 8 + index2052 * 8 - let result1420 = mbt_ffi_ptr2str( + let result2050 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1421.push(result1420) + array2051.push(result2050) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1424 : String? = match + let lifted2054 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1423 = mbt_ffi_ptr2str( + let result2053 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1423) + Option::Some(result2053) } _ => panic() } - let lifted1427 : @types.Role? = match + let lifted2057 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1426 = match + let lifted2056 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1425 = mbt_ffi_ptr2str( + let result2055 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1425) + @types.Role::Other(result2055) } _ => panic() } - Option::Some(lifted1426) + Option::Some(lifted2056) } _ => panic() } - array1428.push(@types.VariantCaseType::{ - name: result1413, - payload: lifted1414, + array2058.push(@types.VariantCaseType::{ + name: result2043, + payload: lifted2044, metadata: @types.MetadataEnvelope::{ - doc: lifted1416, - aliases: array1418, - examples: array1421, - deprecated: lifted1424, - role: lifted1427, + doc: lifted2046, + aliases: array2048, + examples: array2051, + deprecated: lifted2054, + role: lifted2057, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1428) + @types.SchemaTypeBody::VariantType(array2058) } 16 => { - let array1431 : Array[String] = [] - for index1432 = 0 - index1432 < mbt_ffi_load32(iter_base + 12) - index1432 = index1432 + 1 { + let array2061 : Array[String] = [] + for index2062 = 0 + index2062 < mbt_ffi_load32(iter_base + 12) + index2062 = index2062 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1432 * 8 + index2062 * 8 - let result1430 = mbt_ffi_ptr2str( + let result2060 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1431.push(result1430) + array2061.push(result2060) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1431) + @types.SchemaTypeBody::EnumType(array2061) } 17 => { - let array1434 : Array[String] = [] - for index1435 = 0 - index1435 < mbt_ffi_load32(iter_base + 12) - index1435 = index1435 + 1 { + let array2064 : Array[String] = [] + for index2065 = 0 + index2065 < mbt_ffi_load32(iter_base + 12) + index2065 = index2065 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1435 * 8 + index2065 * 8 - let result1433 = mbt_ffi_ptr2str( + let result2063 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1434.push(result1433) + array2064.push(result2063) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1434) + @types.SchemaTypeBody::FlagsType(array2064) } 18 => { - let array1436 : Array[Int] = [] - for index1437 = 0 - index1437 < mbt_ffi_load32(iter_base + 12) - index1437 = index1437 + 1 { + let array2066 : Array[Int] = [] + for index2067 = 0 + index2067 < mbt_ffi_load32(iter_base + 12) + index2067 = index2067 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1437 * 4 + index2067 * 4 - array1436.push(mbt_ffi_load32(iter_base + 0)) + array2066.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1436) + @types.SchemaTypeBody::TupleType(array2066) } 19 => @types.SchemaTypeBody::ListType( @@ -32944,14 +48342,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1438 : Int? = match + let lifted2068 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1439 : Int? = match + let lifted2069 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -32959,37 +48357,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1438, - err: lifted1439, + ok: lifted2068, + err: lifted2069, }) } 24 => { - let lifted1443 : Array[String]? = match + let lifted2073 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1441 : Array[String] = [] - for index1442 = 0 - index1442 < mbt_ffi_load32(iter_base + 16) - index1442 = index1442 + 1 { + let array2071 : Array[String] = [] + for index2072 = 0 + index2072 < mbt_ffi_load32(iter_base + 16) + index2072 = index2072 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1442 * 8 + index2072 * 8 - let result1440 = mbt_ffi_ptr2str( + let result2070 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1441.push(result1440) + array2071.push(result2070) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1441) + Option::Some(array2071) } _ => panic() } - let lifted1444 : UInt? = match + let lifted2074 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -32999,7 +48397,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1445 : UInt? = match + let lifted2075 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -33009,54 +48407,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1447 : String? = match + let lifted2077 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1446 = mbt_ffi_ptr2str( + let result2076 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1446) + Option::Some(result2076) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1443, - min_length: lifted1444, - max_length: lifted1445, - regex: lifted1447, + languages: lifted2073, + min_length: lifted2074, + max_length: lifted2075, + regex: lifted2077, }) } 25 => { - let lifted1451 : Array[String]? = match + 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 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) + - index1450 * 8 + index2080 * 8 - let result1448 = mbt_ffi_ptr2str( + 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 + let lifted2082 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -33066,7 +48464,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1453 : UInt? = match + let lifted2083 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -33077,58 +48475,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1451, - min_bytes: lifted1452, - max_bytes: lifted1453, + mime_types: lifted2081, + min_bytes: lifted2082, + max_bytes: lifted2083, }) } 26 => { - let lifted1457 : Array[String]? = match + let lifted2087 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1455 : Array[String] = [] - for index1456 = 0 - index1456 < mbt_ffi_load32(iter_base + 20) - index1456 = index1456 + 1 { + let array2085 : Array[String] = [] + for index2086 = 0 + index2086 < mbt_ffi_load32(iter_base + 20) + index2086 = index2086 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1456 * 8 + index2086 * 8 - let result1454 = mbt_ffi_ptr2str( + let result2084 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1455.push(result1454) + array2085.push(result2084) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1455) + Option::Some(array2085) } _ => panic() } - let lifted1461 : Array[String]? = match + let lifted2091 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1459 : Array[String] = [] - for index1460 = 0 - index1460 < mbt_ffi_load32(iter_base + 32) - index1460 = index1460 + 1 { + let array2089 : Array[String] = [] + for index2090 = 0 + index2090 < mbt_ffi_load32(iter_base + 32) + index2090 = index2090 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1460 * 8 + index2090 * 8 - let result1458 = mbt_ffi_ptr2str( + let result2088 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1459.push(result1458) + array2089.push(result2088) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1459) + Option::Some(array2089) } _ => panic() } @@ -33140,95 +48538,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1457, - allowed_extensions: lifted1461, + allowed_mime_types: lifted2087, + allowed_extensions: lifted2091, }) } 27 => { - let lifted1465 : Array[String]? = match + let lifted2095 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1463 : Array[String] = [] - for index1464 = 0 - index1464 < mbt_ffi_load32(iter_base + 16) - index1464 = index1464 + 1 { + let array2093 : Array[String] = [] + for index2094 = 0 + index2094 < mbt_ffi_load32(iter_base + 16) + index2094 = index2094 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1464 * 8 + index2094 * 8 - let result1462 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array1463) + Option::Some(array2093) } _ => panic() } - let lifted1469 : Array[String]? = match + let lifted2099 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1467 : Array[String] = [] - for index1468 = 0 - index1468 < mbt_ffi_load32(iter_base + 28) - index1468 = index1468 + 1 { + let array2097 : Array[String] = [] + for index2098 = 0 + index2098 < mbt_ffi_load32(iter_base + 28) + index2098 = index2098 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1468 * 8 + index2098 * 8 - let result1466 = mbt_ffi_ptr2str( + 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 + 24)) - Option::Some(array1467) + Option::Some(array2097) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1465, - allowed_hosts: lifted1469, + allowed_schemes: lifted2095, + allowed_hosts: lifted2099, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1470 = mbt_ffi_ptr2str( + let result2100 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1472 : Array[String] = [] - for index1473 = 0 - index1473 < mbt_ffi_load32(iter_base + 20) - index1473 = index1473 + 1 { + let array2102 : Array[String] = [] + for index2103 = 0 + index2103 < mbt_ffi_load32(iter_base + 20) + index2103 = index2103 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1473 * 8 + index2103 * 8 - let result1471 = mbt_ffi_ptr2str( + let result2101 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1472.push(result1471) + array2102.push(result2101) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1475 : @types.QuantityValue? = match + let lifted2105 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1474 = mbt_ffi_ptr2str( + let result2104 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -33236,17 +48634,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1474, + unit: result2104, }) } _ => panic() } - let lifted1477 : @types.QuantityValue? = match + let lifted2107 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1476 = mbt_ffi_ptr2str( + let result2106 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -33254,406 +48652,406 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1476, + unit: result2106, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1470, - allowed_suffixes: array1472, - min: lifted1475, - max: lifted1477, + base_unit: result2100, + allowed_suffixes: array2102, + min: lifted2105, + max: lifted2107, }) } 31 => { - let array1501 : Array[@types.UnionBranch] = [] - for index1502 = 0 - index1502 < mbt_ffi_load32(iter_base + 12) - index1502 = index1502 + 1 { + let array2131 : Array[@types.UnionBranch] = [] + for index2132 = 0 + index2132 < mbt_ffi_load32(iter_base + 12) + index2132 = index2132 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1502 * 92 + index2132 * 92 - let result1478 = mbt_ffi_ptr2str( + let result2108 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1487 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted2117 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1479 = mbt_ffi_ptr2str( + let result2109 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1479) + @types.DiscriminatorRule::Prefix(result2109) } 1 => { - let result1480 = mbt_ffi_ptr2str( + let result2110 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1480) + @types.DiscriminatorRule::Suffix(result2110) } 2 => { - let result1481 = mbt_ffi_ptr2str( + let result2111 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1481) + @types.DiscriminatorRule::Contains(result2111) } 3 => { - let result1482 = mbt_ffi_ptr2str( + let result2112 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1482) + @types.DiscriminatorRule::Regex(result2112) } 4 => { - let result1483 = mbt_ffi_ptr2str( + let result2113 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1485 : String? = match + let lifted2115 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1484 = mbt_ffi_ptr2str( + let result2114 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1484) + Option::Some(result2114) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1483, - literal: lifted1485, + field_name: result2113, + literal: lifted2115, }) } 5 => { - let result1486 = mbt_ffi_ptr2str( + let result2116 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1486) + @types.DiscriminatorRule::FieldAbsent(result2116) } _ => panic() } - let lifted1489 : String? = match + let lifted2119 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1488 = mbt_ffi_ptr2str( + let result2118 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1488) + Option::Some(result2118) } _ => panic() } - let array1491 : Array[String] = [] - for index1492 = 0 - index1492 < mbt_ffi_load32(iter_base + 52) - index1492 = index1492 + 1 { + let array2121 : Array[String] = [] + for index2122 = 0 + index2122 < mbt_ffi_load32(iter_base + 52) + index2122 = index2122 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1492 * 8 + index2122 * 8 - let result1490 = mbt_ffi_ptr2str( + let result2120 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1491.push(result1490) + array2121.push(result2120) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1494 : Array[String] = [] - for index1495 = 0 - index1495 < mbt_ffi_load32(iter_base + 60) - index1495 = index1495 + 1 { + let array2124 : Array[String] = [] + for index2125 = 0 + index2125 < mbt_ffi_load32(iter_base + 60) + index2125 = index2125 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1495 * 8 + index2125 * 8 - let result1493 = mbt_ffi_ptr2str( + let result2123 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1494.push(result1493) + array2124.push(result2123) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1497 : String? = match + let lifted2127 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1496 = mbt_ffi_ptr2str( + let result2126 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1496) + Option::Some(result2126) } _ => panic() } - let lifted1500 : @types.Role? = match + let lifted2130 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1499 = match + let lifted2129 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1498 = mbt_ffi_ptr2str( + let result2128 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1498) + @types.Role::Other(result2128) } _ => panic() } - Option::Some(lifted1499) + Option::Some(lifted2129) } _ => panic() } - array1501.push(@types.UnionBranch::{ - tag: result1478, + array2131.push(@types.UnionBranch::{ + tag: result2108, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1487, + discriminator: lifted2117, metadata: @types.MetadataEnvelope::{ - doc: lifted1489, - aliases: array1491, - examples: array1494, - deprecated: lifted1497, - role: lifted1500, + doc: lifted2119, + aliases: array2121, + examples: array2124, + deprecated: lifted2127, + role: lifted2130, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1501, + branches: array2131, }) } 32 => { - let lifted1504 : String? = match + let lifted2134 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1503 = mbt_ffi_ptr2str( + let result2133 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1503) + Option::Some(result2133) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1504, + category: lifted2134, }) } 33 => { - let lifted1506 : String? = match + let lifted2136 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1505 = mbt_ffi_ptr2str( + let result2135 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1505) + Option::Some(result2135) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1506, + resource_name: lifted2136, }) } 34 => { - let lifted1507 : Int? = match + let lifted2137 : 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(lifted1507) + @types.SchemaTypeBody::FutureType(lifted2137) } 35 => { - let lifted1508 : Int? = match + let lifted2138 : 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(lifted1508) + @types.SchemaTypeBody::StreamType(lifted2138) } _ => panic() } - let lifted1511 : String? = match + let lifted2141 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1510 = mbt_ffi_ptr2str( + let result2140 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1510) + Option::Some(result2140) } _ => panic() } - let array1513 : Array[String] = [] - for index1514 = 0 - index1514 < mbt_ffi_load32(iter_base + 104) - index1514 = index1514 + 1 { + let array2143 : Array[String] = [] + for index2144 = 0 + index2144 < mbt_ffi_load32(iter_base + 104) + index2144 = index2144 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1514 * 8 + index2144 * 8 - let result1512 = mbt_ffi_ptr2str( + let result2142 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1513.push(result1512) + array2143.push(result2142) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1516 : Array[String] = [] - for index1517 = 0 - index1517 < mbt_ffi_load32(iter_base + 112) - index1517 = index1517 + 1 { + let array2146 : Array[String] = [] + for index2147 = 0 + index2147 < mbt_ffi_load32(iter_base + 112) + index2147 = index2147 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1517 * 8 + index2147 * 8 - let result1515 = mbt_ffi_ptr2str( + let result2145 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1516.push(result1515) + array2146.push(result2145) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1519 : String? = match + let lifted2149 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1518 = mbt_ffi_ptr2str( + let result2148 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1518) + Option::Some(result2148) } _ => panic() } - let lifted1522 : @types.Role? = match + let lifted2152 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1521 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted2151 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1520 = mbt_ffi_ptr2str( + let result2150 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1520) + @types.Role::Other(result2150) } _ => panic() } - Option::Some(lifted1521) + Option::Some(lifted2151) } _ => panic() } - array1523.push(@types.SchemaTypeNode::{ - body: lifted1509, + array2153.push(@types.SchemaTypeNode::{ + body: lifted2139, metadata: @types.MetadataEnvelope::{ - doc: lifted1511, - aliases: array1513, - examples: array1516, - deprecated: lifted1519, - role: lifted1522, + doc: lifted2141, + aliases: array2143, + examples: array2146, + deprecated: lifted2149, + role: lifted2152, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let array1528 : Array[@types.SchemaTypeDef] = [] - for index1529 = 0 - index1529 < mbt_ffi_load32(iter_base + 52) - index1529 = index1529 + 1 { + let array2158 : Array[@types.SchemaTypeDef] = [] + for index2159 = 0 + index2159 < mbt_ffi_load32(iter_base + 52) + index2159 = index2159 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1529 * 24 + index2159 * 24 - let result1525 = mbt_ffi_ptr2str( + let result2155 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1527 : String? = match + let lifted2157 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1526 = mbt_ffi_ptr2str( + let result2156 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1526) + Option::Some(result2156) } _ => panic() } - array1528.push(@types.SchemaTypeDef::{ - id: result1525, - name: lifted1527, + array2158.push(@types.SchemaTypeDef::{ + id: result2155, + name: lifted2157, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1559 : Array[@types.SchemaValueNode] = [] - for index1560 = 0 - index1560 < mbt_ffi_load32(iter_base + 64) - index1560 = index1560 + 1 { + let array2189 : Array[@types.SchemaValueNode] = [] + for index2190 = 0 + index2190 < mbt_ffi_load32(iter_base + 64) + index2190 = index2190 + 1 { let iter_base = mbt_ffi_load32(iter_base + 60) + - index1560 * 32 + index2190 * 32 - let lifted1558 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2188 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -33705,29 +49103,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1530 = mbt_ffi_ptr2str( + let result2160 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1530) + @types.SchemaValueNode::StringValue(result2160) } 13 => { - let array1531 : Array[Int] = [] - for index1532 = 0 - index1532 < mbt_ffi_load32(iter_base + 12) - index1532 = index1532 + 1 { + let array2161 : Array[Int] = [] + for index2162 = 0 + index2162 < mbt_ffi_load32(iter_base + 12) + index2162 = index2162 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1532 * 4 + index2162 * 4 - array1531.push(mbt_ffi_load32(iter_base + 0)) + array2161.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1531) + @types.SchemaValueNode::RecordValue(array2161) } 14 => { - let lifted1533 : Int? = match + let lifted2163 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -33736,7 +49134,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1533, + payload: lifted2163, }) } 15 => @@ -33744,180 +49142,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1534 : Array[Bool] = [] - for index1535 = 0 - index1535 < mbt_ffi_load32(iter_base + 12) - index1535 = index1535 + 1 { + let array2164 : Array[Bool] = [] + for index2165 = 0 + index2165 < mbt_ffi_load32(iter_base + 12) + index2165 = index2165 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1535 * 1 + index2165 * 1 - array1534.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array2164.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1534) + @types.SchemaValueNode::FlagsValue(array2164) } 17 => { - let array1536 : Array[Int] = [] - for index1537 = 0 - index1537 < mbt_ffi_load32(iter_base + 12) - index1537 = index1537 + 1 { + let array2166 : Array[Int] = [] + for index2167 = 0 + index2167 < mbt_ffi_load32(iter_base + 12) + index2167 = index2167 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1537 * 4 + index2167 * 4 - array1536.push(mbt_ffi_load32(iter_base + 0)) + array2166.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1536) + @types.SchemaValueNode::TupleValue(array2166) } 18 => { - let array1538 : Array[Int] = [] - for index1539 = 0 - index1539 < mbt_ffi_load32(iter_base + 12) - index1539 = index1539 + 1 { + let array2168 : Array[Int] = [] + for index2169 = 0 + index2169 < mbt_ffi_load32(iter_base + 12) + index2169 = index2169 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1539 * 4 + index2169 * 4 - array1538.push(mbt_ffi_load32(iter_base + 0)) + array2168.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1538) + @types.SchemaValueNode::ListValue(array2168) } 19 => { - let array1540 : Array[Int] = [] - for index1541 = 0 - index1541 < mbt_ffi_load32(iter_base + 12) - index1541 = index1541 + 1 { + let array2170 : Array[Int] = [] + for index2171 = 0 + index2171 < mbt_ffi_load32(iter_base + 12) + index2171 = index2171 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1541 * 4 + index2171 * 4 - array1540.push(mbt_ffi_load32(iter_base + 0)) + array2170.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1540) + @types.SchemaValueNode::FixedListValue(array2170) } 20 => { - let array1542 : Array[@types.MapEntry] = [] - for index1543 = 0 - index1543 < mbt_ffi_load32(iter_base + 12) - index1543 = index1543 + 1 { + let array2172 : Array[@types.MapEntry] = [] + for index2173 = 0 + index2173 < mbt_ffi_load32(iter_base + 12) + index2173 = index2173 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1543 * 8 + index2173 * 8 - array1542.push(@types.MapEntry::{ + array2172.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(array1542) + @types.SchemaValueNode::MapValue(array2172) } 21 => { - let lifted1544 : Int? = match + let lifted2174 : 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(lifted1544) + @types.SchemaValueNode::OptionValue(lifted2174) } 22 => { - let lifted1547 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2177 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1545 : Int? = match + let lifted2175 : 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(lifted1545) + @types.ResultValuePayload::OkValue(lifted2175) } 1 => { - let lifted1546 : Int? = match + let lifted2176 : 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(lifted1546) + @types.ResultValuePayload::ErrValue(lifted2176) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1547) + @types.SchemaValueNode::ResultValue(lifted2177) } 23 => { - let result1548 = mbt_ffi_ptr2str( + let result2178 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1550 : String? = match + let lifted2180 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1549 = mbt_ffi_ptr2str( + let result2179 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1549) + Option::Some(result2179) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1548, - language: lifted1550, + text: result2178, + language: lifted2180, }) } 24 => { - let result1551 = mbt_ffi_ptr2bytes( + let result2181 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1553 : String? = match + let lifted2183 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1552 = mbt_ffi_ptr2str( + let result2182 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1552) + Option::Some(result2182) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1551, - mime_type: lifted1553, + bytes: result2181, + mime_type: lifted2183, }) } 25 => { - let result1554 = mbt_ffi_ptr2str( + let result2184 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1554) + @types.SchemaValueNode::PathValue(result2184) } 26 => { - let result1555 = mbt_ffi_ptr2str( + let result2185 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1555) + @types.SchemaValueNode::UrlValue(result2185) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -33929,7 +49327,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1556 = mbt_ffi_ptr2str( + let result2186 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -33937,17 +49335,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1556, + unit: result2186, }) } 30 => { - let result1557 = mbt_ffi_ptr2str( + let result2187 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1557, + tag: result2187, body: mbt_ffi_load32(iter_base + 16), }) } @@ -33964,65 +49362,65 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1559.push(lifted1558) + array2189.push(lifted2188) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) - let result1561 = mbt_ffi_ptr2str( + let result2191 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 72), mbt_ffi_load32(iter_base + 76), ) - let array1563 : Array[String] = [] - for index1564 = 0 - index1564 < mbt_ffi_load32(iter_base + 84) - index1564 = index1564 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index1564 * 8 + let array2193 : Array[String] = [] + for index2194 = 0 + index2194 < mbt_ffi_load32(iter_base + 84) + index2194 = index2194 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 80) + index2194 * 8 - let result1562 = mbt_ffi_ptr2str( + let result2192 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1563.push(result1562) + array2193.push(result2192) } mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) - let array1578 : Array[Array[SpanData]] = [] - for index1579 = 0 - index1579 < mbt_ffi_load32(iter_base + 92) - index1579 = index1579 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index1579 * 8 + let array2208 : Array[Array[SpanData]] = [] + for index2209 = 0 + index2209 < mbt_ffi_load32(iter_base + 92) + index2209 = index2209 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index2209 * 8 - let array1576 : Array[SpanData] = [] - for index1577 = 0 - index1577 < mbt_ffi_load32(iter_base + 4) - index1577 = index1577 + 1 { + let array2206 : Array[SpanData] = [] + for index2207 = 0 + index2207 < mbt_ffi_load32(iter_base + 4) + index2207 = index2207 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index1577 * 80 + index2207 * 80 - let lifted1575 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2205 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1565 = mbt_ffi_ptr2str( + let result2195 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1567 : String? = match + let lifted2197 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1566 = mbt_ffi_ptr2str( + let result2196 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1566) + Option::Some(result2196) } _ => panic() } - let lifted1568 : UInt64? = match + let lifted2198 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -34032,411 +49430,1221 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let array1572 : Array[@context.Attribute] = [] - for index1573 = 0 - index1573 < mbt_ffi_load32(iter_base + 68) - index1573 = index1573 + 1 { + let array2202 : Array[@context.Attribute] = [] + for index2203 = 0 + index2203 < mbt_ffi_load32(iter_base + 68) + index2203 = index2203 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index1573 * 20 + index2203 * 20 - let result1569 = mbt_ffi_ptr2str( + let result2199 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1571 = match + let lifted2201 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1570 = mbt_ffi_ptr2str( + let result2200 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1570) + @context.AttributeValue::String(result2200) } _ => panic() } - array1572.push(@context.Attribute::{ - key: result1569, - value: lifted1571, + array2202.push(@context.Attribute::{ + key: result2199, + value: lifted2201, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result1565, + span_id: result2195, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted1567, - linked_context: lifted1568, - attributes: array1572, + parent: lifted2197, + linked_context: lifted2198, + attributes: array2202, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result1574 = mbt_ffi_ptr2str( + let result2204 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result1574, + span_id: result2204, }) } _ => panic() } - array1576.push(lifted1575) + array2206.push(lifted2205) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array1578.push(array1576) + array2208.push(array2206) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) AgentInvocation::AgentInitialization(AgentInitializationParameters::{ - idempotency_key: result1396, + idempotency_key: result1956, constructor_parameters: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1523, - defs: array1528, + type_nodes: array2153, + defs: array2158, root: mbt_ffi_load32(iter_base + 56), }, value: @types.SchemaValueTree::{ - value_nodes: array1559, + value_nodes: array2189, root: mbt_ffi_load32(iter_base + 68), }, }, - trace_id: result1561, - trace_states: array1563, - invocation_context: array1578, + trace_id: result2191, + trace_states: array2193, + invocation_context: array2208, }) } 1 => { - let result1580 = mbt_ffi_ptr2str( + let result2210 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result1581 = mbt_ffi_ptr2str( + let result2211 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let array1708 : Array[@types.SchemaTypeNode] = [] - for index1709 = 0 - index1709 < mbt_ffi_load32(iter_base + 52) - index1709 = index1709 + 1 { + let array2408 : Array[@types.SchemaTypeNode] = [] + for index2409 = 0 + index2409 < mbt_ffi_load32(iter_base + 52) + index2409 = index2409 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1709 * 144 + index2409 * 144 - let lifted1694 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2394 = 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 + 2 => { + let lifted2218 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2213 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2212 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2212) + } + _ => panic() + } + + let lifted2215 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2214 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2214) + } + _ => panic() + } + + let lifted2217 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2216 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2216) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2213, + max: lifted2215, + unit: lifted2217, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted2218) + } + 3 => { + let lifted2225 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2220 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2219 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2219) + } + _ => panic() + } + + let lifted2222 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2221 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2221) + } + _ => panic() + } + + let lifted2224 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2223 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2223) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2220, + max: lifted2222, + unit: lifted2224, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted2225) + } + 4 => { + let lifted2232 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2227 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2226 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2226) + } + _ => panic() + } + + let lifted2229 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2228 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2228) + } + _ => panic() + } + + let lifted2231 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2230 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2230) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2227, + max: lifted2229, + unit: lifted2231, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2232) + } + 5 => { + let lifted2239 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2234 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2233 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2233) + } + _ => panic() + } + + let lifted2236 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2235 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2235) + } + _ => panic() + } + + let lifted2238 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2237 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2237) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2234, + max: lifted2236, + unit: lifted2238, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted2239) + } + 6 => { + let lifted2246 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2241 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2240 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2240) + } + _ => panic() + } + + let lifted2243 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2242 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2242) + } + _ => panic() + } + + let lifted2245 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2244 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2244) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2241, + max: lifted2243, + unit: lifted2245, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted2246) + } + 7 => { + let lifted2253 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2248 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2247 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2247) + } + _ => panic() + } + + let lifted2250 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2249 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2249) + } + _ => panic() + } + + let lifted2252 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2251 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2251) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2248, + max: lifted2250, + unit: lifted2252, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2253) + } + 8 => { + let lifted2260 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2255 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2254 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2254) + } + _ => panic() + } + + let lifted2257 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2256 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2256) + } + _ => panic() + } + + let lifted2259 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2258 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2258) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2255, + max: lifted2257, + unit: lifted2259, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2260) + } + 9 => { + let lifted2267 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2262 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2261 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2261) + } + _ => panic() + } + + let lifted2264 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2263 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2263) + } + _ => panic() + } + + let lifted2266 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2265 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2265) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2262, + max: lifted2264, + unit: lifted2266, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2267) + } + 10 => { + let lifted2274 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2269 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2268 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2268) + } + _ => panic() + } + + let lifted2271 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2270 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2270) + } + _ => panic() + } + + let lifted2273 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2272 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2272) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2269, + max: lifted2271, + unit: lifted2273, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2274) + } + 11 => { + let lifted2281 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2276 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2275 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2275) + } + _ => panic() + } + + let lifted2278 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2277 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2277) + } + _ => panic() + } + + let lifted2280 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2279 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2279) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2276, + max: lifted2278, + unit: lifted2280, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2281) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1596 : Array[@types.NamedFieldType] = [] - for index1597 = 0 - index1597 < mbt_ffi_load32(iter_base + 12) - index1597 = index1597 + 1 { + let array2296 : Array[@types.NamedFieldType] = [] + for index2297 = 0 + index2297 < mbt_ffi_load32(iter_base + 12) + index2297 = index2297 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1597 * 68 + index2297 * 68 - let result1582 = mbt_ffi_ptr2str( + let result2282 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1584 : String? = match + let lifted2284 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1583 = mbt_ffi_ptr2str( + let result2283 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1583) + Option::Some(result2283) } _ => panic() } - let array1586 : Array[String] = [] - for index1587 = 0 - index1587 < mbt_ffi_load32(iter_base + 28) - index1587 = index1587 + 1 { + let array2286 : Array[String] = [] + for index2287 = 0 + index2287 < mbt_ffi_load32(iter_base + 28) + index2287 = index2287 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1587 * 8 + index2287 * 8 - let result1585 = mbt_ffi_ptr2str( + let result2285 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1586.push(result1585) + array2286.push(result2285) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1589 : Array[String] = [] - for index1590 = 0 - index1590 < mbt_ffi_load32(iter_base + 36) - index1590 = index1590 + 1 { + let array2289 : Array[String] = [] + for index2290 = 0 + index2290 < mbt_ffi_load32(iter_base + 36) + index2290 = index2290 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1590 * 8 + index2290 * 8 - let result1588 = mbt_ffi_ptr2str( + let result2288 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1589.push(result1588) + array2289.push(result2288) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1592 : String? = match + let lifted2292 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1591 = mbt_ffi_ptr2str( + let result2291 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1591) + Option::Some(result2291) } _ => panic() } - let lifted1595 : @types.Role? = match + let lifted2295 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1594 = match + let lifted2294 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1593 = mbt_ffi_ptr2str( + let result2293 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1593) + @types.Role::Other(result2293) } _ => panic() } - Option::Some(lifted1594) + Option::Some(lifted2294) } _ => panic() } - array1596.push(@types.NamedFieldType::{ - name: result1582, + array2296.push(@types.NamedFieldType::{ + name: result2282, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1584, - aliases: array1586, - examples: array1589, - deprecated: lifted1592, - role: lifted1595, + doc: lifted2284, + aliases: array2286, + examples: array2289, + deprecated: lifted2292, + role: lifted2295, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1596) + @types.SchemaTypeBody::RecordType(array2296) } 15 => { - let array1613 : Array[@types.VariantCaseType] = [] - for index1614 = 0 - index1614 < mbt_ffi_load32(iter_base + 12) - index1614 = index1614 + 1 { + let array2313 : Array[@types.VariantCaseType] = [] + for index2314 = 0 + index2314 < mbt_ffi_load32(iter_base + 12) + index2314 = index2314 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1614 * 72 + index2314 * 72 - let result1598 = mbt_ffi_ptr2str( + let result2298 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1599 : Int? = match + let lifted2299 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1601 : String? = match + let lifted2301 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1600 = mbt_ffi_ptr2str( + let result2300 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1600) + Option::Some(result2300) } _ => panic() } - let array1603 : Array[String] = [] - for index1604 = 0 - index1604 < mbt_ffi_load32(iter_base + 32) - index1604 = index1604 + 1 { + let array2303 : Array[String] = [] + for index2304 = 0 + index2304 < mbt_ffi_load32(iter_base + 32) + index2304 = index2304 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1604 * 8 + index2304 * 8 - let result1602 = mbt_ffi_ptr2str( + let result2302 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1603.push(result1602) + array2303.push(result2302) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1606 : Array[String] = [] - for index1607 = 0 - index1607 < mbt_ffi_load32(iter_base + 40) - index1607 = index1607 + 1 { + let array2306 : Array[String] = [] + for index2307 = 0 + index2307 < mbt_ffi_load32(iter_base + 40) + index2307 = index2307 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1607 * 8 + index2307 * 8 - let result1605 = mbt_ffi_ptr2str( + let result2305 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1606.push(result1605) + array2306.push(result2305) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1609 : String? = match + let lifted2309 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1608 = mbt_ffi_ptr2str( + let result2308 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1608) + Option::Some(result2308) } _ => panic() } - let lifted1612 : @types.Role? = match + let lifted2312 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1611 = match + let lifted2311 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1610 = mbt_ffi_ptr2str( + let result2310 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1610) + @types.Role::Other(result2310) } _ => panic() } - Option::Some(lifted1611) + Option::Some(lifted2311) } _ => panic() } - array1613.push(@types.VariantCaseType::{ - name: result1598, - payload: lifted1599, + array2313.push(@types.VariantCaseType::{ + name: result2298, + payload: lifted2299, metadata: @types.MetadataEnvelope::{ - doc: lifted1601, - aliases: array1603, - examples: array1606, - deprecated: lifted1609, - role: lifted1612, + doc: lifted2301, + aliases: array2303, + examples: array2306, + deprecated: lifted2309, + role: lifted2312, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1613) + @types.SchemaTypeBody::VariantType(array2313) } 16 => { - let array1616 : Array[String] = [] - for index1617 = 0 - index1617 < mbt_ffi_load32(iter_base + 12) - index1617 = index1617 + 1 { + let array2316 : Array[String] = [] + for index2317 = 0 + index2317 < mbt_ffi_load32(iter_base + 12) + index2317 = index2317 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1617 * 8 + index2317 * 8 - let result1615 = mbt_ffi_ptr2str( + let result2315 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1616.push(result1615) + array2316.push(result2315) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1616) + @types.SchemaTypeBody::EnumType(array2316) } 17 => { - let array1619 : Array[String] = [] - for index1620 = 0 - index1620 < mbt_ffi_load32(iter_base + 12) - index1620 = index1620 + 1 { + let array2319 : Array[String] = [] + for index2320 = 0 + index2320 < mbt_ffi_load32(iter_base + 12) + index2320 = index2320 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1620 * 8 + index2320 * 8 - let result1618 = mbt_ffi_ptr2str( + let result2318 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1619.push(result1618) + array2319.push(result2318) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1619) + @types.SchemaTypeBody::FlagsType(array2319) } 18 => { - let array1621 : Array[Int] = [] - for index1622 = 0 - index1622 < mbt_ffi_load32(iter_base + 12) - index1622 = index1622 + 1 { + let array2321 : Array[Int] = [] + for index2322 = 0 + index2322 < mbt_ffi_load32(iter_base + 12) + index2322 = index2322 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1622 * 4 + index2322 * 4 - array1621.push(mbt_ffi_load32(iter_base + 0)) + array2321.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1621) + @types.SchemaTypeBody::TupleType(array2321) } 19 => @types.SchemaTypeBody::ListType( @@ -34457,14 +50665,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1623 : Int? = match + let lifted2323 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1624 : Int? = match + let lifted2324 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -34472,37 +50680,37 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1623, - err: lifted1624, + ok: lifted2323, + err: lifted2324, }) } 24 => { - let lifted1628 : Array[String]? = match + let lifted2328 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1626 : Array[String] = [] - for index1627 = 0 - index1627 < mbt_ffi_load32(iter_base + 16) - index1627 = index1627 + 1 { + let array2326 : Array[String] = [] + for index2327 = 0 + index2327 < mbt_ffi_load32(iter_base + 16) + index2327 = index2327 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1627 * 8 + index2327 * 8 - let result1625 = mbt_ffi_ptr2str( + let result2325 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1626.push(result1625) + array2326.push(result2325) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1626) + Option::Some(array2326) } _ => panic() } - let lifted1629 : UInt? = match + let lifted2329 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -34512,7 +50720,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1630 : UInt? = match + let lifted2330 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -34522,54 +50730,54 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1632 : String? = match + let lifted2332 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1631 = mbt_ffi_ptr2str( + let result2331 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1631) + Option::Some(result2331) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1628, - min_length: lifted1629, - max_length: lifted1630, - regex: lifted1632, + languages: lifted2328, + min_length: lifted2329, + max_length: lifted2330, + regex: lifted2332, }) } 25 => { - let lifted1636 : Array[String]? = match + let lifted2336 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1634 : Array[String] = [] - for index1635 = 0 - index1635 < mbt_ffi_load32(iter_base + 16) - index1635 = index1635 + 1 { + let array2334 : Array[String] = [] + for index2335 = 0 + index2335 < mbt_ffi_load32(iter_base + 16) + index2335 = index2335 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1635 * 8 + index2335 * 8 - let result1633 = mbt_ffi_ptr2str( + let result2333 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1634.push(result1633) + array2334.push(result2333) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1634) + Option::Some(array2334) } _ => panic() } - let lifted1637 : UInt? = match + let lifted2337 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -34579,7 +50787,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1638 : UInt? = match + let lifted2338 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -34590,58 +50798,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1636, - min_bytes: lifted1637, - max_bytes: lifted1638, + mime_types: lifted2336, + min_bytes: lifted2337, + max_bytes: lifted2338, }) } 26 => { - let lifted1642 : Array[String]? = match + let lifted2342 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1640 : Array[String] = [] - for index1641 = 0 - index1641 < mbt_ffi_load32(iter_base + 20) - index1641 = index1641 + 1 { + let array2340 : Array[String] = [] + for index2341 = 0 + index2341 < mbt_ffi_load32(iter_base + 20) + index2341 = index2341 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1641 * 8 + index2341 * 8 - let result1639 = mbt_ffi_ptr2str( + let result2339 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1640.push(result1639) + array2340.push(result2339) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1640) + Option::Some(array2340) } _ => panic() } - let lifted1646 : Array[String]? = match + let lifted2346 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1644 : Array[String] = [] - for index1645 = 0 - index1645 < mbt_ffi_load32(iter_base + 32) - index1645 = index1645 + 1 { + let array2344 : Array[String] = [] + for index2345 = 0 + index2345 < mbt_ffi_load32(iter_base + 32) + index2345 = index2345 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1645 * 8 + index2345 * 8 - let result1643 = mbt_ffi_ptr2str( + let result2343 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1644.push(result1643) + array2344.push(result2343) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1644) + Option::Some(array2344) } _ => panic() } @@ -34653,95 +50861,95 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1642, - allowed_extensions: lifted1646, + allowed_mime_types: lifted2342, + allowed_extensions: lifted2346, }) } 27 => { - let lifted1650 : Array[String]? = match + let lifted2350 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1648 : Array[String] = [] - for index1649 = 0 - index1649 < mbt_ffi_load32(iter_base + 16) - index1649 = index1649 + 1 { + let array2348 : Array[String] = [] + for index2349 = 0 + index2349 < mbt_ffi_load32(iter_base + 16) + index2349 = index2349 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1649 * 8 + index2349 * 8 - let result1647 = mbt_ffi_ptr2str( + let result2347 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1648.push(result1647) + array2348.push(result2347) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1648) + Option::Some(array2348) } _ => panic() } - let lifted1654 : Array[String]? = match + let lifted2354 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1652 : Array[String] = [] - for index1653 = 0 - index1653 < mbt_ffi_load32(iter_base + 28) - index1653 = index1653 + 1 { + let array2352 : Array[String] = [] + for index2353 = 0 + index2353 < mbt_ffi_load32(iter_base + 28) + index2353 = index2353 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1653 * 8 + index2353 * 8 - let result1651 = mbt_ffi_ptr2str( + let result2351 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1652.push(result1651) + array2352.push(result2351) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1652) + Option::Some(array2352) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1650, - allowed_hosts: lifted1654, + allowed_schemes: lifted2350, + allowed_hosts: lifted2354, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1655 = mbt_ffi_ptr2str( + let result2355 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1657 : Array[String] = [] - for index1658 = 0 - index1658 < mbt_ffi_load32(iter_base + 20) - index1658 = index1658 + 1 { + let array2357 : Array[String] = [] + for index2358 = 0 + index2358 < mbt_ffi_load32(iter_base + 20) + index2358 = index2358 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1658 * 8 + index2358 * 8 - let result1656 = mbt_ffi_ptr2str( + 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 + 16)) - let lifted1660 : @types.QuantityValue? = match + let lifted2360 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1659 = mbt_ffi_ptr2str( + let result2359 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -34749,17 +50957,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1659, + unit: result2359, }) } _ => panic() } - let lifted1662 : @types.QuantityValue? = match + let lifted2362 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1661 = mbt_ffi_ptr2str( + let result2361 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -34767,406 +50975,406 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1661, + unit: result2361, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1655, - allowed_suffixes: array1657, - min: lifted1660, - max: lifted1662, + base_unit: result2355, + allowed_suffixes: array2357, + min: lifted2360, + max: lifted2362, }) } 31 => { - let array1686 : Array[@types.UnionBranch] = [] - for index1687 = 0 - index1687 < mbt_ffi_load32(iter_base + 12) - index1687 = index1687 + 1 { + let array2386 : Array[@types.UnionBranch] = [] + for index2387 = 0 + index2387 < mbt_ffi_load32(iter_base + 12) + index2387 = index2387 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1687 * 92 + index2387 * 92 - let result1663 = mbt_ffi_ptr2str( + let result2363 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1672 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted2372 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1664 = mbt_ffi_ptr2str( + let result2364 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1664) + @types.DiscriminatorRule::Prefix(result2364) } 1 => { - let result1665 = mbt_ffi_ptr2str( + let result2365 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1665) + @types.DiscriminatorRule::Suffix(result2365) } 2 => { - let result1666 = mbt_ffi_ptr2str( + let result2366 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1666) + @types.DiscriminatorRule::Contains(result2366) } 3 => { - let result1667 = mbt_ffi_ptr2str( + let result2367 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1667) + @types.DiscriminatorRule::Regex(result2367) } 4 => { - let result1668 = mbt_ffi_ptr2str( + let result2368 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1670 : String? = match + let lifted2370 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1669 = mbt_ffi_ptr2str( + let result2369 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1669) + Option::Some(result2369) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1668, - literal: lifted1670, + field_name: result2368, + literal: lifted2370, }) } 5 => { - let result1671 = mbt_ffi_ptr2str( + let result2371 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1671) + @types.DiscriminatorRule::FieldAbsent(result2371) } _ => panic() } - let lifted1674 : String? = match + let lifted2374 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1673 = mbt_ffi_ptr2str( + let result2373 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1673) + Option::Some(result2373) } _ => panic() } - let array1676 : Array[String] = [] - for index1677 = 0 - index1677 < mbt_ffi_load32(iter_base + 52) - index1677 = index1677 + 1 { + let array2376 : Array[String] = [] + for index2377 = 0 + index2377 < mbt_ffi_load32(iter_base + 52) + index2377 = index2377 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1677 * 8 + index2377 * 8 - let result1675 = mbt_ffi_ptr2str( + let result2375 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1676.push(result1675) + array2376.push(result2375) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1679 : Array[String] = [] - for index1680 = 0 - index1680 < mbt_ffi_load32(iter_base + 60) - index1680 = index1680 + 1 { + let array2379 : Array[String] = [] + for index2380 = 0 + index2380 < mbt_ffi_load32(iter_base + 60) + index2380 = index2380 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1680 * 8 + index2380 * 8 - let result1678 = mbt_ffi_ptr2str( + let result2378 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1679.push(result1678) + array2379.push(result2378) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1682 : String? = match + let lifted2382 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1681 = mbt_ffi_ptr2str( + let result2381 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1681) + Option::Some(result2381) } _ => panic() } - let lifted1685 : @types.Role? = match + let lifted2385 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1684 = match + let lifted2384 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1683 = mbt_ffi_ptr2str( + let result2383 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1683) + @types.Role::Other(result2383) } _ => panic() } - Option::Some(lifted1684) + Option::Some(lifted2384) } _ => panic() } - array1686.push(@types.UnionBranch::{ - tag: result1663, + array2386.push(@types.UnionBranch::{ + tag: result2363, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1672, + discriminator: lifted2372, metadata: @types.MetadataEnvelope::{ - doc: lifted1674, - aliases: array1676, - examples: array1679, - deprecated: lifted1682, - role: lifted1685, + doc: lifted2374, + aliases: array2376, + examples: array2379, + deprecated: lifted2382, + role: lifted2385, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1686, + branches: array2386, }) } 32 => { - let lifted1689 : String? = match + let lifted2389 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1688 = mbt_ffi_ptr2str( + let result2388 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1688) + Option::Some(result2388) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1689, + category: lifted2389, }) } 33 => { - let lifted1691 : String? = match + let lifted2391 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1690 = mbt_ffi_ptr2str( + let result2390 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1690) + Option::Some(result2390) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1691, + resource_name: lifted2391, }) } 34 => { - let lifted1692 : Int? = match + let lifted2392 : 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(lifted1692) + @types.SchemaTypeBody::FutureType(lifted2392) } 35 => { - let lifted1693 : Int? = match + let lifted2393 : 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(lifted1693) + @types.SchemaTypeBody::StreamType(lifted2393) } _ => panic() } - let lifted1696 : String? = match + let lifted2396 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1695 = mbt_ffi_ptr2str( + let result2395 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1695) + Option::Some(result2395) } _ => panic() } - let array1698 : Array[String] = [] - for index1699 = 0 - index1699 < mbt_ffi_load32(iter_base + 104) - index1699 = index1699 + 1 { + let array2398 : Array[String] = [] + for index2399 = 0 + index2399 < mbt_ffi_load32(iter_base + 104) + index2399 = index2399 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1699 * 8 + index2399 * 8 - let result1697 = mbt_ffi_ptr2str( + let result2397 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1698.push(result1697) + array2398.push(result2397) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1701 : Array[String] = [] - for index1702 = 0 - index1702 < mbt_ffi_load32(iter_base + 112) - index1702 = index1702 + 1 { + let array2401 : Array[String] = [] + for index2402 = 0 + index2402 < mbt_ffi_load32(iter_base + 112) + index2402 = index2402 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1702 * 8 + index2402 * 8 - let result1700 = mbt_ffi_ptr2str( + let result2400 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1701.push(result1700) + array2401.push(result2400) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1704 : String? = match + let lifted2404 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1703 = mbt_ffi_ptr2str( + let result2403 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1703) + Option::Some(result2403) } _ => panic() } - let lifted1707 : @types.Role? = match + let lifted2407 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1706 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted2406 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1705 = mbt_ffi_ptr2str( + let result2405 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1705) + @types.Role::Other(result2405) } _ => panic() } - Option::Some(lifted1706) + Option::Some(lifted2406) } _ => panic() } - array1708.push(@types.SchemaTypeNode::{ - body: lifted1694, + array2408.push(@types.SchemaTypeNode::{ + body: lifted2394, metadata: @types.MetadataEnvelope::{ - doc: lifted1696, - aliases: array1698, - examples: array1701, - deprecated: lifted1704, - role: lifted1707, + doc: lifted2396, + aliases: array2398, + examples: array2401, + deprecated: lifted2404, + role: lifted2407, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1713 : Array[@types.SchemaTypeDef] = [] - for index1714 = 0 - index1714 < mbt_ffi_load32(iter_base + 60) - index1714 = index1714 + 1 { + let array2413 : Array[@types.SchemaTypeDef] = [] + for index2414 = 0 + index2414 < mbt_ffi_load32(iter_base + 60) + index2414 = index2414 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1714 * 24 + index2414 * 24 - let result1710 = mbt_ffi_ptr2str( + let result2410 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1712 : String? = match + let lifted2412 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1711 = mbt_ffi_ptr2str( + let result2411 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1711) + Option::Some(result2411) } _ => panic() } - array1713.push(@types.SchemaTypeDef::{ - id: result1710, - name: lifted1712, + array2413.push(@types.SchemaTypeDef::{ + id: result2410, + name: lifted2412, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let array1744 : Array[@types.SchemaValueNode] = [] - for index1745 = 0 - index1745 < mbt_ffi_load32(iter_base + 72) - index1745 = index1745 + 1 { + let array2444 : Array[@types.SchemaValueNode] = [] + for index2445 = 0 + index2445 < mbt_ffi_load32(iter_base + 72) + index2445 = index2445 + 1 { let iter_base = mbt_ffi_load32(iter_base + 68) + - index1745 * 32 + index2445 * 32 - let lifted1743 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2443 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -35218,29 +51426,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1715 = mbt_ffi_ptr2str( + let result2415 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1715) + @types.SchemaValueNode::StringValue(result2415) } 13 => { - let array1716 : Array[Int] = [] - for index1717 = 0 - index1717 < mbt_ffi_load32(iter_base + 12) - index1717 = index1717 + 1 { + let array2416 : Array[Int] = [] + for index2417 = 0 + index2417 < mbt_ffi_load32(iter_base + 12) + index2417 = index2417 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1717 * 4 + index2417 * 4 - array1716.push(mbt_ffi_load32(iter_base + 0)) + array2416.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1716) + @types.SchemaValueNode::RecordValue(array2416) } 14 => { - let lifted1718 : Int? = match + let lifted2418 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -35249,7 +51457,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1718, + payload: lifted2418, }) } 15 => @@ -35257,180 +51465,180 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1719 : Array[Bool] = [] - for index1720 = 0 - index1720 < mbt_ffi_load32(iter_base + 12) - index1720 = index1720 + 1 { + let array2419 : Array[Bool] = [] + for index2420 = 0 + index2420 < mbt_ffi_load32(iter_base + 12) + index2420 = index2420 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1720 * 1 + index2420 * 1 - array1719.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array2419.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1719) + @types.SchemaValueNode::FlagsValue(array2419) } 17 => { - let array1721 : Array[Int] = [] - for index1722 = 0 - index1722 < mbt_ffi_load32(iter_base + 12) - index1722 = index1722 + 1 { + let array2421 : Array[Int] = [] + for index2422 = 0 + index2422 < mbt_ffi_load32(iter_base + 12) + index2422 = index2422 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1722 * 4 + index2422 * 4 - array1721.push(mbt_ffi_load32(iter_base + 0)) + array2421.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1721) + @types.SchemaValueNode::TupleValue(array2421) } 18 => { - let array1723 : Array[Int] = [] - for index1724 = 0 - index1724 < mbt_ffi_load32(iter_base + 12) - index1724 = index1724 + 1 { + let array2423 : Array[Int] = [] + for index2424 = 0 + index2424 < mbt_ffi_load32(iter_base + 12) + index2424 = index2424 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1724 * 4 + index2424 * 4 - array1723.push(mbt_ffi_load32(iter_base + 0)) + array2423.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1723) + @types.SchemaValueNode::ListValue(array2423) } 19 => { - let array1725 : Array[Int] = [] - for index1726 = 0 - index1726 < mbt_ffi_load32(iter_base + 12) - index1726 = index1726 + 1 { + 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) + - index1726 * 4 + 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::FixedListValue(array1725) + @types.SchemaValueNode::FixedListValue(array2425) } 20 => { - let array1727 : Array[@types.MapEntry] = [] - for index1728 = 0 - index1728 < mbt_ffi_load32(iter_base + 12) - index1728 = index1728 + 1 { + let array2427 : Array[@types.MapEntry] = [] + for index2428 = 0 + index2428 < mbt_ffi_load32(iter_base + 12) + index2428 = index2428 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1728 * 8 + index2428 * 8 - array1727.push(@types.MapEntry::{ + array2427.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(array1727) + @types.SchemaValueNode::MapValue(array2427) } 21 => { - let lifted1729 : Int? = match + let lifted2429 : 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(lifted1729) + @types.SchemaValueNode::OptionValue(lifted2429) } 22 => { - let lifted1732 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2432 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1730 : Int? = match + let lifted2430 : 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(lifted1730) + @types.ResultValuePayload::OkValue(lifted2430) } 1 => { - let lifted1731 : Int? = match + let lifted2431 : 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(lifted1731) + @types.ResultValuePayload::ErrValue(lifted2431) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1732) + @types.SchemaValueNode::ResultValue(lifted2432) } 23 => { - let result1733 = mbt_ffi_ptr2str( + let result2433 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1735 : String? = match + let lifted2435 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1734 = mbt_ffi_ptr2str( + let result2434 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1734) + Option::Some(result2434) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1733, - language: lifted1735, + text: result2433, + language: lifted2435, }) } 24 => { - let result1736 = mbt_ffi_ptr2bytes( + let result2436 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1738 : String? = match + let lifted2438 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1737 = mbt_ffi_ptr2str( + let result2437 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1737) + Option::Some(result2437) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1736, - mime_type: lifted1738, + bytes: result2436, + mime_type: lifted2438, }) } 25 => { - let result1739 = mbt_ffi_ptr2str( + let result2439 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1739) + @types.SchemaValueNode::PathValue(result2439) } 26 => { - let result1740 = mbt_ffi_ptr2str( + let result2440 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1740) + @types.SchemaValueNode::UrlValue(result2440) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -35442,7 +51650,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1741 = mbt_ffi_ptr2str( + let result2441 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -35450,17 +51658,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1741, + unit: result2441, }) } 30 => { - let result1742 = mbt_ffi_ptr2str( + let result2442 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1742, + tag: result2442, body: mbt_ffi_load32(iter_base + 16), }) } @@ -35477,65 +51685,65 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1744.push(lifted1743) + array2444.push(lifted2443) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) - let result1746 = mbt_ffi_ptr2str( + let result2446 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 80), mbt_ffi_load32(iter_base + 84), ) - let array1748 : Array[String] = [] - for index1749 = 0 - index1749 < mbt_ffi_load32(iter_base + 92) - index1749 = index1749 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index1749 * 8 + let array2448 : Array[String] = [] + for index2449 = 0 + index2449 < mbt_ffi_load32(iter_base + 92) + index2449 = index2449 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index2449 * 8 - let result1747 = mbt_ffi_ptr2str( + let result2447 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1748.push(result1747) + array2448.push(result2447) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) - let array1763 : Array[Array[SpanData]] = [] - for index1764 = 0 - index1764 < mbt_ffi_load32(iter_base + 100) - index1764 = index1764 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 96) + index1764 * 8 + let array2463 : Array[Array[SpanData]] = [] + for index2464 = 0 + index2464 < mbt_ffi_load32(iter_base + 100) + index2464 = index2464 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 96) + index2464 * 8 - let array1761 : Array[SpanData] = [] - for index1762 = 0 - index1762 < mbt_ffi_load32(iter_base + 4) - index1762 = index1762 + 1 { + let array2461 : Array[SpanData] = [] + for index2462 = 0 + index2462 < mbt_ffi_load32(iter_base + 4) + index2462 = index2462 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index1762 * 80 + index2462 * 80 - let lifted1760 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2460 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1750 = mbt_ffi_ptr2str( + let result2450 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1752 : String? = match + let lifted2452 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1751 = mbt_ffi_ptr2str( + let result2451 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1751) + Option::Some(result2451) } _ => panic() } - let lifted1753 : UInt64? = match + let lifted2453 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -35545,117 +51753,117 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let array1757 : Array[@context.Attribute] = [] - for index1758 = 0 - index1758 < mbt_ffi_load32(iter_base + 68) - index1758 = index1758 + 1 { + let array2457 : Array[@context.Attribute] = [] + for index2458 = 0 + index2458 < mbt_ffi_load32(iter_base + 68) + index2458 = index2458 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index1758 * 20 + index2458 * 20 - let result1754 = mbt_ffi_ptr2str( + let result2454 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1756 = match + let lifted2456 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1755 = mbt_ffi_ptr2str( + let result2455 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1755) + @context.AttributeValue::String(result2455) } _ => panic() } - array1757.push(@context.Attribute::{ - key: result1754, - value: lifted1756, + array2457.push(@context.Attribute::{ + key: result2454, + value: lifted2456, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result1750, + span_id: result2450, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted1752, - linked_context: lifted1753, - attributes: array1757, + parent: lifted2452, + linked_context: lifted2453, + attributes: array2457, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result1759 = mbt_ffi_ptr2str( + let result2459 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result1759, + span_id: result2459, }) } _ => panic() } - array1761.push(lifted1760) + array2461.push(lifted2460) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array1763.push(array1761) + array2463.push(array2461) } mbt_ffi_free(mbt_ffi_load32(iter_base + 96)) AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{ - idempotency_key: result1580, - method_name: result1581, + idempotency_key: result2210, + method_name: result2211, function_input: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1708, - defs: array1713, + type_nodes: array2408, + defs: array2413, root: mbt_ffi_load32(iter_base + 64), }, value: @types.SchemaValueTree::{ - value_nodes: array1744, + value_nodes: array2444, root: mbt_ffi_load32(iter_base + 76), }, }, - trace_id: result1746, - trace_states: array1748, - invocation_context: array1763, + trace_id: result2446, + trace_states: array2448, + invocation_context: array2463, }) } 2 => AgentInvocation::SaveSnapshot 3 => { - let result1765 = mbt_ffi_ptr2bytes( + let result2465 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result1766 = mbt_ffi_ptr2str( + let result2466 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{ snapshot: SnapshotData::{ - data: result1765, - mime_type: result1766, + data: result2465, + mime_type: result2466, }, }) } 4 => { - let result1767 = mbt_ffi_ptr2str( + let result2467 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{ - idempotency_key: result1767, + idempotency_key: result2467, }) } 5 => @@ -35670,26 +51878,26 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - invocation: lifted1768, + invocation: lifted2468, }) } 15 => { - let lifted1771 = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2471 = match mbt_ffi_load8_u(iter_base + 32) { 0 => UpdateDescription::AutoUpdate 1 => { - let result1769 = mbt_ffi_ptr2bytes( + let result2469 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - let result1770 = mbt_ffi_ptr2str( + let result2470 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) UpdateDescription::SnapshotBased(@host.Snapshot::{ - payload: result1769, - mime_type: result1770, + payload: result2469, + mime_type: result2470, }) } _ => panic() @@ -35701,47 +51909,47 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, target_revision: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - description: lifted1771, + description: lifted2471, }) } 16 => { - let array1778 : Array[PluginInstallationDescription] = [] - for index1779 = 0 - index1779 < mbt_ffi_load32(iter_base + 44) - index1779 = index1779 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index1779 * 48 + let array2478 : Array[PluginInstallationDescription] = [] + for index2479 = 0 + index2479 < mbt_ffi_load32(iter_base + 44) + index2479 = index2479 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 40) + index2479 * 48 - let result1772 = mbt_ffi_ptr2str( + let result2472 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - let result1773 = mbt_ffi_ptr2str( + let result2473 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - let array1776 : Array[(String, String)] = [] - for index1777 = 0 - index1777 < mbt_ffi_load32(iter_base + 40) - index1777 = index1777 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + index1777 * 16 + let array2476 : Array[(String, String)] = [] + for index2477 = 0 + index2477 < mbt_ffi_load32(iter_base + 40) + index2477 = index2477 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + index2477 * 16 - let result1774 = mbt_ffi_ptr2str( + let result2474 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result1775 = mbt_ffi_ptr2str( + let result2475 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array1776.push((result1774, result1775)) + array2476.push((result2474, result2475)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - array1778.push(PluginInstallationDescription::{ + array2478.push(PluginInstallationDescription::{ environment_plugin_grant_id: EnvironmentPluginGrantId::{ uuid: @types.Uuid::{ high_bits: mbt_ffi_load64(iter_base + 0).reinterpret_as_uint64(), @@ -35749,9 +51957,9 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }, }, plugin_priority: mbt_ffi_load32(iter_base + 16), - plugin_name: result1772, - plugin_version: result1773, - parameters: array1776, + plugin_name: result2472, + plugin_version: result2473, + parameters: array2476, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) @@ -35763,19 +51971,19 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }, 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: array1778, + new_active_plugins: array2478, }) } 17 => { - let lifted1781 : String? = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2481 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1780 = mbt_ffi_ptr2str( + let result2480 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1780) + Option::Some(result2480) } _ => panic() } @@ -35786,7 +51994,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, target_revision: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - details: lifted1781, + details: lifted2481, }) } 18 => @@ -35806,12 +52014,12 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { delta: mbt_ffi_load64(iter_base + 24), }) 20 => { - let result1782 = mbt_ffi_ptr2str( + let result2482 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result1783 = mbt_ffi_ptr2str( + let result2483 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) @@ -35822,17 +52030,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, id: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - name: result1782, - owner: result1783, + name: result2482, + owner: result2483, }) } 21 => { - let result1784 = mbt_ffi_ptr2str( + let result2484 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result1785 = mbt_ffi_ptr2str( + let result2485 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) @@ -35843,17 +52051,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, id: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), - name: result1784, - owner: result1785, + name: result2484, + owner: result2485, }) } 22 => { - let result1786 = mbt_ffi_ptr2str( + let result2486 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - let result1787 = mbt_ffi_ptr2str( + let result2487 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) @@ -35864,8 +52072,8 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, level: LogLevel::from(mbt_ffi_load8_u(iter_base + 24)), - context: result1786, - message: result1787, + context: result2486, + message: result2487, }) } 23 => @@ -35876,33 +52084,33 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }, }) 24 => { - let result1788 = mbt_ffi_ptr2str( + let result2488 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - let result1789 = mbt_ffi_ptr2str( + let result2489 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - let array1792 : Array[(String, String)] = [] - for index1793 = 0 - index1793 < mbt_ffi_load32(iter_base + 64) - index1793 = index1793 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 60) + index1793 * 16 + let array2492 : Array[(String, String)] = [] + for index2493 = 0 + index2493 < mbt_ffi_load32(iter_base + 64) + index2493 = index2493 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 60) + index2493 * 16 - let result1790 = mbt_ffi_ptr2str( + let result2490 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result1791 = mbt_ffi_ptr2str( + let result2491 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array1792.push((result1790, result1791)) + array2492.push((result2490, result2491)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) @@ -35919,40 +52127,40 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }, }, plugin_priority: mbt_ffi_load32(iter_base + 40), - plugin_name: result1788, - plugin_version: result1789, - parameters: array1792, + plugin_name: result2488, + plugin_version: result2489, + parameters: array2492, }, }) } 25 => { - let result1794 = mbt_ffi_ptr2str( + let result2494 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - let result1795 = mbt_ffi_ptr2str( + let result2495 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - let array1798 : Array[(String, String)] = [] - for index1799 = 0 - index1799 < mbt_ffi_load32(iter_base + 64) - index1799 = index1799 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 60) + index1799 * 16 + let array2498 : Array[(String, String)] = [] + for index2499 = 0 + index2499 < mbt_ffi_load32(iter_base + 64) + index2499 = index2499 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 60) + index2499 * 16 - let result1796 = mbt_ffi_ptr2str( + let result2496 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result1797 = mbt_ffi_ptr2str( + let result2497 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array1798.push((result1796, result1797)) + array2498.push((result2496, result2497)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) @@ -35969,9 +52177,9 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }, }, plugin_priority: mbt_ffi_load32(iter_base + 40), - plugin_name: result1794, - plugin_version: result1795, - parameters: array1798, + plugin_name: result2494, + plugin_version: result2495, + parameters: array2498, }, }) } @@ -35987,7 +52195,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }, }) 27 => { - let result1800 = mbt_ffi_ptr2str( + let result2500 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) @@ -35997,67 +52205,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - idempotency_key: result1800, + idempotency_key: result2500, }) } 28 => { - let result1801 = mbt_ffi_ptr2str( + let result2501 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let lifted1803 : String? = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2503 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1802 = mbt_ffi_ptr2str( + let result2502 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1802) + Option::Some(result2502) } _ => panic() } - let lifted1805 : String? = match mbt_ffi_load8_u(iter_base + 44) { + let lifted2505 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1804 = mbt_ffi_ptr2str( + let result2504 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1804) + Option::Some(result2504) } _ => panic() } - let array1809 : Array[@context.Attribute] = [] - for index1810 = 0 - index1810 < mbt_ffi_load32(iter_base + 60) - index1810 = index1810 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + index1810 * 20 + let array2509 : Array[@context.Attribute] = [] + for index2510 = 0 + index2510 < mbt_ffi_load32(iter_base + 60) + index2510 = index2510 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + index2510 * 20 - let result1806 = mbt_ffi_ptr2str( + let result2506 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1808 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2508 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1807 = mbt_ffi_ptr2str( + let result2507 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1807) + @context.AttributeValue::String(result2507) } _ => panic() } - array1809.push(@context.Attribute::{ - key: result1806, - value: lifted1808, + array2509.push(@context.Attribute::{ + key: result2506, + value: lifted2508, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) @@ -36067,14 +52275,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - span_id: result1801, - parent: lifted1803, - linked_context_id: lifted1805, - attributes: array1809, + span_id: result2501, + parent: lifted2503, + linked_context_id: lifted2505, + attributes: array2509, }) } 29 => { - let result1811 = mbt_ffi_ptr2str( + let result2511 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) @@ -36084,28 +52292,28 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - span_id: result1811, + span_id: result2511, }) } 30 => { - let result1812 = mbt_ffi_ptr2str( + let result2512 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let result1813 = mbt_ffi_ptr2str( + let result2513 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let lifted1815 = match mbt_ffi_load8_u(iter_base + 40) { + let lifted2515 = match mbt_ffi_load8_u(iter_base + 40) { 0 => { - let result1814 = mbt_ffi_ptr2str( + let result2514 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - @context.AttributeValue::String(result1814) + @context.AttributeValue::String(result2514) } _ => panic() } @@ -36115,13 +52323,13 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - span_id: result1812, - key: result1813, - value: lifted1815, + span_id: result2512, + key: result2513, + value: lifted2515, }) } 31 => { - let lifted1816 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted2516 = match mbt_ffi_load8_u(iter_base + 24) { 0 => @host.PersistenceLevel::PersistNothing 1 => @host.PersistenceLevel::PersistRemoteSideEffects 2 => @host.PersistenceLevel::Smart @@ -36133,11 +52341,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - persistence_level: lifted1816, + persistence_level: lifted2516, }) } 32 => { - let result1817 = mbt_ffi_ptr2str( + let result2517 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) @@ -36147,7 +52355,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - transaction_id: result1817, + transaction_id: result2517, }) } 33 => @@ -36183,12 +52391,12 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { begin_index: mbt_ffi_load64(iter_base + 24).reinterpret_as_uint64(), }) 37 => { - let result1818 = mbt_ffi_ptr2bytes( + let result2518 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let result1819 = mbt_ffi_ptr2str( + let result2519 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) @@ -36198,41 +52406,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - data: SnapshotData::{ data: result1818, mime_type: result1819 }, + data: SnapshotData::{ data: result2518, mime_type: result2519 }, }) } 38 => { - let result1820 = mbt_ffi_ptr2str( + let result2520 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - let result1821 = mbt_ffi_ptr2str( + let result2521 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - let array1824 : Array[(String, String)] = [] - for index1825 = 0 - index1825 < mbt_ffi_load32(iter_base + 64) - index1825 = index1825 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 60) + index1825 * 16 + let array2524 : Array[(String, String)] = [] + for index2525 = 0 + index2525 < mbt_ffi_load32(iter_base + 64) + index2525 = index2525 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 60) + index2525 * 16 - let result1822 = mbt_ffi_ptr2str( + let result2522 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result1823 = mbt_ffi_ptr2str( + let result2523 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array1824.push((result1822, result1823)) + array2524.push((result2522, result2523)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) - let result1826 = mbt_ffi_ptr2str( + let result2526 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 88), mbt_ffi_load32(iter_base + 92), ) @@ -36250,9 +52458,9 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }, }, plugin_priority: mbt_ffi_load32(iter_base + 40), - plugin_name: result1820, - plugin_version: result1821, - parameters: array1824, + plugin_name: result2520, + plugin_version: result2521, + parameters: array2524, }, target_agent_id: @types.AgentId::{ component_id: @types.ComponentId::{ @@ -36261,7 +52469,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { low_bits: mbt_ffi_load64(iter_base + 80).reinterpret_as_uint64(), }, }, - agent_id: result1826, + agent_id: result2526, }, confirmed_up_to: mbt_ffi_load64(iter_base + 96).reinterpret_as_uint64(), sending_up_to: mbt_ffi_load64(iter_base + 104).reinterpret_as_uint64(), @@ -36269,32 +52477,32 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { }) } 39 => { - let result1827 = mbt_ffi_ptr2str( + let result2527 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let array1859 : Array[@retry.PredicateNode] = [] - for index1860 = 0 - index1860 < mbt_ffi_load32(iter_base + 40) - index1860 = index1860 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + index1860 * 32 + let array2559 : Array[@retry.PredicateNode] = [] + for index2560 = 0 + index2560 < mbt_ffi_load32(iter_base + 40) + index2560 = index2560 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + index2560 * 32 - let lifted1858 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2558 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1828 = mbt_ffi_ptr2str( + let result2528 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1830 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2530 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1829 = mbt_ffi_ptr2str( + let result2529 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1829) + @retry.PredicateValue::Text(result2529) } 1 => @retry.PredicateValue::Integer( @@ -36308,24 +52516,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropEq(@retry.PropertyComparison::{ - property_name: result1828, - value: lifted1830, + property_name: result2528, + value: lifted2530, }) } 1 => { - let result1831 = mbt_ffi_ptr2str( + let result2531 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1833 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2533 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1832 = mbt_ffi_ptr2str( + let result2532 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1832) + @retry.PredicateValue::Text(result2532) } 1 => @retry.PredicateValue::Integer( @@ -36339,24 +52547,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{ - property_name: result1831, - value: lifted1833, + property_name: result2531, + value: lifted2533, }) } 2 => { - let result1834 = mbt_ffi_ptr2str( + let result2534 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1836 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2536 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1835 = mbt_ffi_ptr2str( + let result2535 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1835) + @retry.PredicateValue::Text(result2535) } 1 => @retry.PredicateValue::Integer( @@ -36370,24 +52578,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropGt(@retry.PropertyComparison::{ - property_name: result1834, - value: lifted1836, + property_name: result2534, + value: lifted2536, }) } 3 => { - let result1837 = mbt_ffi_ptr2str( + let result2537 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1839 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2539 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1838 = mbt_ffi_ptr2str( + let result2538 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1838) + @retry.PredicateValue::Text(result2538) } 1 => @retry.PredicateValue::Integer( @@ -36401,24 +52609,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropGte(@retry.PropertyComparison::{ - property_name: result1837, - value: lifted1839, + property_name: result2537, + value: lifted2539, }) } 4 => { - let result1840 = mbt_ffi_ptr2str( + let result2540 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1842 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2542 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1841 = mbt_ffi_ptr2str( + let result2541 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1841) + @retry.PredicateValue::Text(result2541) } 1 => @retry.PredicateValue::Integer( @@ -36432,24 +52640,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropLt(@retry.PropertyComparison::{ - property_name: result1840, - value: lifted1842, + property_name: result2540, + value: lifted2542, }) } 5 => { - let result1843 = mbt_ffi_ptr2str( + let result2543 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1845 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2545 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1844 = mbt_ffi_ptr2str( + let result2544 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1844) + @retry.PredicateValue::Text(result2544) } 1 => @retry.PredicateValue::Integer( @@ -36463,39 +52671,39 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropLte(@retry.PropertyComparison::{ - property_name: result1843, - value: lifted1845, + property_name: result2543, + value: lifted2545, }) } 6 => { - let result1846 = mbt_ffi_ptr2str( + let result2546 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateNode::PropExists(result1846) + @retry.PredicateNode::PropExists(result2546) } 7 => { - let result1847 = mbt_ffi_ptr2str( + let result2547 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1850 : Array[@retry.PredicateValue] = [] - for index1851 = 0 - index1851 < mbt_ffi_load32(iter_base + 20) - index1851 = index1851 + 1 { + let array2550 : Array[@retry.PredicateValue] = [] + for index2551 = 0 + index2551 < mbt_ffi_load32(iter_base + 20) + index2551 = index2551 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1851 * 16 + index2551 * 16 - let lifted1849 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2549 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1848 = mbt_ffi_ptr2str( + let result2548 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateValue::Text(result1848) + @retry.PredicateValue::Text(result2548) } 1 => @retry.PredicateValue::Integer( @@ -36508,61 +52716,61 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1850.push(lifted1849) + array2550.push(lifted2549) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{ - property_name: result1847, - values: array1850, + property_name: result2547, + values: array2550, }) } 8 => { - let result1852 = mbt_ffi_ptr2str( + let result2552 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1853 = mbt_ffi_ptr2str( + let result2553 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{ - property_name: result1852, - pattern: result1853, + property_name: result2552, + pattern: result2553, }) } 9 => { - let result1854 = mbt_ffi_ptr2str( + let result2554 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1855 = mbt_ffi_ptr2str( + let result2555 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{ - property_name: result1854, - pattern: result1855, + property_name: result2554, + pattern: result2555, }) } 10 => { - let result1856 = mbt_ffi_ptr2str( + let result2556 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1857 = mbt_ffi_ptr2str( + let result2557 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropContains(@retry.PropertyPattern::{ - property_name: result1856, - pattern: result1857, + property_name: result2556, + pattern: result2557, }) } 11 => @@ -36586,17 +52794,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1859.push(lifted1858) + array2559.push(lifted2558) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array1895 : Array[@retry.PolicyNode] = [] - for index1896 = 0 - index1896 < mbt_ffi_load32(iter_base + 48) - index1896 = index1896 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 44) + index1896 * 32 + let array2595 : Array[@retry.PolicyNode] = [] + for index2596 = 0 + index2596 < mbt_ffi_load32(iter_base + 48) + index2596 = index2596 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 44) + index2596 * 32 - let lifted1894 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2594 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @retry.PolicyNode::Periodic( mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), @@ -36640,28 +52848,28 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { inner: mbt_ffi_load32(iter_base + 16), }) 10 => { - let array1892 : Array[@retry.PredicateNode] = [] - for index1893 = 0 - index1893 < mbt_ffi_load32(iter_base + 12) - index1893 = index1893 + 1 { + let array2592 : Array[@retry.PredicateNode] = [] + for index2593 = 0 + index2593 < mbt_ffi_load32(iter_base + 12) + index2593 = index2593 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1893 * 32 + index2593 * 32 - let lifted1891 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2591 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1861 = mbt_ffi_ptr2str( + let result2561 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1863 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2563 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1862 = mbt_ffi_ptr2str( + let result2562 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1862) + @retry.PredicateValue::Text(result2562) } 1 => @retry.PredicateValue::Integer( @@ -36675,24 +52883,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropEq(@retry.PropertyComparison::{ - property_name: result1861, - value: lifted1863, + property_name: result2561, + value: lifted2563, }) } 1 => { - let result1864 = mbt_ffi_ptr2str( + let result2564 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1866 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2566 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1865 = mbt_ffi_ptr2str( + let result2565 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1865) + @retry.PredicateValue::Text(result2565) } 1 => @retry.PredicateValue::Integer( @@ -36706,24 +52914,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{ - property_name: result1864, - value: lifted1866, + property_name: result2564, + value: lifted2566, }) } 2 => { - let result1867 = mbt_ffi_ptr2str( + let result2567 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1869 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2569 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1868 = mbt_ffi_ptr2str( + let result2568 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1868) + @retry.PredicateValue::Text(result2568) } 1 => @retry.PredicateValue::Integer( @@ -36737,24 +52945,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropGt(@retry.PropertyComparison::{ - property_name: result1867, - value: lifted1869, + property_name: result2567, + value: lifted2569, }) } 3 => { - let result1870 = mbt_ffi_ptr2str( + let result2570 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1872 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2572 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1871 = mbt_ffi_ptr2str( + let result2571 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1871) + @retry.PredicateValue::Text(result2571) } 1 => @retry.PredicateValue::Integer( @@ -36768,24 +52976,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropGte(@retry.PropertyComparison::{ - property_name: result1870, - value: lifted1872, + property_name: result2570, + value: lifted2572, }) } 4 => { - let result1873 = mbt_ffi_ptr2str( + let result2573 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1875 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2575 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1874 = mbt_ffi_ptr2str( + let result2574 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1874) + @retry.PredicateValue::Text(result2574) } 1 => @retry.PredicateValue::Integer( @@ -36799,24 +53007,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropLt(@retry.PropertyComparison::{ - property_name: result1873, - value: lifted1875, + property_name: result2573, + value: lifted2575, }) } 5 => { - let result1876 = mbt_ffi_ptr2str( + let result2576 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1878 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2578 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1877 = mbt_ffi_ptr2str( + let result2577 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1877) + @retry.PredicateValue::Text(result2577) } 1 => @retry.PredicateValue::Integer( @@ -36830,40 +53038,40 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } @retry.PredicateNode::PropLte(@retry.PropertyComparison::{ - property_name: result1876, - value: lifted1878, + property_name: result2576, + value: lifted2578, }) } 6 => { - let result1879 = mbt_ffi_ptr2str( + let result2579 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateNode::PropExists(result1879) + @retry.PredicateNode::PropExists(result2579) } 7 => { - let result1880 = mbt_ffi_ptr2str( + let result2580 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1883 : Array[@retry.PredicateValue] = [] - for index1884 = 0 - index1884 < mbt_ffi_load32(iter_base + 20) - index1884 = index1884 + 1 { + let array2583 : Array[@retry.PredicateValue] = [] + for index2584 = 0 + index2584 < mbt_ffi_load32(iter_base + 20) + index2584 = index2584 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1884 * 16 + index2584 * 16 - let lifted1882 = match + let lifted2582 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1881 = mbt_ffi_ptr2str( + let result2581 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateValue::Text(result1881) + @retry.PredicateValue::Text(result2581) } 1 => @retry.PredicateValue::Integer( @@ -36876,61 +53084,61 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1883.push(lifted1882) + array2583.push(lifted2582) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{ - property_name: result1880, - values: array1883, + property_name: result2580, + values: array2583, }) } 8 => { - let result1885 = mbt_ffi_ptr2str( + let result2585 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1886 = mbt_ffi_ptr2str( + let result2586 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{ - property_name: result1885, - pattern: result1886, + property_name: result2585, + pattern: result2586, }) } 9 => { - let result1887 = mbt_ffi_ptr2str( + let result2587 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1888 = mbt_ffi_ptr2str( + let result2588 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{ - property_name: result1887, - pattern: result1888, + property_name: result2587, + pattern: result2588, }) } 10 => { - let result1889 = mbt_ffi_ptr2str( + let result2589 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1890 = mbt_ffi_ptr2str( + let result2590 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropContains(@retry.PropertyPattern::{ - property_name: result1889, - pattern: result1890, + property_name: result2589, + pattern: result2590, }) } 11 => @@ -36956,12 +53164,12 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1892.push(lifted1891) + array2592.push(lifted2591) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @retry.PolicyNode::FilteredOn(@retry.FilteredConfig::{ - predicate: @retry.RetryPredicate::{ nodes: array1892 }, + predicate: @retry.RetryPredicate::{ nodes: array2592 }, inner: mbt_ffi_load32(iter_base + 16), }) } @@ -36989,7 +53197,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1895.push(lifted1894) + array2595.push(lifted2594) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) @@ -36999,15 +53207,15 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, policy: @retry.NamedRetryPolicy::{ - name: result1827, + name: result2527, priority: mbt_ffi_load32(iter_base + 32).reinterpret_as_uint(), - predicate: @retry.RetryPredicate::{ nodes: array1859 }, - policy: @retry.RetryPolicy::{ nodes: array1895 }, + predicate: @retry.RetryPredicate::{ nodes: array2559 }, + policy: @retry.RetryPolicy::{ nodes: array2595 }, }, }) } 40 => { - let result1897 = mbt_ffi_ptr2str( + let result2597 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) @@ -37017,11 +53225,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - name: result1897, + name: result2597, }) } 41 => { - let lifted1898 = match mbt_ffi_load8_u(iter_base + 24) { + let lifted2598 = match mbt_ffi_load8_u(iter_base + 24) { 0 => PublicQueuedCardEvent::Install(PublicQueuedCardEventCard::{ card_id: @types.CardId::{ @@ -37048,11 +53256,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - event: lifted1898, + event: lifted2598, }) } 42 => { - let lifted1899 : UInt64? = match mbt_ffi_load8_u(iter_base + 24) { + let lifted2599 : UInt64? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => Option::Some( @@ -37066,7 +53274,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { seconds: mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 16).reinterpret_as_uint(), }, - queued_event_index: lifted1899, + queued_event_index: lifted2599, card_id: @types.CardId::{ uuid: @types.Uuid::{ high_bits: mbt_ffi_load64(iter_base + 40).reinterpret_as_uint64(), @@ -37107,15 +53315,15 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1901.push(lifted1900) + array2601.push(lifted2600) } mbt_ffi_free(mbt_ffi_load32(return_area + 4)) - Option::Some(array1901) + Option::Some(array2601) } _ => panic() } - let ret = lifted1903 + let ret = lifted2603 mbt_ffi_free(return_area) return ret } @@ -37150,17 +53358,17 @@ pub fn SearchOplog::get_next( let return_area = mbt_ffi_malloc(12) wasmImportMethodSearchOplogGetNext(handle, return_area) - let lifted1903 : Array[(UInt64, PublicOplogEntry)]? = match + let lifted2603 : Array[(UInt64, PublicOplogEntry)]? = match mbt_ffi_load8_u(return_area + 0) { 0 => Option::None 1 => { - let array1901 : Array[(UInt64, PublicOplogEntry)] = [] - for index1902 = 0 - index1902 < mbt_ffi_load32(return_area + 8) - index1902 = index1902 + 1 { - let iter_base = mbt_ffi_load32(return_area + 4) + index1902 * 216 + let array2601 : Array[(UInt64, PublicOplogEntry)] = [] + for index2602 = 0 + index2602 < mbt_ffi_load32(return_area + 8) + index2602 = index2602 + 1 { + let iter_base = mbt_ffi_load32(return_area + 4) + index2602 * 216 - let lifted1900 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2600 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { let result = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), @@ -37260,11 +53468,11 @@ pub fn SearchOplog::get_next( } mbt_ffi_free(mbt_ffi_load32(iter_base + 160)) - let array178 : Array[LocalAgentConfigEntry] = [] - for index179 = 0 - index179 < mbt_ffi_load32(iter_base + 172) - index179 = index179 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 168) + index179 * 40 + let array248 : Array[LocalAgentConfigEntry] = [] + for index249 = 0 + index249 < mbt_ffi_load32(iter_base + 172) + index249 = index249 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 168) + index249 * 40 let array12 : Array[String] = [] for index13 = 0 @@ -37281,314 +53489,1125 @@ pub fn SearchOplog::get_next( } 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), ) 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 + 2 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 => { + 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 array28 : Array[@types.NamedFieldType] = [] - for index29 = 0 - index29 < mbt_ffi_load32(iter_base + 12) - index29 = index29 + 1 { + 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) + - index29 * 68 + index99 * 68 - let result14 = mbt_ffi_ptr2str( + let result84 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted16 : String? = match + let lifted86 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result15 = mbt_ffi_ptr2str( + 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 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) + - index19 * 8 + index89 * 8 - let result17 = mbt_ffi_ptr2str( + 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 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) + - index22 * 8 + index92 * 8 - let result20 = mbt_ffi_ptr2str( + 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 + let lifted94 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result23 = mbt_ffi_ptr2str( + 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 + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result25 = mbt_ffi_ptr2str( + 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, + array98.push(@types.NamedFieldType::{ + name: result84, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted16, - aliases: array18, - examples: array21, - deprecated: lifted24, - role: lifted27, + 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 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) + - index46 * 72 + index116 * 72 - let result30 = mbt_ffi_ptr2str( + let result100 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted31 : Int? = match + let lifted101 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted33 : String? = match + let lifted103 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result32 = mbt_ffi_ptr2str( + 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 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) + - index36 * 8 + index106 * 8 - let result34 = mbt_ffi_ptr2str( + 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 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) + - index39 * 8 + index109 * 8 - let result37 = mbt_ffi_ptr2str( + 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 + let lifted111 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result40 = mbt_ffi_ptr2str( + 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 + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result42 = mbt_ffi_ptr2str( + 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, + array115.push(@types.VariantCaseType::{ + name: result100, + payload: lifted101, metadata: @types.MetadataEnvelope::{ - doc: lifted33, - aliases: array35, - examples: array38, - deprecated: lifted41, - role: lifted44, + 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 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) + - index49 * 8 + index119 * 8 - let result47 = mbt_ffi_ptr2str( + 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 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) + - index52 * 8 + index122 * 8 - let result50 = mbt_ffi_ptr2str( + 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 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) + - index54 * 4 + 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 => @types.SchemaTypeBody::ListType( @@ -37609,13 +54628,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted56 : Int? = match + let lifted126 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -37623,37 +54643,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted55, - err: lifted56, + ok: lifted125, + err: lifted126, }) } 24 => { - let lifted60 : Array[String]? = match + 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 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) + - index59 * 8 + index129 * 8 - let result57 = mbt_ffi_ptr2str( + 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 + let lifted131 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -37663,7 +54683,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted62 : UInt? = match + let lifted132 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -37673,54 +54693,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted64 : String? = match + let lifted134 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result63 = mbt_ffi_ptr2str( + 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, + languages: lifted130, + min_length: lifted131, + max_length: lifted132, + regex: lifted134, }) } 25 => { - let lifted68 : Array[String]? = match + 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 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) + - index67 * 8 + index137 * 8 - let result65 = mbt_ffi_ptr2str( + 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 + let lifted139 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -37730,7 +54750,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted70 : UInt? = match + let lifted140 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -37741,58 +54761,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted68, - min_bytes: lifted69, - max_bytes: lifted70, + mime_types: lifted138, + min_bytes: lifted139, + max_bytes: lifted140, }) } 26 => { - let lifted74 : Array[String]? = match + 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 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) + - index73 * 8 + index143 * 8 - let result71 = mbt_ffi_ptr2str( + 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 + 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 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) + - index77 * 8 + index147 * 8 - let result75 = mbt_ffi_ptr2str( + 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() } @@ -37804,95 +54824,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted74, - allowed_extensions: lifted78, + allowed_mime_types: lifted144, + allowed_extensions: lifted148, }) } 27 => { - let lifted82 : Array[String]? = match + 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 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) + - index81 * 8 + index151 * 8 - let result79 = mbt_ffi_ptr2str( + 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 + 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 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) + - index85 * 8 + index155 * 8 - let result83 = mbt_ffi_ptr2str( + 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, + allowed_schemes: lifted152, + allowed_hosts: lifted156, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result87 = mbt_ffi_ptr2str( + 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 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) + - index90 * 8 + index160 * 8 - let result88 = mbt_ffi_ptr2str( + 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 + let lifted162 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result91 = mbt_ffi_ptr2str( + let result161 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -37900,17 +54920,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result91, + unit: result161, }) } _ => panic() } - let lifted94 : @types.QuantityValue? = match + let lifted164 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result93 = mbt_ffi_ptr2str( + let result163 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -37918,401 +54938,401 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result93, + unit: result163, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result87, - allowed_suffixes: array89, - min: lifted92, - max: lifted94, + 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 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) + - index119 * 92 + index189 * 92 - let result95 = mbt_ffi_ptr2str( + 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( + 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( + 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( + 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( + 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( + let result170 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted102 : String? = match + let lifted172 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result101 = mbt_ffi_ptr2str( + 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, + field_name: result170, + literal: lifted172, }) } 5 => { - let result103 = mbt_ffi_ptr2str( + 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 + let lifted176 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result105 = mbt_ffi_ptr2str( + 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 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) + - index109 * 8 + index179 * 8 - let result107 = mbt_ffi_ptr2str( + 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 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) + - index112 * 8 + index182 * 8 - let result110 = mbt_ffi_ptr2str( + 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 + let lifted184 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result113 = mbt_ffi_ptr2str( + 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 + let lifted187 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted116 = match + let lifted186 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result115 = mbt_ffi_ptr2str( + 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, + array188.push(@types.UnionBranch::{ + tag: result165, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted104, + discriminator: lifted174, metadata: @types.MetadataEnvelope::{ - doc: lifted106, - aliases: array108, - examples: array111, - deprecated: lifted114, - role: lifted117, + 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, + branches: array188, }) } 32 => { - let lifted121 : String? = match + let lifted191 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result120 = mbt_ffi_ptr2str( + let result190 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result120) + Option::Some(result190) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted121, + category: lifted191, }) } 33 => { - let lifted123 : String? = match + let lifted193 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result122 = mbt_ffi_ptr2str( + 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, + resource_name: lifted193, }) } 34 => { - let lifted124 : Int? = match + let lifted194 : 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(lifted124) + @types.SchemaTypeBody::FutureType(lifted194) } 35 => { - let lifted125 : Int? = match + let lifted195 : 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(lifted125) + @types.SchemaTypeBody::StreamType(lifted195) } _ => panic() } - let lifted128 : String? = match + let lifted198 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result127 = mbt_ffi_ptr2str( + 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( + 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( + 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 + let lifted206 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result135 = mbt_ffi_ptr2str( + 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 + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result137 = mbt_ffi_ptr2str( + 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, + array210.push(@types.SchemaTypeNode::{ + body: lifted196, metadata: @types.MetadataEnvelope::{ - doc: lifted128, - aliases: array130, - examples: array133, - deprecated: lifted136, - role: lifted139, + 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( + 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( + 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, + 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 array176 : Array[@types.SchemaValueNode] = [] - for index177 = 0 - index177 < mbt_ffi_load32(iter_base + 32) - index177 = index177 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + index177 * 32 + let array246 : Array[@types.SchemaValueNode] = [] + for index247 = 0 + index247 < mbt_ffi_load32(iter_base + 32) + index247 = index247 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + index247 * 32 - let lifted175 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted245 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -38364,29 +55384,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result147 = mbt_ffi_ptr2str( + 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 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) + - index149 * 4 + 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 + let lifted220 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -38395,7 +55415,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted150, + payload: lifted220, }) } 15 => @@ -38403,180 +55423,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array151 : Array[Bool] = [] - for index152 = 0 - index152 < mbt_ffi_load32(iter_base + 12) - index152 = 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) + - index152 * 1 + 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 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) + - index154 * 4 + 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 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) + - index156 * 4 + 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 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) + - index158 * 4 + 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 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) + - index160 * 8 + index230 * 8 - array159.push(@types.MapEntry::{ + 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 + let lifted231 : 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(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 + let lifted232 : 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(lifted162) + @types.ResultValuePayload::OkValue(lifted232) } 1 => { - let lifted163 : Int? = match + let lifted233 : 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(lifted163) + @types.ResultValuePayload::ErrValue(lifted233) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted164) + @types.SchemaValueNode::ResultValue(lifted234) } 23 => { - let result165 = mbt_ffi_ptr2str( + let result235 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted167 : String? = match + let lifted237 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result166 = mbt_ffi_ptr2str( + 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, + text: result235, + language: lifted237, }) } 24 => { - let result168 = mbt_ffi_ptr2bytes( + let result238 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted170 : String? = match + let lifted240 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result169 = mbt_ffi_ptr2str( + 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, + bytes: result238, + mime_type: lifted240, }) } 25 => { - let result171 = mbt_ffi_ptr2str( + 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( + 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 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -38588,7 +55608,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result173 = mbt_ffi_ptr2str( + let result243 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -38596,17 +55616,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result173, + unit: result243, }) } 30 => { - let result174 = mbt_ffi_ptr2str( + let result244 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result174, + tag: result244, body: mbt_ffi_load32(iter_base + 16), }) } @@ -38623,20 +55643,20 @@ pub fn SearchOplog::get_next( _ => panic() } - array176.push(lifted175) + array246.push(lifted245) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - array178.push(LocalAgentConfigEntry::{ + array248.push(LocalAgentConfigEntry::{ path: array12, value: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array140, - defs: array145, + type_nodes: array210, + defs: array215, root: mbt_ffi_load32(iter_base + 24), }, value: @types.SchemaValueTree::{ - value_nodes: array176, + value_nodes: array246, root: mbt_ffi_load32(iter_base + 36), }, }, @@ -38644,7 +55664,7 @@ pub fn SearchOplog::get_next( } mbt_ffi_free(mbt_ffi_load32(iter_base + 168)) - let lifted180 : @types.Uuid? = match + let lifted250 : @types.Uuid? = match mbt_ffi_load8_u(iter_base + 176) { 0 => Option::None 1 => @@ -38688,8 +55708,8 @@ pub fn SearchOplog::get_next( 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: array178, - original_phantom_id: lifted180, + local_agent_config: array248, + original_phantom_id: lifted250, 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(), @@ -38697,7 +55717,7 @@ pub fn SearchOplog::get_next( }) } 1 => { - let lifted181 : UInt64? = match mbt_ffi_load8_u(iter_base + 32) { + let lifted251 : UInt64? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => Option::Some( @@ -38706,326 +55726,1136 @@ pub fn SearchOplog::get_next( _ => panic() } - let result182 = mbt_ffi_ptr2str( + let result252 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - let lifted347 : @types.TypedSchemaValue? = match + let lifted487 : @types.TypedSchemaValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let array309 : Array[@types.SchemaTypeNode] = [] - for index310 = 0 - index310 < mbt_ffi_load32(iter_base + 64) - index310 = index310 + 1 { + let array449 : Array[@types.SchemaTypeNode] = [] + for index450 = 0 + index450 < mbt_ffi_load32(iter_base + 64) + index450 = index450 + 1 { let iter_base = mbt_ffi_load32(iter_base + 60) + - index310 * 144 + index450 * 144 - let lifted295 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted435 = 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 + 2 => { + let lifted259 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted254 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted253 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted253) + } + _ => panic() + } + + let lifted256 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted255 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted255) + } + _ => panic() + } + + let lifted258 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result257 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result257) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted254, + max: lifted256, + unit: lifted258, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted259) + } + 3 => { + let lifted266 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted261 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted260 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted260) + } + _ => panic() + } + + let lifted263 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted262 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted262) + } + _ => panic() + } + + let lifted265 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result264 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result264) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted261, + max: lifted263, + unit: lifted265, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted266) + } + 4 => { + let lifted273 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted268 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted267 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted267) + } + _ => panic() + } + + let lifted270 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted269 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted269) + } + _ => panic() + } + + let lifted272 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result271 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result271) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted268, + max: lifted270, + unit: lifted272, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted273) + } + 5 => { + let lifted280 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted275 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted274 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted274) + } + _ => panic() + } + + let lifted277 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted276 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted276) + } + _ => panic() + } + + let lifted279 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result278 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result278) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted275, + max: lifted277, + unit: lifted279, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted280) + } + 6 => { + let lifted287 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted282 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted281 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted281) + } + _ => panic() + } + + let lifted284 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted283 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted283) + } + _ => panic() + } + + let lifted286 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result285 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result285) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted282, + max: lifted284, + unit: lifted286, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted287) + } + 7 => { + let lifted294 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted289 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted288 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted288) + } + _ => panic() + } + + let lifted291 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted290 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted290) + } + _ => panic() + } + + let lifted293 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result292 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result292) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted289, + max: lifted291, + unit: lifted293, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted294) + } + 8 => { + let lifted301 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted296 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted295 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted295) + } + _ => panic() + } + + let lifted298 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted297 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted297) + } + _ => panic() + } + + let lifted300 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result299 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result299) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted296, + max: lifted298, + unit: lifted300, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted301) + } + 9 => { + let lifted308 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted303 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted302 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted302) + } + _ => panic() + } + + let lifted305 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted304 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted304) + } + _ => panic() + } + + let lifted307 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result306 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result306) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted303, + max: lifted305, + unit: lifted307, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted308) + } + 10 => { + let lifted315 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted310 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted309 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted309) + } + _ => panic() + } + + let lifted312 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted311 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted311) + } + _ => panic() + } + + let lifted314 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result313 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result313) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted310, + max: lifted312, + unit: lifted314, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted315) + } + 11 => { + let lifted322 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted317 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted316 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted316) + } + _ => panic() + } + + let lifted319 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted318 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted318) + } + _ => panic() + } + + let lifted321 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result320 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result320) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted317, + max: lifted319, + unit: lifted321, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted322) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array197 : Array[@types.NamedFieldType] = [] - for index198 = 0 - index198 < mbt_ffi_load32(iter_base + 12) - index198 = index198 + 1 { + let array337 : Array[@types.NamedFieldType] = [] + for index338 = 0 + index338 < mbt_ffi_load32(iter_base + 12) + index338 = index338 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index198 * 68 + index338 * 68 - let result183 = mbt_ffi_ptr2str( + let result323 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted185 : String? = match + let lifted325 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result184 = mbt_ffi_ptr2str( + let result324 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result184) + Option::Some(result324) } _ => panic() } - let array187 : Array[String] = [] - for index188 = 0 - index188 < mbt_ffi_load32(iter_base + 28) - index188 = index188 + 1 { + let array327 : Array[String] = [] + for index328 = 0 + index328 < mbt_ffi_load32(iter_base + 28) + index328 = index328 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index188 * 8 + index328 * 8 - let result186 = mbt_ffi_ptr2str( + let result326 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array187.push(result186) + array327.push(result326) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array190 : Array[String] = [] - for index191 = 0 - index191 < mbt_ffi_load32(iter_base + 36) - index191 = index191 + 1 { + let array330 : Array[String] = [] + for index331 = 0 + index331 < mbt_ffi_load32(iter_base + 36) + index331 = index331 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index191 * 8 + index331 * 8 - let result189 = mbt_ffi_ptr2str( + let result329 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array190.push(result189) + array330.push(result329) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted193 : String? = match + let lifted333 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result192 = mbt_ffi_ptr2str( + let result332 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result192) + Option::Some(result332) } _ => panic() } - let lifted196 : @types.Role? = match + let lifted336 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted195 = match + let lifted335 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result194 = mbt_ffi_ptr2str( + let result334 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result194) + @types.Role::Other(result334) } _ => panic() } - Option::Some(lifted195) + Option::Some(lifted335) } _ => panic() } - array197.push(@types.NamedFieldType::{ - name: result183, + array337.push(@types.NamedFieldType::{ + name: result323, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted185, - aliases: array187, - examples: array190, - deprecated: lifted193, - role: lifted196, + doc: lifted325, + aliases: array327, + examples: array330, + deprecated: lifted333, + role: lifted336, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array197) + @types.SchemaTypeBody::RecordType(array337) } 15 => { - let array214 : Array[@types.VariantCaseType] = [] - for index215 = 0 - index215 < mbt_ffi_load32(iter_base + 12) - index215 = index215 + 1 { + let array354 : Array[@types.VariantCaseType] = [] + for index355 = 0 + index355 < mbt_ffi_load32(iter_base + 12) + index355 = index355 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index215 * 72 + index355 * 72 - let result199 = mbt_ffi_ptr2str( + let result339 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted200 : Int? = match + let lifted340 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted202 : String? = match + let lifted342 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result201 = mbt_ffi_ptr2str( + let result341 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result201) + Option::Some(result341) } _ => panic() } - let array204 : Array[String] = [] - for index205 = 0 - index205 < mbt_ffi_load32(iter_base + 32) - index205 = index205 + 1 { + let array344 : Array[String] = [] + for index345 = 0 + index345 < mbt_ffi_load32(iter_base + 32) + index345 = index345 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index205 * 8 + index345 * 8 - let result203 = mbt_ffi_ptr2str( + let result343 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array204.push(result203) + array344.push(result343) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array207 : Array[String] = [] - for index208 = 0 - index208 < mbt_ffi_load32(iter_base + 40) - index208 = index208 + 1 { + let array347 : Array[String] = [] + for index348 = 0 + index348 < mbt_ffi_load32(iter_base + 40) + index348 = index348 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index208 * 8 + index348 * 8 - let result206 = mbt_ffi_ptr2str( + let result346 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array207.push(result206) + array347.push(result346) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted210 : String? = match + let lifted350 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result209 = mbt_ffi_ptr2str( + let result349 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result209) + Option::Some(result349) } _ => panic() } - let lifted213 : @types.Role? = match + let lifted353 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted212 = match + let lifted352 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result211 = mbt_ffi_ptr2str( + let result351 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result211) + @types.Role::Other(result351) } _ => panic() } - Option::Some(lifted212) + Option::Some(lifted352) } _ => panic() } - array214.push(@types.VariantCaseType::{ - name: result199, - payload: lifted200, + array354.push(@types.VariantCaseType::{ + name: result339, + payload: lifted340, metadata: @types.MetadataEnvelope::{ - doc: lifted202, - aliases: array204, - examples: array207, - deprecated: lifted210, - role: lifted213, + doc: lifted342, + aliases: array344, + examples: array347, + deprecated: lifted350, + role: lifted353, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array214) + @types.SchemaTypeBody::VariantType(array354) } 16 => { - let array217 : Array[String] = [] - for index218 = 0 - index218 < mbt_ffi_load32(iter_base + 12) - index218 = index218 + 1 { + let array357 : Array[String] = [] + for index358 = 0 + index358 < mbt_ffi_load32(iter_base + 12) + index358 = index358 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index218 * 8 + index358 * 8 - let result216 = mbt_ffi_ptr2str( + let result356 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array217.push(result216) + array357.push(result356) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array217) + @types.SchemaTypeBody::EnumType(array357) } 17 => { - let array220 : Array[String] = [] - for index221 = 0 - index221 < mbt_ffi_load32(iter_base + 12) - index221 = index221 + 1 { + let array360 : Array[String] = [] + for index361 = 0 + index361 < mbt_ffi_load32(iter_base + 12) + index361 = index361 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index221 * 8 + index361 * 8 - let result219 = mbt_ffi_ptr2str( + let result359 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array220.push(result219) + array360.push(result359) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array220) + @types.SchemaTypeBody::FlagsType(array360) } 18 => { - let array222 : Array[Int] = [] - for index223 = 0 - index223 < mbt_ffi_load32(iter_base + 12) - index223 = index223 + 1 { + 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) + - index223 * 4 + index363 * 4 - array222.push(mbt_ffi_load32(iter_base + 0)) + array362.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array222) + @types.SchemaTypeBody::TupleType(array362) } 19 => @types.SchemaTypeBody::ListType( @@ -39046,14 +56876,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted224 : Int? = match + let lifted364 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted225 : Int? = match + let lifted365 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -39061,37 +56891,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted224, - err: lifted225, + ok: lifted364, + err: lifted365, }) } 24 => { - let lifted229 : Array[String]? = match + let lifted369 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array227 : Array[String] = [] - for index228 = 0 - index228 < mbt_ffi_load32(iter_base + 16) - index228 = index228 + 1 { + let array367 : Array[String] = [] + for index368 = 0 + index368 < mbt_ffi_load32(iter_base + 16) + index368 = index368 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index228 * 8 + index368 * 8 - let result226 = mbt_ffi_ptr2str( + let result366 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array227.push(result226) + array367.push(result366) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array227) + Option::Some(array367) } _ => panic() } - let lifted230 : UInt? = match + let lifted370 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -39101,7 +56931,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted231 : UInt? = match + let lifted371 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -39111,54 +56941,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted233 : String? = match + let lifted373 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result232 = mbt_ffi_ptr2str( + let result372 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result232) + Option::Some(result372) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted229, - min_length: lifted230, - max_length: lifted231, - regex: lifted233, + languages: lifted369, + min_length: lifted370, + max_length: lifted371, + regex: lifted373, }) } 25 => { - let lifted237 : Array[String]? = match + let lifted377 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array235 : Array[String] = [] - for index236 = 0 - index236 < mbt_ffi_load32(iter_base + 16) - index236 = index236 + 1 { + let array375 : Array[String] = [] + for index376 = 0 + index376 < mbt_ffi_load32(iter_base + 16) + index376 = index376 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index236 * 8 + index376 * 8 - let result234 = mbt_ffi_ptr2str( + let result374 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array235.push(result234) + array375.push(result374) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array235) + Option::Some(array375) } _ => panic() } - let lifted238 : UInt? = match + let lifted378 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -39168,7 +56998,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted239 : UInt? = match + let lifted379 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -39179,58 +57009,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted237, - min_bytes: lifted238, - max_bytes: lifted239, + mime_types: lifted377, + min_bytes: lifted378, + max_bytes: lifted379, }) } 26 => { - let lifted243 : Array[String]? = match + let lifted383 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array241 : Array[String] = [] - for index242 = 0 - index242 < mbt_ffi_load32(iter_base + 20) - index242 = index242 + 1 { + let array381 : Array[String] = [] + for index382 = 0 + index382 < mbt_ffi_load32(iter_base + 20) + index382 = index382 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index242 * 8 + index382 * 8 - let result240 = mbt_ffi_ptr2str( + let result380 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array241.push(result240) + array381.push(result380) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array241) + Option::Some(array381) } _ => panic() } - let lifted247 : Array[String]? = match + let lifted387 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array245 : Array[String] = [] - for index246 = 0 - index246 < mbt_ffi_load32(iter_base + 32) - index246 = index246 + 1 { + let array385 : Array[String] = [] + for index386 = 0 + index386 < mbt_ffi_load32(iter_base + 32) + index386 = index386 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index246 * 8 + index386 * 8 - let result244 = mbt_ffi_ptr2str( + let result384 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array245.push(result244) + array385.push(result384) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array245) + Option::Some(array385) } _ => panic() } @@ -39242,95 +57072,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted243, - allowed_extensions: lifted247, + allowed_mime_types: lifted383, + allowed_extensions: lifted387, }) } 27 => { - let lifted251 : Array[String]? = match + let lifted391 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array249 : Array[String] = [] - for index250 = 0 - index250 < mbt_ffi_load32(iter_base + 16) - index250 = index250 + 1 { + let array389 : Array[String] = [] + for index390 = 0 + index390 < mbt_ffi_load32(iter_base + 16) + index390 = index390 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index250 * 8 + index390 * 8 - let result248 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array249) + Option::Some(array389) } _ => panic() } - let lifted255 : Array[String]? = match + let lifted395 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array253 : Array[String] = [] - for index254 = 0 - index254 < mbt_ffi_load32(iter_base + 28) - index254 = index254 + 1 { + let array393 : Array[String] = [] + for index394 = 0 + index394 < mbt_ffi_load32(iter_base + 28) + index394 = index394 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index254 * 8 + index394 * 8 - let result252 = mbt_ffi_ptr2str( + let result392 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array253.push(result252) + array393.push(result392) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array253) + Option::Some(array393) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted251, - allowed_hosts: lifted255, + allowed_schemes: lifted391, + allowed_hosts: lifted395, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result256 = mbt_ffi_ptr2str( + let result396 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array258 : Array[String] = [] - for index259 = 0 - index259 < mbt_ffi_load32(iter_base + 20) - index259 = index259 + 1 { + let array398 : Array[String] = [] + for index399 = 0 + index399 < mbt_ffi_load32(iter_base + 20) + index399 = index399 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index259 * 8 + index399 * 8 - let result257 = mbt_ffi_ptr2str( + let result397 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array258.push(result257) + array398.push(result397) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted261 : @types.QuantityValue? = match + let lifted401 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result260 = mbt_ffi_ptr2str( + let result400 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -39338,17 +57168,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result260, + unit: result400, }) } _ => panic() } - let lifted263 : @types.QuantityValue? = match + let lifted403 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result262 = mbt_ffi_ptr2str( + let result402 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -39356,404 +57186,404 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result262, + unit: result402, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result256, - allowed_suffixes: array258, - min: lifted261, - max: lifted263, + base_unit: result396, + allowed_suffixes: array398, + min: lifted401, + max: lifted403, }) } 31 => { - let array287 : Array[@types.UnionBranch] = [] - for index288 = 0 - index288 < mbt_ffi_load32(iter_base + 12) - index288 = index288 + 1 { + let array427 : Array[@types.UnionBranch] = [] + for index428 = 0 + index428 < mbt_ffi_load32(iter_base + 12) + index428 = index428 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index288 * 92 + index428 * 92 - let result264 = mbt_ffi_ptr2str( + let result404 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted273 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted413 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result265 = mbt_ffi_ptr2str( + let result405 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result265) + @types.DiscriminatorRule::Prefix(result405) } 1 => { - let result266 = mbt_ffi_ptr2str( + let result406 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result266) + @types.DiscriminatorRule::Suffix(result406) } 2 => { - let result267 = mbt_ffi_ptr2str( + let result407 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result267) + @types.DiscriminatorRule::Contains(result407) } 3 => { - let result268 = mbt_ffi_ptr2str( + let result408 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result268) + @types.DiscriminatorRule::Regex(result408) } 4 => { - let result269 = mbt_ffi_ptr2str( + let result409 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted271 : String? = match + let lifted411 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result270 = mbt_ffi_ptr2str( + let result410 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result270) + Option::Some(result410) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result269, - literal: lifted271, + field_name: result409, + literal: lifted411, }) } 5 => { - let result272 = mbt_ffi_ptr2str( + let result412 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result272) + @types.DiscriminatorRule::FieldAbsent(result412) } _ => panic() } - let lifted275 : String? = match + let lifted415 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result274 = mbt_ffi_ptr2str( + let result414 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result274) + Option::Some(result414) } _ => panic() } - let array277 : Array[String] = [] - for index278 = 0 - index278 < mbt_ffi_load32(iter_base + 52) - index278 = index278 + 1 { + let array417 : Array[String] = [] + for index418 = 0 + index418 < mbt_ffi_load32(iter_base + 52) + index418 = index418 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index278 * 8 + index418 * 8 - let result276 = mbt_ffi_ptr2str( + let result416 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array277.push(result276) + array417.push(result416) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array280 : Array[String] = [] - for index281 = 0 - index281 < mbt_ffi_load32(iter_base + 60) - index281 = index281 + 1 { + let array420 : Array[String] = [] + for index421 = 0 + index421 < mbt_ffi_load32(iter_base + 60) + index421 = index421 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index281 * 8 + index421 * 8 - let result279 = mbt_ffi_ptr2str( + let result419 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array280.push(result279) + array420.push(result419) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted283 : String? = match + let lifted423 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result282 = mbt_ffi_ptr2str( + let result422 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result282) + Option::Some(result422) } _ => panic() } - let lifted286 : @types.Role? = match + let lifted426 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted285 = match + let lifted425 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result284 = mbt_ffi_ptr2str( + let result424 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result284) + @types.Role::Other(result424) } _ => panic() } - Option::Some(lifted285) + Option::Some(lifted425) } _ => panic() } - array287.push(@types.UnionBranch::{ - tag: result264, + array427.push(@types.UnionBranch::{ + tag: result404, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted273, + discriminator: lifted413, metadata: @types.MetadataEnvelope::{ - doc: lifted275, - aliases: array277, - examples: array280, - deprecated: lifted283, - role: lifted286, + doc: lifted415, + aliases: array417, + examples: array420, + deprecated: lifted423, + role: lifted426, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array287, + branches: array427, }) } 32 => { - let lifted290 : String? = match + let lifted430 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result289 = mbt_ffi_ptr2str( + let result429 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result289) + Option::Some(result429) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted290, + category: lifted430, }) } 33 => { - let lifted292 : String? = match + let lifted432 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result291 = mbt_ffi_ptr2str( + let result431 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result291) + Option::Some(result431) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted292, + resource_name: lifted432, }) } 34 => { - let lifted293 : Int? = match + let lifted433 : 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(lifted293) + @types.SchemaTypeBody::FutureType(lifted433) } 35 => { - let lifted294 : Int? = match + let lifted434 : 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(lifted294) + @types.SchemaTypeBody::StreamType(lifted434) } _ => panic() } - let lifted297 : String? = match + let lifted437 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result296 = mbt_ffi_ptr2str( + let result436 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result296) + Option::Some(result436) } _ => panic() } - let array299 : Array[String] = [] - for index300 = 0 - index300 < mbt_ffi_load32(iter_base + 104) - index300 = index300 + 1 { + let array439 : Array[String] = [] + for index440 = 0 + index440 < mbt_ffi_load32(iter_base + 104) + index440 = index440 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index300 * 8 + index440 * 8 - let result298 = mbt_ffi_ptr2str( + let result438 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array299.push(result298) + array439.push(result438) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array302 : Array[String] = [] - for index303 = 0 - index303 < mbt_ffi_load32(iter_base + 112) - index303 = index303 + 1 { + let array442 : Array[String] = [] + for index443 = 0 + index443 < mbt_ffi_load32(iter_base + 112) + index443 = index443 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index303 * 8 + index443 * 8 - let result301 = mbt_ffi_ptr2str( + let result441 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array302.push(result301) + array442.push(result441) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted305 : String? = match + let lifted445 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result304 = mbt_ffi_ptr2str( + let result444 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result304) + Option::Some(result444) } _ => panic() } - let lifted308 : @types.Role? = match + let lifted448 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted307 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted447 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result306 = mbt_ffi_ptr2str( + let result446 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result306) + @types.Role::Other(result446) } _ => panic() } - Option::Some(lifted307) + Option::Some(lifted447) } _ => panic() } - array309.push(@types.SchemaTypeNode::{ - body: lifted295, + array449.push(@types.SchemaTypeNode::{ + body: lifted435, metadata: @types.MetadataEnvelope::{ - doc: lifted297, - aliases: array299, - examples: array302, - deprecated: lifted305, - role: lifted308, + doc: lifted437, + aliases: array439, + examples: array442, + deprecated: lifted445, + role: lifted448, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 60)) - let array314 : Array[@types.SchemaTypeDef] = [] - for index315 = 0 - index315 < mbt_ffi_load32(iter_base + 72) - index315 = index315 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 68) + index315 * 24 + let array454 : Array[@types.SchemaTypeDef] = [] + for index455 = 0 + index455 < mbt_ffi_load32(iter_base + 72) + index455 = index455 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 68) + index455 * 24 - let result311 = mbt_ffi_ptr2str( + let result451 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted313 : String? = match + let lifted453 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result312 = mbt_ffi_ptr2str( + let result452 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result312) + Option::Some(result452) } _ => panic() } - array314.push(@types.SchemaTypeDef::{ - id: result311, - name: lifted313, + array454.push(@types.SchemaTypeDef::{ + id: result451, + name: lifted453, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) - let array345 : Array[@types.SchemaValueNode] = [] - for index346 = 0 - index346 < mbt_ffi_load32(iter_base + 84) - index346 = index346 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index346 * 32 + let array485 : Array[@types.SchemaValueNode] = [] + for index486 = 0 + index486 < mbt_ffi_load32(iter_base + 84) + index486 = index486 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 80) + index486 * 32 - let lifted344 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted484 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -39805,29 +57635,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result316 = mbt_ffi_ptr2str( + let result456 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result316) + @types.SchemaValueNode::StringValue(result456) } 13 => { - let array317 : Array[Int] = [] - for index318 = 0 - index318 < mbt_ffi_load32(iter_base + 12) - index318 = index318 + 1 { + 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) + - index318 * 4 + 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::RecordValue(array317) + @types.SchemaValueNode::RecordValue(array457) } 14 => { - let lifted319 : Int? = match + let lifted459 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -39836,7 +57666,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted319, + payload: lifted459, }) } 15 => @@ -39844,180 +57674,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array320 : Array[Bool] = [] - for index321 = 0 - index321 < mbt_ffi_load32(iter_base + 12) - index321 = index321 + 1 { + let array460 : Array[Bool] = [] + for index461 = 0 + index461 < mbt_ffi_load32(iter_base + 12) + index461 = index461 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index321 * 1 + index461 * 1 - array320.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array460.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array320) + @types.SchemaValueNode::FlagsValue(array460) } 17 => { - let array322 : Array[Int] = [] - for index323 = 0 - index323 < mbt_ffi_load32(iter_base + 12) - index323 = index323 + 1 { + let array462 : Array[Int] = [] + for index463 = 0 + index463 < mbt_ffi_load32(iter_base + 12) + index463 = index463 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index323 * 4 + index463 * 4 - array322.push(mbt_ffi_load32(iter_base + 0)) + array462.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array322) + @types.SchemaValueNode::TupleValue(array462) } 18 => { - let array324 : Array[Int] = [] - for index325 = 0 - index325 < mbt_ffi_load32(iter_base + 12) - index325 = index325 + 1 { + let array464 : Array[Int] = [] + for index465 = 0 + index465 < mbt_ffi_load32(iter_base + 12) + index465 = index465 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index325 * 4 + index465 * 4 - array324.push(mbt_ffi_load32(iter_base + 0)) + array464.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array324) + @types.SchemaValueNode::ListValue(array464) } 19 => { - let array326 : Array[Int] = [] - for index327 = 0 - index327 < mbt_ffi_load32(iter_base + 12) - index327 = index327 + 1 { + let array466 : Array[Int] = [] + for index467 = 0 + index467 < mbt_ffi_load32(iter_base + 12) + index467 = index467 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index327 * 4 + index467 * 4 - array326.push(mbt_ffi_load32(iter_base + 0)) + array466.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array326) + @types.SchemaValueNode::FixedListValue(array466) } 20 => { - let array328 : Array[@types.MapEntry] = [] - for index329 = 0 - index329 < mbt_ffi_load32(iter_base + 12) - index329 = index329 + 1 { + let array468 : Array[@types.MapEntry] = [] + for index469 = 0 + index469 < mbt_ffi_load32(iter_base + 12) + index469 = index469 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index329 * 8 + index469 * 8 - array328.push(@types.MapEntry::{ + array468.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(array328) + @types.SchemaValueNode::MapValue(array468) } 21 => { - let lifted330 : Int? = match + let lifted470 : 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(lifted330) + @types.SchemaValueNode::OptionValue(lifted470) } 22 => { - let lifted333 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted473 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted331 : Int? = match + let lifted471 : 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(lifted331) + @types.ResultValuePayload::OkValue(lifted471) } 1 => { - let lifted332 : Int? = match + let lifted472 : 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(lifted332) + @types.ResultValuePayload::ErrValue(lifted472) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted333) + @types.SchemaValueNode::ResultValue(lifted473) } 23 => { - let result334 = mbt_ffi_ptr2str( + let result474 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted336 : String? = match + let lifted476 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result335 = mbt_ffi_ptr2str( + let result475 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result335) + Option::Some(result475) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result334, - language: lifted336, + text: result474, + language: lifted476, }) } 24 => { - let result337 = mbt_ffi_ptr2bytes( + let result477 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted339 : String? = match + let lifted479 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result338 = mbt_ffi_ptr2str( + let result478 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result338) + Option::Some(result478) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result337, - mime_type: lifted339, + bytes: result477, + mime_type: lifted479, }) } 25 => { - let result340 = mbt_ffi_ptr2str( + let result480 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result340) + @types.SchemaValueNode::PathValue(result480) } 26 => { - let result341 = mbt_ffi_ptr2str( + let result481 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result341) + @types.SchemaValueNode::UrlValue(result481) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -40029,7 +57859,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result342 = mbt_ffi_ptr2str( + let result482 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -40037,17 +57867,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result342, + unit: result482, }) } 30 => { - let result343 = mbt_ffi_ptr2str( + let result483 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result343, + tag: result483, body: mbt_ffi_load32(iter_base + 16), }) } @@ -40064,18 +57894,18 @@ pub fn SearchOplog::get_next( _ => panic() } - array345.push(lifted344) + array485.push(lifted484) } mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) Option::Some(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array309, - defs: array314, + type_nodes: array449, + defs: array454, root: mbt_ffi_load32(iter_base + 76), }, value: @types.SchemaValueTree::{ - value_nodes: array345, + value_nodes: array485, root: mbt_ffi_load32(iter_base + 88), }, }) @@ -40083,13 +57913,13 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted350 = match mbt_ffi_load8_u(iter_base + 96) { + let lifted490 = match mbt_ffi_load8_u(iter_base + 96) { 0 => WrappedFunctionType::ReadLocal 1 => WrappedFunctionType::WriteLocal 2 => WrappedFunctionType::ReadRemote 3 => WrappedFunctionType::WriteRemote 4 => { - let lifted348 : UInt64? = match + let lifted488 : UInt64? = match mbt_ffi_load8_u(iter_base + 104) { 0 => Option::None 1 => @@ -40099,10 +57929,10 @@ pub fn SearchOplog::get_next( _ => panic() } - WrappedFunctionType::WriteRemoteBatched(lifted348) + WrappedFunctionType::WriteRemoteBatched(lifted488) } 5 => { - let lifted349 : UInt64? = match + let lifted489 : UInt64? = match mbt_ffi_load8_u(iter_base + 104) { 0 => Option::None 1 => @@ -40112,7 +57942,7 @@ pub fn SearchOplog::get_next( _ => panic() } - WrappedFunctionType::WriteRemoteTransaction(lifted349) + WrappedFunctionType::WriteRemoteTransaction(lifted489) } _ => panic() } @@ -40122,328 +57952,1138 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent_start_index: lifted181, - function_name: result182, - request: lifted347, - durable_function_type: lifted350, + parent_start_index: lifted251, + function_name: result252, + request: lifted487, + durable_function_type: lifted490, }) } 2 => { - let lifted515 : @types.TypedSchemaValue? = match + let lifted725 : @types.TypedSchemaValue? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let array477 : Array[@types.SchemaTypeNode] = [] - for index478 = 0 - index478 < mbt_ffi_load32(iter_base + 48) - index478 = index478 + 1 { + let array687 : Array[@types.SchemaTypeNode] = [] + for index688 = 0 + index688 < mbt_ffi_load32(iter_base + 48) + index688 = index688 + 1 { let iter_base = mbt_ffi_load32(iter_base + 44) + - index478 * 144 + index688 * 144 - let lifted463 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted673 = 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 + 2 => { + let lifted497 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted492 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted491 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted491) + } + _ => panic() + } + + let lifted494 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted493 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted493) + } + _ => panic() + } + + let lifted496 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result495 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result495) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted492, + max: lifted494, + unit: lifted496, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted497) + } + 3 => { + 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 lifted498 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted498) + } + _ => panic() + } + + let lifted501 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted500 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_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 lifted503 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result502 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result502) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted499, + max: lifted501, + unit: lifted503, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted504) + } + 4 => { + 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 lifted505 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted505) + } + _ => panic() + } + + let lifted508 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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 lifted510 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result509 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result509) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted506, + max: lifted508, + unit: lifted510, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted511) + } + 5 => { + let lifted518 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted513 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted512 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted512) + } + _ => panic() + } + + let lifted515 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted514 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted514) + } + _ => panic() + } + + let lifted517 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result516 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result516) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted513, + max: lifted515, + unit: lifted517, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted518) + } + 6 => { + let lifted525 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted520 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted519 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted519) + } + _ => panic() + } + + let lifted522 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted521 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted521) + } + _ => panic() + } + + let lifted524 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result523 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result523) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted520, + max: lifted522, + unit: lifted524, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted525) + } + 7 => { + let lifted532 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted527 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted526 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted526) + } + _ => panic() + } + + let lifted529 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted528 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted528) + } + _ => panic() + } + + let lifted531 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result530 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result530) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted527, + max: lifted529, + unit: lifted531, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted532) + } + 8 => { + let lifted539 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted534 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted533 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted533) + } + _ => panic() + } + + let lifted536 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted535 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted535) + } + _ => panic() + } + + let lifted538 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result537 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result537) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted534, + max: lifted536, + unit: lifted538, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted539) + } + 9 => { + let lifted546 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted541 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted540 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted540) + } + _ => panic() + } + + let lifted543 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted542 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted542) + } + _ => panic() + } + + let lifted545 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result544 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result544) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted541, + max: lifted543, + unit: lifted545, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted546) + } + 10 => { + let lifted553 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted548 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted547 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted547) + } + _ => panic() + } + + let lifted550 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted549 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted549) + } + _ => panic() + } + + let lifted552 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result551 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result551) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted548, + max: lifted550, + unit: lifted552, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted553) + } + 11 => { + let lifted560 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted555 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted554 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted554) + } + _ => panic() + } + + let lifted557 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted556 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted556) + } + _ => panic() + } + + let lifted559 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result558 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result558) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted555, + max: lifted557, + unit: lifted559, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted560) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array365 : Array[@types.NamedFieldType] = [] - for index366 = 0 - index366 < mbt_ffi_load32(iter_base + 12) - index366 = index366 + 1 { + let array575 : Array[@types.NamedFieldType] = [] + for index576 = 0 + index576 < mbt_ffi_load32(iter_base + 12) + index576 = index576 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index366 * 68 + index576 * 68 - let result351 = mbt_ffi_ptr2str( + let result561 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted353 : String? = match + let lifted563 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result352 = mbt_ffi_ptr2str( + let result562 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result352) + Option::Some(result562) } _ => panic() } - let array355 : Array[String] = [] - for index356 = 0 - index356 < mbt_ffi_load32(iter_base + 28) - index356 = index356 + 1 { + let array565 : Array[String] = [] + for index566 = 0 + index566 < mbt_ffi_load32(iter_base + 28) + index566 = index566 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index356 * 8 + index566 * 8 - let result354 = mbt_ffi_ptr2str( + let result564 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array355.push(result354) + array565.push(result564) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array358 : Array[String] = [] - for index359 = 0 - index359 < mbt_ffi_load32(iter_base + 36) - index359 = index359 + 1 { + let array568 : Array[String] = [] + for index569 = 0 + index569 < mbt_ffi_load32(iter_base + 36) + index569 = index569 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index359 * 8 + index569 * 8 - let result357 = mbt_ffi_ptr2str( + let result567 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array358.push(result357) + array568.push(result567) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted361 : String? = match + let lifted571 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result360 = mbt_ffi_ptr2str( + let result570 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result360) + Option::Some(result570) } _ => panic() } - let lifted364 : @types.Role? = match + let lifted574 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted363 = match + let lifted573 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result362 = mbt_ffi_ptr2str( + let result572 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result362) + @types.Role::Other(result572) } _ => panic() } - Option::Some(lifted363) + Option::Some(lifted573) } _ => panic() } - array365.push(@types.NamedFieldType::{ - name: result351, + array575.push(@types.NamedFieldType::{ + name: result561, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted353, - aliases: array355, - examples: array358, - deprecated: lifted361, - role: lifted364, + doc: lifted563, + aliases: array565, + examples: array568, + deprecated: lifted571, + role: lifted574, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array365) + @types.SchemaTypeBody::RecordType(array575) } 15 => { - let array382 : Array[@types.VariantCaseType] = [] - for index383 = 0 - index383 < mbt_ffi_load32(iter_base + 12) - index383 = index383 + 1 { + let array592 : Array[@types.VariantCaseType] = [] + for index593 = 0 + index593 < mbt_ffi_load32(iter_base + 12) + index593 = index593 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index383 * 72 + index593 * 72 - let result367 = mbt_ffi_ptr2str( + let result577 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted368 : Int? = match + let lifted578 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted370 : String? = match + let lifted580 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result369 = mbt_ffi_ptr2str( + let result579 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result369) + Option::Some(result579) } _ => panic() } - let array372 : Array[String] = [] - for index373 = 0 - index373 < mbt_ffi_load32(iter_base + 32) - index373 = index373 + 1 { + let array582 : Array[String] = [] + for index583 = 0 + index583 < mbt_ffi_load32(iter_base + 32) + index583 = index583 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index373 * 8 + index583 * 8 - let result371 = mbt_ffi_ptr2str( + let result581 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array372.push(result371) + array582.push(result581) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array375 : Array[String] = [] - for index376 = 0 - index376 < mbt_ffi_load32(iter_base + 40) - index376 = index376 + 1 { + let array585 : Array[String] = [] + for index586 = 0 + index586 < mbt_ffi_load32(iter_base + 40) + index586 = index586 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index376 * 8 + index586 * 8 - let result374 = mbt_ffi_ptr2str( + let result584 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array375.push(result374) + array585.push(result584) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted378 : String? = match + let lifted588 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result377 = mbt_ffi_ptr2str( + let result587 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result377) + Option::Some(result587) } _ => panic() } - let lifted381 : @types.Role? = match + let lifted591 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted380 = match + let lifted590 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result379 = mbt_ffi_ptr2str( + let result589 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result379) + @types.Role::Other(result589) } _ => panic() } - Option::Some(lifted380) + Option::Some(lifted590) } _ => panic() } - array382.push(@types.VariantCaseType::{ - name: result367, - payload: lifted368, + array592.push(@types.VariantCaseType::{ + name: result577, + payload: lifted578, metadata: @types.MetadataEnvelope::{ - doc: lifted370, - aliases: array372, - examples: array375, - deprecated: lifted378, - role: lifted381, + doc: lifted580, + aliases: array582, + examples: array585, + deprecated: lifted588, + role: lifted591, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array382) + @types.SchemaTypeBody::VariantType(array592) } 16 => { - let array385 : Array[String] = [] - for index386 = 0 - index386 < mbt_ffi_load32(iter_base + 12) - index386 = index386 + 1 { + let array595 : Array[String] = [] + for index596 = 0 + index596 < mbt_ffi_load32(iter_base + 12) + index596 = index596 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index386 * 8 + index596 * 8 - let result384 = mbt_ffi_ptr2str( + let result594 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array385.push(result384) + array595.push(result594) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array385) + @types.SchemaTypeBody::EnumType(array595) } 17 => { - let array388 : Array[String] = [] - for index389 = 0 - index389 < mbt_ffi_load32(iter_base + 12) - index389 = index389 + 1 { + let array598 : Array[String] = [] + for index599 = 0 + index599 < mbt_ffi_load32(iter_base + 12) + index599 = index599 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index389 * 8 + index599 * 8 - let result387 = mbt_ffi_ptr2str( + let result597 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array388.push(result387) + array598.push(result597) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array388) + @types.SchemaTypeBody::FlagsType(array598) } 18 => { - let array390 : Array[Int] = [] - for index391 = 0 - index391 < mbt_ffi_load32(iter_base + 12) - index391 = index391 + 1 { + let array600 : Array[Int] = [] + for index601 = 0 + index601 < mbt_ffi_load32(iter_base + 12) + index601 = index601 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index391 * 4 + index601 * 4 - array390.push(mbt_ffi_load32(iter_base + 0)) + array600.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array390) + @types.SchemaTypeBody::TupleType(array600) } 19 => @types.SchemaTypeBody::ListType( @@ -40464,14 +59104,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted392 : Int? = match + let lifted602 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted393 : Int? = match + let lifted603 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -40479,37 +59119,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted392, - err: lifted393, + ok: lifted602, + err: lifted603, }) } 24 => { - let lifted397 : Array[String]? = match + let lifted607 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array395 : Array[String] = [] - for index396 = 0 - index396 < mbt_ffi_load32(iter_base + 16) - index396 = index396 + 1 { + let array605 : Array[String] = [] + for index606 = 0 + index606 < mbt_ffi_load32(iter_base + 16) + index606 = index606 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index396 * 8 + index606 * 8 - let result394 = mbt_ffi_ptr2str( + let result604 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array395.push(result394) + array605.push(result604) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array395) + Option::Some(array605) } _ => panic() } - let lifted398 : UInt? = match + let lifted608 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -40519,7 +59159,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted399 : UInt? = match + let lifted609 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -40529,54 +59169,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted401 : String? = match + let lifted611 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result400 = mbt_ffi_ptr2str( + let result610 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result400) + Option::Some(result610) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted397, - min_length: lifted398, - max_length: lifted399, - regex: lifted401, + languages: lifted607, + min_length: lifted608, + max_length: lifted609, + regex: lifted611, }) } 25 => { - let lifted405 : Array[String]? = match + let lifted615 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array403 : Array[String] = [] - for index404 = 0 - index404 < mbt_ffi_load32(iter_base + 16) - index404 = index404 + 1 { + let array613 : Array[String] = [] + for index614 = 0 + index614 < mbt_ffi_load32(iter_base + 16) + index614 = index614 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index404 * 8 + index614 * 8 - let result402 = mbt_ffi_ptr2str( + let result612 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array403.push(result402) + array613.push(result612) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array403) + Option::Some(array613) } _ => panic() } - let lifted406 : UInt? = match + let lifted616 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -40586,7 +59226,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted407 : UInt? = match + let lifted617 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -40597,58 +59237,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted405, - min_bytes: lifted406, - max_bytes: lifted407, + mime_types: lifted615, + min_bytes: lifted616, + max_bytes: lifted617, }) } 26 => { - let lifted411 : Array[String]? = match + let lifted621 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array409 : Array[String] = [] - for index410 = 0 - index410 < mbt_ffi_load32(iter_base + 20) - index410 = index410 + 1 { + let array619 : Array[String] = [] + for index620 = 0 + index620 < mbt_ffi_load32(iter_base + 20) + index620 = index620 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index410 * 8 + index620 * 8 - let result408 = mbt_ffi_ptr2str( + let result618 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array409.push(result408) + array619.push(result618) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array409) + Option::Some(array619) } _ => panic() } - let lifted415 : Array[String]? = match + let lifted625 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array413 : Array[String] = [] - for index414 = 0 - index414 < mbt_ffi_load32(iter_base + 32) - index414 = index414 + 1 { + let array623 : Array[String] = [] + for index624 = 0 + index624 < mbt_ffi_load32(iter_base + 32) + index624 = index624 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index414 * 8 + index624 * 8 - let result412 = mbt_ffi_ptr2str( + let result622 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array413.push(result412) + array623.push(result622) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array413) + Option::Some(array623) } _ => panic() } @@ -40660,95 +59300,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted411, - allowed_extensions: lifted415, + allowed_mime_types: lifted621, + allowed_extensions: lifted625, }) } 27 => { - let lifted419 : Array[String]? = match + let lifted629 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array417 : Array[String] = [] - for index418 = 0 - index418 < mbt_ffi_load32(iter_base + 16) - index418 = index418 + 1 { + let array627 : Array[String] = [] + for index628 = 0 + index628 < mbt_ffi_load32(iter_base + 16) + index628 = index628 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index418 * 8 + index628 * 8 - let result416 = mbt_ffi_ptr2str( + let result626 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array417.push(result416) + array627.push(result626) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array417) + Option::Some(array627) } _ => panic() } - let lifted423 : Array[String]? = match + let lifted633 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array421 : Array[String] = [] - for index422 = 0 - index422 < mbt_ffi_load32(iter_base + 28) - index422 = index422 + 1 { + let array631 : Array[String] = [] + for index632 = 0 + index632 < mbt_ffi_load32(iter_base + 28) + index632 = index632 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index422 * 8 + index632 * 8 - let result420 = mbt_ffi_ptr2str( + let result630 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array421.push(result420) + array631.push(result630) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array421) + Option::Some(array631) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted419, - allowed_hosts: lifted423, + allowed_schemes: lifted629, + allowed_hosts: lifted633, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result424 = mbt_ffi_ptr2str( + let result634 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array426 : Array[String] = [] - for index427 = 0 - index427 < mbt_ffi_load32(iter_base + 20) - index427 = index427 + 1 { + let array636 : Array[String] = [] + for index637 = 0 + index637 < mbt_ffi_load32(iter_base + 20) + index637 = index637 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index427 * 8 + index637 * 8 - let result425 = mbt_ffi_ptr2str( + let result635 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array426.push(result425) + array636.push(result635) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted429 : @types.QuantityValue? = match + let lifted639 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result428 = mbt_ffi_ptr2str( + let result638 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -40756,17 +59396,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result428, + unit: result638, }) } _ => panic() } - let lifted431 : @types.QuantityValue? = match + let lifted641 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result430 = mbt_ffi_ptr2str( + let result640 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -40774,404 +59414,404 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result430, + unit: result640, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result424, - allowed_suffixes: array426, - min: lifted429, - max: lifted431, + base_unit: result634, + allowed_suffixes: array636, + min: lifted639, + max: lifted641, }) } 31 => { - let array455 : Array[@types.UnionBranch] = [] - for index456 = 0 - index456 < mbt_ffi_load32(iter_base + 12) - index456 = index456 + 1 { + let array665 : Array[@types.UnionBranch] = [] + for index666 = 0 + index666 < mbt_ffi_load32(iter_base + 12) + index666 = index666 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index456 * 92 + index666 * 92 - let result432 = mbt_ffi_ptr2str( + let result642 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted441 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted651 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result433 = mbt_ffi_ptr2str( + let result643 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result433) + @types.DiscriminatorRule::Prefix(result643) } 1 => { - let result434 = mbt_ffi_ptr2str( + let result644 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result434) + @types.DiscriminatorRule::Suffix(result644) } 2 => { - let result435 = mbt_ffi_ptr2str( + let result645 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result435) + @types.DiscriminatorRule::Contains(result645) } 3 => { - let result436 = mbt_ffi_ptr2str( + let result646 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result436) + @types.DiscriminatorRule::Regex(result646) } 4 => { - let result437 = mbt_ffi_ptr2str( + let result647 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted439 : String? = match + let lifted649 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result438 = mbt_ffi_ptr2str( + let result648 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result438) + Option::Some(result648) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result437, - literal: lifted439, + field_name: result647, + literal: lifted649, }) } 5 => { - let result440 = mbt_ffi_ptr2str( + let result650 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result440) + @types.DiscriminatorRule::FieldAbsent(result650) } _ => panic() } - let lifted443 : String? = match + let lifted653 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result442 = mbt_ffi_ptr2str( + let result652 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result442) + Option::Some(result652) } _ => panic() } - let array445 : Array[String] = [] - for index446 = 0 - index446 < mbt_ffi_load32(iter_base + 52) - index446 = index446 + 1 { + let array655 : Array[String] = [] + for index656 = 0 + index656 < mbt_ffi_load32(iter_base + 52) + index656 = index656 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index446 * 8 + index656 * 8 - let result444 = mbt_ffi_ptr2str( + let result654 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array445.push(result444) + array655.push(result654) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array448 : Array[String] = [] - for index449 = 0 - index449 < mbt_ffi_load32(iter_base + 60) - index449 = index449 + 1 { + let array658 : Array[String] = [] + for index659 = 0 + index659 < mbt_ffi_load32(iter_base + 60) + index659 = index659 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index449 * 8 + index659 * 8 - let result447 = mbt_ffi_ptr2str( + let result657 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array448.push(result447) + array658.push(result657) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted451 : String? = match + let lifted661 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result450 = mbt_ffi_ptr2str( + let result660 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result450) + Option::Some(result660) } _ => panic() } - let lifted454 : @types.Role? = match + let lifted664 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted453 = match + let lifted663 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result452 = mbt_ffi_ptr2str( + let result662 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result452) + @types.Role::Other(result662) } _ => panic() } - Option::Some(lifted453) + Option::Some(lifted663) } _ => panic() } - array455.push(@types.UnionBranch::{ - tag: result432, + array665.push(@types.UnionBranch::{ + tag: result642, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted441, + discriminator: lifted651, metadata: @types.MetadataEnvelope::{ - doc: lifted443, - aliases: array445, - examples: array448, - deprecated: lifted451, - role: lifted454, + doc: lifted653, + aliases: array655, + examples: array658, + deprecated: lifted661, + role: lifted664, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array455, + branches: array665, }) } 32 => { - let lifted458 : String? = match + let lifted668 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result457 = mbt_ffi_ptr2str( + let result667 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result457) + Option::Some(result667) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted458, + category: lifted668, }) } 33 => { - let lifted460 : String? = match + let lifted670 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result459 = mbt_ffi_ptr2str( + 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::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted460, + resource_name: lifted670, }) } 34 => { - let lifted461 : Int? = match + let lifted671 : 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(lifted461) + @types.SchemaTypeBody::FutureType(lifted671) } 35 => { - let lifted462 : Int? = match + let lifted672 : 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(lifted462) + @types.SchemaTypeBody::StreamType(lifted672) } _ => panic() } - let lifted465 : String? = match + let lifted675 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result464 = mbt_ffi_ptr2str( + let result674 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result464) + Option::Some(result674) } _ => panic() } - let array467 : Array[String] = [] - for index468 = 0 - index468 < mbt_ffi_load32(iter_base + 104) - index468 = index468 + 1 { + let array677 : Array[String] = [] + for index678 = 0 + index678 < mbt_ffi_load32(iter_base + 104) + index678 = index678 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index468 * 8 + index678 * 8 - let result466 = mbt_ffi_ptr2str( + let result676 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array467.push(result466) + array677.push(result676) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array470 : Array[String] = [] - for index471 = 0 - index471 < mbt_ffi_load32(iter_base + 112) - index471 = index471 + 1 { + let array680 : Array[String] = [] + for index681 = 0 + index681 < mbt_ffi_load32(iter_base + 112) + index681 = index681 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index471 * 8 + index681 * 8 - let result469 = mbt_ffi_ptr2str( + let result679 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array470.push(result469) + array680.push(result679) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted473 : String? = match + let lifted683 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result472 = mbt_ffi_ptr2str( + let result682 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result472) + Option::Some(result682) } _ => panic() } - let lifted476 : @types.Role? = match + let lifted686 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted475 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted685 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result474 = mbt_ffi_ptr2str( + let result684 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result474) + @types.Role::Other(result684) } _ => panic() } - Option::Some(lifted475) + Option::Some(lifted685) } _ => panic() } - array477.push(@types.SchemaTypeNode::{ - body: lifted463, + array687.push(@types.SchemaTypeNode::{ + body: lifted673, metadata: @types.MetadataEnvelope::{ - doc: lifted465, - aliases: array467, - examples: array470, - deprecated: lifted473, - role: lifted476, + doc: lifted675, + aliases: array677, + examples: array680, + deprecated: lifted683, + role: lifted686, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) - let array482 : Array[@types.SchemaTypeDef] = [] - for index483 = 0 - index483 < mbt_ffi_load32(iter_base + 56) - index483 = index483 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 52) + index483 * 24 + let array692 : Array[@types.SchemaTypeDef] = [] + for index693 = 0 + index693 < mbt_ffi_load32(iter_base + 56) + index693 = index693 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 52) + index693 * 24 - let result479 = mbt_ffi_ptr2str( + let result689 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted481 : String? = match + let lifted691 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result480 = mbt_ffi_ptr2str( + let result690 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result480) + Option::Some(result690) } _ => panic() } - array482.push(@types.SchemaTypeDef::{ - id: result479, - name: lifted481, + array692.push(@types.SchemaTypeDef::{ + id: result689, + name: lifted691, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 52)) - let array513 : Array[@types.SchemaValueNode] = [] - for index514 = 0 - index514 < mbt_ffi_load32(iter_base + 68) - index514 = index514 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 64) + index514 * 32 + let array723 : Array[@types.SchemaValueNode] = [] + for index724 = 0 + index724 < mbt_ffi_load32(iter_base + 68) + index724 = index724 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 64) + index724 * 32 - let lifted512 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted722 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -41223,29 +59863,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result484 = mbt_ffi_ptr2str( + let result694 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result484) + @types.SchemaValueNode::StringValue(result694) } 13 => { - let array485 : Array[Int] = [] - for index486 = 0 - index486 < mbt_ffi_load32(iter_base + 12) - index486 = index486 + 1 { + let array695 : Array[Int] = [] + for index696 = 0 + index696 < mbt_ffi_load32(iter_base + 12) + index696 = index696 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index486 * 4 + index696 * 4 - array485.push(mbt_ffi_load32(iter_base + 0)) + array695.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array485) + @types.SchemaValueNode::RecordValue(array695) } 14 => { - let lifted487 : Int? = match + let lifted697 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -41254,7 +59894,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted487, + payload: lifted697, }) } 15 => @@ -41262,180 +59902,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array488 : Array[Bool] = [] - for index489 = 0 - index489 < mbt_ffi_load32(iter_base + 12) - index489 = index489 + 1 { + let array698 : Array[Bool] = [] + for index699 = 0 + index699 < mbt_ffi_load32(iter_base + 12) + index699 = index699 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index489 * 1 + index699 * 1 - array488.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array698.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array488) + @types.SchemaValueNode::FlagsValue(array698) } 17 => { - let array490 : Array[Int] = [] - for index491 = 0 - index491 < mbt_ffi_load32(iter_base + 12) - index491 = index491 + 1 { + let array700 : Array[Int] = [] + for index701 = 0 + index701 < mbt_ffi_load32(iter_base + 12) + index701 = index701 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index491 * 4 + index701 * 4 - array490.push(mbt_ffi_load32(iter_base + 0)) + array700.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array490) + @types.SchemaValueNode::TupleValue(array700) } 18 => { - let array492 : Array[Int] = [] - for index493 = 0 - index493 < mbt_ffi_load32(iter_base + 12) - index493 = index493 + 1 { + 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) + - index493 * 4 + 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::ListValue(array492) + @types.SchemaValueNode::ListValue(array702) } 19 => { - let array494 : Array[Int] = [] - for index495 = 0 - index495 < mbt_ffi_load32(iter_base + 12) - index495 = index495 + 1 { + 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) + - index495 * 4 + 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::FixedListValue(array494) + @types.SchemaValueNode::FixedListValue(array704) } 20 => { - let array496 : Array[@types.MapEntry] = [] - for index497 = 0 - index497 < mbt_ffi_load32(iter_base + 12) - index497 = index497 + 1 { + let array706 : Array[@types.MapEntry] = [] + for index707 = 0 + index707 < mbt_ffi_load32(iter_base + 12) + index707 = index707 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index497 * 8 + index707 * 8 - array496.push(@types.MapEntry::{ + array706.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(array496) + @types.SchemaValueNode::MapValue(array706) } 21 => { - let lifted498 : Int? = match + let lifted708 : 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(lifted498) + @types.SchemaValueNode::OptionValue(lifted708) } 22 => { - let lifted501 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted711 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted499 : Int? = match + let lifted709 : 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(lifted499) + @types.ResultValuePayload::OkValue(lifted709) } 1 => { - let lifted500 : Int? = match + let lifted710 : 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(lifted500) + @types.ResultValuePayload::ErrValue(lifted710) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted501) + @types.SchemaValueNode::ResultValue(lifted711) } 23 => { - let result502 = mbt_ffi_ptr2str( + let result712 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted504 : String? = match + let lifted714 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result503 = mbt_ffi_ptr2str( + let result713 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result503) + Option::Some(result713) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result502, - language: lifted504, + text: result712, + language: lifted714, }) } 24 => { - let result505 = mbt_ffi_ptr2bytes( + let result715 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted507 : String? = match + let lifted717 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result506 = mbt_ffi_ptr2str( + let result716 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result506) + Option::Some(result716) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result505, - mime_type: lifted507, + bytes: result715, + mime_type: lifted717, }) } 25 => { - let result508 = mbt_ffi_ptr2str( + let result718 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result508) + @types.SchemaValueNode::PathValue(result718) } 26 => { - let result509 = mbt_ffi_ptr2str( + let result719 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result509) + @types.SchemaValueNode::UrlValue(result719) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -41447,7 +60087,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result510 = mbt_ffi_ptr2str( + let result720 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -41455,17 +60095,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result510, + unit: result720, }) } 30 => { - let result511 = mbt_ffi_ptr2str( + let result721 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result511, + tag: result721, body: mbt_ffi_load32(iter_base + 16), }) } @@ -41482,18 +60122,18 @@ pub fn SearchOplog::get_next( _ => panic() } - array513.push(lifted512) + array723.push(lifted722) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) Option::Some(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array477, - defs: array482, + type_nodes: array687, + defs: array692, root: mbt_ffi_load32(iter_base + 60), }, value: @types.SchemaValueTree::{ - value_nodes: array513, + value_nodes: array723, root: mbt_ffi_load32(iter_base + 72), }, }) @@ -41507,326 +60147,1136 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, start_index: mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), - response: lifted515, + response: lifted725, forced_commit: mbt_ffi_load8_u(iter_base + 76) != 0, }) } 3 => { - let lifted680 : @types.TypedSchemaValue? = match + let lifted960 : @types.TypedSchemaValue? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let array642 : Array[@types.SchemaTypeNode] = [] - for index643 = 0 - index643 < mbt_ffi_load32(iter_base + 48) - index643 = index643 + 1 { + let array922 : Array[@types.SchemaTypeNode] = [] + for index923 = 0 + index923 < mbt_ffi_load32(iter_base + 48) + index923 = index923 + 1 { let iter_base = mbt_ffi_load32(iter_base + 44) + - index643 * 144 + index923 * 144 - let lifted628 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted908 = 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 + 2 => { + let lifted732 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted727 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted726 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted726) + } + _ => panic() + } + + let lifted729 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted728 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted728) + } + _ => panic() + } + + let lifted731 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result730 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result730) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted727, + max: lifted729, + unit: lifted731, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted732) + } + 3 => { + let lifted739 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted734 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted733 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted733) + } + _ => panic() + } + + let lifted736 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted735 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted735) + } + _ => panic() + } + + let lifted738 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result737 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result737) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted734, + max: lifted736, + unit: lifted738, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted739) + } + 4 => { + let lifted746 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted741 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted740 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted740) + } + _ => panic() + } + + let lifted743 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted742 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted742) + } + _ => panic() + } + + let lifted745 : 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), + ) + + Option::Some(result744) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted741, + max: lifted743, + unit: lifted745, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted746) + } + 5 => { + let lifted753 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted748 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted747 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted747) + } + _ => panic() + } + + let lifted750 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted749 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted749) + } + _ => panic() + } + + let lifted752 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result751 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result751) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted748, + max: lifted750, + unit: lifted752, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted753) + } + 6 => { + let lifted760 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted755 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted754 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted754) + } + _ => panic() + } + + let lifted757 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted756 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted756) + } + _ => panic() + } + + let lifted759 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result758 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result758) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted755, + max: lifted757, + unit: lifted759, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted760) + } + 7 => { + let lifted767 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted762 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted761 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted761) + } + _ => panic() + } + + let lifted764 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted763 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted763) + } + _ => panic() + } + + let lifted766 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result765 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result765) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted762, + max: lifted764, + unit: lifted766, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted767) + } + 8 => { + let lifted774 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted769 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted768 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted768) + } + _ => panic() + } + + let lifted771 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted770 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted770) + } + _ => panic() + } + + let lifted773 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result772 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result772) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted769, + max: lifted771, + unit: lifted773, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted774) + } + 9 => { + let lifted781 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted776 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted775 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted775) + } + _ => panic() + } + + let lifted778 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted777 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted777) + } + _ => panic() + } + + let lifted780 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result779 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result779) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted776, + max: lifted778, + unit: lifted780, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted781) + } + 10 => { + let lifted788 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted783 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted782 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted782) + } + _ => panic() + } + + let lifted785 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted784 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted784) + } + _ => panic() + } + + let lifted787 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result786 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result786) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted783, + max: lifted785, + unit: lifted787, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted788) + } + 11 => { + let lifted795 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted790 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted789 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted789) + } + _ => panic() + } + + let lifted792 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted791 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted791) + } + _ => panic() + } + + let lifted794 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result793 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result793) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted790, + max: lifted792, + unit: lifted794, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted795) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array530 : Array[@types.NamedFieldType] = [] - for index531 = 0 - index531 < mbt_ffi_load32(iter_base + 12) - index531 = index531 + 1 { + let array810 : Array[@types.NamedFieldType] = [] + for index811 = 0 + index811 < mbt_ffi_load32(iter_base + 12) + index811 = index811 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index531 * 68 + index811 * 68 - let result516 = mbt_ffi_ptr2str( + let result796 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted518 : String? = match + let lifted798 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result517 = mbt_ffi_ptr2str( + let result797 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result517) + Option::Some(result797) } _ => panic() } - let array520 : Array[String] = [] - for index521 = 0 - index521 < mbt_ffi_load32(iter_base + 28) - index521 = index521 + 1 { + let array800 : Array[String] = [] + for index801 = 0 + index801 < mbt_ffi_load32(iter_base + 28) + index801 = index801 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index521 * 8 + index801 * 8 - let result519 = mbt_ffi_ptr2str( + let result799 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array520.push(result519) + array800.push(result799) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array523 : Array[String] = [] - for index524 = 0 - index524 < mbt_ffi_load32(iter_base + 36) - index524 = index524 + 1 { + let array803 : Array[String] = [] + for index804 = 0 + index804 < mbt_ffi_load32(iter_base + 36) + index804 = index804 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index524 * 8 + index804 * 8 - let result522 = mbt_ffi_ptr2str( + 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 + 32)) - let lifted526 : String? = match + let lifted806 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result525 = mbt_ffi_ptr2str( + let result805 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result525) + Option::Some(result805) } _ => panic() } - let lifted529 : @types.Role? = match + let lifted809 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted528 = match + let lifted808 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result527 = mbt_ffi_ptr2str( + let result807 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result527) + @types.Role::Other(result807) } _ => panic() } - Option::Some(lifted528) + Option::Some(lifted808) } _ => panic() } - array530.push(@types.NamedFieldType::{ - name: result516, + array810.push(@types.NamedFieldType::{ + name: result796, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted518, - aliases: array520, - examples: array523, - deprecated: lifted526, - role: lifted529, + doc: lifted798, + aliases: array800, + examples: array803, + deprecated: lifted806, + role: lifted809, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array530) + @types.SchemaTypeBody::RecordType(array810) } 15 => { - let array547 : Array[@types.VariantCaseType] = [] - for index548 = 0 - index548 < mbt_ffi_load32(iter_base + 12) - index548 = index548 + 1 { + let array827 : Array[@types.VariantCaseType] = [] + for index828 = 0 + index828 < mbt_ffi_load32(iter_base + 12) + index828 = index828 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index548 * 72 + index828 * 72 - let result532 = mbt_ffi_ptr2str( + let result812 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted533 : Int? = match + let lifted813 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted535 : String? = match + let lifted815 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result534 = mbt_ffi_ptr2str( + let result814 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result534) + Option::Some(result814) } _ => panic() } - let array537 : Array[String] = [] - for index538 = 0 - index538 < mbt_ffi_load32(iter_base + 32) - index538 = index538 + 1 { + let array817 : Array[String] = [] + for index818 = 0 + index818 < mbt_ffi_load32(iter_base + 32) + index818 = index818 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index538 * 8 + index818 * 8 - let result536 = mbt_ffi_ptr2str( + let result816 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array537.push(result536) + array817.push(result816) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array540 : Array[String] = [] - for index541 = 0 - index541 < mbt_ffi_load32(iter_base + 40) - index541 = index541 + 1 { + let array820 : Array[String] = [] + for index821 = 0 + index821 < mbt_ffi_load32(iter_base + 40) + index821 = index821 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index541 * 8 + index821 * 8 - let result539 = mbt_ffi_ptr2str( + 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 + 36)) - let lifted543 : String? = match + let lifted823 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result542 = mbt_ffi_ptr2str( + let result822 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result542) + Option::Some(result822) } _ => panic() } - let lifted546 : @types.Role? = match + let lifted826 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted545 = match + let lifted825 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result544 = mbt_ffi_ptr2str( + let result824 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result544) + @types.Role::Other(result824) } _ => panic() } - Option::Some(lifted545) + Option::Some(lifted825) } _ => panic() } - array547.push(@types.VariantCaseType::{ - name: result532, - payload: lifted533, + array827.push(@types.VariantCaseType::{ + name: result812, + payload: lifted813, metadata: @types.MetadataEnvelope::{ - doc: lifted535, - aliases: array537, - examples: array540, - deprecated: lifted543, - role: lifted546, + doc: lifted815, + aliases: array817, + examples: array820, + deprecated: lifted823, + role: lifted826, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array547) + @types.SchemaTypeBody::VariantType(array827) } 16 => { - let array550 : Array[String] = [] - for index551 = 0 - index551 < mbt_ffi_load32(iter_base + 12) - index551 = index551 + 1 { + let array830 : Array[String] = [] + for index831 = 0 + index831 < mbt_ffi_load32(iter_base + 12) + index831 = index831 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index551 * 8 + index831 * 8 - let result549 = mbt_ffi_ptr2str( + let result829 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array550.push(result549) + array830.push(result829) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array550) + @types.SchemaTypeBody::EnumType(array830) } 17 => { - let array553 : Array[String] = [] - for index554 = 0 - index554 < mbt_ffi_load32(iter_base + 12) - index554 = index554 + 1 { + 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) + - index554 * 8 + index834 * 8 - let result552 = mbt_ffi_ptr2str( + 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::FlagsType(array553) + @types.SchemaTypeBody::FlagsType(array833) } 18 => { - let array555 : Array[Int] = [] - for index556 = 0 - index556 < mbt_ffi_load32(iter_base + 12) - index556 = index556 + 1 { + let array835 : Array[Int] = [] + for index836 = 0 + index836 < mbt_ffi_load32(iter_base + 12) + index836 = index836 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index556 * 4 + index836 * 4 - array555.push(mbt_ffi_load32(iter_base + 0)) + array835.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array555) + @types.SchemaTypeBody::TupleType(array835) } 19 => @types.SchemaTypeBody::ListType( @@ -41847,14 +61297,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted557 : Int? = match + let lifted837 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted558 : Int? = match + let lifted838 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -41862,37 +61312,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted557, - err: lifted558, + ok: lifted837, + err: lifted838, }) } 24 => { - let lifted562 : Array[String]? = match + let lifted842 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array560 : Array[String] = [] - for index561 = 0 - index561 < mbt_ffi_load32(iter_base + 16) - index561 = index561 + 1 { + let array840 : Array[String] = [] + for index841 = 0 + index841 < mbt_ffi_load32(iter_base + 16) + index841 = index841 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index561 * 8 + index841 * 8 - let result559 = mbt_ffi_ptr2str( + let result839 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array560.push(result559) + array840.push(result839) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array560) + Option::Some(array840) } _ => panic() } - let lifted563 : UInt? = match + let lifted843 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -41902,7 +61352,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted564 : UInt? = match + let lifted844 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -41912,54 +61362,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted566 : String? = match + let lifted846 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result565 = mbt_ffi_ptr2str( + let result845 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result565) + Option::Some(result845) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted562, - min_length: lifted563, - max_length: lifted564, - regex: lifted566, + languages: lifted842, + min_length: lifted843, + max_length: lifted844, + regex: lifted846, }) } 25 => { - let lifted570 : Array[String]? = match + let lifted850 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array568 : Array[String] = [] - for index569 = 0 - index569 < mbt_ffi_load32(iter_base + 16) - index569 = index569 + 1 { + let array848 : Array[String] = [] + for index849 = 0 + index849 < mbt_ffi_load32(iter_base + 16) + index849 = index849 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index569 * 8 + index849 * 8 - let result567 = mbt_ffi_ptr2str( + let result847 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array568.push(result567) + array848.push(result847) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array568) + Option::Some(array848) } _ => panic() } - let lifted571 : UInt? = match + let lifted851 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -41969,7 +61419,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted572 : UInt? = match + let lifted852 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -41980,58 +61430,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted570, - min_bytes: lifted571, - max_bytes: lifted572, + mime_types: lifted850, + min_bytes: lifted851, + max_bytes: lifted852, }) } 26 => { - let lifted576 : Array[String]? = match + let lifted856 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array574 : Array[String] = [] - for index575 = 0 - index575 < mbt_ffi_load32(iter_base + 20) - index575 = index575 + 1 { + let array854 : Array[String] = [] + for index855 = 0 + index855 < mbt_ffi_load32(iter_base + 20) + index855 = index855 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index575 * 8 + index855 * 8 - let result573 = mbt_ffi_ptr2str( + let result853 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array574.push(result573) + array854.push(result853) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array574) + Option::Some(array854) } _ => panic() } - let lifted580 : Array[String]? = match + let lifted860 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array578 : Array[String] = [] - for index579 = 0 - index579 < mbt_ffi_load32(iter_base + 32) - index579 = index579 + 1 { + let array858 : Array[String] = [] + for index859 = 0 + index859 < mbt_ffi_load32(iter_base + 32) + index859 = index859 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index579 * 8 + index859 * 8 - let result577 = mbt_ffi_ptr2str( + let result857 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array578.push(result577) + array858.push(result857) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array578) + Option::Some(array858) } _ => panic() } @@ -42043,95 +61493,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted576, - allowed_extensions: lifted580, + allowed_mime_types: lifted856, + allowed_extensions: lifted860, }) } 27 => { - let lifted584 : Array[String]? = match + let lifted864 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array582 : Array[String] = [] - for index583 = 0 - index583 < mbt_ffi_load32(iter_base + 16) - index583 = index583 + 1 { + let array862 : Array[String] = [] + for index863 = 0 + index863 < mbt_ffi_load32(iter_base + 16) + index863 = index863 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index583 * 8 + index863 * 8 - let result581 = mbt_ffi_ptr2str( + let result861 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array582.push(result581) + array862.push(result861) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array582) + Option::Some(array862) } _ => panic() } - let lifted588 : Array[String]? = match + let lifted868 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array586 : Array[String] = [] - for index587 = 0 - index587 < mbt_ffi_load32(iter_base + 28) - index587 = index587 + 1 { + let array866 : Array[String] = [] + for index867 = 0 + index867 < mbt_ffi_load32(iter_base + 28) + index867 = index867 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index587 * 8 + index867 * 8 - let result585 = mbt_ffi_ptr2str( + let result865 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array586.push(result585) + array866.push(result865) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array586) + Option::Some(array866) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted584, - allowed_hosts: lifted588, + allowed_schemes: lifted864, + allowed_hosts: lifted868, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result589 = mbt_ffi_ptr2str( + let result869 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array591 : Array[String] = [] - for index592 = 0 - index592 < mbt_ffi_load32(iter_base + 20) - index592 = index592 + 1 { + let array871 : Array[String] = [] + for index872 = 0 + index872 < mbt_ffi_load32(iter_base + 20) + index872 = index872 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index592 * 8 + index872 * 8 - let result590 = mbt_ffi_ptr2str( + let result870 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array591.push(result590) + array871.push(result870) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted594 : @types.QuantityValue? = match + let lifted874 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result593 = mbt_ffi_ptr2str( + let result873 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -42139,17 +61589,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result593, + unit: result873, }) } _ => panic() } - let lifted596 : @types.QuantityValue? = match + let lifted876 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result595 = mbt_ffi_ptr2str( + let result875 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -42157,404 +61607,404 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result595, + unit: result875, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result589, - allowed_suffixes: array591, - min: lifted594, - max: lifted596, + base_unit: result869, + allowed_suffixes: array871, + min: lifted874, + max: lifted876, }) } 31 => { - let array620 : Array[@types.UnionBranch] = [] - for index621 = 0 - index621 < mbt_ffi_load32(iter_base + 12) - index621 = index621 + 1 { + let array900 : Array[@types.UnionBranch] = [] + for index901 = 0 + index901 < mbt_ffi_load32(iter_base + 12) + index901 = index901 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index621 * 92 + index901 * 92 - let result597 = mbt_ffi_ptr2str( + let result877 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted606 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted886 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result598 = mbt_ffi_ptr2str( + let result878 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result598) + @types.DiscriminatorRule::Prefix(result878) } 1 => { - let result599 = mbt_ffi_ptr2str( + let result879 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result599) + @types.DiscriminatorRule::Suffix(result879) } 2 => { - let result600 = mbt_ffi_ptr2str( + let result880 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result600) + @types.DiscriminatorRule::Contains(result880) } 3 => { - let result601 = mbt_ffi_ptr2str( + let result881 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result601) + @types.DiscriminatorRule::Regex(result881) } 4 => { - let result602 = mbt_ffi_ptr2str( + let result882 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted604 : String? = match + let lifted884 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result603 = mbt_ffi_ptr2str( + let result883 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result603) + Option::Some(result883) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result602, - literal: lifted604, + field_name: result882, + literal: lifted884, }) } 5 => { - let result605 = mbt_ffi_ptr2str( + let result885 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result605) + @types.DiscriminatorRule::FieldAbsent(result885) } _ => panic() } - let lifted608 : String? = match + let lifted888 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result607 = mbt_ffi_ptr2str( + let result887 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result607) + Option::Some(result887) } _ => panic() } - let array610 : Array[String] = [] - for index611 = 0 - index611 < mbt_ffi_load32(iter_base + 52) - index611 = index611 + 1 { + let array890 : Array[String] = [] + for index891 = 0 + index891 < mbt_ffi_load32(iter_base + 52) + index891 = index891 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index611 * 8 + index891 * 8 - let result609 = mbt_ffi_ptr2str( + let result889 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array610.push(result609) + array890.push(result889) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array613 : Array[String] = [] - for index614 = 0 - index614 < mbt_ffi_load32(iter_base + 60) - index614 = index614 + 1 { + let array893 : Array[String] = [] + for index894 = 0 + index894 < mbt_ffi_load32(iter_base + 60) + index894 = index894 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index614 * 8 + index894 * 8 - let result612 = mbt_ffi_ptr2str( + 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 + 56)) - let lifted616 : String? = match + let lifted896 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result615 = mbt_ffi_ptr2str( + let result895 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result615) + Option::Some(result895) } _ => panic() } - let lifted619 : @types.Role? = match + let lifted899 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted618 = match + let lifted898 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result617 = mbt_ffi_ptr2str( + let result897 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result617) + @types.Role::Other(result897) } _ => panic() } - Option::Some(lifted618) + Option::Some(lifted898) } _ => panic() } - array620.push(@types.UnionBranch::{ - tag: result597, + array900.push(@types.UnionBranch::{ + tag: result877, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted606, + discriminator: lifted886, metadata: @types.MetadataEnvelope::{ - doc: lifted608, - aliases: array610, - examples: array613, - deprecated: lifted616, - role: lifted619, + doc: lifted888, + aliases: array890, + examples: array893, + deprecated: lifted896, + role: lifted899, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array620, + branches: array900, }) } 32 => { - let lifted623 : String? = match + let lifted903 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result622 = mbt_ffi_ptr2str( + let result902 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result622) + Option::Some(result902) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted623, + category: lifted903, }) } 33 => { - let lifted625 : String? = match + let lifted905 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result624 = mbt_ffi_ptr2str( + let result904 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result624) + Option::Some(result904) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted625, + resource_name: lifted905, }) } 34 => { - let lifted626 : Int? = match + let lifted906 : 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(lifted626) + @types.SchemaTypeBody::FutureType(lifted906) } 35 => { - let lifted627 : Int? = match + let lifted907 : 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(lifted627) + @types.SchemaTypeBody::StreamType(lifted907) } _ => panic() } - let lifted630 : String? = match + let lifted910 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result629 = mbt_ffi_ptr2str( + let result909 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result629) + Option::Some(result909) } _ => panic() } - let array632 : Array[String] = [] - for index633 = 0 - index633 < mbt_ffi_load32(iter_base + 104) - index633 = index633 + 1 { + let array912 : Array[String] = [] + for index913 = 0 + index913 < mbt_ffi_load32(iter_base + 104) + index913 = index913 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index633 * 8 + index913 * 8 - let result631 = mbt_ffi_ptr2str( + let result911 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array632.push(result631) + array912.push(result911) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array635 : Array[String] = [] - for index636 = 0 - index636 < mbt_ffi_load32(iter_base + 112) - index636 = index636 + 1 { + let array915 : Array[String] = [] + for index916 = 0 + index916 < mbt_ffi_load32(iter_base + 112) + index916 = index916 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index636 * 8 + index916 * 8 - let result634 = mbt_ffi_ptr2str( + 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 + 108)) - let lifted638 : String? = match + let lifted918 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result637 = mbt_ffi_ptr2str( + let result917 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result637) + Option::Some(result917) } _ => panic() } - let lifted641 : @types.Role? = match + let lifted921 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted640 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted920 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result639 = mbt_ffi_ptr2str( + let result919 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result639) + @types.Role::Other(result919) } _ => panic() } - Option::Some(lifted640) + Option::Some(lifted920) } _ => panic() } - array642.push(@types.SchemaTypeNode::{ - body: lifted628, + array922.push(@types.SchemaTypeNode::{ + body: lifted908, metadata: @types.MetadataEnvelope::{ - doc: lifted630, - aliases: array632, - examples: array635, - deprecated: lifted638, - role: lifted641, + doc: lifted910, + aliases: array912, + examples: array915, + deprecated: lifted918, + role: lifted921, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) - let array647 : Array[@types.SchemaTypeDef] = [] - for index648 = 0 - index648 < mbt_ffi_load32(iter_base + 56) - index648 = index648 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 52) + index648 * 24 + let array927 : Array[@types.SchemaTypeDef] = [] + for index928 = 0 + index928 < mbt_ffi_load32(iter_base + 56) + index928 = index928 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 52) + index928 * 24 - let result644 = mbt_ffi_ptr2str( + let result924 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted646 : String? = match + let lifted926 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result645 = mbt_ffi_ptr2str( + let result925 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result645) + Option::Some(result925) } _ => panic() } - array647.push(@types.SchemaTypeDef::{ - id: result644, - name: lifted646, + array927.push(@types.SchemaTypeDef::{ + id: result924, + name: lifted926, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 52)) - let array678 : Array[@types.SchemaValueNode] = [] - for index679 = 0 - index679 < mbt_ffi_load32(iter_base + 68) - index679 = index679 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 64) + index679 * 32 + let array958 : Array[@types.SchemaValueNode] = [] + for index959 = 0 + index959 < mbt_ffi_load32(iter_base + 68) + index959 = index959 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 64) + index959 * 32 - let lifted677 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted957 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -42606,29 +62056,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result649 = mbt_ffi_ptr2str( + let result929 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result649) + @types.SchemaValueNode::StringValue(result929) } 13 => { - let array650 : Array[Int] = [] - for index651 = 0 - index651 < mbt_ffi_load32(iter_base + 12) - index651 = index651 + 1 { + let array930 : Array[Int] = [] + for index931 = 0 + index931 < mbt_ffi_load32(iter_base + 12) + index931 = index931 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index651 * 4 + index931 * 4 - array650.push(mbt_ffi_load32(iter_base + 0)) + array930.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array650) + @types.SchemaValueNode::RecordValue(array930) } 14 => { - let lifted652 : Int? = match + let lifted932 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -42637,7 +62087,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted652, + payload: lifted932, }) } 15 => @@ -42645,180 +62095,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array653 : Array[Bool] = [] - for index654 = 0 - index654 < mbt_ffi_load32(iter_base + 12) - index654 = index654 + 1 { + let array933 : Array[Bool] = [] + for index934 = 0 + index934 < mbt_ffi_load32(iter_base + 12) + index934 = index934 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index654 * 1 + index934 * 1 - array653.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array933.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array653) + @types.SchemaValueNode::FlagsValue(array933) } 17 => { - let array655 : Array[Int] = [] - for index656 = 0 - index656 < mbt_ffi_load32(iter_base + 12) - index656 = index656 + 1 { + let array935 : Array[Int] = [] + for index936 = 0 + index936 < mbt_ffi_load32(iter_base + 12) + index936 = index936 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index656 * 4 + index936 * 4 - array655.push(mbt_ffi_load32(iter_base + 0)) + array935.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array655) + @types.SchemaValueNode::TupleValue(array935) } 18 => { - let array657 : Array[Int] = [] - for index658 = 0 - index658 < mbt_ffi_load32(iter_base + 12) - index658 = index658 + 1 { + let array937 : Array[Int] = [] + for index938 = 0 + index938 < mbt_ffi_load32(iter_base + 12) + index938 = index938 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index658 * 4 + index938 * 4 - array657.push(mbt_ffi_load32(iter_base + 0)) + array937.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array657) + @types.SchemaValueNode::ListValue(array937) } 19 => { - let array659 : Array[Int] = [] - for index660 = 0 - index660 < mbt_ffi_load32(iter_base + 12) - index660 = index660 + 1 { + let array939 : Array[Int] = [] + for index940 = 0 + index940 < mbt_ffi_load32(iter_base + 12) + index940 = index940 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index660 * 4 + index940 * 4 - array659.push(mbt_ffi_load32(iter_base + 0)) + array939.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array659) + @types.SchemaValueNode::FixedListValue(array939) } 20 => { - let array661 : Array[@types.MapEntry] = [] - for index662 = 0 - index662 < mbt_ffi_load32(iter_base + 12) - index662 = index662 + 1 { + let array941 : Array[@types.MapEntry] = [] + for index942 = 0 + index942 < mbt_ffi_load32(iter_base + 12) + index942 = index942 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index662 * 8 + index942 * 8 - array661.push(@types.MapEntry::{ + array941.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(array661) + @types.SchemaValueNode::MapValue(array941) } 21 => { - let lifted663 : Int? = match + let lifted943 : 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(lifted663) + @types.SchemaValueNode::OptionValue(lifted943) } 22 => { - let lifted666 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted946 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted664 : Int? = match + let lifted944 : 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(lifted664) + @types.ResultValuePayload::OkValue(lifted944) } 1 => { - let lifted665 : Int? = match + let lifted945 : 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(lifted665) + @types.ResultValuePayload::ErrValue(lifted945) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted666) + @types.SchemaValueNode::ResultValue(lifted946) } 23 => { - let result667 = mbt_ffi_ptr2str( + let result947 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted669 : String? = match + let lifted949 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result668 = mbt_ffi_ptr2str( + let result948 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result668) + Option::Some(result948) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result667, - language: lifted669, + text: result947, + language: lifted949, }) } 24 => { - let result670 = mbt_ffi_ptr2bytes( + let result950 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted672 : String? = match + let lifted952 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result671 = mbt_ffi_ptr2str( + 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::BinaryValue(@types.BinaryValuePayload::{ - bytes: result670, - mime_type: lifted672, + bytes: result950, + mime_type: lifted952, }) } 25 => { - let result673 = mbt_ffi_ptr2str( + let result953 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result673) + @types.SchemaValueNode::PathValue(result953) } 26 => { - let result674 = mbt_ffi_ptr2str( + let result954 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result674) + @types.SchemaValueNode::UrlValue(result954) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -42830,7 +62280,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result675 = mbt_ffi_ptr2str( + let result955 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -42838,17 +62288,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result675, + unit: result955, }) } 30 => { - let result676 = mbt_ffi_ptr2str( + let result956 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result676, + tag: result956, body: mbt_ffi_load32(iter_base + 16), }) } @@ -42865,18 +62315,18 @@ pub fn SearchOplog::get_next( _ => panic() } - array678.push(lifted677) + array958.push(lifted957) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) Option::Some(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array642, - defs: array647, + type_nodes: array922, + defs: array927, root: mbt_ffi_load32(iter_base + 60), }, value: @types.SchemaValueTree::{ - value_nodes: array678, + value_nodes: array958, root: mbt_ffi_load32(iter_base + 72), }, }) @@ -42890,328 +62340,1138 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, start_index: mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), - partial: lifted680, + partial: lifted960, }) } 4 => { - let lifted1053 = match mbt_ffi_load8_u(iter_base + 32) { + let lifted1473 = match mbt_ffi_load8_u(iter_base + 32) { 0 => { - let result681 = mbt_ffi_ptr2str( + let result961 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let array808 : Array[@types.SchemaTypeNode] = [] - for index809 = 0 - index809 < mbt_ffi_load32(iter_base + 52) - index809 = index809 + 1 { + let array1158 : Array[@types.SchemaTypeNode] = [] + for index1159 = 0 + index1159 < mbt_ffi_load32(iter_base + 52) + index1159 = index1159 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index809 * 144 + index1159 * 144 - let lifted794 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1144 = 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 + 2 => { + let lifted968 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted963 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted962 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted962) + } + _ => panic() + } + + let lifted965 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted964 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted964) + } + _ => panic() + } + + let lifted967 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result966 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result966) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted963, + max: lifted965, + unit: lifted967, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted968) + } + 3 => { + let lifted975 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted970 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted969 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted969) + } + _ => panic() + } + + let lifted972 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted971 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted971) + } + _ => panic() + } + + let lifted974 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result973 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result973) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted970, + max: lifted972, + unit: lifted974, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted975) + } + 4 => { + let lifted982 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted977 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted976 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted976) + } + _ => panic() + } + + let lifted979 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted978 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted978) + } + _ => panic() + } + + let lifted981 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result980 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result980) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted977, + max: lifted979, + unit: lifted981, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted982) + } + 5 => { + let lifted989 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted984 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted983 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted983) + } + _ => panic() + } + + let lifted986 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted985 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted985) + } + _ => panic() + } + + let lifted988 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result987 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result987) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted984, + max: lifted986, + unit: lifted988, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted989) + } + 6 => { + let lifted996 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted991 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted990 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted990) + } + _ => panic() + } + + let lifted993 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted992 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted992) + } + _ => panic() + } + + let lifted995 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result994 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result994) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted991, + max: lifted993, + unit: lifted995, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted996) + } + 7 => { + let lifted1003 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted998 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted997 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted997) + } + _ => panic() + } + + let lifted1000 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted999 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted999) + } + _ => panic() + } + + let lifted1002 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1001 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1001) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted998, + max: lifted1000, + unit: lifted1002, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1003) + } + 8 => { + let lifted1010 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1005 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1004 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1004) + } + _ => panic() + } + + let lifted1007 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1006 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1006) + } + _ => panic() + } + + let lifted1009 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1008 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1008) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1005, + max: lifted1007, + unit: lifted1009, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1010) + } + 9 => { + let lifted1017 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1012 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1011 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1011) + } + _ => panic() + } + + let lifted1014 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1013 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1013) + } + _ => panic() + } + + let lifted1016 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1015 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1015) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1012, + max: lifted1014, + unit: lifted1016, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1017) + } + 10 => { + let lifted1024 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1019 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1018 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1018) + } + _ => panic() + } + + let lifted1021 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1020 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1020) + } + _ => panic() + } + + let lifted1023 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1022 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1022) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1019, + max: lifted1021, + unit: lifted1023, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1024) + } + 11 => { + let lifted1031 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1026 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1025 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1025) + } + _ => panic() + } + + let lifted1028 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1027 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1027) + } + _ => panic() + } + + let lifted1030 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1029 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1029) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1026, + max: lifted1028, + unit: lifted1030, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1031) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array696 : Array[@types.NamedFieldType] = [] - for index697 = 0 - index697 < mbt_ffi_load32(iter_base + 12) - index697 = index697 + 1 { + let array1046 : Array[@types.NamedFieldType] = [] + for index1047 = 0 + index1047 < mbt_ffi_load32(iter_base + 12) + index1047 = index1047 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index697 * 68 + index1047 * 68 - let result682 = mbt_ffi_ptr2str( + let result1032 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted684 : String? = match + let lifted1034 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result683 = mbt_ffi_ptr2str( + let result1033 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result683) + Option::Some(result1033) } _ => panic() } - let array686 : Array[String] = [] - for index687 = 0 - index687 < mbt_ffi_load32(iter_base + 28) - index687 = index687 + 1 { + let array1036 : Array[String] = [] + for index1037 = 0 + index1037 < mbt_ffi_load32(iter_base + 28) + index1037 = index1037 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index687 * 8 + index1037 * 8 - let result685 = mbt_ffi_ptr2str( + let result1035 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array686.push(result685) + array1036.push(result1035) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array689 : Array[String] = [] - for index690 = 0 - index690 < mbt_ffi_load32(iter_base + 36) - index690 = index690 + 1 { + let array1039 : Array[String] = [] + for index1040 = 0 + index1040 < mbt_ffi_load32(iter_base + 36) + index1040 = index1040 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index690 * 8 + index1040 * 8 - let result688 = mbt_ffi_ptr2str( + let result1038 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array689.push(result688) + array1039.push(result1038) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted692 : String? = match + let lifted1042 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result691 = mbt_ffi_ptr2str( + let result1041 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result691) + Option::Some(result1041) } _ => panic() } - let lifted695 : @types.Role? = match + let lifted1045 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted694 = match + let lifted1044 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result693 = mbt_ffi_ptr2str( + let result1043 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result693) + @types.Role::Other(result1043) } _ => panic() } - Option::Some(lifted694) + Option::Some(lifted1044) } _ => panic() } - array696.push(@types.NamedFieldType::{ - name: result682, + array1046.push(@types.NamedFieldType::{ + name: result1032, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted684, - aliases: array686, - examples: array689, - deprecated: lifted692, - role: lifted695, + doc: lifted1034, + aliases: array1036, + examples: array1039, + deprecated: lifted1042, + role: lifted1045, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array696) + @types.SchemaTypeBody::RecordType(array1046) } 15 => { - let array713 : Array[@types.VariantCaseType] = [] - for index714 = 0 - index714 < mbt_ffi_load32(iter_base + 12) - index714 = index714 + 1 { + let array1063 : Array[@types.VariantCaseType] = [] + for index1064 = 0 + index1064 < mbt_ffi_load32(iter_base + 12) + index1064 = index1064 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index714 * 72 + index1064 * 72 - let result698 = mbt_ffi_ptr2str( + let result1048 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted699 : Int? = match + let lifted1049 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted701 : String? = match + let lifted1051 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result700 = mbt_ffi_ptr2str( + let result1050 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result700) + Option::Some(result1050) } _ => panic() } - let array703 : Array[String] = [] - for index704 = 0 - index704 < mbt_ffi_load32(iter_base + 32) - index704 = index704 + 1 { + let array1053 : Array[String] = [] + for index1054 = 0 + index1054 < mbt_ffi_load32(iter_base + 32) + index1054 = index1054 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index704 * 8 + index1054 * 8 - let result702 = mbt_ffi_ptr2str( + let result1052 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array703.push(result702) + array1053.push(result1052) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array706 : Array[String] = [] - for index707 = 0 - index707 < mbt_ffi_load32(iter_base + 40) - index707 = index707 + 1 { + let array1056 : Array[String] = [] + for index1057 = 0 + index1057 < mbt_ffi_load32(iter_base + 40) + index1057 = index1057 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index707 * 8 + index1057 * 8 - let result705 = mbt_ffi_ptr2str( + let result1055 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array706.push(result705) + array1056.push(result1055) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted709 : String? = match + let lifted1059 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result708 = mbt_ffi_ptr2str( + let result1058 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result708) + Option::Some(result1058) } _ => panic() } - let lifted712 : @types.Role? = match + let lifted1062 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted711 = match + let lifted1061 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result710 = mbt_ffi_ptr2str( + let result1060 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result710) + @types.Role::Other(result1060) } _ => panic() } - Option::Some(lifted711) + Option::Some(lifted1061) } _ => panic() } - array713.push(@types.VariantCaseType::{ - name: result698, - payload: lifted699, + array1063.push(@types.VariantCaseType::{ + name: result1048, + payload: lifted1049, metadata: @types.MetadataEnvelope::{ - doc: lifted701, - aliases: array703, - examples: array706, - deprecated: lifted709, - role: lifted712, + doc: lifted1051, + aliases: array1053, + examples: array1056, + deprecated: lifted1059, + role: lifted1062, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array713) + @types.SchemaTypeBody::VariantType(array1063) } 16 => { - let array716 : Array[String] = [] - for index717 = 0 - index717 < mbt_ffi_load32(iter_base + 12) - index717 = index717 + 1 { + let array1066 : Array[String] = [] + for index1067 = 0 + index1067 < mbt_ffi_load32(iter_base + 12) + index1067 = index1067 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index717 * 8 + index1067 * 8 - let result715 = mbt_ffi_ptr2str( + let result1065 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array716.push(result715) + array1066.push(result1065) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array716) + @types.SchemaTypeBody::EnumType(array1066) } 17 => { - let array719 : Array[String] = [] - for index720 = 0 - index720 < mbt_ffi_load32(iter_base + 12) - index720 = index720 + 1 { + let array1069 : Array[String] = [] + for index1070 = 0 + index1070 < mbt_ffi_load32(iter_base + 12) + index1070 = index1070 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index720 * 8 + index1070 * 8 - let result718 = mbt_ffi_ptr2str( + let result1068 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array719.push(result718) + array1069.push(result1068) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array719) + @types.SchemaTypeBody::FlagsType(array1069) } 18 => { - let array721 : Array[Int] = [] - for index722 = 0 - index722 < mbt_ffi_load32(iter_base + 12) - index722 = index722 + 1 { + let array1071 : Array[Int] = [] + for index1072 = 0 + index1072 < mbt_ffi_load32(iter_base + 12) + index1072 = index1072 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index722 * 4 + index1072 * 4 - array721.push(mbt_ffi_load32(iter_base + 0)) + array1071.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array721) + @types.SchemaTypeBody::TupleType(array1071) } 19 => @types.SchemaTypeBody::ListType( @@ -43232,14 +63492,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted723 : Int? = match + let lifted1073 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted724 : Int? = match + let lifted1074 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -43247,37 +63507,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted723, - err: lifted724, + ok: lifted1073, + err: lifted1074, }) } 24 => { - let lifted728 : Array[String]? = match + let lifted1078 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array726 : Array[String] = [] - for index727 = 0 - index727 < mbt_ffi_load32(iter_base + 16) - index727 = index727 + 1 { + 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) + - index727 * 8 + index1077 * 8 - let result725 = mbt_ffi_ptr2str( + let result1075 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array726.push(result725) + array1076.push(result1075) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array726) + Option::Some(array1076) } _ => panic() } - let lifted729 : UInt? = match + let lifted1079 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -43287,7 +63547,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted730 : UInt? = match + let lifted1080 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -43297,54 +63557,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted732 : String? = match + let lifted1082 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result731 = mbt_ffi_ptr2str( + let result1081 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result731) + Option::Some(result1081) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted728, - min_length: lifted729, - max_length: lifted730, - regex: lifted732, + languages: lifted1078, + min_length: lifted1079, + max_length: lifted1080, + regex: lifted1082, }) } 25 => { - let lifted736 : Array[String]? = match + let lifted1086 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array734 : Array[String] = [] - for index735 = 0 - index735 < mbt_ffi_load32(iter_base + 16) - index735 = index735 + 1 { + let array1084 : Array[String] = [] + for index1085 = 0 + index1085 < mbt_ffi_load32(iter_base + 16) + index1085 = index1085 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index735 * 8 + index1085 * 8 - let result733 = mbt_ffi_ptr2str( + let result1083 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array734.push(result733) + array1084.push(result1083) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array734) + Option::Some(array1084) } _ => panic() } - let lifted737 : UInt? = match + let lifted1087 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -43354,7 +63614,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted738 : UInt? = match + let lifted1088 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -43365,58 +63625,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted736, - min_bytes: lifted737, - max_bytes: lifted738, + mime_types: lifted1086, + min_bytes: lifted1087, + max_bytes: lifted1088, }) } 26 => { - let lifted742 : Array[String]? = match + let lifted1092 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array740 : Array[String] = [] - for index741 = 0 - index741 < mbt_ffi_load32(iter_base + 20) - index741 = index741 + 1 { + let array1090 : Array[String] = [] + for index1091 = 0 + index1091 < mbt_ffi_load32(iter_base + 20) + index1091 = index1091 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index741 * 8 + index1091 * 8 - let result739 = mbt_ffi_ptr2str( + let result1089 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array740.push(result739) + array1090.push(result1089) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array740) + Option::Some(array1090) } _ => panic() } - let lifted746 : Array[String]? = match + let lifted1096 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array744 : Array[String] = [] - for index745 = 0 - index745 < mbt_ffi_load32(iter_base + 32) - index745 = index745 + 1 { + let array1094 : Array[String] = [] + for index1095 = 0 + index1095 < mbt_ffi_load32(iter_base + 32) + index1095 = index1095 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index745 * 8 + index1095 * 8 - let result743 = mbt_ffi_ptr2str( + 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 + 28)) - Option::Some(array744) + Option::Some(array1094) } _ => panic() } @@ -43428,95 +63688,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted742, - allowed_extensions: lifted746, + allowed_mime_types: lifted1092, + allowed_extensions: lifted1096, }) } 27 => { - let lifted750 : Array[String]? = match + let lifted1100 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array748 : Array[String] = [] - for index749 = 0 - index749 < mbt_ffi_load32(iter_base + 16) - index749 = index749 + 1 { + let array1098 : Array[String] = [] + for index1099 = 0 + index1099 < mbt_ffi_load32(iter_base + 16) + index1099 = index1099 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index749 * 8 + index1099 * 8 - let result747 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array748) + Option::Some(array1098) } _ => panic() } - let lifted754 : Array[String]? = match + let lifted1104 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array752 : Array[String] = [] - for index753 = 0 - index753 < mbt_ffi_load32(iter_base + 28) - index753 = index753 + 1 { + let array1102 : Array[String] = [] + for index1103 = 0 + index1103 < mbt_ffi_load32(iter_base + 28) + index1103 = index1103 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index753 * 8 + index1103 * 8 - let result751 = mbt_ffi_ptr2str( + 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 + 24)) - Option::Some(array752) + Option::Some(array1102) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted750, - allowed_hosts: lifted754, + allowed_schemes: lifted1100, + allowed_hosts: lifted1104, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result755 = mbt_ffi_ptr2str( + let result1105 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array757 : Array[String] = [] - for index758 = 0 - index758 < mbt_ffi_load32(iter_base + 20) - index758 = index758 + 1 { + let array1107 : Array[String] = [] + for index1108 = 0 + index1108 < mbt_ffi_load32(iter_base + 20) + index1108 = index1108 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index758 * 8 + index1108 * 8 - let result756 = mbt_ffi_ptr2str( + let result1106 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array757.push(result756) + array1107.push(result1106) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted760 : @types.QuantityValue? = match + let lifted1110 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result759 = mbt_ffi_ptr2str( + let result1109 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -43524,17 +63784,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result759, + unit: result1109, }) } _ => panic() } - let lifted762 : @types.QuantityValue? = match + let lifted1112 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result761 = mbt_ffi_ptr2str( + let result1111 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -43542,404 +63802,406 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result761, + unit: result1111, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result755, - allowed_suffixes: array757, - min: lifted760, - max: lifted762, + base_unit: result1105, + allowed_suffixes: array1107, + min: lifted1110, + max: lifted1112, }) } 31 => { - let array786 : Array[@types.UnionBranch] = [] - for index787 = 0 - index787 < mbt_ffi_load32(iter_base + 12) - index787 = index787 + 1 { + let array1136 : Array[@types.UnionBranch] = [] + for index1137 = 0 + index1137 < mbt_ffi_load32(iter_base + 12) + index1137 = index1137 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index787 * 92 + index1137 * 92 - let result763 = mbt_ffi_ptr2str( + let result1113 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted772 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1122 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result764 = mbt_ffi_ptr2str( + let result1114 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result764) + @types.DiscriminatorRule::Prefix(result1114) } 1 => { - let result765 = mbt_ffi_ptr2str( + let result1115 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result765) + @types.DiscriminatorRule::Suffix(result1115) } 2 => { - let result766 = mbt_ffi_ptr2str( + let result1116 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result766) + @types.DiscriminatorRule::Contains(result1116) } 3 => { - let result767 = mbt_ffi_ptr2str( + let result1117 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result767) + @types.DiscriminatorRule::Regex(result1117) } 4 => { - let result768 = mbt_ffi_ptr2str( + let result1118 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted770 : String? = match + let lifted1120 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result769 = mbt_ffi_ptr2str( + let result1119 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result769) + Option::Some(result1119) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result768, - literal: lifted770, + field_name: result1118, + literal: lifted1120, }) } 5 => { - let result771 = mbt_ffi_ptr2str( + let result1121 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result771) + @types.DiscriminatorRule::FieldAbsent(result1121) } _ => panic() } - let lifted774 : String? = match + let lifted1124 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result773 = mbt_ffi_ptr2str( + let result1123 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result773) + Option::Some(result1123) } _ => panic() } - let array776 : Array[String] = [] - for index777 = 0 - index777 < mbt_ffi_load32(iter_base + 52) - index777 = index777 + 1 { + let array1126 : Array[String] = [] + for index1127 = 0 + index1127 < mbt_ffi_load32(iter_base + 52) + index1127 = index1127 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index777 * 8 + index1127 * 8 - let result775 = mbt_ffi_ptr2str( + let result1125 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array776.push(result775) + array1126.push(result1125) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array779 : Array[String] = [] - for index780 = 0 - index780 < mbt_ffi_load32(iter_base + 60) - index780 = index780 + 1 { + let array1129 : Array[String] = [] + for index1130 = 0 + index1130 < mbt_ffi_load32(iter_base + 60) + index1130 = index1130 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index780 * 8 + index1130 * 8 - let result778 = mbt_ffi_ptr2str( + let result1128 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array779.push(result778) + array1129.push(result1128) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted782 : String? = match + let lifted1132 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result781 = mbt_ffi_ptr2str( + let result1131 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result781) + Option::Some(result1131) } _ => panic() } - let lifted785 : @types.Role? = match + let lifted1135 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted784 = match + let lifted1134 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result783 = mbt_ffi_ptr2str( + let result1133 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result783) + @types.Role::Other(result1133) } _ => panic() } - Option::Some(lifted784) + Option::Some(lifted1134) } _ => panic() } - array786.push(@types.UnionBranch::{ - tag: result763, + array1136.push(@types.UnionBranch::{ + tag: result1113, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted772, + discriminator: lifted1122, metadata: @types.MetadataEnvelope::{ - doc: lifted774, - aliases: array776, - examples: array779, - deprecated: lifted782, - role: lifted785, + doc: lifted1124, + aliases: array1126, + examples: array1129, + deprecated: lifted1132, + role: lifted1135, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array786, + branches: array1136, }) } 32 => { - let lifted789 : String? = match + let lifted1139 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result788 = mbt_ffi_ptr2str( + let result1138 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result788) + Option::Some(result1138) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted789, + category: lifted1139, }) } 33 => { - let lifted791 : String? = match + let lifted1141 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result790 = mbt_ffi_ptr2str( + let result1140 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result790) + Option::Some(result1140) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted791, + resource_name: lifted1141, }) } 34 => { - let lifted792 : Int? = match + let lifted1142 : 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(lifted792) + @types.SchemaTypeBody::FutureType(lifted1142) } 35 => { - let lifted793 : Int? = match + let lifted1143 : 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(lifted793) + @types.SchemaTypeBody::StreamType(lifted1143) } _ => panic() } - let lifted796 : String? = match + let lifted1146 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result795 = mbt_ffi_ptr2str( + let result1145 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result795) + Option::Some(result1145) } _ => panic() } - let array798 : Array[String] = [] - for index799 = 0 - index799 < mbt_ffi_load32(iter_base + 104) - index799 = index799 + 1 { + let array1148 : Array[String] = [] + for index1149 = 0 + index1149 < mbt_ffi_load32(iter_base + 104) + index1149 = index1149 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index799 * 8 + index1149 * 8 - let result797 = mbt_ffi_ptr2str( + let result1147 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array798.push(result797) + array1148.push(result1147) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array801 : Array[String] = [] - for index802 = 0 - index802 < mbt_ffi_load32(iter_base + 112) - index802 = index802 + 1 { + let array1151 : Array[String] = [] + for index1152 = 0 + index1152 < mbt_ffi_load32(iter_base + 112) + index1152 = index1152 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index802 * 8 + index1152 * 8 - let result800 = mbt_ffi_ptr2str( + let result1150 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array801.push(result800) + array1151.push(result1150) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted804 : String? = match + let lifted1154 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result803 = mbt_ffi_ptr2str( + let result1153 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result803) + Option::Some(result1153) } _ => panic() } - let lifted807 : @types.Role? = match + let lifted1157 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted806 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1156 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result805 = mbt_ffi_ptr2str( + let result1155 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result805) + @types.Role::Other(result1155) } _ => panic() } - Option::Some(lifted806) + Option::Some(lifted1156) } _ => panic() } - array808.push(@types.SchemaTypeNode::{ - body: lifted794, + array1158.push(@types.SchemaTypeNode::{ + body: lifted1144, metadata: @types.MetadataEnvelope::{ - doc: lifted796, - aliases: array798, - examples: array801, - deprecated: lifted804, - role: lifted807, + doc: lifted1146, + aliases: array1148, + examples: array1151, + deprecated: lifted1154, + role: lifted1157, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array813 : Array[@types.SchemaTypeDef] = [] - for index814 = 0 - index814 < mbt_ffi_load32(iter_base + 60) - index814 = index814 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + index814 * 24 + let array1163 : Array[@types.SchemaTypeDef] = [] + for index1164 = 0 + index1164 < mbt_ffi_load32(iter_base + 60) + index1164 = index1164 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + + index1164 * 24 - let result810 = mbt_ffi_ptr2str( + let result1160 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted812 : String? = match + let lifted1162 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result811 = mbt_ffi_ptr2str( + let result1161 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result811) + Option::Some(result1161) } _ => panic() } - array813.push(@types.SchemaTypeDef::{ - id: result810, - name: lifted812, + array1163.push(@types.SchemaTypeDef::{ + id: result1160, + name: lifted1162, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let array844 : Array[@types.SchemaValueNode] = [] - for index845 = 0 - index845 < mbt_ffi_load32(iter_base + 72) - index845 = index845 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 68) + index845 * 32 + let array1194 : Array[@types.SchemaValueNode] = [] + for index1195 = 0 + index1195 < mbt_ffi_load32(iter_base + 72) + index1195 = index1195 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 68) + + index1195 * 32 - let lifted843 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1193 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -43991,29 +64253,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result815 = mbt_ffi_ptr2str( + let result1165 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result815) + @types.SchemaValueNode::StringValue(result1165) } 13 => { - let array816 : Array[Int] = [] - for index817 = 0 - index817 < mbt_ffi_load32(iter_base + 12) - index817 = index817 + 1 { + let array1166 : Array[Int] = [] + for index1167 = 0 + index1167 < mbt_ffi_load32(iter_base + 12) + index1167 = index1167 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index817 * 4 + index1167 * 4 - array816.push(mbt_ffi_load32(iter_base + 0)) + array1166.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array816) + @types.SchemaValueNode::RecordValue(array1166) } 14 => { - let lifted818 : Int? = match + let lifted1168 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -44022,7 +64284,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted818, + payload: lifted1168, }) } 15 => @@ -44030,180 +64292,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array819 : Array[Bool] = [] - for index820 = 0 - index820 < mbt_ffi_load32(iter_base + 12) - index820 = index820 + 1 { + let array1169 : Array[Bool] = [] + for index1170 = 0 + index1170 < mbt_ffi_load32(iter_base + 12) + index1170 = index1170 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index820 * 1 + index1170 * 1 - array819.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1169.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array819) + @types.SchemaValueNode::FlagsValue(array1169) } 17 => { - let array821 : Array[Int] = [] - for index822 = 0 - index822 < mbt_ffi_load32(iter_base + 12) - index822 = index822 + 1 { + let array1171 : Array[Int] = [] + for index1172 = 0 + index1172 < mbt_ffi_load32(iter_base + 12) + index1172 = index1172 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index822 * 4 + index1172 * 4 - array821.push(mbt_ffi_load32(iter_base + 0)) + array1171.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array821) + @types.SchemaValueNode::TupleValue(array1171) } 18 => { - let array823 : Array[Int] = [] - for index824 = 0 - index824 < mbt_ffi_load32(iter_base + 12) - index824 = index824 + 1 { + let array1173 : Array[Int] = [] + for index1174 = 0 + index1174 < mbt_ffi_load32(iter_base + 12) + index1174 = index1174 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index824 * 4 + index1174 * 4 - array823.push(mbt_ffi_load32(iter_base + 0)) + array1173.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array823) + @types.SchemaValueNode::ListValue(array1173) } 19 => { - let array825 : Array[Int] = [] - for index826 = 0 - index826 < mbt_ffi_load32(iter_base + 12) - index826 = index826 + 1 { + 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) + - index826 * 4 + 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::FixedListValue(array825) + @types.SchemaValueNode::FixedListValue(array1175) } 20 => { - let array827 : Array[@types.MapEntry] = [] - for index828 = 0 - index828 < mbt_ffi_load32(iter_base + 12) - index828 = index828 + 1 { + let array1177 : Array[@types.MapEntry] = [] + for index1178 = 0 + index1178 < mbt_ffi_load32(iter_base + 12) + index1178 = index1178 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index828 * 8 + index1178 * 8 - array827.push(@types.MapEntry::{ + array1177.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(array827) + @types.SchemaValueNode::MapValue(array1177) } 21 => { - let lifted829 : Int? = match + let lifted1179 : 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(lifted829) + @types.SchemaValueNode::OptionValue(lifted1179) } 22 => { - let lifted832 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1182 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted830 : Int? = match + let lifted1180 : 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(lifted830) + @types.ResultValuePayload::OkValue(lifted1180) } 1 => { - let lifted831 : Int? = match + let lifted1181 : 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(lifted831) + @types.ResultValuePayload::ErrValue(lifted1181) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted832) + @types.SchemaValueNode::ResultValue(lifted1182) } 23 => { - let result833 = mbt_ffi_ptr2str( + let result1183 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted835 : String? = match + let lifted1185 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result834 = mbt_ffi_ptr2str( + let result1184 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result834) + Option::Some(result1184) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result833, - language: lifted835, + text: result1183, + language: lifted1185, }) } 24 => { - let result836 = mbt_ffi_ptr2bytes( + let result1186 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted838 : String? = match + let lifted1188 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result837 = mbt_ffi_ptr2str( + let result1187 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result837) + Option::Some(result1187) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result836, - mime_type: lifted838, + bytes: result1186, + mime_type: lifted1188, }) } 25 => { - let result839 = mbt_ffi_ptr2str( + let result1189 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result839) + @types.SchemaValueNode::PathValue(result1189) } 26 => { - let result840 = mbt_ffi_ptr2str( + let result1190 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result840) + @types.SchemaValueNode::UrlValue(result1190) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -44215,7 +64477,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result841 = mbt_ffi_ptr2str( + let result1191 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -44223,17 +64485,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result841, + unit: result1191, }) } 30 => { - let result842 = mbt_ffi_ptr2str( + let result1192 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result842, + tag: result1192, body: mbt_ffi_load32(iter_base + 16), }) } @@ -44250,65 +64512,65 @@ pub fn SearchOplog::get_next( _ => panic() } - array844.push(lifted843) + array1194.push(lifted1193) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) - let result846 = mbt_ffi_ptr2str( + let result1196 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 80), mbt_ffi_load32(iter_base + 84), ) - let array848 : Array[String] = [] - for index849 = 0 - index849 < mbt_ffi_load32(iter_base + 92) - index849 = index849 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index849 * 8 + let array1198 : Array[String] = [] + for index1199 = 0 + index1199 < mbt_ffi_load32(iter_base + 92) + index1199 = index1199 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index1199 * 8 - let result847 = mbt_ffi_ptr2str( + let result1197 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array848.push(result847) + array1198.push(result1197) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) - let array863 : Array[Array[SpanData]] = [] - for index864 = 0 - index864 < mbt_ffi_load32(iter_base + 100) - index864 = index864 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 96) + index864 * 8 + let array1213 : Array[Array[SpanData]] = [] + for index1214 = 0 + index1214 < mbt_ffi_load32(iter_base + 100) + index1214 = index1214 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 96) + index1214 * 8 - let array861 : Array[SpanData] = [] - for index862 = 0 - index862 < mbt_ffi_load32(iter_base + 4) - index862 = index862 + 1 { + let array1211 : Array[SpanData] = [] + for index1212 = 0 + index1212 < mbt_ffi_load32(iter_base + 4) + index1212 = index1212 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index862 * 80 + index1212 * 80 - let lifted860 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1210 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result850 = mbt_ffi_ptr2str( + let result1200 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted852 : String? = match + let lifted1202 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result851 = mbt_ffi_ptr2str( + let result1201 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result851) + Option::Some(result1201) } _ => panic() } - let lifted853 : UInt64? = match + let lifted1203 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -44318,410 +64580,1221 @@ pub fn SearchOplog::get_next( _ => panic() } - let array857 : Array[@context.Attribute] = [] - for index858 = 0 - index858 < mbt_ffi_load32(iter_base + 68) - index858 = index858 + 1 { + let array1207 : Array[@context.Attribute] = [] + for index1208 = 0 + index1208 < mbt_ffi_load32(iter_base + 68) + index1208 = index1208 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index858 * 20 + index1208 * 20 - let result854 = mbt_ffi_ptr2str( + let result1204 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted856 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1206 = match + mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result855 = mbt_ffi_ptr2str( + let result1205 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result855) + @context.AttributeValue::String(result1205) } _ => panic() } - array857.push(@context.Attribute::{ - key: result854, - value: lifted856, + array1207.push(@context.Attribute::{ + key: result1204, + value: lifted1206, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result850, + span_id: result1200, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted852, - linked_context: lifted853, - attributes: array857, + parent: lifted1202, + linked_context: lifted1203, + attributes: array1207, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result859 = mbt_ffi_ptr2str( + let result1209 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result859, + span_id: result1209, }) } _ => panic() } - array861.push(lifted860) + array1211.push(lifted1210) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array863.push(array861) + array1213.push(array1211) } mbt_ffi_free(mbt_ffi_load32(iter_base + 96)) AgentInvocation::AgentInitialization(AgentInitializationParameters::{ - idempotency_key: result681, + idempotency_key: result961, constructor_parameters: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array808, - defs: array813, + type_nodes: array1158, + defs: array1163, root: mbt_ffi_load32(iter_base + 64), }, value: @types.SchemaValueTree::{ - value_nodes: array844, + value_nodes: array1194, root: mbt_ffi_load32(iter_base + 76), }, }, - trace_id: result846, - trace_states: array848, - invocation_context: array863, + trace_id: result1196, + trace_states: array1198, + invocation_context: array1213, }) } 1 => { - let result865 = mbt_ffi_ptr2str( + let result1215 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let result866 = mbt_ffi_ptr2str( + let result1216 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - let array993 : Array[@types.SchemaTypeNode] = [] - for index994 = 0 - index994 < mbt_ffi_load32(iter_base + 60) - index994 = index994 + 1 { + let array1413 : Array[@types.SchemaTypeNode] = [] + for index1414 = 0 + index1414 < mbt_ffi_load32(iter_base + 60) + index1414 = index1414 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index994 * 144 + index1414 * 144 - let lifted979 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1399 = 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 + 2 => { + let lifted1223 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1218 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1217 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1217) + } + _ => panic() + } + + let lifted1220 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1219 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1219) + } + _ => panic() + } + + let lifted1222 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1221 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1221) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1218, + max: lifted1220, + unit: lifted1222, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1223) + } + 3 => { + let lifted1230 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1225 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1224 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1224) + } + _ => panic() + } + + let lifted1227 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1226 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1226) + } + _ => panic() + } + + let lifted1229 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1228 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1228) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1225, + max: lifted1227, + unit: lifted1229, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1230) + } + 4 => { + let lifted1237 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1232 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1231 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1231) + } + _ => panic() + } + + let lifted1234 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1233 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1233) + } + _ => panic() + } + + let lifted1236 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1235 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1235) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1232, + max: lifted1234, + unit: lifted1236, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1237) + } + 5 => { + let lifted1244 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1239 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1238 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1238) + } + _ => panic() + } + + let lifted1241 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1240 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1240) + } + _ => panic() + } + + let lifted1243 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1242 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1242) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1239, + max: lifted1241, + unit: lifted1243, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1244) + } + 6 => { + let lifted1251 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1246 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1245 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1245) + } + _ => panic() + } + + let lifted1248 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1247 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1247) + } + _ => panic() + } + + let lifted1250 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1249 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1249) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1246, + max: lifted1248, + unit: lifted1250, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1251) + } + 7 => { + let lifted1258 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1253 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1252 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1252) + } + _ => panic() + } + + let lifted1255 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1254 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1254) + } + _ => panic() + } + + let lifted1257 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1256 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1256) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1253, + max: lifted1255, + unit: lifted1257, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1258) + } + 8 => { + let lifted1265 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1260 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1259 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1259) + } + _ => panic() + } + + let lifted1262 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1261 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1261) + } + _ => panic() + } + + let lifted1264 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1263 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1263) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1260, + max: lifted1262, + unit: lifted1264, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1265) + } + 9 => { + let lifted1272 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1267 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1266 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1266) + } + _ => panic() + } + + let lifted1269 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1268 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1268) + } + _ => panic() + } + + let lifted1271 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1270 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1270) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1267, + max: lifted1269, + unit: lifted1271, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1272) + } + 10 => { + let lifted1279 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1274 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1273 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1273) + } + _ => panic() + } + + let lifted1276 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1275 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1275) + } + _ => panic() + } + + let lifted1278 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1277 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1277) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1274, + max: lifted1276, + unit: lifted1278, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1279) + } + 11 => { + let lifted1286 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1281 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1280 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1280) + } + _ => panic() + } + + let lifted1283 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1282 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1282) + } + _ => panic() + } + + let lifted1285 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1284 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1284) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1281, + max: lifted1283, + unit: lifted1285, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1286) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array881 : Array[@types.NamedFieldType] = [] - for index882 = 0 - index882 < mbt_ffi_load32(iter_base + 12) - index882 = index882 + 1 { + let array1301 : Array[@types.NamedFieldType] = [] + for index1302 = 0 + index1302 < mbt_ffi_load32(iter_base + 12) + index1302 = index1302 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index882 * 68 + index1302 * 68 - let result867 = mbt_ffi_ptr2str( + let result1287 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted869 : String? = match + let lifted1289 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result868 = mbt_ffi_ptr2str( + let result1288 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result868) + Option::Some(result1288) } _ => panic() } - let array871 : Array[String] = [] - for index872 = 0 - index872 < mbt_ffi_load32(iter_base + 28) - index872 = index872 + 1 { + let array1291 : Array[String] = [] + for index1292 = 0 + index1292 < mbt_ffi_load32(iter_base + 28) + index1292 = index1292 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index872 * 8 + index1292 * 8 - let result870 = mbt_ffi_ptr2str( + let result1290 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array871.push(result870) + array1291.push(result1290) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array874 : Array[String] = [] - for index875 = 0 - index875 < mbt_ffi_load32(iter_base + 36) - index875 = index875 + 1 { + let array1294 : Array[String] = [] + for index1295 = 0 + index1295 < mbt_ffi_load32(iter_base + 36) + index1295 = index1295 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index875 * 8 + index1295 * 8 - let result873 = mbt_ffi_ptr2str( + let result1293 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array874.push(result873) + array1294.push(result1293) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted877 : String? = match + let lifted1297 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result876 = mbt_ffi_ptr2str( + let result1296 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result876) + Option::Some(result1296) } _ => panic() } - let lifted880 : @types.Role? = match + let lifted1300 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted879 = match + let lifted1299 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result878 = mbt_ffi_ptr2str( + let result1298 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result878) + @types.Role::Other(result1298) } _ => panic() } - Option::Some(lifted879) + Option::Some(lifted1299) } _ => panic() } - array881.push(@types.NamedFieldType::{ - name: result867, + array1301.push(@types.NamedFieldType::{ + name: result1287, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted869, - aliases: array871, - examples: array874, - deprecated: lifted877, - role: lifted880, + doc: lifted1289, + aliases: array1291, + examples: array1294, + deprecated: lifted1297, + role: lifted1300, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array881) + @types.SchemaTypeBody::RecordType(array1301) } 15 => { - let array898 : Array[@types.VariantCaseType] = [] - for index899 = 0 - index899 < mbt_ffi_load32(iter_base + 12) - index899 = index899 + 1 { + let array1318 : Array[@types.VariantCaseType] = [] + for index1319 = 0 + index1319 < mbt_ffi_load32(iter_base + 12) + index1319 = index1319 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index899 * 72 + index1319 * 72 - let result883 = mbt_ffi_ptr2str( + let result1303 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted884 : Int? = match + let lifted1304 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted886 : String? = match + let lifted1306 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result885 = mbt_ffi_ptr2str( + let result1305 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result885) + Option::Some(result1305) } _ => panic() } - let array888 : Array[String] = [] - for index889 = 0 - index889 < mbt_ffi_load32(iter_base + 32) - index889 = index889 + 1 { + let array1308 : Array[String] = [] + for index1309 = 0 + index1309 < mbt_ffi_load32(iter_base + 32) + index1309 = index1309 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index889 * 8 + index1309 * 8 - let result887 = mbt_ffi_ptr2str( + let result1307 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array888.push(result887) + array1308.push(result1307) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array891 : Array[String] = [] - for index892 = 0 - index892 < mbt_ffi_load32(iter_base + 40) - index892 = index892 + 1 { + let array1311 : Array[String] = [] + for index1312 = 0 + index1312 < mbt_ffi_load32(iter_base + 40) + index1312 = index1312 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index892 * 8 + index1312 * 8 - let result890 = mbt_ffi_ptr2str( + let result1310 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array891.push(result890) + array1311.push(result1310) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted894 : String? = match + let lifted1314 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result893 = mbt_ffi_ptr2str( + let result1313 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result893) + Option::Some(result1313) } _ => panic() } - let lifted897 : @types.Role? = match + let lifted1317 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted896 = match + let lifted1316 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result895 = mbt_ffi_ptr2str( + let result1315 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result895) + @types.Role::Other(result1315) } _ => panic() } - Option::Some(lifted896) + Option::Some(lifted1316) } _ => panic() } - array898.push(@types.VariantCaseType::{ - name: result883, - payload: lifted884, + array1318.push(@types.VariantCaseType::{ + name: result1303, + payload: lifted1304, metadata: @types.MetadataEnvelope::{ - doc: lifted886, - aliases: array888, - examples: array891, - deprecated: lifted894, - role: lifted897, + doc: lifted1306, + aliases: array1308, + examples: array1311, + deprecated: lifted1314, + role: lifted1317, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array898) + @types.SchemaTypeBody::VariantType(array1318) } 16 => { - let array901 : Array[String] = [] - for index902 = 0 - index902 < mbt_ffi_load32(iter_base + 12) - index902 = index902 + 1 { + let array1321 : Array[String] = [] + for index1322 = 0 + index1322 < mbt_ffi_load32(iter_base + 12) + index1322 = index1322 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index902 * 8 + index1322 * 8 - let result900 = mbt_ffi_ptr2str( + let result1320 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array901.push(result900) + array1321.push(result1320) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array901) + @types.SchemaTypeBody::EnumType(array1321) } 17 => { - let array904 : Array[String] = [] - for index905 = 0 - index905 < mbt_ffi_load32(iter_base + 12) - index905 = index905 + 1 { + let array1324 : Array[String] = [] + for index1325 = 0 + index1325 < mbt_ffi_load32(iter_base + 12) + index1325 = index1325 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index905 * 8 + index1325 * 8 - let result903 = mbt_ffi_ptr2str( + let result1323 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array904.push(result903) + array1324.push(result1323) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array904) + @types.SchemaTypeBody::FlagsType(array1324) } 18 => { - let array906 : Array[Int] = [] - for index907 = 0 - index907 < mbt_ffi_load32(iter_base + 12) - index907 = index907 + 1 { + let array1326 : Array[Int] = [] + for index1327 = 0 + index1327 < mbt_ffi_load32(iter_base + 12) + index1327 = index1327 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index907 * 4 + index1327 * 4 - array906.push(mbt_ffi_load32(iter_base + 0)) + array1326.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array906) + @types.SchemaTypeBody::TupleType(array1326) } 19 => @types.SchemaTypeBody::ListType( @@ -44742,14 +65815,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted908 : Int? = match + let lifted1328 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted909 : Int? = match + let lifted1329 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -44757,37 +65830,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted908, - err: lifted909, + ok: lifted1328, + err: lifted1329, }) } 24 => { - let lifted913 : Array[String]? = match + let lifted1333 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array911 : Array[String] = [] - for index912 = 0 - index912 < mbt_ffi_load32(iter_base + 16) - index912 = index912 + 1 { + let array1331 : Array[String] = [] + for index1332 = 0 + index1332 < mbt_ffi_load32(iter_base + 16) + index1332 = index1332 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index912 * 8 + index1332 * 8 - let result910 = mbt_ffi_ptr2str( + let result1330 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array911.push(result910) + array1331.push(result1330) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array911) + Option::Some(array1331) } _ => panic() } - let lifted914 : UInt? = match + let lifted1334 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -44797,7 +65870,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted915 : UInt? = match + let lifted1335 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -44807,54 +65880,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted917 : String? = match + let lifted1337 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result916 = mbt_ffi_ptr2str( + let result1336 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result916) + Option::Some(result1336) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted913, - min_length: lifted914, - max_length: lifted915, - regex: lifted917, + languages: lifted1333, + min_length: lifted1334, + max_length: lifted1335, + regex: lifted1337, }) } 25 => { - let lifted921 : Array[String]? = match + let lifted1341 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array919 : Array[String] = [] - for index920 = 0 - index920 < mbt_ffi_load32(iter_base + 16) - index920 = index920 + 1 { + let array1339 : Array[String] = [] + for index1340 = 0 + index1340 < mbt_ffi_load32(iter_base + 16) + index1340 = index1340 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index920 * 8 + index1340 * 8 - let result918 = mbt_ffi_ptr2str( + let result1338 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array919.push(result918) + array1339.push(result1338) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array919) + Option::Some(array1339) } _ => panic() } - let lifted922 : UInt? = match + let lifted1342 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -44864,7 +65937,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted923 : UInt? = match + let lifted1343 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -44875,58 +65948,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted921, - min_bytes: lifted922, - max_bytes: lifted923, + mime_types: lifted1341, + min_bytes: lifted1342, + max_bytes: lifted1343, }) } 26 => { - let lifted927 : Array[String]? = match + let lifted1347 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array925 : Array[String] = [] - for index926 = 0 - index926 < mbt_ffi_load32(iter_base + 20) - index926 = index926 + 1 { + let array1345 : Array[String] = [] + for index1346 = 0 + index1346 < mbt_ffi_load32(iter_base + 20) + index1346 = index1346 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index926 * 8 + index1346 * 8 - let result924 = mbt_ffi_ptr2str( + let result1344 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array925.push(result924) + array1345.push(result1344) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array925) + Option::Some(array1345) } _ => panic() } - let lifted931 : Array[String]? = match + let lifted1351 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array929 : Array[String] = [] - for index930 = 0 - index930 < mbt_ffi_load32(iter_base + 32) - index930 = index930 + 1 { + let array1349 : Array[String] = [] + for index1350 = 0 + index1350 < mbt_ffi_load32(iter_base + 32) + index1350 = index1350 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index930 * 8 + index1350 * 8 - let result928 = mbt_ffi_ptr2str( + let result1348 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array929.push(result928) + array1349.push(result1348) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array929) + Option::Some(array1349) } _ => panic() } @@ -44938,95 +66011,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted927, - allowed_extensions: lifted931, + allowed_mime_types: lifted1347, + allowed_extensions: lifted1351, }) } 27 => { - let lifted935 : Array[String]? = match + let lifted1355 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array933 : Array[String] = [] - for index934 = 0 - index934 < mbt_ffi_load32(iter_base + 16) - index934 = index934 + 1 { + let array1353 : Array[String] = [] + for index1354 = 0 + index1354 < mbt_ffi_load32(iter_base + 16) + index1354 = index1354 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index934 * 8 + index1354 * 8 - let result932 = mbt_ffi_ptr2str( + let result1352 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array933.push(result932) + array1353.push(result1352) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array933) + Option::Some(array1353) } _ => panic() } - let lifted939 : Array[String]? = match + let lifted1359 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array937 : Array[String] = [] - for index938 = 0 - index938 < mbt_ffi_load32(iter_base + 28) - index938 = index938 + 1 { + let array1357 : Array[String] = [] + for index1358 = 0 + index1358 < mbt_ffi_load32(iter_base + 28) + index1358 = index1358 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index938 * 8 + index1358 * 8 - let result936 = mbt_ffi_ptr2str( + let result1356 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array937.push(result936) + array1357.push(result1356) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array937) + Option::Some(array1357) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted935, - allowed_hosts: lifted939, + allowed_schemes: lifted1355, + allowed_hosts: lifted1359, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result940 = mbt_ffi_ptr2str( + let result1360 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array942 : Array[String] = [] - for index943 = 0 - index943 < mbt_ffi_load32(iter_base + 20) - index943 = index943 + 1 { + let array1362 : Array[String] = [] + for index1363 = 0 + index1363 < mbt_ffi_load32(iter_base + 20) + index1363 = index1363 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index943 * 8 + index1363 * 8 - let result941 = mbt_ffi_ptr2str( + 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 + 16)) - let lifted945 : @types.QuantityValue? = match + let lifted1365 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result944 = mbt_ffi_ptr2str( + let result1364 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -45034,17 +66107,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result944, + unit: result1364, }) } _ => panic() } - let lifted947 : @types.QuantityValue? = match + let lifted1367 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result946 = mbt_ffi_ptr2str( + let result1366 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -45052,405 +66125,406 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result946, + unit: result1366, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result940, - allowed_suffixes: array942, - min: lifted945, - max: lifted947, + base_unit: result1360, + allowed_suffixes: array1362, + min: lifted1365, + max: lifted1367, }) } 31 => { - let array971 : Array[@types.UnionBranch] = [] - for index972 = 0 - index972 < mbt_ffi_load32(iter_base + 12) - index972 = index972 + 1 { + let array1391 : Array[@types.UnionBranch] = [] + for index1392 = 0 + index1392 < mbt_ffi_load32(iter_base + 12) + index1392 = index1392 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index972 * 92 + index1392 * 92 - let result948 = mbt_ffi_ptr2str( + let result1368 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted957 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1377 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result949 = mbt_ffi_ptr2str( + let result1369 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result949) + @types.DiscriminatorRule::Prefix(result1369) } 1 => { - let result950 = mbt_ffi_ptr2str( + let result1370 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result950) + @types.DiscriminatorRule::Suffix(result1370) } 2 => { - let result951 = mbt_ffi_ptr2str( + let result1371 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result951) + @types.DiscriminatorRule::Contains(result1371) } 3 => { - let result952 = mbt_ffi_ptr2str( + let result1372 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result952) + @types.DiscriminatorRule::Regex(result1372) } 4 => { - let result953 = mbt_ffi_ptr2str( + let result1373 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted955 : String? = match + let lifted1375 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result954 = mbt_ffi_ptr2str( + let result1374 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result954) + Option::Some(result1374) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result953, - literal: lifted955, + field_name: result1373, + literal: lifted1375, }) } 5 => { - let result956 = mbt_ffi_ptr2str( + let result1376 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result956) + @types.DiscriminatorRule::FieldAbsent(result1376) } _ => panic() } - let lifted959 : String? = match + let lifted1379 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result958 = mbt_ffi_ptr2str( + let result1378 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result958) + Option::Some(result1378) } _ => panic() } - let array961 : Array[String] = [] - for index962 = 0 - index962 < mbt_ffi_load32(iter_base + 52) - index962 = index962 + 1 { + let array1381 : Array[String] = [] + for index1382 = 0 + index1382 < mbt_ffi_load32(iter_base + 52) + index1382 = index1382 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index962 * 8 + index1382 * 8 - let result960 = mbt_ffi_ptr2str( + let result1380 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array961.push(result960) + array1381.push(result1380) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array964 : Array[String] = [] - for index965 = 0 - index965 < mbt_ffi_load32(iter_base + 60) - index965 = index965 + 1 { + let array1384 : Array[String] = [] + for index1385 = 0 + index1385 < mbt_ffi_load32(iter_base + 60) + index1385 = index1385 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index965 * 8 + index1385 * 8 - let result963 = mbt_ffi_ptr2str( + let result1383 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array964.push(result963) + array1384.push(result1383) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted967 : String? = match + let lifted1387 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result966 = mbt_ffi_ptr2str( + let result1386 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result966) + Option::Some(result1386) } _ => panic() } - let lifted970 : @types.Role? = match + let lifted1390 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted969 = match + let lifted1389 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result968 = mbt_ffi_ptr2str( + let result1388 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result968) + @types.Role::Other(result1388) } _ => panic() } - Option::Some(lifted969) + Option::Some(lifted1389) } _ => panic() } - array971.push(@types.UnionBranch::{ - tag: result948, + array1391.push(@types.UnionBranch::{ + tag: result1368, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted957, + discriminator: lifted1377, metadata: @types.MetadataEnvelope::{ - doc: lifted959, - aliases: array961, - examples: array964, - deprecated: lifted967, - role: lifted970, + doc: lifted1379, + aliases: array1381, + examples: array1384, + deprecated: lifted1387, + role: lifted1390, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array971, + branches: array1391, }) } 32 => { - let lifted974 : String? = match + let lifted1394 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result973 = mbt_ffi_ptr2str( + let result1393 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result973) + Option::Some(result1393) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted974, + category: lifted1394, }) } 33 => { - let lifted976 : String? = match + let lifted1396 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result975 = mbt_ffi_ptr2str( + let result1395 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result975) + Option::Some(result1395) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted976, + resource_name: lifted1396, }) } 34 => { - let lifted977 : Int? = match + let lifted1397 : 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(lifted977) + @types.SchemaTypeBody::FutureType(lifted1397) } 35 => { - let lifted978 : Int? = match + let lifted1398 : 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(lifted978) + @types.SchemaTypeBody::StreamType(lifted1398) } _ => panic() } - let lifted981 : String? = match + let lifted1401 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result980 = mbt_ffi_ptr2str( + let result1400 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result980) + Option::Some(result1400) } _ => panic() } - let array983 : Array[String] = [] - for index984 = 0 - index984 < mbt_ffi_load32(iter_base + 104) - index984 = index984 + 1 { + let array1403 : Array[String] = [] + for index1404 = 0 + index1404 < mbt_ffi_load32(iter_base + 104) + index1404 = index1404 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index984 * 8 + index1404 * 8 - let result982 = mbt_ffi_ptr2str( + let result1402 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array983.push(result982) + array1403.push(result1402) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array986 : Array[String] = [] - for index987 = 0 - index987 < mbt_ffi_load32(iter_base + 112) - index987 = index987 + 1 { + let array1406 : Array[String] = [] + for index1407 = 0 + index1407 < mbt_ffi_load32(iter_base + 112) + index1407 = index1407 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index987 * 8 + index1407 * 8 - let result985 = mbt_ffi_ptr2str( + let result1405 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array986.push(result985) + array1406.push(result1405) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted989 : String? = match + let lifted1409 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result988 = mbt_ffi_ptr2str( + let result1408 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result988) + Option::Some(result1408) } _ => panic() } - let lifted992 : @types.Role? = match + let lifted1412 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted991 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1411 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result990 = mbt_ffi_ptr2str( + let result1410 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result990) + @types.Role::Other(result1410) } _ => panic() } - Option::Some(lifted991) + Option::Some(lifted1411) } _ => panic() } - array993.push(@types.SchemaTypeNode::{ - body: lifted979, + array1413.push(@types.SchemaTypeNode::{ + body: lifted1399, metadata: @types.MetadataEnvelope::{ - doc: lifted981, - aliases: array983, - examples: array986, - deprecated: lifted989, - role: lifted992, + doc: lifted1401, + aliases: array1403, + examples: array1406, + deprecated: lifted1409, + role: lifted1412, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let array998 : Array[@types.SchemaTypeDef] = [] - for index999 = 0 - index999 < mbt_ffi_load32(iter_base + 68) - index999 = index999 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 64) + index999 * 24 + let array1418 : Array[@types.SchemaTypeDef] = [] + for index1419 = 0 + index1419 < mbt_ffi_load32(iter_base + 68) + index1419 = index1419 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 64) + + index1419 * 24 - let result995 = mbt_ffi_ptr2str( + let result1415 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted997 : String? = match + let lifted1417 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result996 = mbt_ffi_ptr2str( + let result1416 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result996) + Option::Some(result1416) } _ => panic() } - array998.push(@types.SchemaTypeDef::{ - id: result995, - name: lifted997, + array1418.push(@types.SchemaTypeDef::{ + id: result1415, + name: lifted1417, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) - let array1029 : Array[@types.SchemaValueNode] = [] - for index1030 = 0 - index1030 < mbt_ffi_load32(iter_base + 80) - index1030 = index1030 + 1 { + let array1449 : Array[@types.SchemaValueNode] = [] + for index1450 = 0 + index1450 < mbt_ffi_load32(iter_base + 80) + index1450 = index1450 + 1 { let iter_base = mbt_ffi_load32(iter_base + 76) + - index1030 * 32 + index1450 * 32 - let lifted1028 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1448 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -45502,29 +66576,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1000 = mbt_ffi_ptr2str( + let result1420 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1000) + @types.SchemaValueNode::StringValue(result1420) } 13 => { - let array1001 : Array[Int] = [] - for index1002 = 0 - index1002 < mbt_ffi_load32(iter_base + 12) - index1002 = index1002 + 1 { + let array1421 : Array[Int] = [] + for index1422 = 0 + index1422 < mbt_ffi_load32(iter_base + 12) + index1422 = index1422 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1002 * 4 + index1422 * 4 - array1001.push(mbt_ffi_load32(iter_base + 0)) + array1421.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1001) + @types.SchemaValueNode::RecordValue(array1421) } 14 => { - let lifted1003 : Int? = match + let lifted1423 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -45533,7 +66607,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1003, + payload: lifted1423, }) } 15 => @@ -45541,180 +66615,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1004 : Array[Bool] = [] - for index1005 = 0 - index1005 < mbt_ffi_load32(iter_base + 12) - index1005 = index1005 + 1 { + let array1424 : Array[Bool] = [] + for index1425 = 0 + index1425 < mbt_ffi_load32(iter_base + 12) + index1425 = index1425 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1005 * 1 + index1425 * 1 - array1004.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1424.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1004) + @types.SchemaValueNode::FlagsValue(array1424) } 17 => { - let array1006 : Array[Int] = [] - for index1007 = 0 - index1007 < mbt_ffi_load32(iter_base + 12) - index1007 = index1007 + 1 { + 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) + - index1007 * 4 + 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::TupleValue(array1006) + @types.SchemaValueNode::TupleValue(array1426) } 18 => { - let array1008 : Array[Int] = [] - for index1009 = 0 - index1009 < mbt_ffi_load32(iter_base + 12) - index1009 = index1009 + 1 { + let array1428 : Array[Int] = [] + for index1429 = 0 + index1429 < mbt_ffi_load32(iter_base + 12) + index1429 = index1429 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1009 * 4 + index1429 * 4 - array1008.push(mbt_ffi_load32(iter_base + 0)) + array1428.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1008) + @types.SchemaValueNode::ListValue(array1428) } 19 => { - let array1010 : Array[Int] = [] - for index1011 = 0 - index1011 < mbt_ffi_load32(iter_base + 12) - index1011 = index1011 + 1 { + let array1430 : Array[Int] = [] + for index1431 = 0 + index1431 < mbt_ffi_load32(iter_base + 12) + index1431 = index1431 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1011 * 4 + index1431 * 4 - array1010.push(mbt_ffi_load32(iter_base + 0)) + array1430.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1010) + @types.SchemaValueNode::FixedListValue(array1430) } 20 => { - let array1012 : Array[@types.MapEntry] = [] - for index1013 = 0 - index1013 < mbt_ffi_load32(iter_base + 12) - index1013 = index1013 + 1 { + let array1432 : Array[@types.MapEntry] = [] + for index1433 = 0 + index1433 < mbt_ffi_load32(iter_base + 12) + index1433 = index1433 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1013 * 8 + index1433 * 8 - array1012.push(@types.MapEntry::{ + array1432.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(array1012) + @types.SchemaValueNode::MapValue(array1432) } 21 => { - let lifted1014 : Int? = match + let lifted1434 : 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(lifted1014) + @types.SchemaValueNode::OptionValue(lifted1434) } 22 => { - let lifted1017 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1437 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1015 : Int? = match + let lifted1435 : 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(lifted1015) + @types.ResultValuePayload::OkValue(lifted1435) } 1 => { - let lifted1016 : Int? = match + let lifted1436 : 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(lifted1016) + @types.ResultValuePayload::ErrValue(lifted1436) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1017) + @types.SchemaValueNode::ResultValue(lifted1437) } 23 => { - let result1018 = mbt_ffi_ptr2str( + let result1438 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1020 : String? = match + let lifted1440 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1019 = mbt_ffi_ptr2str( + let result1439 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1019) + Option::Some(result1439) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1018, - language: lifted1020, + text: result1438, + language: lifted1440, }) } 24 => { - let result1021 = mbt_ffi_ptr2bytes( + let result1441 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1023 : String? = match + let lifted1443 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1022 = mbt_ffi_ptr2str( + let result1442 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1022) + Option::Some(result1442) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1021, - mime_type: lifted1023, + bytes: result1441, + mime_type: lifted1443, }) } 25 => { - let result1024 = mbt_ffi_ptr2str( + let result1444 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1024) + @types.SchemaValueNode::PathValue(result1444) } 26 => { - let result1025 = mbt_ffi_ptr2str( + let result1445 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1025) + @types.SchemaValueNode::UrlValue(result1445) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -45726,7 +66800,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1026 = mbt_ffi_ptr2str( + let result1446 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -45734,17 +66808,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1026, + unit: result1446, }) } 30 => { - let result1027 = mbt_ffi_ptr2str( + let result1447 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1027, + tag: result1447, body: mbt_ffi_load32(iter_base + 16), }) } @@ -45761,66 +66835,66 @@ pub fn SearchOplog::get_next( _ => panic() } - array1029.push(lifted1028) + array1449.push(lifted1448) } mbt_ffi_free(mbt_ffi_load32(iter_base + 76)) - let result1031 = mbt_ffi_ptr2str( + let result1451 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 88), mbt_ffi_load32(iter_base + 92), ) - let array1033 : Array[String] = [] - for index1034 = 0 - index1034 < mbt_ffi_load32(iter_base + 100) - index1034 = index1034 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 96) + index1034 * 8 + let array1453 : Array[String] = [] + for index1454 = 0 + index1454 < mbt_ffi_load32(iter_base + 100) + index1454 = index1454 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 96) + index1454 * 8 - let result1032 = mbt_ffi_ptr2str( + let result1452 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1033.push(result1032) + array1453.push(result1452) } mbt_ffi_free(mbt_ffi_load32(iter_base + 96)) - let array1048 : Array[Array[SpanData]] = [] - for index1049 = 0 - index1049 < mbt_ffi_load32(iter_base + 108) - index1049 = index1049 + 1 { + let array1468 : Array[Array[SpanData]] = [] + for index1469 = 0 + index1469 < mbt_ffi_load32(iter_base + 108) + index1469 = index1469 + 1 { let iter_base = mbt_ffi_load32(iter_base + 104) + - index1049 * 8 + index1469 * 8 - let array1046 : Array[SpanData] = [] - for index1047 = 0 - index1047 < mbt_ffi_load32(iter_base + 4) - index1047 = index1047 + 1 { + let array1466 : Array[SpanData] = [] + for index1467 = 0 + index1467 < mbt_ffi_load32(iter_base + 4) + index1467 = index1467 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index1047 * 80 + index1467 * 80 - let lifted1045 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1465 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1035 = mbt_ffi_ptr2str( + let result1455 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1037 : String? = match + let lifted1457 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1036 = mbt_ffi_ptr2str( + let result1456 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1036) + Option::Some(result1456) } _ => panic() } - let lifted1038 : UInt64? = match + let lifted1458 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -45830,117 +66904,117 @@ pub fn SearchOplog::get_next( _ => panic() } - let array1042 : Array[@context.Attribute] = [] - for index1043 = 0 - index1043 < mbt_ffi_load32(iter_base + 68) - index1043 = index1043 + 1 { + let array1462 : Array[@context.Attribute] = [] + for index1463 = 0 + index1463 < mbt_ffi_load32(iter_base + 68) + index1463 = index1463 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index1043 * 20 + index1463 * 20 - let result1039 = mbt_ffi_ptr2str( + let result1459 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1041 = match + let lifted1461 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1040 = mbt_ffi_ptr2str( + let result1460 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1040) + @context.AttributeValue::String(result1460) } _ => panic() } - array1042.push(@context.Attribute::{ - key: result1039, - value: lifted1041, + array1462.push(@context.Attribute::{ + key: result1459, + value: lifted1461, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result1035, + span_id: result1455, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted1037, - linked_context: lifted1038, - attributes: array1042, + parent: lifted1457, + linked_context: lifted1458, + attributes: array1462, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result1044 = mbt_ffi_ptr2str( + let result1464 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result1044, + span_id: result1464, }) } _ => panic() } - array1046.push(lifted1045) + array1466.push(lifted1465) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array1048.push(array1046) + array1468.push(array1466) } mbt_ffi_free(mbt_ffi_load32(iter_base + 104)) AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{ - idempotency_key: result865, - method_name: result866, + idempotency_key: result1215, + method_name: result1216, function_input: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array993, - defs: array998, + type_nodes: array1413, + defs: array1418, root: mbt_ffi_load32(iter_base + 72), }, value: @types.SchemaValueTree::{ - value_nodes: array1029, + value_nodes: array1449, root: mbt_ffi_load32(iter_base + 84), }, }, - trace_id: result1031, - trace_states: array1033, - invocation_context: array1048, + trace_id: result1451, + trace_states: array1453, + invocation_context: array1468, }) } 2 => AgentInvocation::SaveSnapshot 3 => { - let result1050 = mbt_ffi_ptr2bytes( + let result1470 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let result1051 = mbt_ffi_ptr2str( + let result1471 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{ snapshot: SnapshotData::{ - data: result1050, - mime_type: result1051, + data: result1470, + mime_type: result1471, }, }) } 4 => { - let result1052 = mbt_ffi_ptr2str( + let result1472 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{ - idempotency_key: result1052, + idempotency_key: result1472, }) } 5 => @@ -45955,323 +67029,1133 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - invocation: lifted1053, + invocation: lifted1473, }) } 5 => { - let lifted1388 = match mbt_ffi_load8_u(iter_base + 32) { + let lifted1948 = match mbt_ffi_load8_u(iter_base + 32) { 0 => { - let array1180 : Array[@types.SchemaTypeNode] = [] - for index1181 = 0 - index1181 < mbt_ffi_load32(iter_base + 40) - index1181 = index1181 + 1 { + let array1670 : Array[@types.SchemaTypeNode] = [] + for index1671 = 0 + index1671 < mbt_ffi_load32(iter_base + 40) + index1671 = index1671 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1181 * 144 + index1671 * 144 - let lifted1166 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1656 = 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 + 2 => { + let lifted1480 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1475 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1474 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1474) + } + _ => panic() + } + + let lifted1477 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1476 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1476) + } + _ => panic() + } + + let lifted1479 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1478 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1478) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1475, + max: lifted1477, + unit: lifted1479, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1480) + } + 3 => { + let lifted1487 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1482 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1481 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1481) + } + _ => panic() + } + + let lifted1484 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1483 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1483) + } + _ => panic() + } + + let lifted1486 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1485 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1485) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1482, + max: lifted1484, + unit: lifted1486, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1487) + } + 4 => { + let lifted1494 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1489 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1488 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1488) + } + _ => panic() + } + + let lifted1491 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1490 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1490) + } + _ => panic() + } + + let lifted1493 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1492 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1492) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1489, + max: lifted1491, + unit: lifted1493, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1494) + } + 5 => { + let lifted1501 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1496 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1495 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1495) + } + _ => panic() + } + + let lifted1498 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1497 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1497) + } + _ => panic() + } + + let lifted1500 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1499 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1499) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1496, + max: lifted1498, + unit: lifted1500, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1501) + } + 6 => { + let lifted1508 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1503 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1502 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1502) + } + _ => panic() + } + + let lifted1505 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1504 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1504) + } + _ => panic() + } + + let lifted1507 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1506 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1506) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1503, + max: lifted1505, + unit: lifted1507, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1508) + } + 7 => { + let lifted1515 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1510 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1509 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1509) + } + _ => panic() + } + + let lifted1512 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1511 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1511) + } + _ => panic() + } + + let lifted1514 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1513 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1513) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1510, + max: lifted1512, + unit: lifted1514, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1515) + } + 8 => { + let lifted1522 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1517 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1516 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1516) + } + _ => panic() + } + + let lifted1519 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1518 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1518) + } + _ => panic() + } + + let lifted1521 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1520 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1520) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1517, + max: lifted1519, + unit: lifted1521, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1522) + } + 9 => { + let lifted1529 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1524 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1523 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1523) + } + _ => panic() + } + + let lifted1526 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1525 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1525) + } + _ => panic() + } + + let lifted1528 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1527 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1527) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1524, + max: lifted1526, + unit: lifted1528, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1529) + } + 10 => { + let lifted1536 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1531 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1530 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1530) + } + _ => panic() + } + + let lifted1533 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1532 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1532) + } + _ => panic() + } + + let lifted1535 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1534 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1534) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1531, + max: lifted1533, + unit: lifted1535, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1536) + } + 11 => { + let lifted1543 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1538 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1537 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1537) + } + _ => panic() + } + + let lifted1540 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1539 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1539) + } + _ => panic() + } + + let lifted1542 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1541 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1541) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1538, + max: lifted1540, + unit: lifted1542, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1543) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1068 : Array[@types.NamedFieldType] = [] - for index1069 = 0 - index1069 < mbt_ffi_load32(iter_base + 12) - index1069 = index1069 + 1 { + let array1558 : Array[@types.NamedFieldType] = [] + for index1559 = 0 + index1559 < mbt_ffi_load32(iter_base + 12) + index1559 = index1559 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1069 * 68 + index1559 * 68 - let result1054 = mbt_ffi_ptr2str( + let result1544 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1056 : String? = match + let lifted1546 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1055 = mbt_ffi_ptr2str( + let result1545 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1055) + Option::Some(result1545) } _ => panic() } - let array1058 : Array[String] = [] - for index1059 = 0 - index1059 < mbt_ffi_load32(iter_base + 28) - index1059 = index1059 + 1 { + let array1548 : Array[String] = [] + for index1549 = 0 + index1549 < mbt_ffi_load32(iter_base + 28) + index1549 = index1549 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1059 * 8 + index1549 * 8 - let result1057 = mbt_ffi_ptr2str( + let result1547 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1058.push(result1057) + array1548.push(result1547) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1061 : Array[String] = [] - for index1062 = 0 - index1062 < mbt_ffi_load32(iter_base + 36) - index1062 = index1062 + 1 { + let array1551 : Array[String] = [] + for index1552 = 0 + index1552 < mbt_ffi_load32(iter_base + 36) + index1552 = index1552 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1062 * 8 + index1552 * 8 - let result1060 = mbt_ffi_ptr2str( + let result1550 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1061.push(result1060) + array1551.push(result1550) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1064 : String? = match + let lifted1554 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1063 = mbt_ffi_ptr2str( + let result1553 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1063) + Option::Some(result1553) } _ => panic() } - let lifted1067 : @types.Role? = match + let lifted1557 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1066 = match + let lifted1556 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1065 = mbt_ffi_ptr2str( + let result1555 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1065) + @types.Role::Other(result1555) } _ => panic() } - Option::Some(lifted1066) + Option::Some(lifted1556) } _ => panic() } - array1068.push(@types.NamedFieldType::{ - name: result1054, + array1558.push(@types.NamedFieldType::{ + name: result1544, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1056, - aliases: array1058, - examples: array1061, - deprecated: lifted1064, - role: lifted1067, + doc: lifted1546, + aliases: array1548, + examples: array1551, + deprecated: lifted1554, + role: lifted1557, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1068) + @types.SchemaTypeBody::RecordType(array1558) } 15 => { - let array1085 : Array[@types.VariantCaseType] = [] - for index1086 = 0 - index1086 < mbt_ffi_load32(iter_base + 12) - index1086 = index1086 + 1 { + let array1575 : Array[@types.VariantCaseType] = [] + for index1576 = 0 + index1576 < mbt_ffi_load32(iter_base + 12) + index1576 = index1576 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1086 * 72 + index1576 * 72 - let result1070 = mbt_ffi_ptr2str( + let result1560 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1071 : Int? = match + let lifted1561 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1073 : String? = match + let lifted1563 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1072 = mbt_ffi_ptr2str( + let result1562 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1072) + Option::Some(result1562) } _ => panic() } - let array1075 : Array[String] = [] - for index1076 = 0 - index1076 < mbt_ffi_load32(iter_base + 32) - index1076 = index1076 + 1 { + let array1565 : Array[String] = [] + for index1566 = 0 + index1566 < mbt_ffi_load32(iter_base + 32) + index1566 = index1566 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1076 * 8 + index1566 * 8 - let result1074 = mbt_ffi_ptr2str( + let result1564 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1075.push(result1074) + array1565.push(result1564) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1078 : Array[String] = [] - for index1079 = 0 - index1079 < mbt_ffi_load32(iter_base + 40) - index1079 = index1079 + 1 { + let array1568 : Array[String] = [] + for index1569 = 0 + index1569 < mbt_ffi_load32(iter_base + 40) + index1569 = index1569 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1079 * 8 + index1569 * 8 - let result1077 = mbt_ffi_ptr2str( + let result1567 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1078.push(result1077) + array1568.push(result1567) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1081 : String? = match + let lifted1571 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1080 = mbt_ffi_ptr2str( + let result1570 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1080) + Option::Some(result1570) } _ => panic() } - let lifted1084 : @types.Role? = match + let lifted1574 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1083 = match + let lifted1573 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1082 = mbt_ffi_ptr2str( + let result1572 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1082) + @types.Role::Other(result1572) } _ => panic() } - Option::Some(lifted1083) + Option::Some(lifted1573) } _ => panic() } - array1085.push(@types.VariantCaseType::{ - name: result1070, - payload: lifted1071, + array1575.push(@types.VariantCaseType::{ + name: result1560, + payload: lifted1561, metadata: @types.MetadataEnvelope::{ - doc: lifted1073, - aliases: array1075, - examples: array1078, - deprecated: lifted1081, - role: lifted1084, + doc: lifted1563, + aliases: array1565, + examples: array1568, + deprecated: lifted1571, + role: lifted1574, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1085) + @types.SchemaTypeBody::VariantType(array1575) } 16 => { - let array1088 : Array[String] = [] - for index1089 = 0 - index1089 < mbt_ffi_load32(iter_base + 12) - index1089 = index1089 + 1 { + let array1578 : Array[String] = [] + for index1579 = 0 + index1579 < mbt_ffi_load32(iter_base + 12) + index1579 = index1579 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1089 * 8 + index1579 * 8 - let result1087 = mbt_ffi_ptr2str( + let result1577 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1088.push(result1087) + array1578.push(result1577) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1088) + @types.SchemaTypeBody::EnumType(array1578) } 17 => { - let array1091 : Array[String] = [] - for index1092 = 0 - index1092 < mbt_ffi_load32(iter_base + 12) - index1092 = index1092 + 1 { + let array1581 : Array[String] = [] + for index1582 = 0 + index1582 < mbt_ffi_load32(iter_base + 12) + index1582 = index1582 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1092 * 8 + index1582 * 8 - let result1090 = mbt_ffi_ptr2str( + let result1580 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1091.push(result1090) + array1581.push(result1580) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1091) + @types.SchemaTypeBody::FlagsType(array1581) } 18 => { - let array1093 : Array[Int] = [] - for index1094 = 0 - index1094 < mbt_ffi_load32(iter_base + 12) - index1094 = index1094 + 1 { + let array1583 : Array[Int] = [] + for index1584 = 0 + index1584 < mbt_ffi_load32(iter_base + 12) + index1584 = index1584 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1094 * 4 + index1584 * 4 - array1093.push(mbt_ffi_load32(iter_base + 0)) + array1583.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1093) + @types.SchemaTypeBody::TupleType(array1583) } 19 => @types.SchemaTypeBody::ListType( @@ -46292,14 +68176,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1095 : Int? = match + let lifted1585 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1096 : Int? = match + let lifted1586 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -46307,37 +68191,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1095, - err: lifted1096, + ok: lifted1585, + err: lifted1586, }) } 24 => { - let lifted1100 : Array[String]? = match + let lifted1590 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1098 : Array[String] = [] - for index1099 = 0 - index1099 < mbt_ffi_load32(iter_base + 16) - index1099 = index1099 + 1 { + let array1588 : Array[String] = [] + for index1589 = 0 + index1589 < mbt_ffi_load32(iter_base + 16) + index1589 = index1589 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1099 * 8 + index1589 * 8 - let result1097 = mbt_ffi_ptr2str( + let result1587 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1098.push(result1097) + array1588.push(result1587) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1098) + Option::Some(array1588) } _ => panic() } - let lifted1101 : UInt? = match + let lifted1591 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -46347,7 +68231,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1102 : UInt? = match + let lifted1592 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -46357,54 +68241,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1104 : String? = match + let lifted1594 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1103 = mbt_ffi_ptr2str( + let result1593 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1103) + Option::Some(result1593) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1100, - min_length: lifted1101, - max_length: lifted1102, - regex: lifted1104, + languages: lifted1590, + min_length: lifted1591, + max_length: lifted1592, + regex: lifted1594, }) } 25 => { - let lifted1108 : Array[String]? = match + let lifted1598 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1106 : Array[String] = [] - for index1107 = 0 - index1107 < mbt_ffi_load32(iter_base + 16) - index1107 = index1107 + 1 { + let array1596 : Array[String] = [] + for index1597 = 0 + index1597 < mbt_ffi_load32(iter_base + 16) + index1597 = index1597 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1107 * 8 + index1597 * 8 - let result1105 = mbt_ffi_ptr2str( + let result1595 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1106.push(result1105) + array1596.push(result1595) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1106) + Option::Some(array1596) } _ => panic() } - let lifted1109 : UInt? = match + let lifted1599 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -46414,7 +68298,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1110 : UInt? = match + let lifted1600 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -46425,58 +68309,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1108, - min_bytes: lifted1109, - max_bytes: lifted1110, + mime_types: lifted1598, + min_bytes: lifted1599, + max_bytes: lifted1600, }) } 26 => { - let lifted1114 : Array[String]? = match + let lifted1604 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1112 : Array[String] = [] - for index1113 = 0 - index1113 < mbt_ffi_load32(iter_base + 20) - index1113 = index1113 + 1 { + let array1602 : Array[String] = [] + for index1603 = 0 + index1603 < mbt_ffi_load32(iter_base + 20) + index1603 = index1603 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1113 * 8 + index1603 * 8 - let result1111 = mbt_ffi_ptr2str( + 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 + 16)) - Option::Some(array1112) + Option::Some(array1602) } _ => panic() } - let lifted1118 : Array[String]? = match + let lifted1608 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1116 : Array[String] = [] - for index1117 = 0 - index1117 < mbt_ffi_load32(iter_base + 32) - index1117 = index1117 + 1 { + let array1606 : Array[String] = [] + for index1607 = 0 + index1607 < mbt_ffi_load32(iter_base + 32) + index1607 = index1607 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1117 * 8 + index1607 * 8 - let result1115 = mbt_ffi_ptr2str( + let result1605 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1116.push(result1115) + array1606.push(result1605) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1116) + Option::Some(array1606) } _ => panic() } @@ -46488,95 +68372,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1114, - allowed_extensions: lifted1118, + allowed_mime_types: lifted1604, + allowed_extensions: lifted1608, }) } 27 => { - let lifted1122 : Array[String]? = match + let lifted1612 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1120 : Array[String] = [] - for index1121 = 0 - index1121 < mbt_ffi_load32(iter_base + 16) - index1121 = index1121 + 1 { + let array1610 : Array[String] = [] + for index1611 = 0 + index1611 < mbt_ffi_load32(iter_base + 16) + index1611 = index1611 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1121 * 8 + index1611 * 8 - let result1119 = mbt_ffi_ptr2str( + let result1609 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1120.push(result1119) + array1610.push(result1609) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1120) + Option::Some(array1610) } _ => panic() } - let lifted1126 : Array[String]? = match + let lifted1616 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1124 : Array[String] = [] - for index1125 = 0 - index1125 < mbt_ffi_load32(iter_base + 28) - index1125 = index1125 + 1 { + let array1614 : Array[String] = [] + for index1615 = 0 + index1615 < mbt_ffi_load32(iter_base + 28) + index1615 = index1615 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1125 * 8 + index1615 * 8 - let result1123 = mbt_ffi_ptr2str( + let result1613 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1124.push(result1123) + array1614.push(result1613) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1124) + Option::Some(array1614) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1122, - allowed_hosts: lifted1126, + allowed_schemes: lifted1612, + allowed_hosts: lifted1616, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1127 = mbt_ffi_ptr2str( + let result1617 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1129 : Array[String] = [] - for index1130 = 0 - index1130 < mbt_ffi_load32(iter_base + 20) - index1130 = index1130 + 1 { + let array1619 : Array[String] = [] + for index1620 = 0 + index1620 < mbt_ffi_load32(iter_base + 20) + index1620 = index1620 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1130 * 8 + index1620 * 8 - let result1128 = mbt_ffi_ptr2str( + let result1618 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1129.push(result1128) + array1619.push(result1618) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1132 : @types.QuantityValue? = match + let lifted1622 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1131 = mbt_ffi_ptr2str( + let result1621 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -46584,17 +68468,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1131, + unit: result1621, }) } _ => panic() } - let lifted1134 : @types.QuantityValue? = match + let lifted1624 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1133 = mbt_ffi_ptr2str( + let result1623 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -46602,406 +68486,406 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1133, + unit: result1623, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1127, - allowed_suffixes: array1129, - min: lifted1132, - max: lifted1134, + base_unit: result1617, + allowed_suffixes: array1619, + min: lifted1622, + max: lifted1624, }) } 31 => { - let array1158 : Array[@types.UnionBranch] = [] - for index1159 = 0 - index1159 < mbt_ffi_load32(iter_base + 12) - index1159 = index1159 + 1 { + let array1648 : Array[@types.UnionBranch] = [] + for index1649 = 0 + index1649 < mbt_ffi_load32(iter_base + 12) + index1649 = index1649 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1159 * 92 + index1649 * 92 - let result1135 = mbt_ffi_ptr2str( + let result1625 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1144 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1634 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1136 = mbt_ffi_ptr2str( + let result1626 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1136) + @types.DiscriminatorRule::Prefix(result1626) } 1 => { - let result1137 = mbt_ffi_ptr2str( + let result1627 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1137) + @types.DiscriminatorRule::Suffix(result1627) } 2 => { - let result1138 = mbt_ffi_ptr2str( + let result1628 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1138) + @types.DiscriminatorRule::Contains(result1628) } 3 => { - let result1139 = mbt_ffi_ptr2str( + let result1629 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1139) + @types.DiscriminatorRule::Regex(result1629) } 4 => { - let result1140 = mbt_ffi_ptr2str( + let result1630 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1142 : String? = match + let lifted1632 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1141 = mbt_ffi_ptr2str( + let result1631 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1141) + Option::Some(result1631) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1140, - literal: lifted1142, + field_name: result1630, + literal: lifted1632, }) } 5 => { - let result1143 = mbt_ffi_ptr2str( + let result1633 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1143) + @types.DiscriminatorRule::FieldAbsent(result1633) } _ => panic() } - let lifted1146 : String? = match + let lifted1636 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1145 = mbt_ffi_ptr2str( + let result1635 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1145) + Option::Some(result1635) } _ => panic() } - let array1148 : Array[String] = [] - for index1149 = 0 - index1149 < mbt_ffi_load32(iter_base + 52) - index1149 = index1149 + 1 { + let array1638 : Array[String] = [] + for index1639 = 0 + index1639 < mbt_ffi_load32(iter_base + 52) + index1639 = index1639 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1149 * 8 + index1639 * 8 - let result1147 = mbt_ffi_ptr2str( + let result1637 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1148.push(result1147) + array1638.push(result1637) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1151 : Array[String] = [] - for index1152 = 0 - index1152 < mbt_ffi_load32(iter_base + 60) - index1152 = index1152 + 1 { + let array1641 : Array[String] = [] + for index1642 = 0 + index1642 < mbt_ffi_load32(iter_base + 60) + index1642 = index1642 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1152 * 8 + index1642 * 8 - let result1150 = mbt_ffi_ptr2str( + let result1640 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1151.push(result1150) + array1641.push(result1640) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1154 : String? = match + let lifted1644 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1153 = mbt_ffi_ptr2str( + let result1643 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1153) + Option::Some(result1643) } _ => panic() } - let lifted1157 : @types.Role? = match + let lifted1647 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1156 = match + let lifted1646 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1155 = mbt_ffi_ptr2str( + let result1645 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1155) + @types.Role::Other(result1645) } _ => panic() } - Option::Some(lifted1156) + Option::Some(lifted1646) } _ => panic() } - array1158.push(@types.UnionBranch::{ - tag: result1135, + array1648.push(@types.UnionBranch::{ + tag: result1625, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1144, + discriminator: lifted1634, metadata: @types.MetadataEnvelope::{ - doc: lifted1146, - aliases: array1148, - examples: array1151, - deprecated: lifted1154, - role: lifted1157, + doc: lifted1636, + aliases: array1638, + examples: array1641, + deprecated: lifted1644, + role: lifted1647, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1158, + branches: array1648, }) } 32 => { - let lifted1161 : String? = match + let lifted1651 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1160 = mbt_ffi_ptr2str( + let result1650 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1160) + Option::Some(result1650) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1161, + category: lifted1651, }) } 33 => { - let lifted1163 : String? = match + let lifted1653 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1162 = mbt_ffi_ptr2str( + let result1652 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1162) + Option::Some(result1652) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1163, + resource_name: lifted1653, }) } 34 => { - let lifted1164 : Int? = match + let lifted1654 : 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(lifted1164) + @types.SchemaTypeBody::FutureType(lifted1654) } 35 => { - let lifted1165 : Int? = match + let lifted1655 : 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(lifted1165) + @types.SchemaTypeBody::StreamType(lifted1655) } _ => panic() } - let lifted1168 : String? = match + let lifted1658 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1167 = mbt_ffi_ptr2str( + let result1657 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1167) + Option::Some(result1657) } _ => panic() } - let array1170 : Array[String] = [] - for index1171 = 0 - index1171 < mbt_ffi_load32(iter_base + 104) - index1171 = index1171 + 1 { + let array1660 : Array[String] = [] + for index1661 = 0 + index1661 < mbt_ffi_load32(iter_base + 104) + index1661 = index1661 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1171 * 8 + index1661 * 8 - let result1169 = mbt_ffi_ptr2str( + let result1659 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1170.push(result1169) + array1660.push(result1659) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1173 : Array[String] = [] - for index1174 = 0 - index1174 < mbt_ffi_load32(iter_base + 112) - index1174 = index1174 + 1 { + let array1663 : Array[String] = [] + for index1664 = 0 + index1664 < mbt_ffi_load32(iter_base + 112) + index1664 = index1664 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1174 * 8 + index1664 * 8 - let result1172 = mbt_ffi_ptr2str( + let result1662 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1173.push(result1172) + array1663.push(result1662) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1176 : String? = match + let lifted1666 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1175 = mbt_ffi_ptr2str( + let result1665 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1175) + Option::Some(result1665) } _ => panic() } - let lifted1179 : @types.Role? = match + let lifted1669 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1178 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1668 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1177 = mbt_ffi_ptr2str( + let result1667 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1177) + @types.Role::Other(result1667) } _ => panic() } - Option::Some(lifted1178) + Option::Some(lifted1668) } _ => panic() } - array1180.push(@types.SchemaTypeNode::{ - body: lifted1166, + array1670.push(@types.SchemaTypeNode::{ + body: lifted1656, metadata: @types.MetadataEnvelope::{ - doc: lifted1168, - aliases: array1170, - examples: array1173, - deprecated: lifted1176, - role: lifted1179, + doc: lifted1658, + aliases: array1660, + examples: array1663, + deprecated: lifted1666, + role: lifted1669, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array1185 : Array[@types.SchemaTypeDef] = [] - for index1186 = 0 - index1186 < mbt_ffi_load32(iter_base + 48) - index1186 = index1186 + 1 { + let array1675 : Array[@types.SchemaTypeDef] = [] + for index1676 = 0 + index1676 < mbt_ffi_load32(iter_base + 48) + index1676 = index1676 + 1 { let iter_base = mbt_ffi_load32(iter_base + 44) + - index1186 * 24 + index1676 * 24 - let result1182 = mbt_ffi_ptr2str( + let result1672 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1184 : String? = match + let lifted1674 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1183 = mbt_ffi_ptr2str( + let result1673 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1183) + Option::Some(result1673) } _ => panic() } - array1185.push(@types.SchemaTypeDef::{ - id: result1182, - name: lifted1184, + array1675.push(@types.SchemaTypeDef::{ + id: result1672, + name: lifted1674, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) - let array1216 : Array[@types.SchemaValueNode] = [] - for index1217 = 0 - index1217 < mbt_ffi_load32(iter_base + 60) - index1217 = index1217 + 1 { + let array1706 : Array[@types.SchemaValueNode] = [] + for index1707 = 0 + index1707 < mbt_ffi_load32(iter_base + 60) + index1707 = index1707 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1217 * 32 + index1707 * 32 - let lifted1215 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1705 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -47053,29 +68937,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1187 = mbt_ffi_ptr2str( + let result1677 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1187) + @types.SchemaValueNode::StringValue(result1677) } 13 => { - let array1188 : Array[Int] = [] - for index1189 = 0 - index1189 < mbt_ffi_load32(iter_base + 12) - index1189 = index1189 + 1 { + let array1678 : Array[Int] = [] + for index1679 = 0 + index1679 < mbt_ffi_load32(iter_base + 12) + index1679 = index1679 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1189 * 4 + index1679 * 4 - array1188.push(mbt_ffi_load32(iter_base + 0)) + array1678.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1188) + @types.SchemaValueNode::RecordValue(array1678) } 14 => { - let lifted1190 : Int? = match + let lifted1680 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -47084,7 +68968,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1190, + payload: lifted1680, }) } 15 => @@ -47092,180 +68976,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1191 : Array[Bool] = [] - for index1192 = 0 - index1192 < mbt_ffi_load32(iter_base + 12) - index1192 = index1192 + 1 { + let array1681 : Array[Bool] = [] + for index1682 = 0 + index1682 < mbt_ffi_load32(iter_base + 12) + index1682 = index1682 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1192 * 1 + index1682 * 1 - array1191.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1681.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1191) + @types.SchemaValueNode::FlagsValue(array1681) } 17 => { - let array1193 : Array[Int] = [] - for index1194 = 0 - index1194 < mbt_ffi_load32(iter_base + 12) - index1194 = index1194 + 1 { + let array1683 : Array[Int] = [] + for index1684 = 0 + index1684 < mbt_ffi_load32(iter_base + 12) + index1684 = index1684 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1194 * 4 + index1684 * 4 - array1193.push(mbt_ffi_load32(iter_base + 0)) + array1683.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1193) + @types.SchemaValueNode::TupleValue(array1683) } 18 => { - let array1195 : Array[Int] = [] - for index1196 = 0 - index1196 < mbt_ffi_load32(iter_base + 12) - index1196 = index1196 + 1 { + let array1685 : Array[Int] = [] + for index1686 = 0 + index1686 < mbt_ffi_load32(iter_base + 12) + index1686 = index1686 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1196 * 4 + index1686 * 4 - array1195.push(mbt_ffi_load32(iter_base + 0)) + array1685.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1195) + @types.SchemaValueNode::ListValue(array1685) } 19 => { - let array1197 : Array[Int] = [] - for index1198 = 0 - index1198 < mbt_ffi_load32(iter_base + 12) - index1198 = index1198 + 1 { + let array1687 : Array[Int] = [] + for index1688 = 0 + index1688 < mbt_ffi_load32(iter_base + 12) + index1688 = index1688 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1198 * 4 + index1688 * 4 - array1197.push(mbt_ffi_load32(iter_base + 0)) + array1687.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1197) + @types.SchemaValueNode::FixedListValue(array1687) } 20 => { - let array1199 : Array[@types.MapEntry] = [] - for index1200 = 0 - index1200 < mbt_ffi_load32(iter_base + 12) - index1200 = index1200 + 1 { + let array1689 : Array[@types.MapEntry] = [] + for index1690 = 0 + index1690 < mbt_ffi_load32(iter_base + 12) + index1690 = index1690 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1200 * 8 + index1690 * 8 - array1199.push(@types.MapEntry::{ + array1689.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(array1199) + @types.SchemaValueNode::MapValue(array1689) } 21 => { - let lifted1201 : Int? = match + let lifted1691 : 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(lifted1201) + @types.SchemaValueNode::OptionValue(lifted1691) } 22 => { - let lifted1204 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1694 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1202 : Int? = match + let lifted1692 : 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(lifted1202) + @types.ResultValuePayload::OkValue(lifted1692) } 1 => { - let lifted1203 : Int? = match + let lifted1693 : 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(lifted1203) + @types.ResultValuePayload::ErrValue(lifted1693) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1204) + @types.SchemaValueNode::ResultValue(lifted1694) } 23 => { - let result1205 = mbt_ffi_ptr2str( + let result1695 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1207 : String? = match + let lifted1697 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1206 = mbt_ffi_ptr2str( + let result1696 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1206) + Option::Some(result1696) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1205, - language: lifted1207, + text: result1695, + language: lifted1697, }) } 24 => { - let result1208 = mbt_ffi_ptr2bytes( + let result1698 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1210 : String? = match + let lifted1700 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1209 = mbt_ffi_ptr2str( + let result1699 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1209) + Option::Some(result1699) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1208, - mime_type: lifted1210, + bytes: result1698, + mime_type: lifted1700, }) } 25 => { - let result1211 = mbt_ffi_ptr2str( + let result1701 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1211) + @types.SchemaValueNode::PathValue(result1701) } 26 => { - let result1212 = mbt_ffi_ptr2str( + let result1702 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1212) + @types.SchemaValueNode::UrlValue(result1702) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -47277,7 +69161,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1213 = mbt_ffi_ptr2str( + let result1703 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -47285,17 +69169,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1213, + unit: result1703, }) } 30 => { - let result1214 = mbt_ffi_ptr2str( + let result1704 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1214, + tag: result1704, body: mbt_ffi_load32(iter_base + 16), }) } @@ -47312,336 +69196,1146 @@ pub fn SearchOplog::get_next( _ => panic() } - array1216.push(lifted1215) + array1706.push(lifted1705) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) AgentInvocationResult::AgentInitialization(AgentInvocationOutputParameters::{ output: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1180, - defs: array1185, + type_nodes: array1670, + defs: array1675, root: mbt_ffi_load32(iter_base + 52), }, value: @types.SchemaValueTree::{ - value_nodes: array1216, + value_nodes: array1706, root: mbt_ffi_load32(iter_base + 64), }, }, }) } 1 => { - let array1344 : Array[@types.SchemaTypeNode] = [] - for index1345 = 0 - index1345 < mbt_ffi_load32(iter_base + 40) - index1345 = index1345 + 1 { + let array1904 : Array[@types.SchemaTypeNode] = [] + for index1905 = 0 + index1905 < mbt_ffi_load32(iter_base + 40) + index1905 = index1905 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1345 * 144 + index1905 * 144 - let lifted1330 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1890 = 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 + 2 => { + let lifted1714 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1709 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1708 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1708) + } + _ => panic() + } + + let lifted1711 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1710 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1710) + } + _ => panic() + } + + let lifted1713 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1712 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1712) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1709, + max: lifted1711, + unit: lifted1713, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1714) + } + 3 => { + 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::S16Type(lifted1721) + } + 4 => { + 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::S32Type(lifted1728) + } + 5 => { + 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::S64Type(lifted1735) + } + 6 => { + 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::U8Type(lifted1742) + } + 7 => { + 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::U16Type(lifted1749) + } + 8 => { + 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::U32Type(lifted1756) + } + 9 => { + 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::U64Type(lifted1763) + } + 10 => { + 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::F32Type(lifted1770) + } + 11 => { + 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::F64Type(lifted1777) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1232 : Array[@types.NamedFieldType] = [] - for index1233 = 0 - index1233 < mbt_ffi_load32(iter_base + 12) - index1233 = index1233 + 1 { + let array1792 : Array[@types.NamedFieldType] = [] + for index1793 = 0 + index1793 < mbt_ffi_load32(iter_base + 12) + index1793 = index1793 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1233 * 68 + index1793 * 68 - let result1218 = mbt_ffi_ptr2str( + let result1778 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1220 : String? = match + let lifted1780 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1219 = mbt_ffi_ptr2str( + let result1779 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1219) + Option::Some(result1779) } _ => panic() } - let array1222 : Array[String] = [] - for index1223 = 0 - index1223 < mbt_ffi_load32(iter_base + 28) - index1223 = index1223 + 1 { + let array1782 : Array[String] = [] + for index1783 = 0 + index1783 < mbt_ffi_load32(iter_base + 28) + index1783 = index1783 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1223 * 8 + index1783 * 8 - let result1221 = mbt_ffi_ptr2str( + let result1781 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1222.push(result1221) + array1782.push(result1781) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1225 : Array[String] = [] - for index1226 = 0 - index1226 < mbt_ffi_load32(iter_base + 36) - index1226 = index1226 + 1 { + let array1785 : Array[String] = [] + for index1786 = 0 + index1786 < mbt_ffi_load32(iter_base + 36) + index1786 = index1786 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1226 * 8 + index1786 * 8 - let result1224 = mbt_ffi_ptr2str( + let result1784 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1225.push(result1224) + array1785.push(result1784) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1228 : String? = match + let lifted1788 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1227 = mbt_ffi_ptr2str( + let result1787 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1227) + Option::Some(result1787) } _ => panic() } - let lifted1231 : @types.Role? = match + let lifted1791 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1230 = match + let lifted1790 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1229 = mbt_ffi_ptr2str( + let result1789 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1229) + @types.Role::Other(result1789) } _ => panic() } - Option::Some(lifted1230) + Option::Some(lifted1790) } _ => panic() } - array1232.push(@types.NamedFieldType::{ - name: result1218, + array1792.push(@types.NamedFieldType::{ + name: result1778, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1220, - aliases: array1222, - examples: array1225, - deprecated: lifted1228, - role: lifted1231, + doc: lifted1780, + aliases: array1782, + examples: array1785, + deprecated: lifted1788, + role: lifted1791, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1232) + @types.SchemaTypeBody::RecordType(array1792) } 15 => { - let array1249 : Array[@types.VariantCaseType] = [] - for index1250 = 0 - index1250 < mbt_ffi_load32(iter_base + 12) - index1250 = index1250 + 1 { + let array1809 : Array[@types.VariantCaseType] = [] + for index1810 = 0 + index1810 < mbt_ffi_load32(iter_base + 12) + index1810 = index1810 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1250 * 72 + index1810 * 72 - let result1234 = mbt_ffi_ptr2str( + let result1794 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1235 : Int? = match + let lifted1795 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1237 : String? = match + let lifted1797 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1236 = mbt_ffi_ptr2str( + let result1796 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1236) + Option::Some(result1796) } _ => panic() } - let array1239 : Array[String] = [] - for index1240 = 0 - index1240 < mbt_ffi_load32(iter_base + 32) - index1240 = index1240 + 1 { + let array1799 : Array[String] = [] + for index1800 = 0 + index1800 < mbt_ffi_load32(iter_base + 32) + index1800 = index1800 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1240 * 8 + index1800 * 8 - let result1238 = mbt_ffi_ptr2str( + let result1798 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1239.push(result1238) + array1799.push(result1798) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1242 : Array[String] = [] - for index1243 = 0 - index1243 < mbt_ffi_load32(iter_base + 40) - index1243 = index1243 + 1 { + let array1802 : Array[String] = [] + for index1803 = 0 + index1803 < mbt_ffi_load32(iter_base + 40) + index1803 = index1803 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1243 * 8 + index1803 * 8 - let result1241 = mbt_ffi_ptr2str( + let result1801 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1242.push(result1241) + array1802.push(result1801) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1245 : String? = match + let lifted1805 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1244 = mbt_ffi_ptr2str( + let result1804 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1244) + Option::Some(result1804) } _ => panic() } - let lifted1248 : @types.Role? = match + let lifted1808 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1247 = match + let lifted1807 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1246 = mbt_ffi_ptr2str( + let result1806 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1246) + @types.Role::Other(result1806) } _ => panic() } - Option::Some(lifted1247) + Option::Some(lifted1807) } _ => panic() } - array1249.push(@types.VariantCaseType::{ - name: result1234, - payload: lifted1235, + array1809.push(@types.VariantCaseType::{ + name: result1794, + payload: lifted1795, metadata: @types.MetadataEnvelope::{ - doc: lifted1237, - aliases: array1239, - examples: array1242, - deprecated: lifted1245, - role: lifted1248, + doc: lifted1797, + aliases: array1799, + examples: array1802, + deprecated: lifted1805, + role: lifted1808, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1249) + @types.SchemaTypeBody::VariantType(array1809) } 16 => { - let array1252 : Array[String] = [] - for index1253 = 0 - index1253 < mbt_ffi_load32(iter_base + 12) - index1253 = index1253 + 1 { + let array1812 : Array[String] = [] + for index1813 = 0 + index1813 < mbt_ffi_load32(iter_base + 12) + index1813 = index1813 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1253 * 8 + index1813 * 8 - let result1251 = mbt_ffi_ptr2str( + let result1811 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1252.push(result1251) + array1812.push(result1811) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1252) + @types.SchemaTypeBody::EnumType(array1812) } 17 => { - let array1255 : Array[String] = [] - for index1256 = 0 - index1256 < mbt_ffi_load32(iter_base + 12) - index1256 = index1256 + 1 { + let array1815 : Array[String] = [] + for index1816 = 0 + index1816 < mbt_ffi_load32(iter_base + 12) + index1816 = index1816 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1256 * 8 + index1816 * 8 - let result1254 = mbt_ffi_ptr2str( + let result1814 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1255.push(result1254) + array1815.push(result1814) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1255) + @types.SchemaTypeBody::FlagsType(array1815) } 18 => { - let array1257 : Array[Int] = [] - for index1258 = 0 - index1258 < mbt_ffi_load32(iter_base + 12) - index1258 = index1258 + 1 { + let array1817 : Array[Int] = [] + for index1818 = 0 + index1818 < mbt_ffi_load32(iter_base + 12) + index1818 = index1818 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1258 * 4 + index1818 * 4 - array1257.push(mbt_ffi_load32(iter_base + 0)) + array1817.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1257) + @types.SchemaTypeBody::TupleType(array1817) } 19 => @types.SchemaTypeBody::ListType( @@ -47662,14 +70356,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1259 : Int? = match + let lifted1819 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1260 : Int? = match + let lifted1820 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -47677,37 +70371,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1259, - err: lifted1260, + ok: lifted1819, + err: lifted1820, }) } 24 => { - let lifted1264 : Array[String]? = match + let lifted1824 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1262 : Array[String] = [] - for index1263 = 0 - index1263 < mbt_ffi_load32(iter_base + 16) - index1263 = index1263 + 1 { + let array1822 : Array[String] = [] + for index1823 = 0 + index1823 < mbt_ffi_load32(iter_base + 16) + index1823 = index1823 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1263 * 8 + index1823 * 8 - let result1261 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array1262) + Option::Some(array1822) } _ => panic() } - let lifted1265 : UInt? = match + let lifted1825 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -47717,7 +70411,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1266 : UInt? = match + let lifted1826 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -47727,54 +70421,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1268 : String? = match + let lifted1828 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1267 = mbt_ffi_ptr2str( + let result1827 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1267) + Option::Some(result1827) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1264, - min_length: lifted1265, - max_length: lifted1266, - regex: lifted1268, + languages: lifted1824, + min_length: lifted1825, + max_length: lifted1826, + regex: lifted1828, }) } 25 => { - let lifted1272 : Array[String]? = match + let lifted1832 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1270 : Array[String] = [] - for index1271 = 0 - index1271 < mbt_ffi_load32(iter_base + 16) - index1271 = index1271 + 1 { + let array1830 : Array[String] = [] + for index1831 = 0 + index1831 < mbt_ffi_load32(iter_base + 16) + index1831 = index1831 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1271 * 8 + index1831 * 8 - let result1269 = mbt_ffi_ptr2str( + let result1829 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1270.push(result1269) + array1830.push(result1829) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1270) + Option::Some(array1830) } _ => panic() } - let lifted1273 : UInt? = match + let lifted1833 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -47784,7 +70478,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1274 : UInt? = match + let lifted1834 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -47795,58 +70489,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1272, - min_bytes: lifted1273, - max_bytes: lifted1274, + mime_types: lifted1832, + min_bytes: lifted1833, + max_bytes: lifted1834, }) } 26 => { - let lifted1278 : Array[String]? = match + let lifted1838 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1276 : Array[String] = [] - for index1277 = 0 - index1277 < mbt_ffi_load32(iter_base + 20) - index1277 = index1277 + 1 { + let array1836 : Array[String] = [] + for index1837 = 0 + index1837 < mbt_ffi_load32(iter_base + 20) + index1837 = index1837 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1277 * 8 + index1837 * 8 - let result1275 = mbt_ffi_ptr2str( + let result1835 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1276.push(result1275) + array1836.push(result1835) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1276) + Option::Some(array1836) } _ => panic() } - let lifted1282 : Array[String]? = match + let lifted1842 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1280 : Array[String] = [] - for index1281 = 0 - index1281 < mbt_ffi_load32(iter_base + 32) - index1281 = index1281 + 1 { + let array1840 : Array[String] = [] + for index1841 = 0 + index1841 < mbt_ffi_load32(iter_base + 32) + index1841 = index1841 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1281 * 8 + index1841 * 8 - let result1279 = mbt_ffi_ptr2str( + let result1839 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1280.push(result1279) + array1840.push(result1839) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1280) + Option::Some(array1840) } _ => panic() } @@ -47858,95 +70552,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1278, - allowed_extensions: lifted1282, + allowed_mime_types: lifted1838, + allowed_extensions: lifted1842, }) } 27 => { - let lifted1286 : Array[String]? = match + let lifted1846 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1284 : Array[String] = [] - for index1285 = 0 - index1285 < mbt_ffi_load32(iter_base + 16) - index1285 = index1285 + 1 { + let array1844 : Array[String] = [] + for index1845 = 0 + index1845 < mbt_ffi_load32(iter_base + 16) + index1845 = index1845 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1285 * 8 + index1845 * 8 - let result1283 = mbt_ffi_ptr2str( + let result1843 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1284.push(result1283) + array1844.push(result1843) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1284) + Option::Some(array1844) } _ => panic() } - let lifted1290 : Array[String]? = match + let lifted1850 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1288 : Array[String] = [] - for index1289 = 0 - index1289 < mbt_ffi_load32(iter_base + 28) - index1289 = index1289 + 1 { + let array1848 : Array[String] = [] + for index1849 = 0 + index1849 < mbt_ffi_load32(iter_base + 28) + index1849 = index1849 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1289 * 8 + index1849 * 8 - let result1287 = mbt_ffi_ptr2str( + let result1847 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1288.push(result1287) + array1848.push(result1847) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1288) + Option::Some(array1848) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1286, - allowed_hosts: lifted1290, + allowed_schemes: lifted1846, + allowed_hosts: lifted1850, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1291 = mbt_ffi_ptr2str( + let result1851 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1293 : Array[String] = [] - for index1294 = 0 - index1294 < mbt_ffi_load32(iter_base + 20) - index1294 = index1294 + 1 { + let array1853 : Array[String] = [] + for index1854 = 0 + index1854 < mbt_ffi_load32(iter_base + 20) + index1854 = index1854 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1294 * 8 + index1854 * 8 - let result1292 = mbt_ffi_ptr2str( + let result1852 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1293.push(result1292) + array1853.push(result1852) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1296 : @types.QuantityValue? = match + let lifted1856 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1295 = mbt_ffi_ptr2str( + let result1855 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -47954,17 +70648,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1295, + unit: result1855, }) } _ => panic() } - let lifted1298 : @types.QuantityValue? = match + let lifted1858 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1297 = mbt_ffi_ptr2str( + let result1857 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -47972,406 +70666,406 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1297, + unit: result1857, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1291, - allowed_suffixes: array1293, - min: lifted1296, - max: lifted1298, + base_unit: result1851, + allowed_suffixes: array1853, + min: lifted1856, + max: lifted1858, }) } 31 => { - let array1322 : Array[@types.UnionBranch] = [] - for index1323 = 0 - index1323 < mbt_ffi_load32(iter_base + 12) - index1323 = index1323 + 1 { + let array1882 : Array[@types.UnionBranch] = [] + for index1883 = 0 + index1883 < mbt_ffi_load32(iter_base + 12) + index1883 = index1883 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1323 * 92 + index1883 * 92 - let result1299 = mbt_ffi_ptr2str( + let result1859 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1308 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted1868 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1300 = mbt_ffi_ptr2str( + let result1860 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1300) + @types.DiscriminatorRule::Prefix(result1860) } 1 => { - let result1301 = mbt_ffi_ptr2str( + let result1861 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1301) + @types.DiscriminatorRule::Suffix(result1861) } 2 => { - let result1302 = mbt_ffi_ptr2str( + let result1862 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1302) + @types.DiscriminatorRule::Contains(result1862) } 3 => { - let result1303 = mbt_ffi_ptr2str( + let result1863 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1303) + @types.DiscriminatorRule::Regex(result1863) } 4 => { - let result1304 = mbt_ffi_ptr2str( + let result1864 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1306 : String? = match + let lifted1866 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1305 = mbt_ffi_ptr2str( + let result1865 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1305) + Option::Some(result1865) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1304, - literal: lifted1306, + field_name: result1864, + literal: lifted1866, }) } 5 => { - let result1307 = mbt_ffi_ptr2str( + let result1867 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1307) + @types.DiscriminatorRule::FieldAbsent(result1867) } _ => panic() } - let lifted1310 : String? = match + let lifted1870 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1309 = mbt_ffi_ptr2str( + let result1869 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1309) + Option::Some(result1869) } _ => panic() } - let array1312 : Array[String] = [] - for index1313 = 0 - index1313 < mbt_ffi_load32(iter_base + 52) - index1313 = index1313 + 1 { + let array1872 : Array[String] = [] + for index1873 = 0 + index1873 < mbt_ffi_load32(iter_base + 52) + index1873 = index1873 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1313 * 8 + index1873 * 8 - let result1311 = mbt_ffi_ptr2str( + let result1871 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1312.push(result1311) + array1872.push(result1871) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1315 : Array[String] = [] - for index1316 = 0 - index1316 < mbt_ffi_load32(iter_base + 60) - index1316 = index1316 + 1 { + let array1875 : Array[String] = [] + for index1876 = 0 + index1876 < mbt_ffi_load32(iter_base + 60) + index1876 = index1876 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1316 * 8 + index1876 * 8 - let result1314 = mbt_ffi_ptr2str( + let result1874 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1315.push(result1314) + array1875.push(result1874) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1318 : String? = match + let lifted1878 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1317 = mbt_ffi_ptr2str( + let result1877 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1317) + Option::Some(result1877) } _ => panic() } - let lifted1321 : @types.Role? = match + let lifted1881 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1320 = match + let lifted1880 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1319 = mbt_ffi_ptr2str( + let result1879 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1319) + @types.Role::Other(result1879) } _ => panic() } - Option::Some(lifted1320) + Option::Some(lifted1880) } _ => panic() } - array1322.push(@types.UnionBranch::{ - tag: result1299, + array1882.push(@types.UnionBranch::{ + tag: result1859, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1308, + discriminator: lifted1868, metadata: @types.MetadataEnvelope::{ - doc: lifted1310, - aliases: array1312, - examples: array1315, - deprecated: lifted1318, - role: lifted1321, + doc: lifted1870, + aliases: array1872, + examples: array1875, + deprecated: lifted1878, + role: lifted1881, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1322, + branches: array1882, }) } 32 => { - let lifted1325 : String? = match + let lifted1885 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1324 = mbt_ffi_ptr2str( + let result1884 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1324) + Option::Some(result1884) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1325, + category: lifted1885, }) } 33 => { - let lifted1327 : String? = match + let lifted1887 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1326 = mbt_ffi_ptr2str( + let result1886 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1326) + Option::Some(result1886) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1327, + resource_name: lifted1887, }) } 34 => { - let lifted1328 : Int? = match + let lifted1888 : 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(lifted1328) + @types.SchemaTypeBody::FutureType(lifted1888) } 35 => { - let lifted1329 : Int? = match + let lifted1889 : 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(lifted1329) + @types.SchemaTypeBody::StreamType(lifted1889) } _ => panic() } - let lifted1332 : String? = match + let lifted1892 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1331 = mbt_ffi_ptr2str( + let result1891 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1331) + Option::Some(result1891) } _ => panic() } - let array1334 : Array[String] = [] - for index1335 = 0 - index1335 < mbt_ffi_load32(iter_base + 104) - index1335 = index1335 + 1 { + let array1894 : Array[String] = [] + for index1895 = 0 + index1895 < mbt_ffi_load32(iter_base + 104) + index1895 = index1895 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1335 * 8 + index1895 * 8 - let result1333 = mbt_ffi_ptr2str( + let result1893 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1334.push(result1333) + array1894.push(result1893) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1337 : Array[String] = [] - for index1338 = 0 - index1338 < mbt_ffi_load32(iter_base + 112) - index1338 = index1338 + 1 { + let array1897 : Array[String] = [] + for index1898 = 0 + index1898 < mbt_ffi_load32(iter_base + 112) + index1898 = index1898 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1338 * 8 + index1898 * 8 - let result1336 = mbt_ffi_ptr2str( + let result1896 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1337.push(result1336) + array1897.push(result1896) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1340 : String? = match + let lifted1900 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1339 = mbt_ffi_ptr2str( + let result1899 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1339) + Option::Some(result1899) } _ => panic() } - let lifted1343 : @types.Role? = match + let lifted1903 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1342 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted1902 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1341 = mbt_ffi_ptr2str( + let result1901 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1341) + @types.Role::Other(result1901) } _ => panic() } - Option::Some(lifted1342) + Option::Some(lifted1902) } _ => panic() } - array1344.push(@types.SchemaTypeNode::{ - body: lifted1330, + array1904.push(@types.SchemaTypeNode::{ + body: lifted1890, metadata: @types.MetadataEnvelope::{ - doc: lifted1332, - aliases: array1334, - examples: array1337, - deprecated: lifted1340, - role: lifted1343, + doc: lifted1892, + aliases: array1894, + examples: array1897, + deprecated: lifted1900, + role: lifted1903, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let array1349 : Array[@types.SchemaTypeDef] = [] - for index1350 = 0 - index1350 < mbt_ffi_load32(iter_base + 48) - index1350 = index1350 + 1 { + let array1909 : Array[@types.SchemaTypeDef] = [] + for index1910 = 0 + index1910 < mbt_ffi_load32(iter_base + 48) + index1910 = index1910 + 1 { let iter_base = mbt_ffi_load32(iter_base + 44) + - index1350 * 24 + index1910 * 24 - let result1346 = mbt_ffi_ptr2str( + let result1906 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1348 : String? = match + let lifted1908 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1347 = mbt_ffi_ptr2str( + let result1907 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1347) + Option::Some(result1907) } _ => panic() } - array1349.push(@types.SchemaTypeDef::{ - id: result1346, - name: lifted1348, + array1909.push(@types.SchemaTypeDef::{ + id: result1906, + name: lifted1908, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) - let array1380 : Array[@types.SchemaValueNode] = [] - for index1381 = 0 - index1381 < mbt_ffi_load32(iter_base + 60) - index1381 = index1381 + 1 { + let array1940 : Array[@types.SchemaValueNode] = [] + for index1941 = 0 + index1941 < mbt_ffi_load32(iter_base + 60) + index1941 = index1941 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1381 * 32 + index1941 * 32 - let lifted1379 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1939 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -48423,29 +71117,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1351 = mbt_ffi_ptr2str( + let result1911 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1351) + @types.SchemaValueNode::StringValue(result1911) } 13 => { - let array1352 : Array[Int] = [] - for index1353 = 0 - index1353 < mbt_ffi_load32(iter_base + 12) - index1353 = index1353 + 1 { + let array1912 : Array[Int] = [] + for index1913 = 0 + index1913 < mbt_ffi_load32(iter_base + 12) + index1913 = index1913 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1353 * 4 + index1913 * 4 - array1352.push(mbt_ffi_load32(iter_base + 0)) + array1912.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1352) + @types.SchemaValueNode::RecordValue(array1912) } 14 => { - let lifted1354 : Int? = match + let lifted1914 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -48454,7 +71148,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1354, + payload: lifted1914, }) } 15 => @@ -48462,180 +71156,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1355 : Array[Bool] = [] - for index1356 = 0 - index1356 < mbt_ffi_load32(iter_base + 12) - index1356 = index1356 + 1 { + let array1915 : Array[Bool] = [] + for index1916 = 0 + index1916 < mbt_ffi_load32(iter_base + 12) + index1916 = index1916 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1356 * 1 + index1916 * 1 - array1355.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array1915.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1355) + @types.SchemaValueNode::FlagsValue(array1915) } 17 => { - let array1357 : Array[Int] = [] - for index1358 = 0 - index1358 < mbt_ffi_load32(iter_base + 12) - index1358 = index1358 + 1 { + let array1917 : Array[Int] = [] + for index1918 = 0 + index1918 < mbt_ffi_load32(iter_base + 12) + index1918 = index1918 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1358 * 4 + index1918 * 4 - array1357.push(mbt_ffi_load32(iter_base + 0)) + array1917.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1357) + @types.SchemaValueNode::TupleValue(array1917) } 18 => { - let array1359 : Array[Int] = [] - for index1360 = 0 - index1360 < mbt_ffi_load32(iter_base + 12) - index1360 = index1360 + 1 { + 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) + - index1360 * 4 + 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::ListValue(array1359) + @types.SchemaValueNode::ListValue(array1919) } 19 => { - let array1361 : Array[Int] = [] - for index1362 = 0 - index1362 < mbt_ffi_load32(iter_base + 12) - index1362 = index1362 + 1 { + let array1921 : Array[Int] = [] + for index1922 = 0 + index1922 < mbt_ffi_load32(iter_base + 12) + index1922 = index1922 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1362 * 4 + index1922 * 4 - array1361.push(mbt_ffi_load32(iter_base + 0)) + array1921.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1361) + @types.SchemaValueNode::FixedListValue(array1921) } 20 => { - let array1363 : Array[@types.MapEntry] = [] - for index1364 = 0 - index1364 < mbt_ffi_load32(iter_base + 12) - index1364 = index1364 + 1 { + let array1923 : Array[@types.MapEntry] = [] + for index1924 = 0 + index1924 < mbt_ffi_load32(iter_base + 12) + index1924 = index1924 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1364 * 8 + index1924 * 8 - array1363.push(@types.MapEntry::{ + array1923.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(array1363) + @types.SchemaValueNode::MapValue(array1923) } 21 => { - let lifted1365 : Int? = match + let lifted1925 : 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(lifted1365) + @types.SchemaValueNode::OptionValue(lifted1925) } 22 => { - let lifted1368 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted1928 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1366 : Int? = match + let lifted1926 : 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(lifted1366) + @types.ResultValuePayload::OkValue(lifted1926) } 1 => { - let lifted1367 : Int? = match + let lifted1927 : 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(lifted1367) + @types.ResultValuePayload::ErrValue(lifted1927) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1368) + @types.SchemaValueNode::ResultValue(lifted1928) } 23 => { - let result1369 = mbt_ffi_ptr2str( + let result1929 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1371 : String? = match + let lifted1931 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1370 = mbt_ffi_ptr2str( + let result1930 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1370) + Option::Some(result1930) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1369, - language: lifted1371, + text: result1929, + language: lifted1931, }) } 24 => { - let result1372 = mbt_ffi_ptr2bytes( + let result1932 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1374 : String? = match + let lifted1934 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1373 = mbt_ffi_ptr2str( + let result1933 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1373) + Option::Some(result1933) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1372, - mime_type: lifted1374, + bytes: result1932, + mime_type: lifted1934, }) } 25 => { - let result1375 = mbt_ffi_ptr2str( + let result1935 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1375) + @types.SchemaValueNode::PathValue(result1935) } 26 => { - let result1376 = mbt_ffi_ptr2str( + let result1936 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1376) + @types.SchemaValueNode::UrlValue(result1936) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -48647,7 +71341,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1377 = mbt_ffi_ptr2str( + let result1937 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -48655,17 +71349,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1377, + unit: result1937, }) } 30 => { - let result1378 = mbt_ffi_ptr2str( + let result1938 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1378, + tag: result1938, body: mbt_ffi_load32(iter_base + 16), }) } @@ -48682,19 +71376,19 @@ pub fn SearchOplog::get_next( _ => panic() } - array1380.push(lifted1379) + array1940.push(lifted1939) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) AgentInvocationResult::AgentMethod(AgentInvocationOutputParameters::{ output: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1344, - defs: array1349, + type_nodes: array1904, + defs: array1909, root: mbt_ffi_load32(iter_base + 52), }, value: @types.SchemaValueTree::{ - value_nodes: array1380, + value_nodes: array1940, root: mbt_ffi_load32(iter_base + 64), }, }, @@ -48702,73 +71396,73 @@ pub fn SearchOplog::get_next( } 2 => AgentInvocationResult::ManualUpdate 3 => { - let lifted1383 : String? = match + let lifted1943 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1382 = mbt_ffi_ptr2str( + let result1942 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1382) + Option::Some(result1942) } _ => panic() } AgentInvocationResult::LoadSnapshot(FallibleResultParameters::{ - error: lifted1383, + error: lifted1943, }) } 4 => { - let result1384 = mbt_ffi_ptr2bytes( + let result1944 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - let result1385 = mbt_ffi_ptr2str( + let result1945 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) AgentInvocationResult::SaveSnapshot(SaveSnapshotResultParameters::{ snapshot: SnapshotData::{ - data: result1384, - mime_type: result1385, + data: result1944, + mime_type: result1945, }, }) } 5 => { - let lifted1387 : String? = match + let lifted1947 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1386 = mbt_ffi_ptr2str( + let result1946 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1386) + Option::Some(result1946) } _ => panic() } AgentInvocationResult::ProcessOplogEntries(FallibleResultParameters::{ - error: lifted1387, + error: lifted1947, }) } _ => panic() } - let lifted1390 : String? = match mbt_ffi_load8_u(iter_base + 68) { + let lifted1950 : String? = match mbt_ffi_load8_u(iter_base + 68) { 0 => Option::None 1 => { - let result1389 = mbt_ffi_ptr2str( + let result1949 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 72), mbt_ffi_load32(iter_base + 76), ) - Option::Some(result1389) + Option::Some(result1949) } _ => panic() } @@ -48778,8 +71472,8 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - result: lifted1388, - method_name: lifted1390, + result: lifted1948, + method_name: lifted1950, consumed_fuel: mbt_ffi_load64(iter_base + 80), component_revision: mbt_ffi_load64(iter_base + 88).reinterpret_as_uint64(), }) @@ -48792,23 +71486,23 @@ pub fn SearchOplog::get_next( }, }) 7 => { - let result1391 = mbt_ffi_ptr2str( + let result1951 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let lifted1395 : RetryPolicyState? = match + let lifted1955 : RetryPolicyState? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let array1393 : Array[StateNode] = [] - for index1394 = 0 - index1394 < mbt_ffi_load32(iter_base + 60) - index1394 = index1394 + 1 { + let array1953 : Array[StateNode] = [] + for index1954 = 0 + index1954 < mbt_ffi_load32(iter_base + 60) + index1954 = index1954 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1394 * 16 + index1954 * 16 - let lifted1392 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted1952 = match mbt_ffi_load8_u(iter_base + 0) { 0 => StateNode::Counter( mbt_ffi_load32(iter_base + 4).reinterpret_as_uint(), @@ -48834,11 +71528,11 @@ pub fn SearchOplog::get_next( _ => panic() } - array1393.push(lifted1392) + array1953.push(lifted1952) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - Option::Some(RetryPolicyState::{ nodes: array1393 }) + Option::Some(RetryPolicyState::{ nodes: array1953 }) } _ => panic() } @@ -48848,10 +71542,10 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - error: result1391, + error: result1951, 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: lifted1395, + retry_policy_state: lifted1955, }) } 8 => @@ -48902,324 +71596,1134 @@ pub fn SearchOplog::get_next( begin_index: mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), }) 14 => { - let lifted1768 = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2468 = match mbt_ffi_load8_u(iter_base + 32) { 0 => { - let result1396 = mbt_ffi_ptr2str( + let result1956 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let array1523 : Array[@types.SchemaTypeNode] = [] - for index1524 = 0 - index1524 < mbt_ffi_load32(iter_base + 52) - index1524 = index1524 + 1 { + let array2153 : Array[@types.SchemaTypeNode] = [] + for index2154 = 0 + index2154 < mbt_ffi_load32(iter_base + 52) + index2154 = index2154 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1524 * 144 + index2154 * 144 - let lifted1509 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2139 = 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 + 2 => { + let lifted1963 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1958 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1957 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1957) + } + _ => panic() + } + + let lifted1960 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1959 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1959) + } + _ => panic() + } + + let lifted1962 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1961 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1961) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1958, + max: lifted1960, + unit: lifted1962, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1963) + } + 3 => { + let lifted1970 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1965 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1964 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1964) + } + _ => panic() + } + + let lifted1967 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1966 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1966) + } + _ => panic() + } + + let lifted1969 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1968 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1968) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1965, + max: lifted1967, + unit: lifted1969, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1970) + } + 4 => { + let lifted1977 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1972 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1971 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1971) + } + _ => panic() + } + + let lifted1974 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1973 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1973) + } + _ => panic() + } + + let lifted1976 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1975 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1975) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1972, + max: lifted1974, + unit: lifted1976, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1977) + } + 5 => { + let lifted1984 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1979 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1978 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1978) + } + _ => panic() + } + + let lifted1981 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1980 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1980) + } + _ => panic() + } + + let lifted1983 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1982 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1982) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1979, + max: lifted1981, + unit: lifted1983, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1984) + } + 6 => { + let lifted1991 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1986 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1985 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1985) + } + _ => panic() + } + + let lifted1988 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1987 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1987) + } + _ => panic() + } + + let lifted1990 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1989 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1989) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1986, + max: lifted1988, + unit: lifted1990, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1991) + } + 7 => { + let lifted1998 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted1993 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1992 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1992) + } + _ => panic() + } + + let lifted1995 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted1994 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1994) + } + _ => panic() + } + + let lifted1997 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result1996 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result1996) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted1993, + max: lifted1995, + unit: lifted1997, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1998) + } + 8 => { + let lifted2005 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2000 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted1999 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted1999) + } + _ => panic() + } + + let lifted2002 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2001 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2001) + } + _ => panic() + } + + let lifted2004 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2003 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2003) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2000, + max: lifted2002, + unit: lifted2004, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2005) + } + 9 => { + let lifted2012 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2007 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2006 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2006) + } + _ => panic() + } + + let lifted2009 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2008 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2008) + } + _ => panic() + } + + let lifted2011 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2010 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2010) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2007, + max: lifted2009, + unit: lifted2011, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2012) + } + 10 => { + let lifted2019 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2014 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2013 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2013) + } + _ => panic() + } + + let lifted2016 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2015 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2015) + } + _ => panic() + } + + let lifted2018 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2017 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2017) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2014, + max: lifted2016, + unit: lifted2018, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2019) + } + 11 => { + let lifted2026 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2021 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2020 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2020) + } + _ => panic() + } + + let lifted2023 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2022 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2022) + } + _ => panic() + } + + let lifted2025 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2024 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2024) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2021, + max: lifted2023, + unit: lifted2025, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2026) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1411 : Array[@types.NamedFieldType] = [] - for index1412 = 0 - index1412 < mbt_ffi_load32(iter_base + 12) - index1412 = index1412 + 1 { + let array2041 : Array[@types.NamedFieldType] = [] + for index2042 = 0 + index2042 < mbt_ffi_load32(iter_base + 12) + index2042 = index2042 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1412 * 68 + index2042 * 68 - let result1397 = mbt_ffi_ptr2str( + let result2027 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1399 : String? = match + let lifted2029 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1398 = mbt_ffi_ptr2str( + let result2028 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1398) + Option::Some(result2028) } _ => panic() } - let array1401 : Array[String] = [] - for index1402 = 0 - index1402 < mbt_ffi_load32(iter_base + 28) - index1402 = index1402 + 1 { + let array2031 : Array[String] = [] + for index2032 = 0 + index2032 < mbt_ffi_load32(iter_base + 28) + index2032 = index2032 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1402 * 8 + index2032 * 8 - let result1400 = mbt_ffi_ptr2str( + let result2030 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1401.push(result1400) + array2031.push(result2030) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1404 : Array[String] = [] - for index1405 = 0 - index1405 < mbt_ffi_load32(iter_base + 36) - index1405 = index1405 + 1 { + let array2034 : Array[String] = [] + for index2035 = 0 + index2035 < mbt_ffi_load32(iter_base + 36) + index2035 = index2035 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1405 * 8 + index2035 * 8 - let result1403 = mbt_ffi_ptr2str( + let result2033 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1404.push(result1403) + array2034.push(result2033) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1407 : String? = match + let lifted2037 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1406 = mbt_ffi_ptr2str( + let result2036 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1406) + Option::Some(result2036) } _ => panic() } - let lifted1410 : @types.Role? = match + let lifted2040 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1409 = match + let lifted2039 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1408 = mbt_ffi_ptr2str( + let result2038 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1408) + @types.Role::Other(result2038) } _ => panic() } - Option::Some(lifted1409) + Option::Some(lifted2039) } _ => panic() } - array1411.push(@types.NamedFieldType::{ - name: result1397, + array2041.push(@types.NamedFieldType::{ + name: result2027, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1399, - aliases: array1401, - examples: array1404, - deprecated: lifted1407, - role: lifted1410, + doc: lifted2029, + aliases: array2031, + examples: array2034, + deprecated: lifted2037, + role: lifted2040, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1411) + @types.SchemaTypeBody::RecordType(array2041) } 15 => { - let array1428 : Array[@types.VariantCaseType] = [] - for index1429 = 0 - index1429 < mbt_ffi_load32(iter_base + 12) - index1429 = index1429 + 1 { + let array2058 : Array[@types.VariantCaseType] = [] + for index2059 = 0 + index2059 < mbt_ffi_load32(iter_base + 12) + index2059 = index2059 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1429 * 72 + index2059 * 72 - let result1413 = mbt_ffi_ptr2str( + let result2043 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1414 : Int? = match + let lifted2044 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1416 : String? = match + let lifted2046 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1415 = mbt_ffi_ptr2str( + let result2045 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1415) + Option::Some(result2045) } _ => panic() } - let array1418 : Array[String] = [] - for index1419 = 0 - index1419 < mbt_ffi_load32(iter_base + 32) - index1419 = index1419 + 1 { + let array2048 : Array[String] = [] + for index2049 = 0 + index2049 < mbt_ffi_load32(iter_base + 32) + index2049 = index2049 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1419 * 8 + index2049 * 8 - let result1417 = mbt_ffi_ptr2str( + let result2047 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1418.push(result1417) + array2048.push(result2047) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1421 : Array[String] = [] - for index1422 = 0 - index1422 < mbt_ffi_load32(iter_base + 40) - index1422 = index1422 + 1 { + let array2051 : Array[String] = [] + for index2052 = 0 + index2052 < mbt_ffi_load32(iter_base + 40) + index2052 = index2052 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1422 * 8 + index2052 * 8 - let result1420 = mbt_ffi_ptr2str( + let result2050 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1421.push(result1420) + array2051.push(result2050) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1424 : String? = match + let lifted2054 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1423 = mbt_ffi_ptr2str( + let result2053 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1423) + Option::Some(result2053) } _ => panic() } - let lifted1427 : @types.Role? = match + let lifted2057 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1426 = match + let lifted2056 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1425 = mbt_ffi_ptr2str( + let result2055 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1425) + @types.Role::Other(result2055) } _ => panic() } - Option::Some(lifted1426) + Option::Some(lifted2056) } _ => panic() } - array1428.push(@types.VariantCaseType::{ - name: result1413, - payload: lifted1414, + array2058.push(@types.VariantCaseType::{ + name: result2043, + payload: lifted2044, metadata: @types.MetadataEnvelope::{ - doc: lifted1416, - aliases: array1418, - examples: array1421, - deprecated: lifted1424, - role: lifted1427, + doc: lifted2046, + aliases: array2048, + examples: array2051, + deprecated: lifted2054, + role: lifted2057, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1428) + @types.SchemaTypeBody::VariantType(array2058) } 16 => { - let array1431 : Array[String] = [] - for index1432 = 0 - index1432 < mbt_ffi_load32(iter_base + 12) - index1432 = index1432 + 1 { + let array2061 : Array[String] = [] + for index2062 = 0 + index2062 < mbt_ffi_load32(iter_base + 12) + index2062 = index2062 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1432 * 8 + index2062 * 8 - let result1430 = mbt_ffi_ptr2str( + let result2060 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1431.push(result1430) + array2061.push(result2060) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1431) + @types.SchemaTypeBody::EnumType(array2061) } 17 => { - let array1434 : Array[String] = [] - for index1435 = 0 - index1435 < mbt_ffi_load32(iter_base + 12) - index1435 = index1435 + 1 { + let array2064 : Array[String] = [] + for index2065 = 0 + index2065 < mbt_ffi_load32(iter_base + 12) + index2065 = index2065 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1435 * 8 + index2065 * 8 - let result1433 = mbt_ffi_ptr2str( + let result2063 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1434.push(result1433) + array2064.push(result2063) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1434) + @types.SchemaTypeBody::FlagsType(array2064) } 18 => { - let array1436 : Array[Int] = [] - for index1437 = 0 - index1437 < mbt_ffi_load32(iter_base + 12) - index1437 = index1437 + 1 { + let array2066 : Array[Int] = [] + for index2067 = 0 + index2067 < mbt_ffi_load32(iter_base + 12) + index2067 = index2067 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1437 * 4 + index2067 * 4 - array1436.push(mbt_ffi_load32(iter_base + 0)) + array2066.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1436) + @types.SchemaTypeBody::TupleType(array2066) } 19 => @types.SchemaTypeBody::ListType( @@ -49240,14 +72744,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1438 : Int? = match + let lifted2068 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1439 : Int? = match + let lifted2069 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -49255,37 +72759,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1438, - err: lifted1439, + ok: lifted2068, + err: lifted2069, }) } 24 => { - let lifted1443 : Array[String]? = match + let lifted2073 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1441 : Array[String] = [] - for index1442 = 0 - index1442 < mbt_ffi_load32(iter_base + 16) - index1442 = index1442 + 1 { + let array2071 : Array[String] = [] + for index2072 = 0 + index2072 < mbt_ffi_load32(iter_base + 16) + index2072 = index2072 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1442 * 8 + index2072 * 8 - let result1440 = mbt_ffi_ptr2str( + let result2070 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1441.push(result1440) + array2071.push(result2070) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1441) + Option::Some(array2071) } _ => panic() } - let lifted1444 : UInt? = match + let lifted2074 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -49295,7 +72799,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1445 : UInt? = match + let lifted2075 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -49305,54 +72809,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1447 : String? = match + let lifted2077 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1446 = mbt_ffi_ptr2str( + let result2076 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1446) + Option::Some(result2076) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1443, - min_length: lifted1444, - max_length: lifted1445, - regex: lifted1447, + languages: lifted2073, + min_length: lifted2074, + max_length: lifted2075, + regex: lifted2077, }) } 25 => { - let lifted1451 : Array[String]? = match + 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 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) + - index1450 * 8 + index2080 * 8 - let result1448 = mbt_ffi_ptr2str( + 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 + let lifted2082 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -49362,7 +72866,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1453 : UInt? = match + let lifted2083 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -49373,58 +72877,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1451, - min_bytes: lifted1452, - max_bytes: lifted1453, + mime_types: lifted2081, + min_bytes: lifted2082, + max_bytes: lifted2083, }) } 26 => { - let lifted1457 : Array[String]? = match + let lifted2087 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1455 : Array[String] = [] - for index1456 = 0 - index1456 < mbt_ffi_load32(iter_base + 20) - index1456 = index1456 + 1 { + let array2085 : Array[String] = [] + for index2086 = 0 + index2086 < mbt_ffi_load32(iter_base + 20) + index2086 = index2086 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1456 * 8 + index2086 * 8 - let result1454 = mbt_ffi_ptr2str( + let result2084 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1455.push(result1454) + array2085.push(result2084) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1455) + Option::Some(array2085) } _ => panic() } - let lifted1461 : Array[String]? = match + let lifted2091 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1459 : Array[String] = [] - for index1460 = 0 - index1460 < mbt_ffi_load32(iter_base + 32) - index1460 = index1460 + 1 { + let array2089 : Array[String] = [] + for index2090 = 0 + index2090 < mbt_ffi_load32(iter_base + 32) + index2090 = index2090 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1460 * 8 + index2090 * 8 - let result1458 = mbt_ffi_ptr2str( + let result2088 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1459.push(result1458) + array2089.push(result2088) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1459) + Option::Some(array2089) } _ => panic() } @@ -49436,95 +72940,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1457, - allowed_extensions: lifted1461, + allowed_mime_types: lifted2087, + allowed_extensions: lifted2091, }) } 27 => { - let lifted1465 : Array[String]? = match + let lifted2095 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1463 : Array[String] = [] - for index1464 = 0 - index1464 < mbt_ffi_load32(iter_base + 16) - index1464 = index1464 + 1 { + let array2093 : Array[String] = [] + for index2094 = 0 + index2094 < mbt_ffi_load32(iter_base + 16) + index2094 = index2094 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1464 * 8 + index2094 * 8 - let result1462 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array1463) + Option::Some(array2093) } _ => panic() } - let lifted1469 : Array[String]? = match + let lifted2099 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1467 : Array[String] = [] - for index1468 = 0 - index1468 < mbt_ffi_load32(iter_base + 28) - index1468 = index1468 + 1 { + let array2097 : Array[String] = [] + for index2098 = 0 + index2098 < mbt_ffi_load32(iter_base + 28) + index2098 = index2098 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1468 * 8 + index2098 * 8 - let result1466 = mbt_ffi_ptr2str( + 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 + 24)) - Option::Some(array1467) + Option::Some(array2097) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1465, - allowed_hosts: lifted1469, + allowed_schemes: lifted2095, + allowed_hosts: lifted2099, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1470 = mbt_ffi_ptr2str( + let result2100 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1472 : Array[String] = [] - for index1473 = 0 - index1473 < mbt_ffi_load32(iter_base + 20) - index1473 = index1473 + 1 { + let array2102 : Array[String] = [] + for index2103 = 0 + index2103 < mbt_ffi_load32(iter_base + 20) + index2103 = index2103 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1473 * 8 + index2103 * 8 - let result1471 = mbt_ffi_ptr2str( + let result2101 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1472.push(result1471) + array2102.push(result2101) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted1475 : @types.QuantityValue? = match + let lifted2105 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1474 = mbt_ffi_ptr2str( + let result2104 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -49532,17 +73036,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1474, + unit: result2104, }) } _ => panic() } - let lifted1477 : @types.QuantityValue? = match + let lifted2107 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1476 = mbt_ffi_ptr2str( + let result2106 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -49550,406 +73054,406 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1476, + unit: result2106, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1470, - allowed_suffixes: array1472, - min: lifted1475, - max: lifted1477, + base_unit: result2100, + allowed_suffixes: array2102, + min: lifted2105, + max: lifted2107, }) } 31 => { - let array1501 : Array[@types.UnionBranch] = [] - for index1502 = 0 - index1502 < mbt_ffi_load32(iter_base + 12) - index1502 = index1502 + 1 { + let array2131 : Array[@types.UnionBranch] = [] + for index2132 = 0 + index2132 < mbt_ffi_load32(iter_base + 12) + index2132 = index2132 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1502 * 92 + index2132 * 92 - let result1478 = mbt_ffi_ptr2str( + let result2108 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1487 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted2117 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1479 = mbt_ffi_ptr2str( + let result2109 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1479) + @types.DiscriminatorRule::Prefix(result2109) } 1 => { - let result1480 = mbt_ffi_ptr2str( + let result2110 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1480) + @types.DiscriminatorRule::Suffix(result2110) } 2 => { - let result1481 = mbt_ffi_ptr2str( + let result2111 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1481) + @types.DiscriminatorRule::Contains(result2111) } 3 => { - let result1482 = mbt_ffi_ptr2str( + let result2112 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1482) + @types.DiscriminatorRule::Regex(result2112) } 4 => { - let result1483 = mbt_ffi_ptr2str( + let result2113 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1485 : String? = match + let lifted2115 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1484 = mbt_ffi_ptr2str( + let result2114 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1484) + Option::Some(result2114) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1483, - literal: lifted1485, + field_name: result2113, + literal: lifted2115, }) } 5 => { - let result1486 = mbt_ffi_ptr2str( + let result2116 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1486) + @types.DiscriminatorRule::FieldAbsent(result2116) } _ => panic() } - let lifted1489 : String? = match + let lifted2119 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1488 = mbt_ffi_ptr2str( + let result2118 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1488) + Option::Some(result2118) } _ => panic() } - let array1491 : Array[String] = [] - for index1492 = 0 - index1492 < mbt_ffi_load32(iter_base + 52) - index1492 = index1492 + 1 { + let array2121 : Array[String] = [] + for index2122 = 0 + index2122 < mbt_ffi_load32(iter_base + 52) + index2122 = index2122 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1492 * 8 + index2122 * 8 - let result1490 = mbt_ffi_ptr2str( + let result2120 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1491.push(result1490) + array2121.push(result2120) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1494 : Array[String] = [] - for index1495 = 0 - index1495 < mbt_ffi_load32(iter_base + 60) - index1495 = index1495 + 1 { + let array2124 : Array[String] = [] + for index2125 = 0 + index2125 < mbt_ffi_load32(iter_base + 60) + index2125 = index2125 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1495 * 8 + index2125 * 8 - let result1493 = mbt_ffi_ptr2str( + let result2123 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1494.push(result1493) + array2124.push(result2123) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1497 : String? = match + let lifted2127 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1496 = mbt_ffi_ptr2str( + let result2126 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1496) + Option::Some(result2126) } _ => panic() } - let lifted1500 : @types.Role? = match + let lifted2130 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1499 = match + let lifted2129 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1498 = mbt_ffi_ptr2str( + let result2128 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1498) + @types.Role::Other(result2128) } _ => panic() } - Option::Some(lifted1499) + Option::Some(lifted2129) } _ => panic() } - array1501.push(@types.UnionBranch::{ - tag: result1478, + array2131.push(@types.UnionBranch::{ + tag: result2108, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1487, + discriminator: lifted2117, metadata: @types.MetadataEnvelope::{ - doc: lifted1489, - aliases: array1491, - examples: array1494, - deprecated: lifted1497, - role: lifted1500, + doc: lifted2119, + aliases: array2121, + examples: array2124, + deprecated: lifted2127, + role: lifted2130, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1501, + branches: array2131, }) } 32 => { - let lifted1504 : String? = match + let lifted2134 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1503 = mbt_ffi_ptr2str( + let result2133 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1503) + Option::Some(result2133) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1504, + category: lifted2134, }) } 33 => { - let lifted1506 : String? = match + let lifted2136 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1505 = mbt_ffi_ptr2str( + let result2135 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1505) + Option::Some(result2135) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1506, + resource_name: lifted2136, }) } 34 => { - let lifted1507 : Int? = match + let lifted2137 : 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(lifted1507) + @types.SchemaTypeBody::FutureType(lifted2137) } 35 => { - let lifted1508 : Int? = match + let lifted2138 : 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(lifted1508) + @types.SchemaTypeBody::StreamType(lifted2138) } _ => panic() } - let lifted1511 : String? = match + let lifted2141 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1510 = mbt_ffi_ptr2str( + let result2140 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1510) + Option::Some(result2140) } _ => panic() } - let array1513 : Array[String] = [] - for index1514 = 0 - index1514 < mbt_ffi_load32(iter_base + 104) - index1514 = index1514 + 1 { + let array2143 : Array[String] = [] + for index2144 = 0 + index2144 < mbt_ffi_load32(iter_base + 104) + index2144 = index2144 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1514 * 8 + index2144 * 8 - let result1512 = mbt_ffi_ptr2str( + let result2142 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1513.push(result1512) + array2143.push(result2142) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1516 : Array[String] = [] - for index1517 = 0 - index1517 < mbt_ffi_load32(iter_base + 112) - index1517 = index1517 + 1 { + let array2146 : Array[String] = [] + for index2147 = 0 + index2147 < mbt_ffi_load32(iter_base + 112) + index2147 = index2147 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1517 * 8 + index2147 * 8 - let result1515 = mbt_ffi_ptr2str( + let result2145 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1516.push(result1515) + array2146.push(result2145) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1519 : String? = match + let lifted2149 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1518 = mbt_ffi_ptr2str( + let result2148 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1518) + Option::Some(result2148) } _ => panic() } - let lifted1522 : @types.Role? = match + let lifted2152 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1521 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted2151 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1520 = mbt_ffi_ptr2str( + let result2150 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1520) + @types.Role::Other(result2150) } _ => panic() } - Option::Some(lifted1521) + Option::Some(lifted2151) } _ => panic() } - array1523.push(@types.SchemaTypeNode::{ - body: lifted1509, + array2153.push(@types.SchemaTypeNode::{ + body: lifted2139, metadata: @types.MetadataEnvelope::{ - doc: lifted1511, - aliases: array1513, - examples: array1516, - deprecated: lifted1519, - role: lifted1522, + doc: lifted2141, + aliases: array2143, + examples: array2146, + deprecated: lifted2149, + role: lifted2152, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1528 : Array[@types.SchemaTypeDef] = [] - for index1529 = 0 - index1529 < mbt_ffi_load32(iter_base + 60) - index1529 = index1529 + 1 { + let array2158 : Array[@types.SchemaTypeDef] = [] + for index2159 = 0 + index2159 < mbt_ffi_load32(iter_base + 60) + index2159 = index2159 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1529 * 24 + index2159 * 24 - let result1525 = mbt_ffi_ptr2str( + let result2155 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1527 : String? = match + let lifted2157 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1526 = mbt_ffi_ptr2str( + let result2156 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1526) + Option::Some(result2156) } _ => panic() } - array1528.push(@types.SchemaTypeDef::{ - id: result1525, - name: lifted1527, + array2158.push(@types.SchemaTypeDef::{ + id: result2155, + name: lifted2157, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let array1559 : Array[@types.SchemaValueNode] = [] - for index1560 = 0 - index1560 < mbt_ffi_load32(iter_base + 72) - index1560 = index1560 + 1 { + let array2189 : Array[@types.SchemaValueNode] = [] + for index2190 = 0 + index2190 < mbt_ffi_load32(iter_base + 72) + index2190 = index2190 + 1 { let iter_base = mbt_ffi_load32(iter_base + 68) + - index1560 * 32 + index2190 * 32 - let lifted1558 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2188 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -50001,29 +73505,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1530 = mbt_ffi_ptr2str( + let result2160 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1530) + @types.SchemaValueNode::StringValue(result2160) } 13 => { - let array1531 : Array[Int] = [] - for index1532 = 0 - index1532 < mbt_ffi_load32(iter_base + 12) - index1532 = index1532 + 1 { + let array2161 : Array[Int] = [] + for index2162 = 0 + index2162 < mbt_ffi_load32(iter_base + 12) + index2162 = index2162 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1532 * 4 + index2162 * 4 - array1531.push(mbt_ffi_load32(iter_base + 0)) + array2161.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1531) + @types.SchemaValueNode::RecordValue(array2161) } 14 => { - let lifted1533 : Int? = match + let lifted2163 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -50032,7 +73536,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1533, + payload: lifted2163, }) } 15 => @@ -50040,180 +73544,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1534 : Array[Bool] = [] - for index1535 = 0 - index1535 < mbt_ffi_load32(iter_base + 12) - index1535 = index1535 + 1 { + let array2164 : Array[Bool] = [] + for index2165 = 0 + index2165 < mbt_ffi_load32(iter_base + 12) + index2165 = index2165 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1535 * 1 + index2165 * 1 - array1534.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array2164.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1534) + @types.SchemaValueNode::FlagsValue(array2164) } 17 => { - let array1536 : Array[Int] = [] - for index1537 = 0 - index1537 < mbt_ffi_load32(iter_base + 12) - index1537 = index1537 + 1 { + let array2166 : Array[Int] = [] + for index2167 = 0 + index2167 < mbt_ffi_load32(iter_base + 12) + index2167 = index2167 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1537 * 4 + index2167 * 4 - array1536.push(mbt_ffi_load32(iter_base + 0)) + array2166.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1536) + @types.SchemaValueNode::TupleValue(array2166) } 18 => { - let array1538 : Array[Int] = [] - for index1539 = 0 - index1539 < mbt_ffi_load32(iter_base + 12) - index1539 = index1539 + 1 { + let array2168 : Array[Int] = [] + for index2169 = 0 + index2169 < mbt_ffi_load32(iter_base + 12) + index2169 = index2169 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1539 * 4 + index2169 * 4 - array1538.push(mbt_ffi_load32(iter_base + 0)) + array2168.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1538) + @types.SchemaValueNode::ListValue(array2168) } 19 => { - let array1540 : Array[Int] = [] - for index1541 = 0 - index1541 < mbt_ffi_load32(iter_base + 12) - index1541 = index1541 + 1 { + let array2170 : Array[Int] = [] + for index2171 = 0 + index2171 < mbt_ffi_load32(iter_base + 12) + index2171 = index2171 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1541 * 4 + index2171 * 4 - array1540.push(mbt_ffi_load32(iter_base + 0)) + array2170.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array1540) + @types.SchemaValueNode::FixedListValue(array2170) } 20 => { - let array1542 : Array[@types.MapEntry] = [] - for index1543 = 0 - index1543 < mbt_ffi_load32(iter_base + 12) - index1543 = index1543 + 1 { + let array2172 : Array[@types.MapEntry] = [] + for index2173 = 0 + index2173 < mbt_ffi_load32(iter_base + 12) + index2173 = index2173 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1543 * 8 + index2173 * 8 - array1542.push(@types.MapEntry::{ + array2172.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(array1542) + @types.SchemaValueNode::MapValue(array2172) } 21 => { - let lifted1544 : Int? = match + let lifted2174 : 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(lifted1544) + @types.SchemaValueNode::OptionValue(lifted2174) } 22 => { - let lifted1547 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2177 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1545 : Int? = match + let lifted2175 : 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(lifted1545) + @types.ResultValuePayload::OkValue(lifted2175) } 1 => { - let lifted1546 : Int? = match + let lifted2176 : 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(lifted1546) + @types.ResultValuePayload::ErrValue(lifted2176) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1547) + @types.SchemaValueNode::ResultValue(lifted2177) } 23 => { - let result1548 = mbt_ffi_ptr2str( + let result2178 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1550 : String? = match + let lifted2180 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1549 = mbt_ffi_ptr2str( + let result2179 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1549) + Option::Some(result2179) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1548, - language: lifted1550, + text: result2178, + language: lifted2180, }) } 24 => { - let result1551 = mbt_ffi_ptr2bytes( + let result2181 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1553 : String? = match + let lifted2183 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1552 = mbt_ffi_ptr2str( + let result2182 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1552) + Option::Some(result2182) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1551, - mime_type: lifted1553, + bytes: result2181, + mime_type: lifted2183, }) } 25 => { - let result1554 = mbt_ffi_ptr2str( + let result2184 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1554) + @types.SchemaValueNode::PathValue(result2184) } 26 => { - let result1555 = mbt_ffi_ptr2str( + let result2185 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1555) + @types.SchemaValueNode::UrlValue(result2185) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -50225,7 +73729,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1556 = mbt_ffi_ptr2str( + let result2186 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -50233,17 +73737,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1556, + unit: result2186, }) } 30 => { - let result1557 = mbt_ffi_ptr2str( + let result2187 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1557, + tag: result2187, body: mbt_ffi_load32(iter_base + 16), }) } @@ -50260,65 +73764,65 @@ pub fn SearchOplog::get_next( _ => panic() } - array1559.push(lifted1558) + array2189.push(lifted2188) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) - let result1561 = mbt_ffi_ptr2str( + let result2191 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 80), mbt_ffi_load32(iter_base + 84), ) - let array1563 : Array[String] = [] - for index1564 = 0 - index1564 < mbt_ffi_load32(iter_base + 92) - index1564 = index1564 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 88) + index1564 * 8 + let array2193 : Array[String] = [] + for index2194 = 0 + index2194 < mbt_ffi_load32(iter_base + 92) + index2194 = index2194 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 88) + index2194 * 8 - let result1562 = mbt_ffi_ptr2str( + let result2192 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1563.push(result1562) + array2193.push(result2192) } mbt_ffi_free(mbt_ffi_load32(iter_base + 88)) - let array1578 : Array[Array[SpanData]] = [] - for index1579 = 0 - index1579 < mbt_ffi_load32(iter_base + 100) - index1579 = index1579 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 96) + index1579 * 8 + let array2208 : Array[Array[SpanData]] = [] + for index2209 = 0 + index2209 < mbt_ffi_load32(iter_base + 100) + index2209 = index2209 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 96) + index2209 * 8 - let array1576 : Array[SpanData] = [] - for index1577 = 0 - index1577 < mbt_ffi_load32(iter_base + 4) - index1577 = index1577 + 1 { + let array2206 : Array[SpanData] = [] + for index2207 = 0 + index2207 < mbt_ffi_load32(iter_base + 4) + index2207 = index2207 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index1577 * 80 + index2207 * 80 - let lifted1575 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2205 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1565 = mbt_ffi_ptr2str( + let result2195 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1567 : String? = match + let lifted2197 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1566 = mbt_ffi_ptr2str( + let result2196 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1566) + Option::Some(result2196) } _ => panic() } - let lifted1568 : UInt64? = match + let lifted2198 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -50328,411 +73832,1221 @@ pub fn SearchOplog::get_next( _ => panic() } - let array1572 : Array[@context.Attribute] = [] - for index1573 = 0 - index1573 < mbt_ffi_load32(iter_base + 68) - index1573 = index1573 + 1 { + let array2202 : Array[@context.Attribute] = [] + for index2203 = 0 + index2203 < mbt_ffi_load32(iter_base + 68) + index2203 = index2203 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index1573 * 20 + index2203 * 20 - let result1569 = mbt_ffi_ptr2str( + let result2199 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1571 = match + let lifted2201 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1570 = mbt_ffi_ptr2str( + let result2200 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1570) + @context.AttributeValue::String(result2200) } _ => panic() } - array1572.push(@context.Attribute::{ - key: result1569, - value: lifted1571, + array2202.push(@context.Attribute::{ + key: result2199, + value: lifted2201, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result1565, + span_id: result2195, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted1567, - linked_context: lifted1568, - attributes: array1572, + parent: lifted2197, + linked_context: lifted2198, + attributes: array2202, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result1574 = mbt_ffi_ptr2str( + let result2204 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result1574, + span_id: result2204, }) } _ => panic() } - array1576.push(lifted1575) + array2206.push(lifted2205) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array1578.push(array1576) + array2208.push(array2206) } mbt_ffi_free(mbt_ffi_load32(iter_base + 96)) AgentInvocation::AgentInitialization(AgentInitializationParameters::{ - idempotency_key: result1396, + idempotency_key: result1956, constructor_parameters: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1523, - defs: array1528, + type_nodes: array2153, + defs: array2158, root: mbt_ffi_load32(iter_base + 64), }, value: @types.SchemaValueTree::{ - value_nodes: array1559, + value_nodes: array2189, root: mbt_ffi_load32(iter_base + 76), }, }, - trace_id: result1561, - trace_states: array1563, - invocation_context: array1578, + trace_id: result2191, + trace_states: array2193, + invocation_context: array2208, }) } 1 => { - let result1580 = mbt_ffi_ptr2str( + let result2210 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let result1581 = mbt_ffi_ptr2str( + let result2211 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - let array1708 : Array[@types.SchemaTypeNode] = [] - for index1709 = 0 - index1709 < mbt_ffi_load32(iter_base + 60) - index1709 = index1709 + 1 { + let array2408 : Array[@types.SchemaTypeNode] = [] + for index2409 = 0 + index2409 < mbt_ffi_load32(iter_base + 60) + index2409 = index2409 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1709 * 144 + index2409 * 144 - let lifted1694 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2394 = 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 + 2 => { + let lifted2218 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2213 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2212 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2212) + } + _ => panic() + } + + let lifted2215 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2214 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2214) + } + _ => panic() + } + + let lifted2217 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2216 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2216) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2213, + max: lifted2215, + unit: lifted2217, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted2218) + } + 3 => { + let lifted2225 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2220 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2219 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2219) + } + _ => panic() + } + + let lifted2222 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2221 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2221) + } + _ => panic() + } + + let lifted2224 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2223 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2223) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2220, + max: lifted2222, + unit: lifted2224, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted2225) + } + 4 => { + let lifted2232 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2227 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2226 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2226) + } + _ => panic() + } + + let lifted2229 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2228 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2228) + } + _ => panic() + } + + let lifted2231 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2230 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2230) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2227, + max: lifted2229, + unit: lifted2231, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2232) + } + 5 => { + let lifted2239 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2234 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2233 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2233) + } + _ => panic() + } + + let lifted2236 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2235 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2235) + } + _ => panic() + } + + let lifted2238 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2237 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2237) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2234, + max: lifted2236, + unit: lifted2238, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted2239) + } + 6 => { + let lifted2246 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2241 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2240 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2240) + } + _ => panic() + } + + let lifted2243 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2242 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2242) + } + _ => panic() + } + + let lifted2245 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2244 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2244) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2241, + max: lifted2243, + unit: lifted2245, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted2246) + } + 7 => { + let lifted2253 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2248 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2247 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2247) + } + _ => panic() + } + + let lifted2250 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2249 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2249) + } + _ => panic() + } + + let lifted2252 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2251 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2251) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2248, + max: lifted2250, + unit: lifted2252, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2253) + } + 8 => { + let lifted2260 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2255 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2254 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2254) + } + _ => panic() + } + + let lifted2257 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2256 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2256) + } + _ => panic() + } + + let lifted2259 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2258 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2258) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2255, + max: lifted2257, + unit: lifted2259, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2260) + } + 9 => { + let lifted2267 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2262 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2261 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2261) + } + _ => panic() + } + + let lifted2264 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2263 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2263) + } + _ => panic() + } + + let lifted2266 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2265 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2265) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2262, + max: lifted2264, + unit: lifted2266, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2267) + } + 10 => { + let lifted2274 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2269 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2268 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2268) + } + _ => panic() + } + + let lifted2271 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2270 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2270) + } + _ => panic() + } + + let lifted2273 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2272 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2272) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2269, + max: lifted2271, + unit: lifted2273, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2274) + } + 11 => { + let lifted2281 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted2276 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted2275 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2275) + } + _ => panic() + } + + let lifted2278 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted2277 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted2277) + } + _ => panic() + } + + let lifted2280 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result2279 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result2279) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted2276, + max: lifted2278, + unit: lifted2280, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2281) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array1596 : Array[@types.NamedFieldType] = [] - for index1597 = 0 - index1597 < mbt_ffi_load32(iter_base + 12) - index1597 = index1597 + 1 { + let array2296 : Array[@types.NamedFieldType] = [] + for index2297 = 0 + index2297 < mbt_ffi_load32(iter_base + 12) + index2297 = index2297 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1597 * 68 + index2297 * 68 - let result1582 = mbt_ffi_ptr2str( + let result2282 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1584 : String? = match + let lifted2284 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1583 = mbt_ffi_ptr2str( + let result2283 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1583) + Option::Some(result2283) } _ => panic() } - let array1586 : Array[String] = [] - for index1587 = 0 - index1587 < mbt_ffi_load32(iter_base + 28) - index1587 = index1587 + 1 { + let array2286 : Array[String] = [] + for index2287 = 0 + index2287 < mbt_ffi_load32(iter_base + 28) + index2287 = index2287 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1587 * 8 + index2287 * 8 - let result1585 = mbt_ffi_ptr2str( + let result2285 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1586.push(result1585) + array2286.push(result2285) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array1589 : Array[String] = [] - for index1590 = 0 - index1590 < mbt_ffi_load32(iter_base + 36) - index1590 = index1590 + 1 { + let array2289 : Array[String] = [] + for index2290 = 0 + index2290 < mbt_ffi_load32(iter_base + 36) + index2290 = index2290 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index1590 * 8 + index2290 * 8 - let result1588 = mbt_ffi_ptr2str( + let result2288 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1589.push(result1588) + array2289.push(result2288) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted1592 : String? = match + let lifted2292 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1591 = mbt_ffi_ptr2str( + let result2291 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1591) + Option::Some(result2291) } _ => panic() } - let lifted1595 : @types.Role? = match + let lifted2295 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted1594 = match + let lifted2294 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1593 = mbt_ffi_ptr2str( + let result2293 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result1593) + @types.Role::Other(result2293) } _ => panic() } - Option::Some(lifted1594) + Option::Some(lifted2294) } _ => panic() } - array1596.push(@types.NamedFieldType::{ - name: result1582, + array2296.push(@types.NamedFieldType::{ + name: result2282, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted1584, - aliases: array1586, - examples: array1589, - deprecated: lifted1592, - role: lifted1595, + doc: lifted2284, + aliases: array2286, + examples: array2289, + deprecated: lifted2292, + role: lifted2295, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array1596) + @types.SchemaTypeBody::RecordType(array2296) } 15 => { - let array1613 : Array[@types.VariantCaseType] = [] - for index1614 = 0 - index1614 < mbt_ffi_load32(iter_base + 12) - index1614 = index1614 + 1 { + let array2313 : Array[@types.VariantCaseType] = [] + for index2314 = 0 + index2314 < mbt_ffi_load32(iter_base + 12) + index2314 = index2314 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1614 * 72 + index2314 * 72 - let result1598 = mbt_ffi_ptr2str( + let result2298 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1599 : Int? = match + let lifted2299 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1601 : String? = match + let lifted2301 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1600 = mbt_ffi_ptr2str( + let result2300 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1600) + Option::Some(result2300) } _ => panic() } - let array1603 : Array[String] = [] - for index1604 = 0 - index1604 < mbt_ffi_load32(iter_base + 32) - index1604 = index1604 + 1 { + let array2303 : Array[String] = [] + for index2304 = 0 + index2304 < mbt_ffi_load32(iter_base + 32) + index2304 = index2304 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1604 * 8 + index2304 * 8 - let result1602 = mbt_ffi_ptr2str( + let result2302 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1603.push(result1602) + array2303.push(result2302) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array1606 : Array[String] = [] - for index1607 = 0 - index1607 < mbt_ffi_load32(iter_base + 40) - index1607 = index1607 + 1 { + let array2306 : Array[String] = [] + for index2307 = 0 + index2307 < mbt_ffi_load32(iter_base + 40) + index2307 = index2307 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index1607 * 8 + index2307 * 8 - let result1605 = mbt_ffi_ptr2str( + let result2305 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1606.push(result1605) + array2306.push(result2305) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted1609 : String? = match + let lifted2309 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result1608 = mbt_ffi_ptr2str( + let result2308 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result1608) + Option::Some(result2308) } _ => panic() } - let lifted1612 : @types.Role? = match + let lifted2312 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted1611 = match + let lifted2311 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1610 = mbt_ffi_ptr2str( + let result2310 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result1610) + @types.Role::Other(result2310) } _ => panic() } - Option::Some(lifted1611) + Option::Some(lifted2311) } _ => panic() } - array1613.push(@types.VariantCaseType::{ - name: result1598, - payload: lifted1599, + array2313.push(@types.VariantCaseType::{ + name: result2298, + payload: lifted2299, metadata: @types.MetadataEnvelope::{ - doc: lifted1601, - aliases: array1603, - examples: array1606, - deprecated: lifted1609, - role: lifted1612, + doc: lifted2301, + aliases: array2303, + examples: array2306, + deprecated: lifted2309, + role: lifted2312, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array1613) + @types.SchemaTypeBody::VariantType(array2313) } 16 => { - let array1616 : Array[String] = [] - for index1617 = 0 - index1617 < mbt_ffi_load32(iter_base + 12) - index1617 = index1617 + 1 { + let array2316 : Array[String] = [] + for index2317 = 0 + index2317 < mbt_ffi_load32(iter_base + 12) + index2317 = index2317 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1617 * 8 + index2317 * 8 - let result1615 = mbt_ffi_ptr2str( + let result2315 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1616.push(result1615) + array2316.push(result2315) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array1616) + @types.SchemaTypeBody::EnumType(array2316) } 17 => { - let array1619 : Array[String] = [] - for index1620 = 0 - index1620 < mbt_ffi_load32(iter_base + 12) - index1620 = index1620 + 1 { + let array2319 : Array[String] = [] + for index2320 = 0 + index2320 < mbt_ffi_load32(iter_base + 12) + index2320 = index2320 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1620 * 8 + index2320 * 8 - let result1618 = mbt_ffi_ptr2str( + let result2318 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1619.push(result1618) + array2319.push(result2318) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array1619) + @types.SchemaTypeBody::FlagsType(array2319) } 18 => { - let array1621 : Array[Int] = [] - for index1622 = 0 - index1622 < mbt_ffi_load32(iter_base + 12) - index1622 = index1622 + 1 { + let array2321 : Array[Int] = [] + for index2322 = 0 + index2322 < mbt_ffi_load32(iter_base + 12) + index2322 = index2322 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1622 * 4 + index2322 * 4 - array1621.push(mbt_ffi_load32(iter_base + 0)) + array2321.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array1621) + @types.SchemaTypeBody::TupleType(array2321) } 19 => @types.SchemaTypeBody::ListType( @@ -50753,14 +75067,14 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted1623 : Int? = match + let lifted2323 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted1624 : Int? = match + let lifted2324 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -50768,37 +75082,37 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted1623, - err: lifted1624, + ok: lifted2323, + err: lifted2324, }) } 24 => { - let lifted1628 : Array[String]? = match + let lifted2328 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1626 : Array[String] = [] - for index1627 = 0 - index1627 < mbt_ffi_load32(iter_base + 16) - index1627 = index1627 + 1 { + let array2326 : Array[String] = [] + for index2327 = 0 + index2327 < mbt_ffi_load32(iter_base + 16) + index2327 = index2327 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1627 * 8 + index2327 * 8 - let result1625 = mbt_ffi_ptr2str( + let result2325 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1626.push(result1625) + array2326.push(result2325) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1626) + Option::Some(array2326) } _ => panic() } - let lifted1629 : UInt? = match + let lifted2329 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -50808,7 +75122,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1630 : UInt? = match + let lifted2330 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -50818,54 +75132,54 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1632 : String? = match + let lifted2332 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1631 = mbt_ffi_ptr2str( + let result2331 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1631) + Option::Some(result2331) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted1628, - min_length: lifted1629, - max_length: lifted1630, - regex: lifted1632, + languages: lifted2328, + min_length: lifted2329, + max_length: lifted2330, + regex: lifted2332, }) } 25 => { - let lifted1636 : Array[String]? = match + let lifted2336 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1634 : Array[String] = [] - for index1635 = 0 - index1635 < mbt_ffi_load32(iter_base + 16) - index1635 = index1635 + 1 { + let array2334 : Array[String] = [] + for index2335 = 0 + index2335 < mbt_ffi_load32(iter_base + 16) + index2335 = index2335 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1635 * 8 + index2335 * 8 - let result1633 = mbt_ffi_ptr2str( + let result2333 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1634.push(result1633) + array2334.push(result2333) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1634) + Option::Some(array2334) } _ => panic() } - let lifted1637 : UInt? = match + let lifted2337 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -50875,7 +75189,7 @@ pub fn SearchOplog::get_next( _ => panic() } - let lifted1638 : UInt? = match + let lifted2338 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -50886,58 +75200,58 @@ pub fn SearchOplog::get_next( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted1636, - min_bytes: lifted1637, - max_bytes: lifted1638, + mime_types: lifted2336, + min_bytes: lifted2337, + max_bytes: lifted2338, }) } 26 => { - let lifted1642 : Array[String]? = match + let lifted2342 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array1640 : Array[String] = [] - for index1641 = 0 - index1641 < mbt_ffi_load32(iter_base + 20) - index1641 = index1641 + 1 { + let array2340 : Array[String] = [] + for index2341 = 0 + index2341 < mbt_ffi_load32(iter_base + 20) + index2341 = index2341 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1641 * 8 + index2341 * 8 - let result1639 = mbt_ffi_ptr2str( + let result2339 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1640.push(result1639) + array2340.push(result2339) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array1640) + Option::Some(array2340) } _ => panic() } - let lifted1646 : Array[String]? = match + let lifted2346 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array1644 : Array[String] = [] - for index1645 = 0 - index1645 < mbt_ffi_load32(iter_base + 32) - index1645 = index1645 + 1 { + let array2344 : Array[String] = [] + for index2345 = 0 + index2345 < mbt_ffi_load32(iter_base + 32) + index2345 = index2345 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index1645 * 8 + index2345 * 8 - let result1643 = mbt_ffi_ptr2str( + let result2343 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1644.push(result1643) + array2344.push(result2343) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array1644) + Option::Some(array2344) } _ => panic() } @@ -50949,95 +75263,95 @@ pub fn SearchOplog::get_next( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted1642, - allowed_extensions: lifted1646, + allowed_mime_types: lifted2342, + allowed_extensions: lifted2346, }) } 27 => { - let lifted1650 : Array[String]? = match + let lifted2350 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array1648 : Array[String] = [] - for index1649 = 0 - index1649 < mbt_ffi_load32(iter_base + 16) - index1649 = index1649 + 1 { + let array2348 : Array[String] = [] + for index2349 = 0 + index2349 < mbt_ffi_load32(iter_base + 16) + index2349 = index2349 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index1649 * 8 + index2349 * 8 - let result1647 = mbt_ffi_ptr2str( + let result2347 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1648.push(result1647) + array2348.push(result2347) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array1648) + Option::Some(array2348) } _ => panic() } - let lifted1654 : Array[String]? = match + let lifted2354 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array1652 : Array[String] = [] - for index1653 = 0 - index1653 < mbt_ffi_load32(iter_base + 28) - index1653 = index1653 + 1 { + let array2352 : Array[String] = [] + for index2353 = 0 + index2353 < mbt_ffi_load32(iter_base + 28) + index2353 = index2353 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index1653 * 8 + index2353 * 8 - let result1651 = mbt_ffi_ptr2str( + let result2351 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1652.push(result1651) + array2352.push(result2351) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array1652) + Option::Some(array2352) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted1650, - allowed_hosts: lifted1654, + allowed_schemes: lifted2350, + allowed_hosts: lifted2354, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result1655 = mbt_ffi_ptr2str( + let result2355 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1657 : Array[String] = [] - for index1658 = 0 - index1658 < mbt_ffi_load32(iter_base + 20) - index1658 = index1658 + 1 { + let array2357 : Array[String] = [] + for index2358 = 0 + index2358 < mbt_ffi_load32(iter_base + 20) + index2358 = index2358 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1658 * 8 + index2358 * 8 - let result1656 = mbt_ffi_ptr2str( + 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 + 16)) - let lifted1660 : @types.QuantityValue? = match + let lifted2360 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1659 = mbt_ffi_ptr2str( + let result2359 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -51045,17 +75359,17 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result1659, + unit: result2359, }) } _ => panic() } - let lifted1662 : @types.QuantityValue? = match + let lifted2362 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result1661 = mbt_ffi_ptr2str( + let result2361 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -51063,406 +75377,406 @@ pub fn SearchOplog::get_next( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result1661, + unit: result2361, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result1655, - allowed_suffixes: array1657, - min: lifted1660, - max: lifted1662, + base_unit: result2355, + allowed_suffixes: array2357, + min: lifted2360, + max: lifted2362, }) } 31 => { - let array1686 : Array[@types.UnionBranch] = [] - for index1687 = 0 - index1687 < mbt_ffi_load32(iter_base + 12) - index1687 = index1687 + 1 { + let array2386 : Array[@types.UnionBranch] = [] + for index2387 = 0 + index2387 < mbt_ffi_load32(iter_base + 12) + index2387 = index2387 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1687 * 92 + index2387 * 92 - let result1663 = mbt_ffi_ptr2str( + let result2363 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1672 = match mbt_ffi_load8_u(iter_base + 12) { + let lifted2372 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result1664 = mbt_ffi_ptr2str( + let result2364 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result1664) + @types.DiscriminatorRule::Prefix(result2364) } 1 => { - let result1665 = mbt_ffi_ptr2str( + let result2365 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result1665) + @types.DiscriminatorRule::Suffix(result2365) } 2 => { - let result1666 = mbt_ffi_ptr2str( + let result2366 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result1666) + @types.DiscriminatorRule::Contains(result2366) } 3 => { - let result1667 = mbt_ffi_ptr2str( + let result2367 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result1667) + @types.DiscriminatorRule::Regex(result2367) } 4 => { - let result1668 = mbt_ffi_ptr2str( + let result2368 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted1670 : String? = match + let lifted2370 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result1669 = mbt_ffi_ptr2str( + let result2369 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result1669) + Option::Some(result2369) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result1668, - literal: lifted1670, + field_name: result2368, + literal: lifted2370, }) } 5 => { - let result1671 = mbt_ffi_ptr2str( + let result2371 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result1671) + @types.DiscriminatorRule::FieldAbsent(result2371) } _ => panic() } - let lifted1674 : String? = match + let lifted2374 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result1673 = mbt_ffi_ptr2str( + let result2373 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result1673) + Option::Some(result2373) } _ => panic() } - let array1676 : Array[String] = [] - for index1677 = 0 - index1677 < mbt_ffi_load32(iter_base + 52) - index1677 = index1677 + 1 { + let array2376 : Array[String] = [] + for index2377 = 0 + index2377 < mbt_ffi_load32(iter_base + 52) + index2377 = index2377 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index1677 * 8 + index2377 * 8 - let result1675 = mbt_ffi_ptr2str( + let result2375 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1676.push(result1675) + array2376.push(result2375) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array1679 : Array[String] = [] - for index1680 = 0 - index1680 < mbt_ffi_load32(iter_base + 60) - index1680 = index1680 + 1 { + let array2379 : Array[String] = [] + for index2380 = 0 + index2380 < mbt_ffi_load32(iter_base + 60) + index2380 = index2380 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index1680 * 8 + index2380 * 8 - let result1678 = mbt_ffi_ptr2str( + let result2378 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1679.push(result1678) + array2379.push(result2378) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted1682 : String? = match + let lifted2382 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result1681 = mbt_ffi_ptr2str( + let result2381 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result1681) + Option::Some(result2381) } _ => panic() } - let lifted1685 : @types.Role? = match + let lifted2385 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted1684 = match + let lifted2384 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1683 = mbt_ffi_ptr2str( + let result2383 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result1683) + @types.Role::Other(result2383) } _ => panic() } - Option::Some(lifted1684) + Option::Some(lifted2384) } _ => panic() } - array1686.push(@types.UnionBranch::{ - tag: result1663, + array2386.push(@types.UnionBranch::{ + tag: result2363, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted1672, + discriminator: lifted2372, metadata: @types.MetadataEnvelope::{ - doc: lifted1674, - aliases: array1676, - examples: array1679, - deprecated: lifted1682, - role: lifted1685, + doc: lifted2374, + aliases: array2376, + examples: array2379, + deprecated: lifted2382, + role: lifted2385, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array1686, + branches: array2386, }) } 32 => { - let lifted1689 : String? = match + let lifted2389 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result1688 = mbt_ffi_ptr2str( + let result2388 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1688) + Option::Some(result2388) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted1689, + category: lifted2389, }) } 33 => { - let lifted1691 : String? = match + let lifted2391 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1690 = mbt_ffi_ptr2str( + let result2390 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1690) + Option::Some(result2390) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted1691, + resource_name: lifted2391, }) } 34 => { - let lifted1692 : Int? = match + let lifted2392 : 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(lifted1692) + @types.SchemaTypeBody::FutureType(lifted2392) } 35 => { - let lifted1693 : Int? = match + let lifted2393 : 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(lifted1693) + @types.SchemaTypeBody::StreamType(lifted2393) } _ => panic() } - let lifted1696 : String? = match + let lifted2396 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result1695 = mbt_ffi_ptr2str( + let result2395 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result1695) + Option::Some(result2395) } _ => panic() } - let array1698 : Array[String] = [] - for index1699 = 0 - index1699 < mbt_ffi_load32(iter_base + 104) - index1699 = index1699 + 1 { + let array2398 : Array[String] = [] + for index2399 = 0 + index2399 < mbt_ffi_load32(iter_base + 104) + index2399 = index2399 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index1699 * 8 + index2399 * 8 - let result1697 = mbt_ffi_ptr2str( + let result2397 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1698.push(result1697) + array2398.push(result2397) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array1701 : Array[String] = [] - for index1702 = 0 - index1702 < mbt_ffi_load32(iter_base + 112) - index1702 = index1702 + 1 { + let array2401 : Array[String] = [] + for index2402 = 0 + index2402 < mbt_ffi_load32(iter_base + 112) + index2402 = index2402 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index1702 * 8 + index2402 * 8 - let result1700 = mbt_ffi_ptr2str( + let result2400 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1701.push(result1700) + array2401.push(result2400) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted1704 : String? = match + let lifted2404 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result1703 = mbt_ffi_ptr2str( + let result2403 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result1703) + Option::Some(result2403) } _ => panic() } - let lifted1707 : @types.Role? = match + let lifted2407 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted1706 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted2406 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result1705 = mbt_ffi_ptr2str( + let result2405 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result1705) + @types.Role::Other(result2405) } _ => panic() } - Option::Some(lifted1706) + Option::Some(lifted2406) } _ => panic() } - array1708.push(@types.SchemaTypeNode::{ - body: lifted1694, + array2408.push(@types.SchemaTypeNode::{ + body: lifted2394, metadata: @types.MetadataEnvelope::{ - doc: lifted1696, - aliases: array1698, - examples: array1701, - deprecated: lifted1704, - role: lifted1707, + doc: lifted2396, + aliases: array2398, + examples: array2401, + deprecated: lifted2404, + role: lifted2407, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let array1713 : Array[@types.SchemaTypeDef] = [] - for index1714 = 0 - index1714 < mbt_ffi_load32(iter_base + 68) - index1714 = index1714 + 1 { + let array2413 : Array[@types.SchemaTypeDef] = [] + for index2414 = 0 + index2414 < mbt_ffi_load32(iter_base + 68) + index2414 = index2414 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index1714 * 24 + index2414 * 24 - let result1710 = mbt_ffi_ptr2str( + let result2410 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1712 : String? = match + let lifted2412 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result1711 = mbt_ffi_ptr2str( + let result2411 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result1711) + Option::Some(result2411) } _ => panic() } - array1713.push(@types.SchemaTypeDef::{ - id: result1710, - name: lifted1712, + array2413.push(@types.SchemaTypeDef::{ + id: result2410, + name: lifted2412, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) - let array1744 : Array[@types.SchemaValueNode] = [] - for index1745 = 0 - index1745 < mbt_ffi_load32(iter_base + 80) - index1745 = index1745 + 1 { + let array2444 : Array[@types.SchemaValueNode] = [] + for index2445 = 0 + index2445 < mbt_ffi_load32(iter_base + 80) + index2445 = index2445 + 1 { let iter_base = mbt_ffi_load32(iter_base + 76) + - index1745 * 32 + index2445 * 32 - let lifted1743 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2443 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -51514,29 +75828,29 @@ pub fn SearchOplog::get_next( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result1715 = mbt_ffi_ptr2str( + let result2415 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result1715) + @types.SchemaValueNode::StringValue(result2415) } 13 => { - let array1716 : Array[Int] = [] - for index1717 = 0 - index1717 < mbt_ffi_load32(iter_base + 12) - index1717 = index1717 + 1 { + let array2416 : Array[Int] = [] + for index2417 = 0 + index2417 < mbt_ffi_load32(iter_base + 12) + index2417 = index2417 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1717 * 4 + index2417 * 4 - array1716.push(mbt_ffi_load32(iter_base + 0)) + array2416.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array1716) + @types.SchemaValueNode::RecordValue(array2416) } 14 => { - let lifted1718 : Int? = match + let lifted2418 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -51545,7 +75859,7 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted1718, + payload: lifted2418, }) } 15 => @@ -51553,180 +75867,180 @@ pub fn SearchOplog::get_next( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array1719 : Array[Bool] = [] - for index1720 = 0 - index1720 < mbt_ffi_load32(iter_base + 12) - index1720 = index1720 + 1 { + let array2419 : Array[Bool] = [] + for index2420 = 0 + index2420 < mbt_ffi_load32(iter_base + 12) + index2420 = index2420 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1720 * 1 + index2420 * 1 - array1719.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array2419.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array1719) + @types.SchemaValueNode::FlagsValue(array2419) } 17 => { - let array1721 : Array[Int] = [] - for index1722 = 0 - index1722 < mbt_ffi_load32(iter_base + 12) - index1722 = index1722 + 1 { + let array2421 : Array[Int] = [] + for index2422 = 0 + index2422 < mbt_ffi_load32(iter_base + 12) + index2422 = index2422 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1722 * 4 + index2422 * 4 - array1721.push(mbt_ffi_load32(iter_base + 0)) + array2421.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array1721) + @types.SchemaValueNode::TupleValue(array2421) } 18 => { - let array1723 : Array[Int] = [] - for index1724 = 0 - index1724 < mbt_ffi_load32(iter_base + 12) - index1724 = index1724 + 1 { + let array2423 : Array[Int] = [] + for index2424 = 0 + index2424 < mbt_ffi_load32(iter_base + 12) + index2424 = index2424 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1724 * 4 + index2424 * 4 - array1723.push(mbt_ffi_load32(iter_base + 0)) + array2423.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array1723) + @types.SchemaValueNode::ListValue(array2423) } 19 => { - let array1725 : Array[Int] = [] - for index1726 = 0 - index1726 < mbt_ffi_load32(iter_base + 12) - index1726 = index1726 + 1 { + 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) + - index1726 * 4 + 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::FixedListValue(array1725) + @types.SchemaValueNode::FixedListValue(array2425) } 20 => { - let array1727 : Array[@types.MapEntry] = [] - for index1728 = 0 - index1728 < mbt_ffi_load32(iter_base + 12) - index1728 = index1728 + 1 { + let array2427 : Array[@types.MapEntry] = [] + for index2428 = 0 + index2428 < mbt_ffi_load32(iter_base + 12) + index2428 = index2428 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1728 * 8 + index2428 * 8 - array1727.push(@types.MapEntry::{ + array2427.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(array1727) + @types.SchemaValueNode::MapValue(array2427) } 21 => { - let lifted1729 : Int? = match + let lifted2429 : 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(lifted1729) + @types.SchemaValueNode::OptionValue(lifted2429) } 22 => { - let lifted1732 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2432 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted1730 : Int? = match + let lifted2430 : 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(lifted1730) + @types.ResultValuePayload::OkValue(lifted2430) } 1 => { - let lifted1731 : Int? = match + let lifted2431 : 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(lifted1731) + @types.ResultValuePayload::ErrValue(lifted2431) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1732) + @types.SchemaValueNode::ResultValue(lifted2432) } 23 => { - let result1733 = mbt_ffi_ptr2str( + let result2433 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1735 : String? = match + let lifted2435 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1734 = mbt_ffi_ptr2str( + let result2434 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1734) + Option::Some(result2434) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result1733, - language: lifted1735, + text: result2433, + language: lifted2435, }) } 24 => { - let result1736 = mbt_ffi_ptr2bytes( + let result2436 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1738 : String? = match + let lifted2438 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result1737 = mbt_ffi_ptr2str( + let result2437 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result1737) + Option::Some(result2437) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result1736, - mime_type: lifted1738, + bytes: result2436, + mime_type: lifted2438, }) } 25 => { - let result1739 = mbt_ffi_ptr2str( + let result2439 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result1739) + @types.SchemaValueNode::PathValue(result2439) } 26 => { - let result1740 = mbt_ffi_ptr2str( + let result2440 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result1740) + @types.SchemaValueNode::UrlValue(result2440) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -51738,7 +76052,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result1741 = mbt_ffi_ptr2str( + let result2441 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -51746,17 +76060,17 @@ pub fn SearchOplog::get_next( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result1741, + unit: result2441, }) } 30 => { - let result1742 = mbt_ffi_ptr2str( + let result2442 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result1742, + tag: result2442, body: mbt_ffi_load32(iter_base + 16), }) } @@ -51773,66 +76087,66 @@ pub fn SearchOplog::get_next( _ => panic() } - array1744.push(lifted1743) + array2444.push(lifted2443) } mbt_ffi_free(mbt_ffi_load32(iter_base + 76)) - let result1746 = mbt_ffi_ptr2str( + let result2446 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 88), mbt_ffi_load32(iter_base + 92), ) - let array1748 : Array[String] = [] - for index1749 = 0 - index1749 < mbt_ffi_load32(iter_base + 100) - index1749 = index1749 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 96) + index1749 * 8 + let array2448 : Array[String] = [] + for index2449 = 0 + index2449 < mbt_ffi_load32(iter_base + 100) + index2449 = index2449 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 96) + index2449 * 8 - let result1747 = mbt_ffi_ptr2str( + let result2447 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array1748.push(result1747) + array2448.push(result2447) } mbt_ffi_free(mbt_ffi_load32(iter_base + 96)) - let array1763 : Array[Array[SpanData]] = [] - for index1764 = 0 - index1764 < mbt_ffi_load32(iter_base + 108) - index1764 = index1764 + 1 { + let array2463 : Array[Array[SpanData]] = [] + for index2464 = 0 + index2464 < mbt_ffi_load32(iter_base + 108) + index2464 = index2464 + 1 { let iter_base = mbt_ffi_load32(iter_base + 104) + - index1764 * 8 + index2464 * 8 - let array1761 : Array[SpanData] = [] - for index1762 = 0 - index1762 < mbt_ffi_load32(iter_base + 4) - index1762 = index1762 + 1 { + let array2461 : Array[SpanData] = [] + for index2462 = 0 + index2462 < mbt_ffi_load32(iter_base + 4) + index2462 = index2462 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index1762 * 80 + index2462 * 80 - let lifted1760 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2460 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1750 = mbt_ffi_ptr2str( + let result2450 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1752 : String? = match + let lifted2452 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result1751 = mbt_ffi_ptr2str( + let result2451 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result1751) + Option::Some(result2451) } _ => panic() } - let lifted1753 : UInt64? = match + let lifted2453 : UInt64? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => @@ -51842,117 +76156,117 @@ pub fn SearchOplog::get_next( _ => panic() } - let array1757 : Array[@context.Attribute] = [] - for index1758 = 0 - index1758 < mbt_ffi_load32(iter_base + 68) - index1758 = index1758 + 1 { + let array2457 : Array[@context.Attribute] = [] + for index2458 = 0 + index2458 < mbt_ffi_load32(iter_base + 68) + index2458 = index2458 + 1 { let iter_base = mbt_ffi_load32(iter_base + 64) + - index1758 * 20 + index2458 * 20 - let result1754 = mbt_ffi_ptr2str( + let result2454 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1756 = match + let lifted2456 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1755 = mbt_ffi_ptr2str( + let result2455 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1755) + @context.AttributeValue::String(result2455) } _ => panic() } - array1757.push(@context.Attribute::{ - key: result1754, - value: lifted1756, + array2457.push(@context.Attribute::{ + key: result2454, + value: lifted2456, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) SpanData::LocalSpan(LocalSpanData::{ - span_id: result1750, + span_id: result2450, start: @wallClock.Datetime::{ seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - parent: lifted1752, - linked_context: lifted1753, - attributes: array1757, + parent: lifted2452, + linked_context: lifted2453, + attributes: array2457, inherited: mbt_ffi_load8_u(iter_base + 72) != 0, }) } 1 => { - let result1759 = mbt_ffi_ptr2str( + let result2459 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) SpanData::ExternalSpan(ExternalSpanData::{ - span_id: result1759, + span_id: result2459, }) } _ => panic() } - array1761.push(lifted1760) + array2461.push(lifted2460) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array1763.push(array1761) + array2463.push(array2461) } mbt_ffi_free(mbt_ffi_load32(iter_base + 104)) AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{ - idempotency_key: result1580, - method_name: result1581, + idempotency_key: result2210, + method_name: result2211, function_input: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array1708, - defs: array1713, + type_nodes: array2408, + defs: array2413, root: mbt_ffi_load32(iter_base + 72), }, value: @types.SchemaValueTree::{ - value_nodes: array1744, + value_nodes: array2444, root: mbt_ffi_load32(iter_base + 84), }, }, - trace_id: result1746, - trace_states: array1748, - invocation_context: array1763, + trace_id: result2446, + trace_states: array2448, + invocation_context: array2463, }) } 2 => AgentInvocation::SaveSnapshot 3 => { - let result1765 = mbt_ffi_ptr2bytes( + let result2465 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let result1766 = mbt_ffi_ptr2str( + let result2466 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{ snapshot: SnapshotData::{ - data: result1765, - mime_type: result1766, + data: result2465, + mime_type: result2466, }, }) } 4 => { - let result1767 = mbt_ffi_ptr2str( + let result2467 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{ - idempotency_key: result1767, + idempotency_key: result2467, }) } 5 => @@ -51967,26 +76281,26 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - invocation: lifted1768, + invocation: lifted2468, }) } 15 => { - let lifted1771 = match mbt_ffi_load8_u(iter_base + 40) { + let lifted2471 = match mbt_ffi_load8_u(iter_base + 40) { 0 => UpdateDescription::AutoUpdate 1 => { - let result1769 = mbt_ffi_ptr2bytes( + let result2469 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - let result1770 = mbt_ffi_ptr2str( + let result2470 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) UpdateDescription::SnapshotBased(@host.Snapshot::{ - payload: result1769, - mime_type: result1770, + payload: result2469, + mime_type: result2470, }) } _ => panic() @@ -51998,47 +76312,47 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, target_revision: mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), - description: lifted1771, + description: lifted2471, }) } 16 => { - let array1778 : Array[PluginInstallationDescription] = [] - for index1779 = 0 - index1779 < mbt_ffi_load32(iter_base + 52) - index1779 = index1779 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 48) + index1779 * 48 + let array2478 : Array[PluginInstallationDescription] = [] + for index2479 = 0 + index2479 < mbt_ffi_load32(iter_base + 52) + index2479 = index2479 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 48) + index2479 * 48 - let result1772 = mbt_ffi_ptr2str( + let result2472 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - let result1773 = mbt_ffi_ptr2str( + let result2473 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - let array1776 : Array[(String, String)] = [] - for index1777 = 0 - index1777 < mbt_ffi_load32(iter_base + 40) - index1777 = index1777 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + index1777 * 16 + let array2476 : Array[(String, String)] = [] + for index2477 = 0 + index2477 < mbt_ffi_load32(iter_base + 40) + index2477 = index2477 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + index2477 * 16 - let result1774 = mbt_ffi_ptr2str( + let result2474 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result1775 = mbt_ffi_ptr2str( + let result2475 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array1776.push((result1774, result1775)) + array2476.push((result2474, result2475)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - array1778.push(PluginInstallationDescription::{ + array2478.push(PluginInstallationDescription::{ environment_plugin_grant_id: EnvironmentPluginGrantId::{ uuid: @types.Uuid::{ high_bits: mbt_ffi_load64(iter_base + 0).reinterpret_as_uint64(), @@ -52046,9 +76360,9 @@ pub fn SearchOplog::get_next( }, }, plugin_priority: mbt_ffi_load32(iter_base + 16), - plugin_name: result1772, - plugin_version: result1773, - parameters: array1776, + plugin_name: result2472, + plugin_version: result2473, + parameters: array2476, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) @@ -52060,19 +76374,19 @@ pub fn SearchOplog::get_next( }, 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: array1778, + new_active_plugins: array2478, }) } 17 => { - let lifted1781 : String? = match mbt_ffi_load8_u(iter_base + 40) { + let lifted2481 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1780 = mbt_ffi_ptr2str( + let result2480 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1780) + Option::Some(result2480) } _ => panic() } @@ -52083,7 +76397,7 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, target_revision: mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), - details: lifted1781, + details: lifted2481, }) } 18 => @@ -52103,12 +76417,12 @@ pub fn SearchOplog::get_next( delta: mbt_ffi_load64(iter_base + 32), }) 20 => { - let result1782 = mbt_ffi_ptr2str( + let result2482 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let result1783 = mbt_ffi_ptr2str( + let result2483 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) @@ -52119,17 +76433,17 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, id: mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), - name: result1782, - owner: result1783, + name: result2482, + owner: result2483, }) } 21 => { - let result1784 = mbt_ffi_ptr2str( + let result2484 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let result1785 = mbt_ffi_ptr2str( + let result2485 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) @@ -52140,17 +76454,17 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, id: mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), - name: result1784, - owner: result1785, + name: result2484, + owner: result2485, }) } 22 => { - let result1786 = mbt_ffi_ptr2str( + let result2486 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - let result1787 = mbt_ffi_ptr2str( + let result2487 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -52161,8 +76475,8 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, level: LogLevel::from(mbt_ffi_load8_u(iter_base + 32)), - context: result1786, - message: result1787, + context: result2486, + message: result2487, }) } 23 => @@ -52173,33 +76487,33 @@ pub fn SearchOplog::get_next( }, }) 24 => { - let result1788 = mbt_ffi_ptr2str( + let result2488 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - let result1789 = mbt_ffi_ptr2str( + let result2489 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - let array1792 : Array[(String, String)] = [] - for index1793 = 0 - index1793 < mbt_ffi_load32(iter_base + 72) - index1793 = index1793 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 68) + index1793 * 16 + let array2492 : Array[(String, String)] = [] + for index2493 = 0 + index2493 < mbt_ffi_load32(iter_base + 72) + index2493 = index2493 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 68) + index2493 * 16 - let result1790 = mbt_ffi_ptr2str( + let result2490 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result1791 = mbt_ffi_ptr2str( + let result2491 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array1792.push((result1790, result1791)) + array2492.push((result2490, result2491)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) @@ -52216,40 +76530,40 @@ pub fn SearchOplog::get_next( }, }, plugin_priority: mbt_ffi_load32(iter_base + 48), - plugin_name: result1788, - plugin_version: result1789, - parameters: array1792, + plugin_name: result2488, + plugin_version: result2489, + parameters: array2492, }, }) } 25 => { - let result1794 = mbt_ffi_ptr2str( + let result2494 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - let result1795 = mbt_ffi_ptr2str( + let result2495 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - let array1798 : Array[(String, String)] = [] - for index1799 = 0 - index1799 < mbt_ffi_load32(iter_base + 72) - index1799 = index1799 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 68) + index1799 * 16 + let array2498 : Array[(String, String)] = [] + for index2499 = 0 + index2499 < mbt_ffi_load32(iter_base + 72) + index2499 = index2499 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 68) + index2499 * 16 - let result1796 = mbt_ffi_ptr2str( + let result2496 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result1797 = mbt_ffi_ptr2str( + let result2497 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array1798.push((result1796, result1797)) + array2498.push((result2496, result2497)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) @@ -52266,9 +76580,9 @@ pub fn SearchOplog::get_next( }, }, plugin_priority: mbt_ffi_load32(iter_base + 48), - plugin_name: result1794, - plugin_version: result1795, - parameters: array1798, + plugin_name: result2494, + plugin_version: result2495, + parameters: array2498, }, }) } @@ -52284,7 +76598,7 @@ pub fn SearchOplog::get_next( }, }) 27 => { - let result1800 = mbt_ffi_ptr2str( + let result2500 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) @@ -52294,67 +76608,67 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - idempotency_key: result1800, + idempotency_key: result2500, }) } 28 => { - let result1801 = mbt_ffi_ptr2str( + let result2501 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let lifted1803 : String? = match mbt_ffi_load8_u(iter_base + 40) { + let lifted2503 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result1802 = mbt_ffi_ptr2str( + let result2502 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result1802) + Option::Some(result2502) } _ => panic() } - let lifted1805 : String? = match mbt_ffi_load8_u(iter_base + 52) { + let lifted2505 : String? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let result1804 = mbt_ffi_ptr2str( + let result2504 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 56), mbt_ffi_load32(iter_base + 60), ) - Option::Some(result1804) + Option::Some(result2504) } _ => panic() } - let array1809 : Array[@context.Attribute] = [] - for index1810 = 0 - index1810 < mbt_ffi_load32(iter_base + 68) - index1810 = index1810 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 64) + index1810 * 20 + let array2509 : Array[@context.Attribute] = [] + for index2510 = 0 + index2510 < mbt_ffi_load32(iter_base + 68) + index2510 = index2510 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 64) + index2510 * 20 - let result1806 = mbt_ffi_ptr2str( + let result2506 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted1808 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted2508 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let result1807 = mbt_ffi_ptr2str( + let result2507 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - @context.AttributeValue::String(result1807) + @context.AttributeValue::String(result2507) } _ => panic() } - array1809.push(@context.Attribute::{ - key: result1806, - value: lifted1808, + array2509.push(@context.Attribute::{ + key: result2506, + value: lifted2508, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 64)) @@ -52364,14 +76678,14 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - span_id: result1801, - parent: lifted1803, - linked_context_id: lifted1805, - attributes: array1809, + span_id: result2501, + parent: lifted2503, + linked_context_id: lifted2505, + attributes: array2509, }) } 29 => { - let result1811 = mbt_ffi_ptr2str( + let result2511 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) @@ -52381,28 +76695,28 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - span_id: result1811, + span_id: result2511, }) } 30 => { - let result1812 = mbt_ffi_ptr2str( + let result2512 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result1813 = mbt_ffi_ptr2str( + let result2513 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - let lifted1815 = match mbt_ffi_load8_u(iter_base + 48) { + let lifted2515 = match mbt_ffi_load8_u(iter_base + 48) { 0 => { - let result1814 = mbt_ffi_ptr2str( + let result2514 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - @context.AttributeValue::String(result1814) + @context.AttributeValue::String(result2514) } _ => panic() } @@ -52412,13 +76726,13 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - span_id: result1812, - key: result1813, - value: lifted1815, + span_id: result2512, + key: result2513, + value: lifted2515, }) } 31 => { - let lifted1816 = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2516 = match mbt_ffi_load8_u(iter_base + 32) { 0 => @host.PersistenceLevel::PersistNothing 1 => @host.PersistenceLevel::PersistRemoteSideEffects 2 => @host.PersistenceLevel::Smart @@ -52430,11 +76744,11 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - persistence_level: lifted1816, + persistence_level: lifted2516, }) } 32 => { - let result1817 = mbt_ffi_ptr2str( + let result2517 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) @@ -52444,7 +76758,7 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - transaction_id: result1817, + transaction_id: result2517, }) } 33 => @@ -52480,12 +76794,12 @@ pub fn SearchOplog::get_next( begin_index: mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), }) 37 => { - let result1818 = mbt_ffi_ptr2bytes( + let result2518 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let result1819 = mbt_ffi_ptr2str( + let result2519 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) @@ -52495,41 +76809,41 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - data: SnapshotData::{ data: result1818, mime_type: result1819 }, + data: SnapshotData::{ data: result2518, mime_type: result2519 }, }) } 38 => { - let result1820 = mbt_ffi_ptr2str( + let result2520 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - let result1821 = mbt_ffi_ptr2str( + let result2521 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - let array1824 : Array[(String, String)] = [] - for index1825 = 0 - index1825 < mbt_ffi_load32(iter_base + 72) - index1825 = index1825 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 68) + index1825 * 16 + let array2524 : Array[(String, String)] = [] + for index2525 = 0 + index2525 < mbt_ffi_load32(iter_base + 72) + index2525 = index2525 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 68) + index2525 * 16 - let result1822 = mbt_ffi_ptr2str( + let result2522 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result1823 = mbt_ffi_ptr2str( + let result2523 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array1824.push((result1822, result1823)) + array2524.push((result2522, result2523)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) - let result1826 = mbt_ffi_ptr2str( + let result2526 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 96), mbt_ffi_load32(iter_base + 100), ) @@ -52547,9 +76861,9 @@ pub fn SearchOplog::get_next( }, }, plugin_priority: mbt_ffi_load32(iter_base + 48), - plugin_name: result1820, - plugin_version: result1821, - parameters: array1824, + plugin_name: result2520, + plugin_version: result2521, + parameters: array2524, }, target_agent_id: @types.AgentId::{ component_id: @types.ComponentId::{ @@ -52558,7 +76872,7 @@ pub fn SearchOplog::get_next( low_bits: mbt_ffi_load64(iter_base + 88).reinterpret_as_uint64(), }, }, - agent_id: result1826, + agent_id: result2526, }, confirmed_up_to: mbt_ffi_load64(iter_base + 104).reinterpret_as_uint64(), sending_up_to: mbt_ffi_load64(iter_base + 112).reinterpret_as_uint64(), @@ -52566,32 +76880,32 @@ pub fn SearchOplog::get_next( }) } 39 => { - let result1827 = mbt_ffi_ptr2str( + let result2527 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array1859 : Array[@retry.PredicateNode] = [] - for index1860 = 0 - index1860 < mbt_ffi_load32(iter_base + 48) - index1860 = index1860 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 44) + index1860 * 32 + let array2559 : Array[@retry.PredicateNode] = [] + for index2560 = 0 + index2560 < mbt_ffi_load32(iter_base + 48) + index2560 = index2560 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 44) + index2560 * 32 - let lifted1858 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2558 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1828 = mbt_ffi_ptr2str( + let result2528 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1830 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2530 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1829 = mbt_ffi_ptr2str( + let result2529 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1829) + @retry.PredicateValue::Text(result2529) } 1 => @retry.PredicateValue::Integer( @@ -52605,24 +76919,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropEq(@retry.PropertyComparison::{ - property_name: result1828, - value: lifted1830, + property_name: result2528, + value: lifted2530, }) } 1 => { - let result1831 = mbt_ffi_ptr2str( + let result2531 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1833 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2533 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1832 = mbt_ffi_ptr2str( + let result2532 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1832) + @retry.PredicateValue::Text(result2532) } 1 => @retry.PredicateValue::Integer( @@ -52636,24 +76950,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{ - property_name: result1831, - value: lifted1833, + property_name: result2531, + value: lifted2533, }) } 2 => { - let result1834 = mbt_ffi_ptr2str( + let result2534 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1836 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2536 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1835 = mbt_ffi_ptr2str( + let result2535 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1835) + @retry.PredicateValue::Text(result2535) } 1 => @retry.PredicateValue::Integer( @@ -52667,24 +76981,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropGt(@retry.PropertyComparison::{ - property_name: result1834, - value: lifted1836, + property_name: result2534, + value: lifted2536, }) } 3 => { - let result1837 = mbt_ffi_ptr2str( + let result2537 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1839 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2539 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1838 = mbt_ffi_ptr2str( + let result2538 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1838) + @retry.PredicateValue::Text(result2538) } 1 => @retry.PredicateValue::Integer( @@ -52698,24 +77012,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropGte(@retry.PropertyComparison::{ - property_name: result1837, - value: lifted1839, + property_name: result2537, + value: lifted2539, }) } 4 => { - let result1840 = mbt_ffi_ptr2str( + let result2540 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1842 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2542 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1841 = mbt_ffi_ptr2str( + let result2541 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1841) + @retry.PredicateValue::Text(result2541) } 1 => @retry.PredicateValue::Integer( @@ -52729,24 +77043,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropLt(@retry.PropertyComparison::{ - property_name: result1840, - value: lifted1842, + property_name: result2540, + value: lifted2542, }) } 5 => { - let result1843 = mbt_ffi_ptr2str( + let result2543 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1845 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2545 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1844 = mbt_ffi_ptr2str( + let result2544 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1844) + @retry.PredicateValue::Text(result2544) } 1 => @retry.PredicateValue::Integer( @@ -52760,39 +77074,39 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropLte(@retry.PropertyComparison::{ - property_name: result1843, - value: lifted1845, + property_name: result2543, + value: lifted2545, }) } 6 => { - let result1846 = mbt_ffi_ptr2str( + let result2546 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateNode::PropExists(result1846) + @retry.PredicateNode::PropExists(result2546) } 7 => { - let result1847 = mbt_ffi_ptr2str( + let result2547 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1850 : Array[@retry.PredicateValue] = [] - for index1851 = 0 - index1851 < mbt_ffi_load32(iter_base + 20) - index1851 = index1851 + 1 { + let array2550 : Array[@retry.PredicateValue] = [] + for index2551 = 0 + index2551 < mbt_ffi_load32(iter_base + 20) + index2551 = index2551 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1851 * 16 + index2551 * 16 - let lifted1849 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2549 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1848 = mbt_ffi_ptr2str( + let result2548 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateValue::Text(result1848) + @retry.PredicateValue::Text(result2548) } 1 => @retry.PredicateValue::Integer( @@ -52805,61 +77119,61 @@ pub fn SearchOplog::get_next( _ => panic() } - array1850.push(lifted1849) + array2550.push(lifted2549) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{ - property_name: result1847, - values: array1850, + property_name: result2547, + values: array2550, }) } 8 => { - let result1852 = mbt_ffi_ptr2str( + let result2552 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1853 = mbt_ffi_ptr2str( + let result2553 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{ - property_name: result1852, - pattern: result1853, + property_name: result2552, + pattern: result2553, }) } 9 => { - let result1854 = mbt_ffi_ptr2str( + let result2554 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1855 = mbt_ffi_ptr2str( + let result2555 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{ - property_name: result1854, - pattern: result1855, + property_name: result2554, + pattern: result2555, }) } 10 => { - let result1856 = mbt_ffi_ptr2str( + let result2556 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1857 = mbt_ffi_ptr2str( + let result2557 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropContains(@retry.PropertyPattern::{ - property_name: result1856, - pattern: result1857, + property_name: result2556, + pattern: result2557, }) } 11 => @@ -52883,17 +77197,17 @@ pub fn SearchOplog::get_next( _ => panic() } - array1859.push(lifted1858) + array2559.push(lifted2558) } mbt_ffi_free(mbt_ffi_load32(iter_base + 44)) - let array1895 : Array[@retry.PolicyNode] = [] - for index1896 = 0 - index1896 < mbt_ffi_load32(iter_base + 56) - index1896 = index1896 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 52) + index1896 * 32 + let array2595 : Array[@retry.PolicyNode] = [] + for index2596 = 0 + index2596 < mbt_ffi_load32(iter_base + 56) + index2596 = index2596 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 52) + index2596 * 32 - let lifted1894 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2594 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @retry.PolicyNode::Periodic( mbt_ffi_load64(iter_base + 8).reinterpret_as_uint64(), @@ -52937,28 +77251,28 @@ pub fn SearchOplog::get_next( inner: mbt_ffi_load32(iter_base + 16), }) 10 => { - let array1892 : Array[@retry.PredicateNode] = [] - for index1893 = 0 - index1893 < mbt_ffi_load32(iter_base + 12) - index1893 = index1893 + 1 { + let array2592 : Array[@retry.PredicateNode] = [] + for index2593 = 0 + index2593 < mbt_ffi_load32(iter_base + 12) + index2593 = index2593 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index1893 * 32 + index2593 * 32 - let lifted1891 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted2591 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1861 = mbt_ffi_ptr2str( + let result2561 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1863 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2563 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1862 = mbt_ffi_ptr2str( + let result2562 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1862) + @retry.PredicateValue::Text(result2562) } 1 => @retry.PredicateValue::Integer( @@ -52972,24 +77286,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropEq(@retry.PropertyComparison::{ - property_name: result1861, - value: lifted1863, + property_name: result2561, + value: lifted2563, }) } 1 => { - let result1864 = mbt_ffi_ptr2str( + let result2564 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1866 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2566 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1865 = mbt_ffi_ptr2str( + let result2565 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1865) + @retry.PredicateValue::Text(result2565) } 1 => @retry.PredicateValue::Integer( @@ -53003,24 +77317,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{ - property_name: result1864, - value: lifted1866, + property_name: result2564, + value: lifted2566, }) } 2 => { - let result1867 = mbt_ffi_ptr2str( + let result2567 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1869 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2569 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1868 = mbt_ffi_ptr2str( + let result2568 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1868) + @retry.PredicateValue::Text(result2568) } 1 => @retry.PredicateValue::Integer( @@ -53034,24 +77348,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropGt(@retry.PropertyComparison::{ - property_name: result1867, - value: lifted1869, + property_name: result2567, + value: lifted2569, }) } 3 => { - let result1870 = mbt_ffi_ptr2str( + let result2570 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1872 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2572 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1871 = mbt_ffi_ptr2str( + let result2571 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1871) + @retry.PredicateValue::Text(result2571) } 1 => @retry.PredicateValue::Integer( @@ -53065,24 +77379,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropGte(@retry.PropertyComparison::{ - property_name: result1870, - value: lifted1872, + property_name: result2570, + value: lifted2572, }) } 4 => { - let result1873 = mbt_ffi_ptr2str( + let result2573 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1875 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2575 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1874 = mbt_ffi_ptr2str( + let result2574 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1874) + @retry.PredicateValue::Text(result2574) } 1 => @retry.PredicateValue::Integer( @@ -53096,24 +77410,24 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropLt(@retry.PropertyComparison::{ - property_name: result1873, - value: lifted1875, + property_name: result2573, + value: lifted2575, }) } 5 => { - let result1876 = mbt_ffi_ptr2str( + let result2576 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted1878 = match mbt_ffi_load8_u(iter_base + 16) { + let lifted2578 = match mbt_ffi_load8_u(iter_base + 16) { 0 => { - let result1877 = mbt_ffi_ptr2str( + let result2577 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - @retry.PredicateValue::Text(result1877) + @retry.PredicateValue::Text(result2577) } 1 => @retry.PredicateValue::Integer( @@ -53127,40 +77441,40 @@ pub fn SearchOplog::get_next( } @retry.PredicateNode::PropLte(@retry.PropertyComparison::{ - property_name: result1876, - value: lifted1878, + property_name: result2576, + value: lifted2578, }) } 6 => { - let result1879 = mbt_ffi_ptr2str( + let result2579 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateNode::PropExists(result1879) + @retry.PredicateNode::PropExists(result2579) } 7 => { - let result1880 = mbt_ffi_ptr2str( + let result2580 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array1883 : Array[@retry.PredicateValue] = [] - for index1884 = 0 - index1884 < mbt_ffi_load32(iter_base + 20) - index1884 = index1884 + 1 { + let array2583 : Array[@retry.PredicateValue] = [] + for index2584 = 0 + index2584 < mbt_ffi_load32(iter_base + 20) + index2584 = index2584 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index1884 * 16 + index2584 * 16 - let lifted1882 = match + let lifted2582 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result1881 = mbt_ffi_ptr2str( + let result2581 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @retry.PredicateValue::Text(result1881) + @retry.PredicateValue::Text(result2581) } 1 => @retry.PredicateValue::Integer( @@ -53173,61 +77487,61 @@ pub fn SearchOplog::get_next( _ => panic() } - array1883.push(lifted1882) + array2583.push(lifted2582) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{ - property_name: result1880, - values: array1883, + property_name: result2580, + values: array2583, }) } 8 => { - let result1885 = mbt_ffi_ptr2str( + let result2585 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1886 = mbt_ffi_ptr2str( + let result2586 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{ - property_name: result1885, - pattern: result1886, + property_name: result2585, + pattern: result2586, }) } 9 => { - let result1887 = mbt_ffi_ptr2str( + let result2587 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1888 = mbt_ffi_ptr2str( + let result2588 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{ - property_name: result1887, - pattern: result1888, + property_name: result2587, + pattern: result2588, }) } 10 => { - let result1889 = mbt_ffi_ptr2str( + let result2589 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result1890 = mbt_ffi_ptr2str( + let result2590 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) @retry.PredicateNode::PropContains(@retry.PropertyPattern::{ - property_name: result1889, - pattern: result1890, + property_name: result2589, + pattern: result2590, }) } 11 => @@ -53253,12 +77567,12 @@ pub fn SearchOplog::get_next( _ => panic() } - array1892.push(lifted1891) + array2592.push(lifted2591) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @retry.PolicyNode::FilteredOn(@retry.FilteredConfig::{ - predicate: @retry.RetryPredicate::{ nodes: array1892 }, + predicate: @retry.RetryPredicate::{ nodes: array2592 }, inner: mbt_ffi_load32(iter_base + 16), }) } @@ -53286,7 +77600,7 @@ pub fn SearchOplog::get_next( _ => panic() } - array1895.push(lifted1894) + array2595.push(lifted2594) } mbt_ffi_free(mbt_ffi_load32(iter_base + 52)) @@ -53296,15 +77610,15 @@ pub fn SearchOplog::get_next( nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, policy: @retry.NamedRetryPolicy::{ - name: result1827, + name: result2527, priority: mbt_ffi_load32(iter_base + 40).reinterpret_as_uint(), - predicate: @retry.RetryPredicate::{ nodes: array1859 }, - policy: @retry.RetryPolicy::{ nodes: array1895 }, + predicate: @retry.RetryPredicate::{ nodes: array2559 }, + policy: @retry.RetryPolicy::{ nodes: array2595 }, }, }) } 40 => { - let result1897 = mbt_ffi_ptr2str( + let result2597 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) @@ -53314,11 +77628,11 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - name: result1897, + name: result2597, }) } 41 => { - let lifted1898 = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2598 = match mbt_ffi_load8_u(iter_base + 32) { 0 => PublicQueuedCardEvent::Install(PublicQueuedCardEventCard::{ card_id: @types.CardId::{ @@ -53345,11 +77659,11 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - event: lifted1898, + event: lifted2598, }) } 42 => { - let lifted1899 : UInt64? = match mbt_ffi_load8_u(iter_base + 32) { + let lifted2599 : UInt64? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => Option::Some( @@ -53363,7 +77677,7 @@ pub fn SearchOplog::get_next( seconds: mbt_ffi_load64(iter_base + 16).reinterpret_as_uint64(), nanoseconds: mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), }, - queued_event_index: lifted1899, + queued_event_index: lifted2599, card_id: @types.CardId::{ uuid: @types.Uuid::{ high_bits: mbt_ffi_load64(iter_base + 48).reinterpret_as_uint64(), @@ -53404,17 +77718,17 @@ pub fn SearchOplog::get_next( _ => panic() } - array1901.push( - (mbt_ffi_load64(iter_base + 0).reinterpret_as_uint64(), lifted1900), + array2601.push( + (mbt_ffi_load64(iter_base + 0).reinterpret_as_uint64(), lifted2600), ) } mbt_ffi_free(mbt_ffi_load32(return_area + 4)) - Option::Some(array1901) + Option::Some(array2601) } _ => panic() } - let ret = lifted1903 + let ret = lifted2603 mbt_ffi_free(return_area) return ret } diff --git a/sdks/moonbit/golem_sdk/interface/golem/api/retry/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/api/retry/ffi.mbt index e56d2837e4..cfbf7daf10 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/api/retry/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/api/retry/ffi.mbt @@ -32,13 +32,25 @@ fn wasmImportSetRetryPolicy( fn wasmImportRemoveRetryPolicy(p0 : Int, p1 : Int) = "golem:api/retry@1.5.0" "remove-retry-policy" ///| -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_store8(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) ///| extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = #|(func (param i32) (result f64) local.get 0 f64.load) +///| +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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) + +///| +extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = + #|(func (param i32) (result i64) local.get 0 i64.load) + ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #|(func (param i32) (result i32) (local i32) @@ -54,21 +66,13 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| local.get 0) ///| -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_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +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_store64(offset : Int, value : Int64) = #|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) -///| -extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = - #|(func (param i32) (result i64) local.get 0 i64.load) - ///| #owned(str) extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = @@ -81,7 +85,3 @@ extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = ///| 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_store8(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) diff --git a/sdks/moonbit/golem_sdk/interface/golem/core/types/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/core/types/ffi.mbt index 389802f573..57a52f8d38 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/core/types/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/core/types/ffi.mbt @@ -12,6 +12,14 @@ fn wasmImportParseUuid(p0 : Int, p1 : Int, p2 : Int) = "golem:core/types@2.0.0" ///| fn wasmImportUuidToString(p0 : Int64, p1 : Int64, p2 : Int) = "golem:core/types@2.0.0" "uuid-to-string" +///| +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_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) @@ -19,18 +27,14 @@ 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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) - ///| #owned(str) extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = #|(func (param i32) (result i32) local.get 0) ///| -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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = @@ -42,7 +46,3 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| local.get 0 #| local.get 1 call $moonbit.init_array16 #| local.get 0) - -///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) diff --git a/sdks/moonbit/golem_sdk/interface/golem/core/types/pkg.generated.mbti b/sdks/moonbit/golem_sdk/interface/golem/core/types/pkg.generated.mbti index 273ca1731a..17928cc385 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/core/types/pkg.generated.mbti +++ b/sdks/moonbit/golem_sdk/interface/golem/core/types/pkg.generated.mbti @@ -93,6 +93,18 @@ pub(all) struct NamedFieldType { metadata : MetadataEnvelope } derive(Eq, Show) +pub(all) enum NumericBound { + Signed(Int64) + Unsigned(UInt64) + FloatBits(UInt64) +} derive(Eq, Show) + +pub(all) struct NumericRestrictions { + min : NumericBound? + max : NumericBound? + unit : String? +} derive(Eq, Show) + pub(all) enum PathDirection { INPUT OUTPUT @@ -167,16 +179,16 @@ pub(all) struct SchemaGraph { 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/core/types/top.mbt b/sdks/moonbit/golem_sdk/interface/golem/core/types/top.mbt index 26bdd795ef..7d7bca6d2e 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/core/types/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/core/types/top.mbt @@ -161,6 +161,28 @@ pub(all) struct ResultSpec { 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 { @@ -346,16 +368,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/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/durability/durability/ffi.mbt index eb8b15460e..46bae11a6e 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/durability/durability/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/durability/durability/ffi.mbt @@ -37,16 +37,35 @@ fn wasmImportMethodLazyInitializedPollableSet(p0 : Int, p1 : Int) = "golem:durab fn wasmImportMethodLazyInitializedPollableSubscribe(p0 : Int) -> Int = "golem:durability/durability@1.5.0" "[method]lazy-initialized-pollable.subscribe" ///| -extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = - #|(func (param i32) (result f32) local.get 0 f32.load) +extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = + #|(func (param i32) (result f64) local.get 0 f64.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_store64(offset : Int, value : Int64) = + #|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) ///| -extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.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_extend8(value : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.extend8_s) + +///| +extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| local.get 0) + +///| +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) ///| extern "wasm" fn mbt_ffi_store8(offset : Int, value : Int) = @@ -58,30 +77,20 @@ extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = #|(func (param i32) (result i32) 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_extend16(value : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.extend16_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_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array8 - #| local.get 0) +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_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_load8(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_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_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 = @@ -91,46 +100,37 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| local.get 1) ///| -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_load8(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_s) - -///| -extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = - #|(func (param i32) (result i64) local.get 0 i64.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_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_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_storef64(offset : Int, value : Double) = - #|(func (param i32) (param f64) local.get 0 local.get 1 f64.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(str) -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_store16(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) +extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = + #|(func (param i32) (result i64) local.get 0 i64.load) ///| -extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = - #|(func (param i32) (result f64) local.get 0 f64.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_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_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) 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 4c5528d972..a7a6704f91 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/durability/durability/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/durability/durability/top.mbt @@ -191,12 +191,12 @@ pub fn persist_durable_function_invocation( 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) => { @@ -210,218 +210,2014 @@ pub fn persist_durable_function_invocation( () } - 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 => { + 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) + () } - S32Type => { - mbt_ffi_store8(iter_base + 0, 4) + 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()) () } - S64Type => { - mbt_ffi_store8(iter_base + 0, 5) + 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) () } - U8Type => { - mbt_ffi_store8(iter_base + 0, 6) + OptionType(payload223) => { + mbt_ffi_store8(iter_base + 0, 22) + mbt_ffi_store32(iter_base + 8, payload223) () } - U16Type => { - mbt_ffi_store8(iter_base + 0, 7) + 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) + + () + } + } () } - U32Type => { - mbt_ffi_store8(iter_base + 0, 8) + 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) + + () + } + } () } - U64Type => { - mbt_ffi_store8(iter_base + 0, 9) + 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()) + + () + } + } () } - F32Type => { - mbt_ffi_store8(iter_base + 0, 10) + 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) + + () + } + } () } - F64Type => { - mbt_ffi_store8(iter_base + 0, 11) + 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) + + () + } + } () } - CharType => { - mbt_ffi_store8(iter_base + 0, 12) + DatetimeType => { + mbt_ffi_store8(iter_base + 0, 28) () } - StringType => { - mbt_ffi_store8(iter_base + 0, 13) + DurationType => { + mbt_ffi_store8(iter_base + 0, 29) () } - RecordType(payload13) => { - mbt_ffi_store8(iter_base + 0, 14) + QuantityType(payload276) => { + mbt_ffi_store8(iter_base + 0, 30) - 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 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 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 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 - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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) - () - } - Some(payload16) => { - mbt_ffi_store8(iter_base + 12, 1) + 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 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 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) - () - } + () } + } - 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 + match payload276.max { + None => { + mbt_ffi_store8(iter_base + 56, 0) - 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) + () } - mbt_ffi_store32(iter_base + 28, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 24, address) + 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 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 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) - 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) + () } - mbt_ffi_store32(iter_base + 36, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 32, address20) + } + cleanup_list.push(ptr277) + cleanup_list.push(address279) - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 40, 0) + () + } + 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) () } - Some(payload23) => { - mbt_ffi_store8(iter_base + 40, 1) + Contains(payload293) => { + mbt_ffi_store8(iter_base + 12, 2) - 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) + 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) - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 52, 0) + 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) () } - Some(payload26) => { - mbt_ffi_store8(iter_base + 52, 1) - - match payload26 { - Multimodal => { - mbt_ffi_store8(iter_base + 56, 0) + FieldEquals(payload297) => { + mbt_ffi_store8(iter_base + 12, 4) - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 56, 1) + 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) - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 56, 2) + match payload297.literal { + None => { + mbt_ffi_store8(iter_base + 24, 0) () } - Other(payload30) => { - mbt_ffi_store8(iter_base + 56, 3) + Some(payload300) => { + mbt_ffi_store8(iter_base + 24, 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 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) () } - } - 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) + FieldAbsent(payload302) => { + mbt_ffi_store8(iter_base + 12, 5) - () - } - Some(payload37) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload37) + 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) () } @@ -429,69 +2225,69 @@ pub fn persist_durable_function_invocation( match iter_elem.metadata.doc { None => { - mbt_ffi_store8(iter_base + 16, 0) + mbt_ffi_store8(iter_base + 36, 0) () } - Some(payload39) => { - mbt_ffi_store8(iter_base + 16, 1) + Some(payload305) => { + mbt_ffi_store8(iter_base + 36, 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 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 address42 = mbt_ffi_malloc( + let address308 = 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 + 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 ptr41 = mbt_ffi_str2ptr(iter_elem) + let ptr307 = 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) + mbt_ffi_store32(iter_base + 0, ptr307) + cleanup_list.push(ptr307) } - mbt_ffi_store32(iter_base + 32, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 28, address42) + mbt_ffi_store32(iter_base + 52, iter_elem.metadata.aliases.length()) + mbt_ffi_store32(iter_base + 48, address308) - let address45 = mbt_ffi_malloc( + let address311 = 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 + 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 ptr44 = mbt_ffi_str2ptr(iter_elem) + let ptr310 = 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) + mbt_ffi_store32(iter_base + 0, ptr310) + cleanup_list.push(ptr310) } - mbt_ffi_store32(iter_base + 40, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 36, address45) + 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 + 44, 0) + mbt_ffi_store8(iter_base + 64, 0) () } - Some(payload48) => { - mbt_ffi_store8(iter_base + 44, 1) + Some(payload314) => { + mbt_ffi_store8(iter_base + 64, 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) + 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) () } @@ -499,36 +2295,36 @@ pub fn persist_durable_function_invocation( match iter_elem.metadata.role { None => { - mbt_ffi_store8(iter_base + 56, 0) + mbt_ffi_store8(iter_base + 76, 0) () } - Some(payload51) => { - mbt_ffi_store8(iter_base + 56, 1) + Some(payload317) => { + mbt_ffi_store8(iter_base + 76, 1) - match payload51 { + match payload317 { Multimodal => { - mbt_ffi_store8(iter_base + 60, 0) + mbt_ffi_store8(iter_base + 80, 0) () } UnstructuredText => { - mbt_ffi_store8(iter_base + 60, 1) + mbt_ffi_store8(iter_base + 80, 1) () } UnstructuredBinary => { - mbt_ffi_store8(iter_base + 60, 2) + mbt_ffi_store8(iter_base + 80, 2) () } - Other(payload55) => { - mbt_ffi_store8(iter_base + 60, 3) + Other(payload321) => { + mbt_ffi_store8(iter_base + 80, 3) - 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 ptr322 = mbt_ffi_str2ptr(payload321) + mbt_ffi_store32(iter_base + 88, payload321.length()) + mbt_ffi_store32(iter_base + 84, ptr322) + cleanup_list.push(ptr322) () } @@ -537,121 +2333,33 @@ pub fn persist_durable_function_invocation( () } } - 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 - - 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) - } - mbt_ffi_store32(iter_base + 12, payload59.length()) - mbt_ffi_store32(iter_base + 8, address61) - cleanup_list.push(address61) - - () - } - FlagsType(payload63) => { - mbt_ffi_store8(iter_base + 0, 17) - - 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 - - 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) - - () - } - TupleType(payload67) => { - mbt_ffi_store8(iter_base + 0, 18) - - 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) + cleanup_list.push(ptr288) + cleanup_list.push(address308) + cleanup_list.push(address311) } - mbt_ffi_store32(iter_base + 12, payload67.length()) - mbt_ffi_store32(iter_base + 8, address68) - cleanup_list.push(address68) - - () - } - ListType(payload70) => { - mbt_ffi_store8(iter_base + 0, 19) - mbt_ffi_store32(iter_base + 8, payload70) - - () - } - 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()) - - () - } - 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) + mbt_ffi_store32(iter_base + 12, payload287.branches.length()) + mbt_ffi_store32(iter_base + 8, address323) + cleanup_list.push(address323) () } - ResultType(payload74) => { - mbt_ffi_store8(iter_base + 0, 23) + SecretType(payload325) => { + mbt_ffi_store8(iter_base + 0, 32) + mbt_ffi_store32(iter_base + 8, payload325.inner) - match payload74.ok { + match payload325.category { None => { - mbt_ffi_store8(iter_base + 8, 0) - - () - } - Some(payload76) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload76) + mbt_ffi_store8(iter_base + 12, 0) () } - } - - match payload74.err { - None => { - mbt_ffi_store8(iter_base + 16, 0) + Some(payload327) => { + mbt_ffi_store8(iter_base + 12, 1) - () - } - Some(payload78) => { - mbt_ffi_store8(iter_base + 16, 1) - mbt_ffi_store32(iter_base + 20, payload78) + let ptr328 = mbt_ffi_str2ptr(payload327) + mbt_ffi_store32(iter_base + 20, payload327.length()) + mbt_ffi_store32(iter_base + 16, ptr328) + cleanup_list.push(ptr328) () } @@ -659,77 +2367,22 @@ pub fn persist_durable_function_invocation( () } - TextType(payload79) => { - mbt_ffi_store8(iter_base + 0, 24) + QuotaTokenType(payload329) => { + mbt_ffi_store8(iter_base + 0, 33) - match payload79.languages { + match payload329.resource_name { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload81) => { + Some(payload331) => { 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 - - 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) - } - 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 payload79.max_length { - None => { - mbt_ffi_store8(iter_base + 28, 0) - - () - } - Some(payload88) => { - mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload88.reinterpret_as_int()) - - () - } - } - - match payload79.regex { - None => { - mbt_ffi_store8(iter_base + 36, 0) - - () - } - Some(payload90) => { - mbt_ffi_store8(iter_base + 36, 1) - - 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) + 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) () } @@ -737,59 +2390,18 @@ pub fn persist_durable_function_invocation( () } - BinaryType(payload92) => { - mbt_ffi_store8(iter_base + 0, 25) + FutureType(payload333) => { + mbt_ffi_store8(iter_base + 0, 34) - match payload92.mime_types { + match payload333 { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload94) => { + Some(payload335) => { 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 - - 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) - } - mbt_ffi_store32(iter_base + 16, payload94.length()) - mbt_ffi_store32(iter_base + 12, address96) - cleanup_list.push(address96) - - () - } - } - - match payload92.min_bytes { - None => { - mbt_ffi_store8(iter_base + 20, 0) - - () - } - Some(payload99) => { - mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload99.reinterpret_as_int()) - - () - } - } - - match payload92.max_bytes { - None => { - mbt_ffi_store8(iter_base + 28, 0) - - () - } - Some(payload101) => { - mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload101.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 12, payload335) () } @@ -797,64 +2409,18 @@ pub fn persist_durable_function_invocation( () } - 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()) - - match payload102.allowed_mime_types { - None => { - mbt_ffi_store8(iter_base + 12, 0) - - () - } - Some(payload104) => { - mbt_ffi_store8(iter_base + 12, 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 - - 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) - } - mbt_ffi_store32(iter_base + 20, payload104.length()) - mbt_ffi_store32(iter_base + 16, address106) - cleanup_list.push(address106) - - () - } - } + StreamType(payload336) => { + mbt_ffi_store8(iter_base + 0, 35) - match payload102.allowed_extensions { + match payload336 { None => { - mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store8(iter_base + 8, 0) () } - 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 - - 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) - } - mbt_ffi_store32(iter_base + 32, payload109.length()) - mbt_ffi_store32(iter_base + 28, address111) - cleanup_list.push(address111) + Some(payload338) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload338) () } @@ -862,380 +2428,432 @@ pub fn persist_durable_function_invocation( () } - UrlType(payload113) => { - mbt_ffi_store8(iter_base + 0, 27) - - match payload113.allowed_schemes { - None => { - mbt_ffi_store8(iter_base + 8, 0) - - () - } - Some(payload115) => { - 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 iter_elem.metadata.doc { + None => { + mbt_ffi_store8(iter_base + 88, 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) - } - mbt_ffi_store32(iter_base + 16, payload115.length()) - mbt_ffi_store32(iter_base + 12, address117) - cleanup_list.push(address117) + () + } + 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) - match payload113.allowed_hosts { - None => { - mbt_ffi_store8(iter_base + 20, 0) + () + } + } - () - } - Some(payload120) => { - mbt_ffi_store8(iter_base + 20, 1) + 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 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 + 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 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) - } - mbt_ffi_store32(iter_base + 28, payload120.length()) - mbt_ffi_store32(iter_base + 24, address122) - cleanup_list.push(address122) + 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) - () - } - DatetimeType => { - mbt_ffi_store8(iter_base + 0, 28) + match iter_elem.metadata.deprecated { + None => { + mbt_ffi_store8(iter_base + 116, 0) () } - DurationType => { - mbt_ffi_store8(iter_base + 0, 29) + 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) () } - QuantityType(payload126) => { - mbt_ffi_store8(iter_base + 0, 30) - - 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) + } - 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 iter_elem.metadata.role { + None => { + mbt_ffi_store8(iter_base + 128, 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) - } - mbt_ffi_store32(iter_base + 20, payload126.allowed_suffixes.length()) - mbt_ffi_store32(iter_base + 16, address129) + () + } + Some(payload352) => { + mbt_ffi_store8(iter_base + 128, 1) - match payload126.min { - None => { - mbt_ffi_store8(iter_base + 24, 0) + match payload352 { + Multimodal => { + mbt_ffi_store8(iter_base + 132, 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) - - 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) + UnstructuredText => { + mbt_ffi_store8(iter_base + 132, 1) () } - } - - match payload126.max { - None => { - mbt_ffi_store8(iter_base + 56, 0) + UnstructuredBinary => { + mbt_ffi_store8(iter_base + 132, 2) () } - 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) + Other(payload356) => { + mbt_ffi_store8(iter_base + 132, 3) - 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) + 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(ptr127) - cleanup_list.push(address129) () } - UnionType(payload137) => { - mbt_ffi_store8(iter_base + 0, 31) + } + 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 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 + 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 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) + 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.discriminator { - Prefix(payload139) => { - mbt_ffi_store8(iter_base + 12, 0) + match iter_elem.name { + None => { + mbt_ffi_store8(iter_base + 8, 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(payload362) => { + mbt_ffi_store8(iter_base + 8, 1) - () - } - Suffix(payload141) => { - mbt_ffi_store8(iter_base + 12, 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) - 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) + () + } + } + 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) - () - } - Contains(payload143) => { - mbt_ffi_store8(iter_base + 12, 2) + 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 - 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 iter_elem { + BoolValue(payload366) => { + mbt_ffi_store8(iter_base + 0, 0) + mbt_ffi_store8(iter_base + 8, if payload366 { 1 } else { 0 }) - () - } - Regex(payload145) => { - mbt_ffi_store8(iter_base + 12, 3) + () + } + S8Value(payload367) => { + mbt_ffi_store8(iter_base + 0, 1) + mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload367)) - 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) + () + } + S16Value(payload368) => { + mbt_ffi_store8(iter_base + 0, 2) + mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload368)) - () - } - FieldEquals(payload147) => { - mbt_ffi_store8(iter_base + 12, 4) + () + } + S32Value(payload369) => { + mbt_ffi_store8(iter_base + 0, 3) + mbt_ffi_store32(iter_base + 8, payload369) - 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) + () + } + S64Value(payload370) => { + mbt_ffi_store8(iter_base + 0, 4) + mbt_ffi_store64(iter_base + 8, payload370) - match payload147.literal { - None => { - mbt_ffi_store8(iter_base + 24, 0) + () + } + U8Value(payload371) => { + mbt_ffi_store8(iter_base + 0, 5) + mbt_ffi_store8(iter_base + 8, payload371.to_int()) - () - } - Some(payload150) => { - mbt_ffi_store8(iter_base + 24, 1) + () + } + U16Value(payload372) => { + mbt_ffi_store8(iter_base + 0, 6) + mbt_ffi_store16(iter_base + 8, payload372.reinterpret_as_int()) - 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) + () + } + U32Value(payload373) => { + mbt_ffi_store8(iter_base + 0, 7) + mbt_ffi_store32(iter_base + 8, payload373.reinterpret_as_int()) - () - } - } - cleanup_list.push(ptr148) + () + } + U64Value(payload374) => { + mbt_ffi_store8(iter_base + 0, 8) + mbt_ffi_store64(iter_base + 8, payload374.reinterpret_as_int64()) - () - } - FieldAbsent(payload152) => { - mbt_ffi_store8(iter_base + 12, 5) + () + } + F32Value(payload375) => { + mbt_ffi_store8(iter_base + 0, 9) + mbt_ffi_storef32(iter_base + 8, payload375) - 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) + () + } + 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()) - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 36, 0) + () + } + StringValue(payload378) => { + mbt_ffi_store8(iter_base + 0, 12) - () - } - Some(payload155) => { - mbt_ffi_store8(iter_base + 36, 1) + 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) - 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) + () + } + 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) - 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 + () + } + VariantValue(payload383) => { + mbt_ffi_store8(iter_base + 0, 14) + mbt_ffi_store32(iter_base + 8, payload383.case.reinterpret_as_int()) - let ptr157 = 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 + 52, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 48, address158) + match payload383.payload { + None => { + mbt_ffi_store8(iter_base + 12, 0) - 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 + () + } + Some(payload385) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload385) - 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) + () } - mbt_ffi_store32(iter_base + 60, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 56, address161) + } - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 64, 0) + () + } + EnumValue(payload386) => { + mbt_ffi_store8(iter_base + 0, 15) + mbt_ffi_store32(iter_base + 8, payload386.reinterpret_as_int()) - () - } - Some(payload164) => { - mbt_ffi_store8(iter_base + 64, 1) + () + } + FlagsValue(payload387) => { + mbt_ffi_store8(iter_base + 0, 16) - 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 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) - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 76, 0) + 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) - () - } - Some(payload167) => { - mbt_ffi_store8(iter_base + 76, 1) + () + } + ListValue(payload393) => { + mbt_ffi_store8(iter_base + 0, 18) - match payload167 { - Multimodal => { - mbt_ffi_store8(iter_base + 80, 0) + 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) - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 80, 1) + () + } + FixedListValue(payload396) => { + mbt_ffi_store8(iter_base + 0, 19) - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 80, 2) + 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) - () - } - Other(payload171) => { - mbt_ffi_store8(iter_base + 80, 3) + () + } + MapValue(payload399) => { + mbt_ffi_store8(iter_base + 0, 20) - 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 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) + + () } - cleanup_list.push(ptr138) - cleanup_list.push(address158) - cleanup_list.push(address161) } - mbt_ffi_store32(iter_base + 12, payload137.branches.length()) - mbt_ffi_store32(iter_base + 8, address173) - cleanup_list.push(address173) () } - SecretType(payload175) => { - mbt_ffi_store8(iter_base + 0, 32) - mbt_ffi_store32(iter_base + 8, payload175.inner) + ResultValue(payload405) => { + mbt_ffi_store8(iter_base + 0, 22) - match payload175.category { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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) + + () + } + } () } - Some(payload177) => { - mbt_ffi_store8(iter_base + 12, 1) + 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) - let ptr178 = mbt_ffi_str2ptr(payload177) - mbt_ffi_store32(iter_base + 20, payload177.length()) - mbt_ffi_store32(iter_base + 16, ptr178) - cleanup_list.push(ptr178) + () + } + } () } @@ -1243,167 +2861,388 @@ pub fn persist_durable_function_invocation( () } - QuotaTokenType(payload179) => { - mbt_ffi_store8(iter_base + 0, 33) + 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 payload179.resource_name { + match payload412.language { None => { - mbt_ffi_store8(iter_base + 8, 0) + mbt_ffi_store8(iter_base + 16, 0) () } - Some(payload181) => { - mbt_ffi_store8(iter_base + 8, 1) + Some(payload415) => { + mbt_ffi_store8(iter_base + 16, 1) - 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) + 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) () } - FutureType(payload183) => { - mbt_ffi_store8(iter_base + 0, 34) + 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 payload183 { + match payload417.mime_type { None => { - mbt_ffi_store8(iter_base + 8, 0) + mbt_ffi_store8(iter_base + 16, 0) () } - Some(payload185) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload185) + 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) () } - StreamType(payload186) => { - mbt_ffi_store8(iter_base + 0, 35) - - match payload186 { - None => { - mbt_ffi_store8(iter_base + 8, 0) - - () - } - Some(payload188) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload188) + PathValue(payload422) => { + mbt_ffi_store8(iter_base + 0, 25) - () - } - } + 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) () } - } + UrlValue(payload424) => { + mbt_ffi_store8(iter_base + 0, 26) - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 88, 0) + 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) () } - Some(payload190) => { - mbt_ffi_store8(iter_base + 88, 1) + 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(), + ) - 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) + () + } + DurationValue(payload427) => { + mbt_ffi_store8(iter_base + 0, 28) + mbt_ffi_store64(iter_base + 8, payload427.nanoseconds) () } - } + 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) - 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 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) - 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) + () + } + UnionValue(payload430) => { + mbt_ffi_store8(iter_base + 0, 30) - 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 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) - 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) + () + } + SecretValue(payload432) => { + mbt_ffi_store8(iter_base + 0, 31) - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 116, 0) + let @types.Secret(handle) = payload432 + mbt_ffi_store32(iter_base + 8, handle) () } - Some(payload199) => { - mbt_ffi_store8(iter_base + 116, 1) + QuotaTokenHandle(payload433) => { + mbt_ffi_store8(iter_base + 0, 32) - 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) + let @types.QuotaToken(handle434) = payload433 + mbt_ffi_store32(iter_base + 8, handle434) () } } + } + 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) - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 128, 0) + 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 + + match iter_elem.body { + RefType(payload437) => { + mbt_ffi_store8(iter_base + 0, 0) + mbt_ffi_store32(iter_base + 8, payload437) () } - Some(payload202) => { - mbt_ffi_store8(iter_base + 128, 1) + BoolType => { + mbt_ffi_store8(iter_base + 0, 1) - match payload202 { - Multimodal => { - mbt_ffi_store8(iter_base + 132, 0) + () + } + S8Type(payload439) => { + mbt_ffi_store8(iter_base + 0, 2) + + match payload439 { + None => { + mbt_ffi_store8(iter_base + 8, 0) () } - UnstructuredText => { - mbt_ffi_store8(iter_base + 132, 1) + Some(payload441) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload441.min { + None => { + mbt_ffi_store8(iter_base + 16, 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(), + ) + + () + } + } + + () + } + } + + match payload441.max { + None => { + mbt_ffi_store8(iter_base + 40, 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(), + ) + + () + } + } + + () + } + } + + match payload441.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload453) => { + mbt_ffi_store8(iter_base + 64, 1) + + 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) + + () + } + } () } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 132, 2) + } + + () + } + S16Type(payload455) => { + mbt_ffi_store8(iter_base + 0, 3) + + match payload455 { + None => { + mbt_ffi_store8(iter_base + 8, 0) () } - Other(payload206) => { - mbt_ffi_store8(iter_base + 132, 3) + Some(payload457) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload457.min { + None => { + mbt_ffi_store8(iter_base + 16, 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(), + ) + + () + } + } + + () + } + } + + match payload457.max { + None => { + mbt_ffi_store8(iter_base + 40, 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(), + ) + + () + } + } + + () + } + } + + match payload457.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload469) => { + mbt_ffi_store8(iter_base + 64, 1) - 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) + 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) + + () + } + } () } @@ -1411,279 +3250,463 @@ pub fn persist_durable_function_invocation( () } - } - cleanup_list.push(address193) - cleanup_list.push(address196) - } - mbt_ffi_store32(return_area + 12, request.graph.type_nodes.length()) - mbt_ffi_store32(return_area + 8, address208) + S32Type(payload471) => { + mbt_ffi_store8(iter_base + 0, 4) - 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 + match payload471 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - 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) + () + } + Some(payload473) => { + mbt_ffi_store8(iter_base + 8, 1) - match iter_elem.name { - None => { - mbt_ffi_store8(iter_base + 8, 0) + match payload473.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - Some(payload212) => { - mbt_ffi_store8(iter_base + 8, 1) + () + } + 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 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 + 20, iter_elem.body) - cleanup_list.push(ptr210) - } - 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) + match payload473.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + 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 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 + () + } + } - match iter_elem { - BoolValue(payload216) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store8(iter_base + 8, if payload216 { 1 } else { 0 }) + match payload473.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - S8Value(payload217) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload217)) + () + } + Some(payload485) => { + mbt_ffi_store8(iter_base + 64, 1) - () - } - S16Value(payload218) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload218)) + 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) - () - } - S32Value(payload219) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload219) + () + } + } - () - } - S64Value(payload220) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload220) + () + } + } () } - U8Value(payload221) => { + S64Type(payload487) => { mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload221.to_int()) - () - } - U16Value(payload222) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload222.reinterpret_as_int()) + match payload487 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - () - } - U32Value(payload223) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload223.reinterpret_as_int()) + () + } + Some(payload489) => { + mbt_ffi_store8(iter_base + 8, 1) - () - } - U64Value(payload224) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload224.reinterpret_as_int64()) + match payload489.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - F32Value(payload225) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload225) + () + } + 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(), + ) + + () + } + } - () - } - F64Value(payload226) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload226) + () + } + } + + 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(), + ) + + () + } + } + + () + } + } - () - } - CharValue(payload227) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload227.to_int()) + match payload489.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - StringValue(payload228) => { - mbt_ffi_store8(iter_base + 0, 12) + () + } + Some(payload501) => { + mbt_ffi_store8(iter_base + 64, 1) - 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) + 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) - () - } - RecordValue(payload230) => { - mbt_ffi_store8(iter_base + 0, 13) + () + } + } - 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) + () + } } - 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()) + U8Type(payload503) => { + mbt_ffi_store8(iter_base + 0, 6) - match payload233.payload { + match payload503 { None => { - mbt_ffi_store8(iter_base + 12, 0) - - () - } - Some(payload235) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload235) + mbt_ffi_store8(iter_base + 8, 0) () } - } + Some(payload505) => { + mbt_ffi_store8(iter_base + 8, 1) - () - } - EnumValue(payload236) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload236.reinterpret_as_int()) + match payload505.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - FlagsValue(payload237) => { - mbt_ffi_store8(iter_base + 0, 16) + () + } + 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(), + ) + + () + } + } - 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 }) - } - mbt_ffi_store32(iter_base + 12, payload237.length()) - mbt_ffi_store32(iter_base + 8, address238) - cleanup_list.push(address238) + () + } + } - () - } - TupleValue(payload240) => { - mbt_ffi_store8(iter_base + 0, 17) + match payload505.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - 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 + 12, payload240.length()) - mbt_ffi_store32(iter_base + 8, address241) - cleanup_list.push(address241) + () + } + 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(), + ) + + () + } + } - () - } - ListValue(payload243) => { - mbt_ffi_store8(iter_base + 0, 18) + () + } + } - 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) - } - mbt_ffi_store32(iter_base + 12, payload243.length()) - mbt_ffi_store32(iter_base + 8, address244) - cleanup_list.push(address244) + match payload505.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - FixedListValue(payload246) => { - mbt_ffi_store8(iter_base + 0, 19) + () + } + Some(payload517) => { + mbt_ffi_store8(iter_base + 64, 1) - 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) - } - mbt_ffi_store32(iter_base + 12, payload246.length()) - mbt_ffi_store32(iter_base + 8, address247) - cleanup_list.push(address247) + 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) - () - } - MapValue(payload249) => { - mbt_ffi_store8(iter_base + 0, 20) + () + } + } - 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) + () + } } - 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) + U16Type(payload519) => { + mbt_ffi_store8(iter_base + 0, 7) - match payload252 { + match payload519 { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload254) => { + Some(payload521) => { mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload254) + + match payload521.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + 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(), + ) + + () + } + } + + () + } + } + + match payload521.max { + None => { + mbt_ffi_store8(iter_base + 40, 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(), + ) + + () + } + } + + () + } + } + + match payload521.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload533) => { + mbt_ffi_store8(iter_base + 64, 1) + + 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) + + () + } + } () } @@ -1691,41 +3714,111 @@ pub fn persist_durable_function_invocation( () } - ResultValue(payload255) => { - mbt_ffi_store8(iter_base + 0, 22) + U32Type(payload535) => { + mbt_ffi_store8(iter_base + 0, 8) - match payload255 { - OkValue(payload256) => { + match payload535 { + None => { mbt_ffi_store8(iter_base + 8, 0) - match payload256 { + () + } + Some(payload537) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload537.min { None => { - mbt_ffi_store8(iter_base + 12, 0) + mbt_ffi_store8(iter_base + 16, 0) () } - Some(payload258) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload258) + 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(), + ) + + () + } + } () } } - () - } - ErrValue(payload259) => { - mbt_ffi_store8(iter_base + 8, 1) + match payload537.max { + None => { + mbt_ffi_store8(iter_base + 40, 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(), + ) + + () + } + } + + () + } + } - match payload259 { + match payload537.unit { None => { - mbt_ffi_store8(iter_base + 12, 0) + mbt_ffi_store8(iter_base + 64, 0) () } - Some(payload261) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload261) + 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) () } @@ -1737,210 +3830,351 @@ pub fn persist_durable_function_invocation( () } - 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) + U64Type(payload551) => { + mbt_ffi_store8(iter_base + 0, 9) - match payload262.language { + match payload551 { None => { - mbt_ffi_store8(iter_base + 16, 0) + mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload265) => { - mbt_ffi_store8(iter_base + 16, 1) + Some(payload553) => { + mbt_ffi_store8(iter_base + 8, 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) + match payload553.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - } - cleanup_list.push(ptr263) + () + } + 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(), + ) + + () + } + } - () - } - BinaryValue(payload267) => { - mbt_ffi_store8(iter_base + 0, 24) + () + } + } + + match payload553.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let ptr268 = mbt_ffi_bytes2ptr(payload267.bytes) + () + } + 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(), + ) + + () + } + } - mbt_ffi_store32(iter_base + 12, payload267.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr268) + () + } + } - match payload267.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + match payload553.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - Some(payload270) => { - mbt_ffi_store8(iter_base + 16, 1) + () + } + Some(payload565) => { + mbt_ffi_store8(iter_base + 64, 1) - 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) + 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) + + () + } + } () } } - cleanup_list.push(ptr268) () } - PathValue(payload272) => { - mbt_ffi_store8(iter_base + 0, 25) + F32Type(payload567) => { + mbt_ffi_store8(iter_base + 0, 10) - 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) + match payload567 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - () - } - UrlValue(payload274) => { - mbt_ffi_store8(iter_base + 0, 26) + () + } + Some(payload569) => { + mbt_ffi_store8(iter_base + 8, 1) - 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) + match payload569.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - 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(), - ) + () + } + 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(), + ) + + () + } + } - () - } - DurationValue(payload277) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload277.nanoseconds) + () + } + } - () - } - QuantityValueNode(payload278) => { - mbt_ffi_store8(iter_base + 0, 29) - mbt_ffi_store64(iter_base + 8, payload278.mantissa) - mbt_ffi_store32(iter_base + 16, payload278.scale) + match payload569.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - 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) + () + } + 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(), + ) + + () + } + } - () - } - UnionValue(payload280) => { - 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) + match payload569.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - SecretValue(payload282) => { - mbt_ffi_store8(iter_base + 0, 31) + () + } + Some(payload581) => { + mbt_ffi_store8(iter_base + 64, 1) - let @types.Secret(handle) = payload282 - mbt_ffi_store32(iter_base + 8, handle) + 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) - () - } - QuotaTokenHandle(payload283) => { - mbt_ffi_store8(iter_base + 0, 32) + () + } + } - let @types.QuotaToken(handle284) = payload283 - mbt_ffi_store32(iter_base + 8, handle284) + () + } + } () } - } - } - 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) + F64Type(payload583) => { + mbt_ffi_store8(iter_base + 0, 11) - 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 + match payload583 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - match iter_elem.body { - RefType(payload287) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store32(iter_base + 8, payload287) + () + } + Some(payload585) => { + mbt_ffi_store8(iter_base + 8, 1) - () - } - BoolType => { - mbt_ffi_store8(iter_base + 0, 1) + match payload585.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - S8Type => { - mbt_ffi_store8(iter_base + 0, 2) + () + } + 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(), + ) + + () + } + } - () - } - S16Type => { - mbt_ffi_store8(iter_base + 0, 3) + () + } + } - () - } - S32Type => { - mbt_ffi_store8(iter_base + 0, 4) + match payload585.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - () - } - S64Type => { - mbt_ffi_store8(iter_base + 0, 5) + () + } + 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(), + ) + + () + } + } - () - } - U8Type => { - mbt_ffi_store8(iter_base + 0, 6) + () + } + } - () - } - U16Type => { - mbt_ffi_store8(iter_base + 0, 7) + match payload585.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - U32Type => { - mbt_ffi_store8(iter_base + 0, 8) + () + } + Some(payload597) => { + mbt_ffi_store8(iter_base + 64, 1) - () - } - U64Type => { - mbt_ffi_store8(iter_base + 0, 9) + 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) - () - } - F32Type => { - mbt_ffi_store8(iter_base + 0, 10) + () + } + } - () - } - F64Type => { - mbt_ffi_store8(iter_base + 0, 11) + () + } + } () } @@ -1954,19 +4188,19 @@ pub fn persist_durable_function_invocation( () } - RecordType(payload301) => { + RecordType(payload601) => { mbt_ffi_store8(iter_base + 0, 14) - 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 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 ptr302 = mbt_ffi_str2ptr(iter_elem.name) + let ptr602 = 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 + 0, ptr602) mbt_ffi_store32(iter_base + 8, iter_elem.body) match iter_elem.metadata.doc { @@ -1975,51 +4209,51 @@ pub fn persist_durable_function_invocation( () } - Some(payload304) => { + Some(payload604) => { mbt_ffi_store8(iter_base + 12, 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 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 address307 = mbt_ffi_malloc( + let address607 = 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 + 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 ptr306 = 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, ptr306) - cleanup_list.push(ptr306) + mbt_ffi_store32(iter_base + 0, ptr606) + cleanup_list.push(ptr606) } mbt_ffi_store32(iter_base + 28, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 24, address307) + mbt_ffi_store32(iter_base + 24, address607) - let address310 = mbt_ffi_malloc( + let address610 = 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 + 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 ptr309 = 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, ptr309) - cleanup_list.push(ptr309) + mbt_ffi_store32(iter_base + 0, ptr609) + cleanup_list.push(ptr609) } mbt_ffi_store32(iter_base + 36, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 32, address310) + mbt_ffi_store32(iter_base + 32, address610) match iter_elem.metadata.deprecated { None => { @@ -2027,13 +4261,13 @@ pub fn persist_durable_function_invocation( () } - Some(payload313) => { + Some(payload613) => { mbt_ffi_store8(iter_base + 40, 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 ptr614 = mbt_ffi_str2ptr(payload613) + mbt_ffi_store32(iter_base + 48, payload613.length()) + mbt_ffi_store32(iter_base + 44, ptr614) + cleanup_list.push(ptr614) () } @@ -2045,10 +4279,10 @@ pub fn persist_durable_function_invocation( () } - Some(payload316) => { + Some(payload616) => { mbt_ffi_store8(iter_base + 52, 1) - match payload316 { + match payload616 { Multimodal => { mbt_ffi_store8(iter_base + 56, 0) @@ -2064,13 +4298,13 @@ pub fn persist_durable_function_invocation( () } - Other(payload320) => { + Other(payload620) => { mbt_ffi_store8(iter_base + 56, 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 ptr621 = mbt_ffi_str2ptr(payload620) + mbt_ffi_store32(iter_base + 64, payload620.length()) + mbt_ffi_store32(iter_base + 60, ptr621) + cleanup_list.push(ptr621) () } @@ -2079,29 +4313,29 @@ pub fn persist_durable_function_invocation( () } } - cleanup_list.push(ptr302) - cleanup_list.push(address307) - cleanup_list.push(address310) + cleanup_list.push(ptr602) + cleanup_list.push(address607) + cleanup_list.push(address610) } - 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, payload601.length()) + mbt_ffi_store32(iter_base + 8, address622) + cleanup_list.push(address622) () } - VariantType(payload324) => { + VariantType(payload624) => { 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 + 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 - let ptr325 = mbt_ffi_str2ptr(iter_elem.name) + let ptr625 = mbt_ffi_str2ptr(iter_elem.name) mbt_ffi_store32(iter_base + 4, iter_elem.name.length()) - mbt_ffi_store32(iter_base + 0, ptr325) + mbt_ffi_store32(iter_base + 0, ptr625) match iter_elem.payload { None => { @@ -2109,9 +4343,9 @@ pub fn persist_durable_function_invocation( () } - Some(payload327) => { + Some(payload627) => { mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload327) + mbt_ffi_store32(iter_base + 12, payload627) () } @@ -2123,51 +4357,51 @@ pub fn persist_durable_function_invocation( () } - Some(payload329) => { + Some(payload629) => { mbt_ffi_store8(iter_base + 16, 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 ptr630 = mbt_ffi_str2ptr(payload629) + mbt_ffi_store32(iter_base + 24, payload629.length()) + mbt_ffi_store32(iter_base + 20, ptr630) + cleanup_list.push(ptr630) () } } - let address332 = mbt_ffi_malloc( + let address632 = 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 + 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 - let ptr331 = mbt_ffi_str2ptr(iter_elem) + let ptr631 = 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) + mbt_ffi_store32(iter_base + 0, ptr631) + cleanup_list.push(ptr631) } mbt_ffi_store32(iter_base + 32, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 28, address332) + mbt_ffi_store32(iter_base + 28, address632) - let address335 = mbt_ffi_malloc( + let address635 = 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 + 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 - let ptr334 = mbt_ffi_str2ptr(iter_elem) + let ptr634 = 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) + mbt_ffi_store32(iter_base + 0, ptr634) + cleanup_list.push(ptr634) } mbt_ffi_store32(iter_base + 40, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 36, address335) + mbt_ffi_store32(iter_base + 36, address635) match iter_elem.metadata.deprecated { None => { @@ -2175,13 +4409,13 @@ pub fn persist_durable_function_invocation( () } - Some(payload338) => { + Some(payload638) => { 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) + 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) () } @@ -2193,10 +4427,10 @@ pub fn persist_durable_function_invocation( () } - Some(payload341) => { + Some(payload641) => { mbt_ffi_store8(iter_base + 56, 1) - match payload341 { + match payload641 { Multimodal => { mbt_ffi_store8(iter_base + 60, 0) @@ -2212,13 +4446,13 @@ pub fn persist_durable_function_invocation( () } - Other(payload345) => { + Other(payload645) => { mbt_ffi_store8(iter_base + 60, 3) - 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) + 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) () } @@ -2227,127 +4461,127 @@ pub fn persist_durable_function_invocation( () } } - cleanup_list.push(ptr325) - cleanup_list.push(address332) - cleanup_list.push(address335) + cleanup_list.push(ptr625) + cleanup_list.push(address632) + cleanup_list.push(address635) } - mbt_ffi_store32(iter_base + 12, payload324.length()) - mbt_ffi_store32(iter_base + 8, address347) - cleanup_list.push(address347) + mbt_ffi_store32(iter_base + 12, payload624.length()) + mbt_ffi_store32(iter_base + 8, address647) + cleanup_list.push(address647) () } - EnumType(payload349) => { + EnumType(payload649) => { mbt_ffi_store8(iter_base + 0, 16) - 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 + 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 ptr350 = mbt_ffi_str2ptr(iter_elem) + let ptr650 = 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) + mbt_ffi_store32(iter_base + 0, ptr650) + cleanup_list.push(ptr650) } - mbt_ffi_store32(iter_base + 12, payload349.length()) - mbt_ffi_store32(iter_base + 8, address351) - cleanup_list.push(address351) + mbt_ffi_store32(iter_base + 12, payload649.length()) + mbt_ffi_store32(iter_base + 8, address651) + cleanup_list.push(address651) () } - FlagsType(payload353) => { + FlagsType(payload653) => { 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 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 - let ptr354 = mbt_ffi_str2ptr(iter_elem) + let ptr654 = 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) + mbt_ffi_store32(iter_base + 0, ptr654) + cleanup_list.push(ptr654) } - mbt_ffi_store32(iter_base + 12, payload353.length()) - mbt_ffi_store32(iter_base + 8, address355) - cleanup_list.push(address355) + mbt_ffi_store32(iter_base + 12, payload653.length()) + mbt_ffi_store32(iter_base + 8, address655) + cleanup_list.push(address655) () } - TupleType(payload357) => { + TupleType(payload657) => { mbt_ffi_store8(iter_base + 0, 18) - 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 + 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) } - mbt_ffi_store32(iter_base + 12, payload357.length()) - mbt_ffi_store32(iter_base + 8, address358) - cleanup_list.push(address358) + mbt_ffi_store32(iter_base + 12, payload657.length()) + mbt_ffi_store32(iter_base + 8, address658) + cleanup_list.push(address658) () } - ListType(payload360) => { + ListType(payload660) => { mbt_ffi_store8(iter_base + 0, 19) - mbt_ffi_store32(iter_base + 8, payload360) + mbt_ffi_store32(iter_base + 8, payload660) () } - FixedListType(payload361) => { + FixedListType(payload661) => { 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()) + mbt_ffi_store32(iter_base + 8, payload661.element) + mbt_ffi_store32(iter_base + 12, payload661.length.reinterpret_as_int()) () } - MapType(payload362) => { + MapType(payload662) => { mbt_ffi_store8(iter_base + 0, 21) - mbt_ffi_store32(iter_base + 8, payload362.key) - mbt_ffi_store32(iter_base + 12, payload362.value) + mbt_ffi_store32(iter_base + 8, payload662.key) + mbt_ffi_store32(iter_base + 12, payload662.value) () } - OptionType(payload363) => { + OptionType(payload663) => { mbt_ffi_store8(iter_base + 0, 22) - mbt_ffi_store32(iter_base + 8, payload363) + mbt_ffi_store32(iter_base + 8, payload663) () } - ResultType(payload364) => { + ResultType(payload664) => { mbt_ffi_store8(iter_base + 0, 23) - match payload364.ok { + match payload664.ok { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload366) => { + Some(payload666) => { mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload366) + mbt_ffi_store32(iter_base + 12, payload666) () } } - match payload364.err { + match payload664.err { None => { mbt_ffi_store8(iter_base + 16, 0) () } - Some(payload368) => { + Some(payload668) => { mbt_ffi_store8(iter_base + 16, 1) - mbt_ffi_store32(iter_base + 20, payload368) + mbt_ffi_store32(iter_base + 20, payload668) () } @@ -2355,79 +4589,79 @@ pub fn persist_durable_function_invocation( () } - TextType(payload369) => { + TextType(payload669) => { mbt_ffi_store8(iter_base + 0, 24) - match payload369.languages { + match payload669.languages { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload371) => { + Some(payload671) => { mbt_ffi_store8(iter_base + 8, 1) - 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 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 - let ptr372 = mbt_ffi_str2ptr(iter_elem) + let ptr672 = 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) + mbt_ffi_store32(iter_base + 0, ptr672) + cleanup_list.push(ptr672) } - mbt_ffi_store32(iter_base + 16, payload371.length()) - mbt_ffi_store32(iter_base + 12, address373) - cleanup_list.push(address373) + mbt_ffi_store32(iter_base + 16, payload671.length()) + mbt_ffi_store32(iter_base + 12, address673) + cleanup_list.push(address673) () } } - match payload369.min_length { + match payload669.min_length { None => { mbt_ffi_store8(iter_base + 20, 0) () } - Some(payload376) => { + Some(payload676) => { mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload376.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 24, payload676.reinterpret_as_int()) () } } - match payload369.max_length { + match payload669.max_length { None => { mbt_ffi_store8(iter_base + 28, 0) () } - Some(payload378) => { + Some(payload678) => { mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload378.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 32, payload678.reinterpret_as_int()) () } } - match payload369.regex { + match payload669.regex { None => { mbt_ffi_store8(iter_base + 36, 0) () } - Some(payload380) => { + Some(payload680) => { mbt_ffi_store8(iter_base + 36, 1) - 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 ptr681 = mbt_ffi_str2ptr(payload680) + mbt_ffi_store32(iter_base + 44, payload680.length()) + mbt_ffi_store32(iter_base + 40, ptr681) + cleanup_list.push(ptr681) () } @@ -2435,61 +4669,61 @@ pub fn persist_durable_function_invocation( () } - BinaryType(payload382) => { + BinaryType(payload682) => { mbt_ffi_store8(iter_base + 0, 25) - match payload382.mime_types { + match payload682.mime_types { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload384) => { + Some(payload684) => { 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 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 ptr385 = mbt_ffi_str2ptr(iter_elem) + let ptr685 = 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 + 0, ptr685) + cleanup_list.push(ptr685) } - mbt_ffi_store32(iter_base + 16, payload384.length()) - mbt_ffi_store32(iter_base + 12, address386) - cleanup_list.push(address386) + mbt_ffi_store32(iter_base + 16, payload684.length()) + mbt_ffi_store32(iter_base + 12, address686) + cleanup_list.push(address686) () } } - match payload382.min_bytes { + match payload682.min_bytes { None => { mbt_ffi_store8(iter_base + 20, 0) () } - Some(payload389) => { + Some(payload689) => { mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload389.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 24, payload689.reinterpret_as_int()) () } } - match payload382.max_bytes { + match payload682.max_bytes { None => { mbt_ffi_store8(iter_base + 28, 0) () } - Some(payload391) => { + Some(payload691) => { mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload391.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 32, payload691.reinterpret_as_int()) () } @@ -2497,64 +4731,64 @@ pub fn persist_durable_function_invocation( () } - PathType(payload392) => { + PathType(payload692) => { 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()) + mbt_ffi_store8(iter_base + 8, payload692.direction.ordinal()) + mbt_ffi_store8(iter_base + 9, payload692.kind.ordinal()) - match payload392.allowed_mime_types { + match payload692.allowed_mime_types { None => { mbt_ffi_store8(iter_base + 12, 0) () } - Some(payload394) => { + Some(payload694) => { 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 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 ptr395 = mbt_ffi_str2ptr(iter_elem) + let ptr695 = 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) + mbt_ffi_store32(iter_base + 0, ptr695) + cleanup_list.push(ptr695) } - mbt_ffi_store32(iter_base + 20, payload394.length()) - mbt_ffi_store32(iter_base + 16, address396) - cleanup_list.push(address396) + mbt_ffi_store32(iter_base + 20, payload694.length()) + mbt_ffi_store32(iter_base + 16, address696) + cleanup_list.push(address696) () } } - match payload392.allowed_extensions { + match payload692.allowed_extensions { None => { mbt_ffi_store8(iter_base + 24, 0) () } - Some(payload399) => { + Some(payload699) => { 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 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 ptr400 = mbt_ffi_str2ptr(iter_elem) + let ptr700 = 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 + 0, ptr700) + cleanup_list.push(ptr700) } - mbt_ffi_store32(iter_base + 32, payload399.length()) - mbt_ffi_store32(iter_base + 28, address401) - cleanup_list.push(address401) + mbt_ffi_store32(iter_base + 32, payload699.length()) + mbt_ffi_store32(iter_base + 28, address701) + cleanup_list.push(address701) () } @@ -2562,62 +4796,62 @@ pub fn persist_durable_function_invocation( () } - UrlType(payload403) => { + UrlType(payload703) => { mbt_ffi_store8(iter_base + 0, 27) - match payload403.allowed_schemes { + match payload703.allowed_schemes { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload405) => { + Some(payload705) => { 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 + 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 ptr406 = mbt_ffi_str2ptr(iter_elem) + let ptr706 = 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) + mbt_ffi_store32(iter_base + 0, ptr706) + cleanup_list.push(ptr706) } - mbt_ffi_store32(iter_base + 16, payload405.length()) - mbt_ffi_store32(iter_base + 12, address407) - cleanup_list.push(address407) + mbt_ffi_store32(iter_base + 16, payload705.length()) + mbt_ffi_store32(iter_base + 12, address707) + cleanup_list.push(address707) () } } - match payload403.allowed_hosts { + match payload703.allowed_hosts { None => { mbt_ffi_store8(iter_base + 20, 0) () } - Some(payload410) => { + Some(payload710) => { mbt_ffi_store8(iter_base + 20, 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 + 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 ptr411 = mbt_ffi_str2ptr(iter_elem) + let ptr711 = 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) + mbt_ffi_store32(iter_base + 0, ptr711) + cleanup_list.push(ptr711) } - mbt_ffi_store32(iter_base + 28, payload410.length()) - mbt_ffi_store32(iter_base + 24, address412) - cleanup_list.push(address412) + mbt_ffi_store32(iter_base + 28, payload710.length()) + mbt_ffi_store32(iter_base + 24, address712) + cleanup_list.push(address712) () } @@ -2635,165 +4869,165 @@ pub fn persist_durable_function_invocation( () } - QuantityType(payload416) => { + QuantityType(payload716) => { 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 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 address419 = mbt_ffi_malloc( - payload416.allowed_suffixes.length() * 8, + let address719 = mbt_ffi_malloc( + payload716.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 + 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 ptr418 = mbt_ffi_str2ptr(iter_elem) + let ptr718 = 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) + mbt_ffi_store32(iter_base + 0, ptr718) + cleanup_list.push(ptr718) } - mbt_ffi_store32(iter_base + 20, payload416.allowed_suffixes.length()) - mbt_ffi_store32(iter_base + 16, address419) + mbt_ffi_store32(iter_base + 20, payload716.allowed_suffixes.length()) + mbt_ffi_store32(iter_base + 16, address719) - match payload416.min { + match payload716.min { None => { mbt_ffi_store8(iter_base + 24, 0) () } - Some(payload422) => { + Some(payload722) => { mbt_ffi_store8(iter_base + 24, 1) - mbt_ffi_store64(iter_base + 32, payload422.mantissa) - mbt_ffi_store32(iter_base + 40, payload422.scale) + mbt_ffi_store64(iter_base + 32, payload722.mantissa) + mbt_ffi_store32(iter_base + 40, payload722.scale) - 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 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) () } } - match payload416.max { + match payload716.max { None => { mbt_ffi_store8(iter_base + 56, 0) () } - Some(payload425) => { + Some(payload725) => { mbt_ffi_store8(iter_base + 56, 1) - mbt_ffi_store64(iter_base + 64, payload425.mantissa) - mbt_ffi_store32(iter_base + 72, payload425.scale) + mbt_ffi_store64(iter_base + 64, payload725.mantissa) + mbt_ffi_store32(iter_base + 72, payload725.scale) - 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 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(ptr417) - cleanup_list.push(address419) + cleanup_list.push(ptr717) + cleanup_list.push(address719) () } - UnionType(payload427) => { + UnionType(payload727) => { mbt_ffi_store8(iter_base + 0, 31) - 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 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 ptr428 = mbt_ffi_str2ptr(iter_elem.tag) + let ptr728 = 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 + 0, ptr728) mbt_ffi_store32(iter_base + 8, iter_elem.body) match iter_elem.discriminator { - Prefix(payload429) => { + Prefix(payload729) => { mbt_ffi_store8(iter_base + 12, 0) - 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) + 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) () } - Suffix(payload431) => { + Suffix(payload731) => { mbt_ffi_store8(iter_base + 12, 1) - 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) + 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) () } - Contains(payload433) => { + Contains(payload733) => { mbt_ffi_store8(iter_base + 12, 2) - 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) + 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) () } - Regex(payload435) => { + Regex(payload735) => { mbt_ffi_store8(iter_base + 12, 3) - 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) + 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) () } - FieldEquals(payload437) => { + FieldEquals(payload737) => { mbt_ffi_store8(iter_base + 12, 4) - 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) + 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) - match payload437.literal { + match payload737.literal { None => { mbt_ffi_store8(iter_base + 24, 0) () } - Some(payload440) => { + Some(payload740) => { 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) + 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) () } } - cleanup_list.push(ptr438) + cleanup_list.push(ptr738) () } - FieldAbsent(payload442) => { + FieldAbsent(payload742) => { mbt_ffi_store8(iter_base + 12, 5) - 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) + 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) () } @@ -2805,51 +5039,51 @@ pub fn persist_durable_function_invocation( () } - Some(payload445) => { + Some(payload745) => { mbt_ffi_store8(iter_base + 36, 1) - 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) + 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 address448 = mbt_ffi_malloc( + let address748 = 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 + 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 ptr447 = 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, ptr447) - cleanup_list.push(ptr447) + mbt_ffi_store32(iter_base + 0, ptr747) + cleanup_list.push(ptr747) } mbt_ffi_store32(iter_base + 52, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 48, address448) + mbt_ffi_store32(iter_base + 48, address748) - let address451 = mbt_ffi_malloc( + let address751 = 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 + 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 ptr450 = 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, ptr450) - cleanup_list.push(ptr450) + mbt_ffi_store32(iter_base + 0, ptr750) + cleanup_list.push(ptr750) } mbt_ffi_store32(iter_base + 60, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 56, address451) + mbt_ffi_store32(iter_base + 56, address751) match iter_elem.metadata.deprecated { None => { @@ -2857,13 +5091,13 @@ pub fn persist_durable_function_invocation( () } - Some(payload454) => { + Some(payload754) => { mbt_ffi_store8(iter_base + 64, 1) - 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 ptr755 = mbt_ffi_str2ptr(payload754) + mbt_ffi_store32(iter_base + 72, payload754.length()) + mbt_ffi_store32(iter_base + 68, ptr755) + cleanup_list.push(ptr755) () } @@ -2875,10 +5109,10 @@ pub fn persist_durable_function_invocation( () } - Some(payload457) => { + Some(payload757) => { mbt_ffi_store8(iter_base + 76, 1) - match payload457 { + match payload757 { Multimodal => { mbt_ffi_store8(iter_base + 80, 0) @@ -2894,13 +5128,13 @@ pub fn persist_durable_function_invocation( () } - Other(payload461) => { + Other(payload761) => { mbt_ffi_store8(iter_base + 80, 3) - 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) + 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) () } @@ -2909,33 +5143,33 @@ pub fn persist_durable_function_invocation( () } } - cleanup_list.push(ptr428) - cleanup_list.push(address448) - cleanup_list.push(address451) + cleanup_list.push(ptr728) + cleanup_list.push(address748) + cleanup_list.push(address751) } - mbt_ffi_store32(iter_base + 12, payload427.branches.length()) - mbt_ffi_store32(iter_base + 8, address463) - cleanup_list.push(address463) + mbt_ffi_store32(iter_base + 12, payload727.branches.length()) + mbt_ffi_store32(iter_base + 8, address763) + cleanup_list.push(address763) () } - SecretType(payload465) => { + SecretType(payload765) => { mbt_ffi_store8(iter_base + 0, 32) - mbt_ffi_store32(iter_base + 8, payload465.inner) + mbt_ffi_store32(iter_base + 8, payload765.inner) - match payload465.category { + match payload765.category { None => { mbt_ffi_store8(iter_base + 12, 0) () } - Some(payload467) => { + Some(payload767) => { mbt_ffi_store8(iter_base + 12, 1) - let ptr468 = mbt_ffi_str2ptr(payload467) - mbt_ffi_store32(iter_base + 20, payload467.length()) - mbt_ffi_store32(iter_base + 16, ptr468) - cleanup_list.push(ptr468) + let ptr768 = mbt_ffi_str2ptr(payload767) + mbt_ffi_store32(iter_base + 20, payload767.length()) + mbt_ffi_store32(iter_base + 16, ptr768) + cleanup_list.push(ptr768) () } @@ -2943,22 +5177,22 @@ pub fn persist_durable_function_invocation( () } - QuotaTokenType(payload469) => { + QuotaTokenType(payload769) => { mbt_ffi_store8(iter_base + 0, 33) - match payload469.resource_name { + match payload769.resource_name { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload471) => { + Some(payload771) => { mbt_ffi_store8(iter_base + 8, 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 ptr772 = mbt_ffi_str2ptr(payload771) + mbt_ffi_store32(iter_base + 16, payload771.length()) + mbt_ffi_store32(iter_base + 12, ptr772) + cleanup_list.push(ptr772) () } @@ -2966,18 +5200,18 @@ pub fn persist_durable_function_invocation( () } - FutureType(payload473) => { + FutureType(payload773) => { mbt_ffi_store8(iter_base + 0, 34) - match payload473 { + match payload773 { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload475) => { + Some(payload775) => { mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload475) + mbt_ffi_store32(iter_base + 12, payload775) () } @@ -2985,18 +5219,18 @@ pub fn persist_durable_function_invocation( () } - StreamType(payload476) => { + StreamType(payload776) => { mbt_ffi_store8(iter_base + 0, 35) - match payload476 { + match payload776 { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload478) => { + Some(payload778) => { mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload478) + mbt_ffi_store32(iter_base + 12, payload778) () } @@ -3012,47 +5246,47 @@ pub fn persist_durable_function_invocation( () } - Some(payload480) => { + Some(payload780) => { mbt_ffi_store8(iter_base + 88, 1) - 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) + 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) () } } - 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 + 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 - let ptr482 = mbt_ffi_str2ptr(iter_elem) + let ptr782 = 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) + mbt_ffi_store32(iter_base + 0, ptr782) + cleanup_list.push(ptr782) } mbt_ffi_store32(iter_base + 104, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 100, address483) + mbt_ffi_store32(iter_base + 100, address783) - 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 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 ptr485 = mbt_ffi_str2ptr(iter_elem) + let ptr785 = 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) + 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, address486) + mbt_ffi_store32(iter_base + 108, address786) match iter_elem.metadata.deprecated { None => { @@ -3060,13 +5294,13 @@ pub fn persist_durable_function_invocation( () } - Some(payload489) => { + Some(payload789) => { mbt_ffi_store8(iter_base + 116, 1) - 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 ptr790 = mbt_ffi_str2ptr(payload789) + mbt_ffi_store32(iter_base + 124, payload789.length()) + mbt_ffi_store32(iter_base + 120, ptr790) + cleanup_list.push(ptr790) () } @@ -3078,10 +5312,10 @@ pub fn persist_durable_function_invocation( () } - Some(payload492) => { + Some(payload792) => { mbt_ffi_store8(iter_base + 128, 1) - match payload492 { + match payload792 { Multimodal => { mbt_ffi_store8(iter_base + 132, 0) @@ -3097,610 +5331,1350 @@ pub fn persist_durable_function_invocation( () } - Other(payload496) => { + Other(payload796) => { mbt_ffi_store8(iter_base + 132, 3) - 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) + 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) + + () + } + } + + () + } + } + cleanup_list.push(address783) + cleanup_list.push(address786) + } + mbt_ffi_store32(return_area + 44, response.graph.type_nodes.length()) + mbt_ffi_store32(return_area + 40, address798) + + 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 + + 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) + + () + } + Some(payload802) => { + mbt_ffi_store8(iter_base + 8, 1) + + 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) + + () + } + } + mbt_ffi_store32(iter_base + 20, iter_elem.body) + cleanup_list.push(ptr800) + } + 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) + + 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 }) + + () + } + S8Value(payload807) => { + mbt_ffi_store8(iter_base + 0, 1) + mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload807)) + + () + } + S16Value(payload808) => { + mbt_ffi_store8(iter_base + 0, 2) + mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload808)) + + () + } + S32Value(payload809) => { + mbt_ffi_store8(iter_base + 0, 3) + mbt_ffi_store32(iter_base + 8, payload809) + + () + } + S64Value(payload810) => { + mbt_ffi_store8(iter_base + 0, 4) + mbt_ffi_store64(iter_base + 8, payload810) + + () + } + 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()) + + () + } + U32Value(payload813) => { + mbt_ffi_store8(iter_base + 0, 7) + mbt_ffi_store32(iter_base + 8, payload813.reinterpret_as_int()) + + () + } + 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) + + () + } + F64Value(payload816) => { + mbt_ffi_store8(iter_base + 0, 10) + mbt_ffi_storef64(iter_base + 8, payload816) + + () + } + CharValue(payload817) => { + mbt_ffi_store8(iter_base + 0, 11) + mbt_ffi_store32(iter_base + 8, payload817.to_int()) + + () + } + StringValue(payload818) => { + mbt_ffi_store8(iter_base + 0, 12) + + 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) + + () + } + RecordValue(payload820) => { + mbt_ffi_store8(iter_base + 0, 13) + + 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) + + () + } + VariantValue(payload823) => { + mbt_ffi_store8(iter_base + 0, 14) + mbt_ffi_store32(iter_base + 8, payload823.case.reinterpret_as_int()) + + match payload823.payload { + None => { + mbt_ffi_store8(iter_base + 12, 0) + + () + } + Some(payload825) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload825) + + () + } + } + + () + } + EnumValue(payload826) => { + mbt_ffi_store8(iter_base + 0, 15) + mbt_ffi_store32(iter_base + 8, payload826.reinterpret_as_int()) + + () + } + FlagsValue(payload827) => { + mbt_ffi_store8(iter_base + 0, 16) + + 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) + + () + } + TupleValue(payload830) => { + mbt_ffi_store8(iter_base + 0, 17) + + 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) + + () + } + ListValue(payload833) => { + mbt_ffi_store8(iter_base + 0, 18) + + 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) + + () + } + FixedListValue(payload836) => { + mbt_ffi_store8(iter_base + 0, 19) + + 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) + + () + } + MapValue(payload839) => { + mbt_ffi_store8(iter_base + 0, 20) + + 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) + + () + } + OptionValue(payload842) => { + mbt_ffi_store8(iter_base + 0, 21) + + match payload842 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload844) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload844) + + () + } + } + + () + } + ResultValue(payload845) => { + mbt_ffi_store8(iter_base + 0, 22) + + match payload845 { + OkValue(payload846) => { + mbt_ffi_store8(iter_base + 8, 0) + + match payload846 { + None => { + mbt_ffi_store8(iter_base + 12, 0) + + () + } + Some(payload848) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload848) + + () + } + } + + () + } + ErrValue(payload849) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload849 { + None => { + mbt_ffi_store8(iter_base + 12, 0) + + () + } + Some(payload851) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload851) + + () + } + } + + () + } + } + + () + } + TextValue(payload852) => { + mbt_ffi_store8(iter_base + 0, 23) + + let ptr853 = mbt_ffi_str2ptr(payload852.text) + mbt_ffi_store32(iter_base + 12, payload852.text.length()) + mbt_ffi_store32(iter_base + 8, ptr853) + + match payload852.language { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload855) => { + mbt_ffi_store8(iter_base + 16, 1) + + 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) () } - } - cleanup_list.push(address483) - cleanup_list.push(address486) - } - mbt_ffi_store32(return_area + 44, response.graph.type_nodes.length()) - mbt_ffi_store32(return_area + 40, address498) + BinaryValue(payload857) => { + mbt_ffi_store8(iter_base + 0, 24) - 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 ptr858 = mbt_ffi_bytes2ptr(payload857.bytes) - 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) + mbt_ffi_store32(iter_base + 12, payload857.bytes.length()) + mbt_ffi_store32(iter_base + 8, ptr858) - match iter_elem.name { - None => { - mbt_ffi_store8(iter_base + 8, 0) + match payload857.mime_type { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - Some(payload502) => { - mbt_ffi_store8(iter_base + 8, 1) + () + } + Some(payload860) => { + mbt_ffi_store8(iter_base + 16, 1) + + 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) - 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) + () + } + } + cleanup_list.push(ptr858) () } - } - mbt_ffi_store32(iter_base + 20, iter_elem.body) - cleanup_list.push(ptr500) - } - 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 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 + PathValue(payload862) => { + mbt_ffi_store8(iter_base + 0, 25) - match iter_elem { - BoolValue(payload506) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store8(iter_base + 8, if payload506 { 1 } else { 0 }) + 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) () } - S8Value(payload507) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload507)) + UrlValue(payload864) => { + mbt_ffi_store8(iter_base + 0, 26) - () - } - S16Value(payload508) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload508)) + 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) () } - S32Value(payload509) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload509) + 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(), + ) () } - S64Value(payload510) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload510) + DurationValue(payload867) => { + mbt_ffi_store8(iter_base + 0, 28) + mbt_ffi_store64(iter_base + 8, payload867.nanoseconds) () } - U8Value(payload511) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload511.to_int()) + 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) - () - } - U16Value(payload512) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload512.reinterpret_as_int()) + 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) () } - U32Value(payload513) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload513.reinterpret_as_int()) + UnionValue(payload870) => { + mbt_ffi_store8(iter_base + 0, 30) - () - } - U64Value(payload514) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload514.reinterpret_as_int64()) + 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) () } - F32Value(payload515) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload515) + SecretValue(payload872) => { + mbt_ffi_store8(iter_base + 0, 31) - () - } - F64Value(payload516) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload516) + let @types.Secret(handle873) = payload872 + mbt_ffi_store32(iter_base + 8, handle873) () } - CharValue(payload517) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload517.to_int()) + QuotaTokenHandle(payload874) => { + mbt_ffi_store8(iter_base + 0, 32) + + let @types.QuotaToken(handle875) = payload874 + mbt_ffi_store32(iter_base + 8, handle875) () } - StringValue(payload518) => { - mbt_ffi_store8(iter_base + 0, 12) + } + } + 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) - 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) + match function_type { + ReadLocal => { + mbt_ffi_store8(return_area + 72, 0) - () - } - RecordValue(payload520) => { - mbt_ffi_store8(iter_base + 0, 13) + () + } + WriteLocal => { + mbt_ffi_store8(return_area + 72, 1) - 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) - } - mbt_ffi_store32(iter_base + 12, payload520.length()) - mbt_ffi_store32(iter_base + 8, address521) - cleanup_list.push(address521) + () + } + ReadRemote => { + mbt_ffi_store8(return_area + 72, 2) - () - } - VariantValue(payload523) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload523.case.reinterpret_as_int()) + () + } + WriteRemote => { + mbt_ffi_store8(return_area + 72, 3) - match payload523.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + () + } + WriteRemoteBatched(payload882) => { + mbt_ffi_store8(return_area + 72, 4) - () - } - Some(payload525) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload525) + match payload882 { + None => { + mbt_ffi_store8(return_area + 80, 0) - () - } + () } + Some(payload884) => { + mbt_ffi_store8(return_area + 80, 1) + mbt_ffi_store64(return_area + 88, payload884.reinterpret_as_int64()) - () + () + } } - EnumValue(payload526) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload526.reinterpret_as_int()) - () - } - FlagsValue(payload527) => { - mbt_ffi_store8(iter_base + 0, 16) + () + } + WriteRemoteTransaction(payload885) => { + mbt_ffi_store8(return_area + 72, 5) - 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 }) + match payload885 { + None => { + mbt_ffi_store8(return_area + 80, 0) + + () } - mbt_ffi_store32(iter_base + 12, payload527.length()) - mbt_ffi_store32(iter_base + 8, address528) - cleanup_list.push(address528) + Some(payload887) => { + mbt_ffi_store8(return_area + 80, 1) + mbt_ffi_store64(return_area + 88, payload887.reinterpret_as_int64()) - () + () + } } - TupleValue(payload530) => { - mbt_ffi_store8(iter_base + 0, 17) - 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) - } - mbt_ffi_store32(iter_base + 12, payload530.length()) - mbt_ffi_store32(iter_base + 8, address531) - cleanup_list.push(address531) + () + } + } + 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) - () - } - ListValue(payload533) => { - mbt_ffi_store8(iter_base + 0, 18) + cleanup_list.each(mbt_ffi_free) +} - 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) - } - mbt_ffi_store32(iter_base + 12, payload533.length()) - mbt_ffi_store32(iter_base + 8, address534) - cleanup_list.push(address534) +///| +/// Reads the next persisted durable function invocation from the oplog during replay +pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionInvocation { + let return_area = mbt_ffi_malloc(88) + wasmImportReadPersistedDurableFunctionInvocation(return_area) - () - } - FixedListValue(payload536) => { - mbt_ffi_store8(iter_base + 0, 19) + let result = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), + ) - 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) - } - mbt_ffi_store32(iter_base + 12, payload536.length()) - mbt_ffi_store32(iter_base + 8, address537) - cleanup_list.push(address537) + 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 - () - } - MapValue(payload539) => { - mbt_ffi_store8(iter_base + 0, 20) + let lifted179 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @types.SchemaTypeBody::RefType(mbt_ffi_load32(iter_base + 8)) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted5 : @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() + } - 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) + 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 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() } - mbt_ffi_store32(iter_base + 12, payload539.length()) - mbt_ffi_store32(iter_base + 8, address540) - cleanup_list.push(address540) - () + @types.SchemaTypeBody::S8Type(lifted5) } - OptionValue(payload542) => { - mbt_ffi_store8(iter_base + 0, 21) + 3 => { + let lifted12 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted7 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted6 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 32)) + 1 => + @types.NumericBound::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 payload542 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(lifted6) + } + _ => panic() + } - () - } - Some(payload544) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload544) + let lifted9 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted8 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 56)) + 1 => + @types.NumericBound::Unsigned( + mbt_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() + } + + let lifted11 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + 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() } - () + @types.SchemaTypeBody::S16Type(lifted12) } - ResultValue(payload545) => { - mbt_ffi_store8(iter_base + 0, 22) + 4 => { + let lifted19 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted14 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted13 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 32)) + 1 => + @types.NumericBound::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 payload545 { - OkValue(payload546) => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(lifted13) + } + _ => panic() + } - match payload546 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 56)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () + Option::Some(lifted15) } - Some(payload548) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload548) + _ => panic() + } - () + let lifted18 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result17 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result17) } + _ => panic() } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted14, + max: lifted16, + unit: lifted18, + }) } - ErrValue(payload549) => { - mbt_ffi_store8(iter_base + 8, 1) + _ => panic() + } - match payload549 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + @types.SchemaTypeBody::S32Type(lifted19) + } + 5 => { + let lifted26 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted21 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted20 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 32)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () + Option::Some(lifted20) } - Some(payload551) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload551) + _ => panic() + } + + let lifted23 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted22 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 56)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted22) + } + _ => panic() + } - () + let lifted25 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result24 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result24) } + _ => panic() } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted21, + max: lifted23, + unit: lifted25, + }) } + _ => panic() } - () + @types.SchemaTypeBody::S64Type(lifted26) } - TextValue(payload552) => { - mbt_ffi_store8(iter_base + 0, 23) + 6 => { + let lifted33 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted28 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted27 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 32)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted27) + } + _ => panic() + } - let ptr553 = mbt_ffi_str2ptr(payload552.text) - mbt_ffi_store32(iter_base + 12, payload552.text.length()) - mbt_ffi_store32(iter_base + 8, ptr553) + let lifted30 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted29 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 56)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - match payload552.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + Option::Some(lifted29) + } + _ => panic() + } - () - } - Some(payload555) => { - mbt_ffi_store8(iter_base + 16, 1) + let lifted32 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result31 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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) + Option::Some(result31) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted28, + max: lifted30, + unit: lifted32, + }) } + _ => panic() } - cleanup_list.push(ptr553) - () + @types.SchemaTypeBody::U8Type(lifted33) } - BinaryValue(payload557) => { - mbt_ffi_store8(iter_base + 0, 24) + 7 => { + let lifted40 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted35 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted34 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 32)) + 1 => + @types.NumericBound::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 ptr558 = mbt_ffi_bytes2ptr(payload557.bytes) + Option::Some(lifted34) + } + _ => panic() + } - mbt_ffi_store32(iter_base + 12, payload557.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr558) + let lifted37 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted36 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 56)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - match payload557.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + Option::Some(lifted36) + } + _ => panic() + } - () - } - Some(payload560) => { - mbt_ffi_store8(iter_base + 16, 1) + 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), + ) - 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) + Option::Some(result38) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted35, + max: lifted37, + unit: lifted39, + }) } + _ => panic() } - cleanup_list.push(ptr558) - () + @types.SchemaTypeBody::U16Type(lifted40) } - PathValue(payload562) => { - mbt_ffi_store8(iter_base + 0, 25) - - 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) + 8 => { + let lifted47 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 32)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - UrlValue(payload564) => { - mbt_ffi_store8(iter_base + 0, 26) + Option::Some(lifted41) + } + _ => panic() + } - 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) + let lifted44 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted43 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 56)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - 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(), - ) + Option::Some(lifted43) + } + _ => panic() + } - () - } - DurationValue(payload567) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload567.nanoseconds) + 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), + ) - () - } - 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(result45) + } + _ => 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) + Option::Some(@types.NumericRestrictions::{ + min: lifted42, + max: lifted44, + unit: lifted46, + }) + } + _ => panic() + } - () + @types.SchemaTypeBody::U32Type(lifted47) } - UnionValue(payload570) => { - mbt_ffi_store8(iter_base + 0, 30) + 9 => { + let lifted54 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted49 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted48 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 32)) + 1 => + @types.NumericBound::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 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(lifted48) + } + _ => panic() + } - () - } - SecretValue(payload572) => { - mbt_ffi_store8(iter_base + 0, 31) + 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 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 56)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let @types.Secret(handle573) = payload572 - mbt_ffi_store32(iter_base + 8, handle573) + Option::Some(lifted50) + } + _ => panic() + } - () - } - QuotaTokenHandle(payload574) => { - mbt_ffi_store8(iter_base + 0, 32) + let lifted53 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result52 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let @types.QuotaToken(handle575) = payload574 - mbt_ffi_store32(iter_base + 8, handle575) + Option::Some(result52) + } + _ => panic() + } - () - } - } - } - 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) + Option::Some(@types.NumericRestrictions::{ + min: lifted49, + max: lifted51, + unit: lifted53, + }) + } + _ => panic() + } - match function_type { - ReadLocal => { - mbt_ffi_store8(return_area + 72, 0) + @types.SchemaTypeBody::U64Type(lifted54) + } + 10 => { + let lifted61 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted56 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted55 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 32)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @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 => { + let lifted57 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed(mbt_ffi_load64(iter_base + 56)) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - WriteRemote => { - mbt_ffi_store8(return_area + 72, 3) + Option::Some(lifted57) + } + _ => panic() + } - () - } - WriteRemoteBatched(payload582) => { - mbt_ffi_store8(return_area + 72, 4) + let lifted60 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result59 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - match payload582 { - None => { - mbt_ffi_store8(return_area + 80, 0) + Option::Some(result59) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{ + min: lifted56, + max: lifted58, + unit: lifted60, + }) + } + _ => panic() } - Some(payload584) => { - mbt_ffi_store8(return_area + 80, 1) - mbt_ffi_store64(return_area + 88, payload584.reinterpret_as_int64()) - () - } + @types.SchemaTypeBody::F32Type(lifted61) } + 11 => { + let lifted68 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted63 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + 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() + } - () - } - WriteRemoteTransaction(payload585) => { - mbt_ffi_store8(return_area + 72, 5) - - match payload585 { - None => { - mbt_ffi_store8(return_area + 80, 0) - - () - } - Some(payload587) => { - mbt_ffi_store8(return_area + 80, 1) - mbt_ffi_store64(return_area + 88, payload587.reinterpret_as_int64()) - - () - } - } + Option::Some(lifted62) + } + _ => 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) + 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() + } - cleanup_list.each(mbt_ffi_free) -} + Option::Some(lifted64) + } + _ => panic() + } -///| -/// Reads the next persisted durable function invocation from the oplog during replay -pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionInvocation { - let return_area = mbt_ffi_malloc(88) - wasmImportReadPersistedDurableFunctionInvocation(return_area) + 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), + ) - let result = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) + Option::Some(result66) + } + _ => panic() + } - 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 + Option::Some(@types.NumericRestrictions::{ + min: lifted63, + max: lifted65, + unit: lifted67, + }) + } + _ => panic() + } - let lifted109 = 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(lifted68) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 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( + 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( + let result70 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result1) + Option::Some(result70) } _ => panic() } @@ -3711,243 +6685,243 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI index = index + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + index * 8 - let result2 = mbt_ffi_ptr2str( + 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( + 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( + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result8 = mbt_ffi_ptr2str( + 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, + array81.push(@types.NamedFieldType::{ + name: result69, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted, + doc: lifted71, aliases: array, - examples: array4, - deprecated: lifted7, - role: lifted10, + 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( + 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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( + 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( + 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( + 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( + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result25 = mbt_ffi_ptr2str( + 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, + array98.push(@types.VariantCaseType::{ + name: result83, + payload: lifted84, metadata: @types.MetadataEnvelope::{ - doc: lifted16, - aliases: array18, - examples: array21, - deprecated: lifted24, - role: lifted27, + 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( + 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( + 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 => @types.SchemaTypeBody::ListType(mbt_ffi_load32(iter_base + 8)) 20 => @@ -3962,113 +6936,113 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI }) 22 => @types.SchemaTypeBody::OptionType(mbt_ffi_load32(iter_base + 8)) 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 20)) _ => panic() } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted38, - err: lifted39, + 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( + 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 => Option::Some(mbt_ffi_load32(iter_base + 24).reinterpret_as_uint()) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 32).reinterpret_as_uint()) _ => 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( + 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, + 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( + 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 => Option::Some(mbt_ffi_load32(iter_base + 24).reinterpret_as_uint()) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 32).reinterpret_as_uint()) @@ -4076,54 +7050,54 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted51, - min_bytes: lifted52, - max_bytes: lifted53, + 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( + 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( + 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() } @@ -4131,90 +7105,90 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI @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, + 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( + 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( + 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, + allowed_schemes: lifted135, + allowed_hosts: lifted139, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result70 = mbt_ffi_ptr2str( + 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( + 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 + let lifted145 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result74 = mbt_ffi_ptr2str( + let result144 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -4222,17 +7196,17 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result74, + unit: result144, }) } _ => panic() } - let lifted77 : @types.QuantityValue? = match + let lifted147 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result76 = mbt_ffi_ptr2str( + let result146 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -4240,386 +7214,386 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result76, + unit: result146, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result70, - allowed_suffixes: array72, - min: lifted75, - max: lifted77, + 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( + 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( + 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( + 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( + 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( + 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( + 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( + 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, + field_name: result153, + literal: lifted155, }) } 5 => { - let result86 = mbt_ffi_ptr2str( + 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( + 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( + 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( + 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( + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result98 = mbt_ffi_ptr2str( + 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, + array171.push(@types.UnionBranch::{ + tag: result148, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted87, + discriminator: lifted157, metadata: @types.MetadataEnvelope::{ - doc: lifted89, - aliases: array91, - examples: array94, - deprecated: lifted97, - role: lifted100, + 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, + branches: array171, }) } 32 => { - let lifted104 : String? = match mbt_ffi_load8_u(iter_base + 12) { + let lifted174 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result103 = mbt_ffi_ptr2str( + let result173 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result103) + Option::Some(result173) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted104, + 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( + 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, + 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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( + 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( + 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( + 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( + 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 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result120 = mbt_ffi_ptr2str( + 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, + array193.push(@types.SchemaTypeNode::{ + body: lifted179, metadata: @types.MetadataEnvelope::{ - doc: lifted111, - aliases: array113, - examples: array116, - deprecated: lifted119, - role: lifted122, + 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( + 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( + 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, + 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 array159 : Array[@types.SchemaValueNode] = [] - for index160 = 0 - index160 < mbt_ffi_load32(return_area + 48) - index160 = index160 + 1 { - let iter_base = mbt_ffi_load32(return_area + 44) + index160 * 32 + let array229 : Array[@types.SchemaValueNode] = [] + for index230 = 0 + index230 < mbt_ffi_load32(return_area + 48) + index230 = index230 + 1 { + let iter_base = mbt_ffi_load32(return_area + 44) + index230 * 32 - let lifted158 = match mbt_ffi_load8_u(iter_base + 0) { + 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)) @@ -4649,28 +7623,28 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result130 = mbt_ffi_ptr2str( + 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => panic() @@ -4678,7 +7652,7 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted133, + payload: lifted203, }) } 15 => @@ -4686,170 +7660,170 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 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::{ + 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => panic() } - @types.ResultValuePayload::ErrValue(lifted146) + @types.ResultValuePayload::ErrValue(lifted216) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted147) + @types.SchemaValueNode::ResultValue(lifted217) } 23 => { - let result148 = mbt_ffi_ptr2str( + 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( + 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, + text: result218, + language: lifted220, }) } 24 => { - let result151 = mbt_ffi_ptr2bytes( + 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( + 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, + bytes: result221, + mime_type: lifted223, }) } 25 => { - let result154 = mbt_ffi_ptr2str( + 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( + 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 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -4861,7 +7835,7 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result156 = mbt_ffi_ptr2str( + let result226 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -4869,17 +7843,17 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result156, + unit: result226, }) } 30 => { - let result157 = mbt_ffi_ptr2str( + let result227 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result157, + tag: result227, body: mbt_ffi_load32(iter_base + 16), }) } @@ -4894,34 +7868,34 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - array159.push(lifted158) + array229.push(lifted228) } mbt_ffi_free(mbt_ffi_load32(return_area + 44)) - let lifted163 = match mbt_ffi_load8_u(return_area + 56) { + let lifted233 = match mbt_ffi_load8_u(return_area + 56) { 0 => @oplog.WrappedFunctionType::ReadLocal 1 => @oplog.WrappedFunctionType::WriteLocal 2 => @oplog.WrappedFunctionType::ReadRemote 3 => @oplog.WrappedFunctionType::WriteRemote 4 => { - let lifted161 : UInt64? = match mbt_ffi_load8_u(return_area + 64) { + let lifted231 : UInt64? = match mbt_ffi_load8_u(return_area + 64) { 0 => Option::None 1 => Option::Some(mbt_ffi_load64(return_area + 72).reinterpret_as_uint64()) _ => panic() } - @oplog.WrappedFunctionType::WriteRemoteBatched(lifted161) + @oplog.WrappedFunctionType::WriteRemoteBatched(lifted231) } 5 => { - 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 => Option::Some(mbt_ffi_load64(return_area + 72).reinterpret_as_uint64()) _ => panic() } - @oplog.WrappedFunctionType::WriteRemoteTransaction(lifted162) + @oplog.WrappedFunctionType::WriteRemoteTransaction(lifted232) } _ => panic() } @@ -4933,16 +7907,16 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI function_name: result, response: @types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array123, - defs: array128, + type_nodes: array193, + defs: array198, root: mbt_ffi_load32(return_area + 40), }, value: @types.SchemaValueTree::{ - value_nodes: array159, + value_nodes: array229, root: mbt_ffi_load32(return_area + 52), }, }, - function_type: lifted163, + function_type: lifted233, entry_version: OplogEntryVersion::from(mbt_ffi_load8_u(return_area + 80)), } mbt_ffi_free(return_area) diff --git a/sdks/moonbit/golem_sdk/interface/golem/quota/types/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/quota/types/ffi.mbt index 0b83bb9ad6..97d90edbc7 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/quota/types/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/quota/types/ffi.mbt @@ -19,25 +19,16 @@ fn wasmImportSplit(p0 : Int, p1 : Int64) -> Int = "golem:quota/types@1.5.0" "spl fn wasmImportMerge(p0 : Int, p1 : Int) = "golem:quota/types@1.5.0" "merge" ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - -///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = - #|(func (param i32) (result i32) 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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = @@ -45,3 +36,12 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| 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_load64(offset : Int) -> Int64 = + #|(func (param i32) (result i64) local.get 0 i64.load) + +///| +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) diff --git a/sdks/moonbit/golem_sdk/interface/golem/rdbms/ignite2/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/rdbms/ignite2/ffi.mbt index ebb49ee36c..5c064ee425 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/rdbms/ignite2/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/rdbms/ignite2/ffi.mbt @@ -88,41 +88,45 @@ fn wasmImportMethodDbConnectionExecute( fn wasmImportMethodDbConnectionBeginTransaction(p0 : Int, p1 : Int) = "golem:rdbms/ignite2@1.5.0" "[method]db-connection.begin-transaction" ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = + #|(func (param i32) (result i64) local.get 0 i64.load) ///| -#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_load16_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load16_u) - -///| -extern "wasm" fn mbt_ffi_store16(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) ///| extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = #|(func (param i32) (result f32) local.get 0 f32.load) ///| -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_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_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_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_store32(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.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_loadf64(offset : Int) -> Double = + #|(func (param i32) (result f64) local.get 0 f64.load) ///| extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = @@ -132,56 +136,52 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| local.get 0) ///| -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_extend8(value : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.extend8_s) ///| -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_store16(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) ///| 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_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_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| local.get 0) ///| -extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = - #|(func (param i32) (result f64) local.get 0 f64.load) +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| -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_load16_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_u) ///| -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_store32(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) ///| -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_extend16(value : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.extend16_s) ///| -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_store64(offset : Int, value : Int64) = + #|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) ///| -extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array8 - #| 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_store64(offset : Int, value : Int64) = - #|(func (param i32) (param i64) local.get 0 local.get 1 i64.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/interface/golem/rdbms/mysql/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/rdbms/mysql/ffi.mbt index b78599c7a0..4bbc34f017 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/rdbms/mysql/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/rdbms/mysql/ffi.mbt @@ -88,12 +88,19 @@ fn wasmImportMethodDbTransactionCommit(p0 : Int, p1 : Int) = "golem:rdbms/mysql@ fn wasmImportMethodDbTransactionRollback(p0 : Int, p1 : Int) = "golem:rdbms/mysql@1.5.0" "[method]db-transaction.rollback" ///| -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_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_store8(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) +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_store64(offset : Int, value : Int64) = + #|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) ///| extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = @@ -103,43 +110,43 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| 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_loadf32(offset : Int) -> Float = + #|(func (param i32) (result f32) local.get 0 f32.load) ///| -extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = - #|(func (param i32) (result f64) local.get 0 f64.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_extend16(value : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.extend16_s) +extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = + #|(func (param i32) (result i64) local.get 0 i64.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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) ///| -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_storef64(offset : Int, value : Double) = - #|(func (param i32) (param f64) local.get 0 local.get 1 f64.store) +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_loadf32(offset : Int) -> Float = - #|(func (param i32) (result f32) local.get 0 f32.load) +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| -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_load8(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_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_store16(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) ///| #owned(str) @@ -147,31 +154,28 @@ extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = #|(func (param i32) (result i32) local.get 0) ///| -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_load16_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load16_u) +extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = + #|(func (param i32) (result f64) local.get 0 f64.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_storef32(offset : Int, value : Float) = + #|(func (param i32) (param f32) local.get 0 local.get 1 f32.store) ///| -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_load16(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_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_load16_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_u) ///| -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) ///| #owned(bytes) @@ -179,9 +183,5 @@ extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = #|(func (param i32) (result i32) 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_load16(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load16_s) +extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) diff --git a/sdks/moonbit/golem_sdk/interface/golem/rdbms/postgres/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/rdbms/postgres/ffi.mbt index 7b837b516e..bbb0a4ca54 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/rdbms/postgres/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/rdbms/postgres/ffi.mbt @@ -112,47 +112,44 @@ fn wasmImportMethodDbTransactionCommit(p0 : Int, p1 : Int) = "golem:rdbms/postgr fn wasmImportMethodDbTransactionRollback(p0 : Int, p1 : Int) = "golem:rdbms/postgres@1.5.0" "[method]db-transaction.rollback" ///| -extern "wasm" fn mbt_ffi_ptr2int_array(ptr : Int, len : Int) -> FixedArray[Int] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array32 - #| 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_store32(offset : Int, value : Int) = #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) ///| -#owned(array) -extern "wasm" fn mbt_ffi_float_array2ptr(array : FixedArray[Float]) -> Int = - #|(func (param i32) (result i32) local.get 0) +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_storef32(offset : Int, value : Float) = - #|(func (param i32) (param f32) local.get 0 local.get 1 f32.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_load8(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_s) +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_extend8(value : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.extend8_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_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_extend8(value : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.extend8_s) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) ///| -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) ///| #owned(bytes) @@ -160,79 +157,82 @@ extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = #|(func (param i32) (result i32) local.get 0) ///| -extern "wasm" fn mbt_ffi_storef64(offset : Int, value : Double) = - #|(func (param i32) (param f64) local.get 0 local.get 1 f64.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_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_store16(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) +extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| local.get 0) ///| -#owned(array) -extern "wasm" fn mbt_ffi_int_array2ptr(array : FixedArray[Int]) -> 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_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(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load16_s) +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_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_u) +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_load16(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_s) ///| extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load) ///| -extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = - #|(func (param i32) (result i64) local.get 0 i64.load) - -///| -extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = +extern "wasm" fn mbt_ffi_ptr2float_array( + ptr : Int, + len : Int, +) -> FixedArray[Float] = #|(func (param i32) (param i32) (result i32) #| local.get 0 - #| local.get 1 call $moonbit.init_array8 + #| local.get 1 call $moonbit.init_array32 #| local.get 0) ///| -extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = - #|(func (param i32) (result f64) local.get 0 f64.load) +#owned(array) +extern "wasm" fn mbt_ffi_float_array2ptr(array : FixedArray[Float]) -> Int = + #|(func (param i32) (result i32) 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_loadf64(offset : Int) -> Double = + #|(func (param i32) (result f64) local.get 0 f64.load) ///| -extern "wasm" fn mbt_ffi_ptr2float_array( - ptr : Int, - len : Int, -) -> FixedArray[Float] = +extern "wasm" fn mbt_ffi_ptr2int_array(ptr : Int, len : Int) -> FixedArray[Int] = #|(func (param i32) (param i32) (result i32) #| local.get 0 #| local.get 1 call $moonbit.init_array32 #| 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_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) + +///| +#owned(array) +extern "wasm" fn mbt_ffi_int_array2ptr(array : FixedArray[Int]) -> Int = + #|(func (param i32) (result i32) local.get 0) + +///| +extern "wasm" fn mbt_ffi_store16(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) diff --git a/sdks/moonbit/golem_sdk/interface/golem/secrets/reveal/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/secrets/reveal/ffi.mbt index 7e85e6c466..5a5c301f96 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/secrets/reveal/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/secrets/reveal/ffi.mbt @@ -11,35 +11,30 @@ fn wasmImportReveal( p6 : Int, ) = "golem:secrets/reveal@0.1.0" "reveal" -///| -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_load8_u(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load8_u) ///| -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_load64(offset : Int) -> Int64 = + #|(func (param i32) (result i64) local.get 0 i64.load) ///| -extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array8 - #| 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_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_store64(offset : Int, value : Int64) = + #|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) ///| -extern "wasm" fn mbt_ffi_load16_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load16_u) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> 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_loadf64(offset : Int) -> Double = @@ -52,14 +47,6 @@ 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_load64(offset : Int) -> Int64 = - #|(func (param i32) (result i64) local.get 0 i64.load) - -///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - ///| extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = #|(func (param i32) (result f32) local.get 0 f32.load) @@ -69,18 +56,31 @@ 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_store32(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = - #|(func (param i32) (result i32) local.get 0) +extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| local.get 0) ///| -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_load16(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_s) + +///| +extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) + +///| +extern "wasm" fn mbt_ffi_load16_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_u) diff --git a/sdks/moonbit/golem_sdk/interface/golem/secrets/reveal/top.mbt b/sdks/moonbit/golem_sdk/interface/golem/secrets/reveal/top.mbt index 5f369c9dd1..81fc3c0c28 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/secrets/reveal/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/secrets/reveal/top.mbt @@ -12,12 +12,12 @@ pub fn reveal( let @types.Secret(handle) = s - let address207 = mbt_ffi_malloc(expected.type_nodes.length() * 144) - for index208 = 0 - index208 < expected.type_nodes.length() - index208 = index208 + 1 { - let iter_elem : @types.SchemaTypeNode = expected.type_nodes[index208] - let iter_base = address207 + index208 * 144 + let address357 = mbt_ffi_malloc(expected.type_nodes.length() * 144) + for index358 = 0 + index358 < expected.type_nodes.length() + index358 = index358 + 1 { + let iter_elem : @types.SchemaTypeNode = expected.type_nodes[index358] + let iter_base = address357 + index358 * 144 match iter_elem.body { RefType(payload) => { @@ -31,54 +31,1164 @@ pub fn reveal( () } - 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 ptr = mbt_ffi_str2ptr(payload15) + mbt_ffi_store32(iter_base + 72, payload15.length()) + mbt_ffi_store32(iter_base + 68, ptr) + cleanup_list.push(ptr) + + () + } + } + + () + } + } + () } - S16Type => { + S16Type(payload16) => { mbt_ffi_store8(iter_base + 0, 3) + match payload16 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload18) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload18.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload20) => { + mbt_ffi_store8(iter_base + 16, 1) + + match payload20 { + Signed(payload21) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload21) + + () + } + Unsigned(payload22) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload22.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload23) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload23.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload18.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload25) => { + mbt_ffi_store8(iter_base + 40, 1) + + match payload25 { + Signed(payload26) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload26) + + () + } + Unsigned(payload27) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload27.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload28) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload28.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload18.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload30) => { + mbt_ffi_store8(iter_base + 64, 1) + + let ptr31 = mbt_ffi_str2ptr(payload30) + mbt_ffi_store32(iter_base + 72, payload30.length()) + mbt_ffi_store32(iter_base + 68, ptr31) + cleanup_list.push(ptr31) + + () + } + } + + () + } + } + () } - S32Type => { + S32Type(payload32) => { mbt_ffi_store8(iter_base + 0, 4) + match payload32 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload34) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload34.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload36) => { + mbt_ffi_store8(iter_base + 16, 1) + + match payload36 { + Signed(payload37) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload37) + + () + } + Unsigned(payload38) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload38.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload39) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload39.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload34.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload41) => { + mbt_ffi_store8(iter_base + 40, 1) + + match payload41 { + Signed(payload42) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload42) + + () + } + Unsigned(payload43) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload43.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload44) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload44.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload34.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload46) => { + mbt_ffi_store8(iter_base + 64, 1) + + let ptr47 = mbt_ffi_str2ptr(payload46) + mbt_ffi_store32(iter_base + 72, payload46.length()) + mbt_ffi_store32(iter_base + 68, ptr47) + cleanup_list.push(ptr47) + + () + } + } + + () + } + } + () } - S64Type => { + S64Type(payload48) => { mbt_ffi_store8(iter_base + 0, 5) + match payload48 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload50) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload50.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload52) => { + mbt_ffi_store8(iter_base + 16, 1) + + match payload52 { + Signed(payload53) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload53) + + () + } + Unsigned(payload54) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload54.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload55) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload55.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload50.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload57) => { + mbt_ffi_store8(iter_base + 40, 1) + + match payload57 { + Signed(payload58) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload58) + + () + } + Unsigned(payload59) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload59.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload60) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload60.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload50.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload62) => { + mbt_ffi_store8(iter_base + 64, 1) + + let ptr63 = mbt_ffi_str2ptr(payload62) + mbt_ffi_store32(iter_base + 72, payload62.length()) + mbt_ffi_store32(iter_base + 68, ptr63) + cleanup_list.push(ptr63) + + () + } + } + + () + } + } + () } - U8Type => { + U8Type(payload64) => { mbt_ffi_store8(iter_base + 0, 6) + match payload64 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload66) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload66.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload68) => { + mbt_ffi_store8(iter_base + 16, 1) + + match payload68 { + Signed(payload69) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload69) + + () + } + Unsigned(payload70) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload70.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload71) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload71.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload66.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload73) => { + mbt_ffi_store8(iter_base + 40, 1) + + match payload73 { + Signed(payload74) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload74) + + () + } + Unsigned(payload75) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload75.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload76) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload76.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload66.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload78) => { + mbt_ffi_store8(iter_base + 64, 1) + + let ptr79 = mbt_ffi_str2ptr(payload78) + mbt_ffi_store32(iter_base + 72, payload78.length()) + mbt_ffi_store32(iter_base + 68, ptr79) + cleanup_list.push(ptr79) + + () + } + } + + () + } + } + () } - U16Type => { + U16Type(payload80) => { mbt_ffi_store8(iter_base + 0, 7) + match payload80 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload82) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload82.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload84) => { + mbt_ffi_store8(iter_base + 16, 1) + + match payload84 { + Signed(payload85) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload85) + + () + } + Unsigned(payload86) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload86.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload87) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload87.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload82.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload89) => { + mbt_ffi_store8(iter_base + 40, 1) + + match payload89 { + Signed(payload90) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload90) + + () + } + Unsigned(payload91) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload91.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload92) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload92.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload82.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload94) => { + mbt_ffi_store8(iter_base + 64, 1) + + let ptr95 = mbt_ffi_str2ptr(payload94) + mbt_ffi_store32(iter_base + 72, payload94.length()) + mbt_ffi_store32(iter_base + 68, ptr95) + cleanup_list.push(ptr95) + + () + } + } + + () + } + } + () } - U32Type => { + U32Type(payload96) => { mbt_ffi_store8(iter_base + 0, 8) + match payload96 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload98) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload98.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload100) => { + mbt_ffi_store8(iter_base + 16, 1) + + match payload100 { + Signed(payload101) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload101) + + () + } + Unsigned(payload102) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload102.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload103) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload103.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload98.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload105) => { + mbt_ffi_store8(iter_base + 40, 1) + + match payload105 { + Signed(payload106) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload106) + + () + } + Unsigned(payload107) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload107.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload108) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload108.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload98.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload110) => { + mbt_ffi_store8(iter_base + 64, 1) + + let ptr111 = mbt_ffi_str2ptr(payload110) + mbt_ffi_store32(iter_base + 72, payload110.length()) + mbt_ffi_store32(iter_base + 68, ptr111) + cleanup_list.push(ptr111) + + () + } + } + + () + } + } + () } - U64Type => { + U64Type(payload112) => { mbt_ffi_store8(iter_base + 0, 9) + match payload112 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload114) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload114.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload116) => { + mbt_ffi_store8(iter_base + 16, 1) + + match payload116 { + Signed(payload117) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload117) + + () + } + Unsigned(payload118) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload118.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload119) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload119.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload114.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload121) => { + mbt_ffi_store8(iter_base + 40, 1) + + match payload121 { + Signed(payload122) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload122) + + () + } + Unsigned(payload123) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload123.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload124) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload124.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload114.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload126) => { + mbt_ffi_store8(iter_base + 64, 1) + + let ptr127 = mbt_ffi_str2ptr(payload126) + mbt_ffi_store32(iter_base + 72, payload126.length()) + mbt_ffi_store32(iter_base + 68, ptr127) + cleanup_list.push(ptr127) + + () + } + } + + () + } + } + () } - F32Type => { + F32Type(payload128) => { mbt_ffi_store8(iter_base + 0, 10) + match payload128 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload130) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload130.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload132) => { + mbt_ffi_store8(iter_base + 16, 1) + + match payload132 { + Signed(payload133) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload133) + + () + } + Unsigned(payload134) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload134.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload135) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload135.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload130.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload137) => { + mbt_ffi_store8(iter_base + 40, 1) + + match payload137 { + Signed(payload138) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload138) + + () + } + Unsigned(payload139) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload139.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload140) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload140.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload130.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload142) => { + mbt_ffi_store8(iter_base + 64, 1) + + let ptr143 = mbt_ffi_str2ptr(payload142) + mbt_ffi_store32(iter_base + 72, payload142.length()) + mbt_ffi_store32(iter_base + 68, ptr143) + cleanup_list.push(ptr143) + + () + } + } + + () + } + } + () } - F64Type => { + F64Type(payload144) => { mbt_ffi_store8(iter_base + 0, 11) + match payload144 { + None => { + mbt_ffi_store8(iter_base + 8, 0) + + () + } + Some(payload146) => { + mbt_ffi_store8(iter_base + 8, 1) + + match payload146.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) + + () + } + Some(payload148) => { + mbt_ffi_store8(iter_base + 16, 1) + + match payload148 { + Signed(payload149) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload149) + + () + } + Unsigned(payload150) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload150.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload151) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload151.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload146.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload153) => { + mbt_ffi_store8(iter_base + 40, 1) + + match payload153 { + Signed(payload154) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload154) + + () + } + Unsigned(payload155) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload155.reinterpret_as_int64(), + ) + + () + } + FloatBits(payload156) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload156.reinterpret_as_int64(), + ) + + () + } + } + + () + } + } + + match payload146.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) + + () + } + Some(payload158) => { + mbt_ffi_store8(iter_base + 64, 1) + + let ptr159 = mbt_ffi_str2ptr(payload158) + mbt_ffi_store32(iter_base + 72, payload158.length()) + mbt_ffi_store32(iter_base + 68, ptr159) + cleanup_list.push(ptr159) + + () + } + } + + () + } + } + () } CharType => { @@ -91,17 +1201,19 @@ pub fn reveal( () } - RecordType(payload13) => { + RecordType(payload162) => { mbt_ffi_store8(iter_base + 0, 14) - let address31 = mbt_ffi_malloc(payload13.length() * 68) - for index32 = 0; index32 < payload13.length(); index32 = index32 + 1 { - let iter_elem : @types.NamedFieldType = payload13[index32] - let iter_base = address31 + index32 * 68 + let address181 = mbt_ffi_malloc(payload162.length() * 68) + for index182 = 0 + index182 < payload162.length() + index182 = index182 + 1 { + let iter_elem : @types.NamedFieldType = payload162[index182] + let iter_base = address181 + index182 * 68 - let ptr = mbt_ffi_str2ptr(iter_elem.name) + let ptr163 = mbt_ffi_str2ptr(iter_elem.name) mbt_ffi_store32(iter_base + 4, iter_elem.name.length()) - mbt_ffi_store32(iter_base + 0, ptr) + mbt_ffi_store32(iter_base + 0, ptr163) mbt_ffi_store32(iter_base + 8, iter_elem.body) match iter_elem.metadata.doc { @@ -110,13 +1222,13 @@ pub fn reveal( () } - Some(payload15) => { + Some(payload165) => { mbt_ffi_store8(iter_base + 12, 1) - let ptr16 = mbt_ffi_str2ptr(payload15) - mbt_ffi_store32(iter_base + 20, payload15.length()) - mbt_ffi_store32(iter_base + 16, ptr16) - cleanup_list.push(ptr16) + let ptr166 = mbt_ffi_str2ptr(payload165) + mbt_ffi_store32(iter_base + 20, payload165.length()) + mbt_ffi_store32(iter_base + 16, ptr166) + cleanup_list.push(ptr166) () } @@ -129,30 +1241,30 @@ pub fn reveal( let iter_elem : String = iter_elem.metadata.aliases[index] let iter_base = address + index * 8 - let ptr17 = mbt_ffi_str2ptr(iter_elem) + let ptr167 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr17) - cleanup_list.push(ptr17) + mbt_ffi_store32(iter_base + 0, ptr167) + cleanup_list.push(ptr167) } mbt_ffi_store32(iter_base + 28, iter_elem.metadata.aliases.length()) mbt_ffi_store32(iter_base + 24, address) - let address19 = mbt_ffi_malloc( + let address169 = mbt_ffi_malloc( iter_elem.metadata.examples.length() * 8, ) - for index20 = 0 - index20 < iter_elem.metadata.examples.length() - index20 = index20 + 1 { - let iter_elem : String = iter_elem.metadata.examples[index20] - let iter_base = address19 + index20 * 8 + for index170 = 0 + index170 < iter_elem.metadata.examples.length() + index170 = index170 + 1 { + let iter_elem : String = iter_elem.metadata.examples[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 + 36, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 32, address19) + mbt_ffi_store32(iter_base + 32, address169) match iter_elem.metadata.deprecated { None => { @@ -160,13 +1272,13 @@ pub fn reveal( () } - Some(payload22) => { + Some(payload172) => { mbt_ffi_store8(iter_base + 40, 1) - let ptr23 = mbt_ffi_str2ptr(payload22) - mbt_ffi_store32(iter_base + 48, payload22.length()) - mbt_ffi_store32(iter_base + 44, ptr23) - cleanup_list.push(ptr23) + let ptr173 = mbt_ffi_str2ptr(payload172) + mbt_ffi_store32(iter_base + 48, payload172.length()) + mbt_ffi_store32(iter_base + 44, ptr173) + cleanup_list.push(ptr173) () } @@ -178,10 +1290,10 @@ pub fn reveal( () } - Some(payload25) => { + Some(payload175) => { mbt_ffi_store8(iter_base + 52, 1) - match payload25 { + match payload175 { Multimodal => { mbt_ffi_store8(iter_base + 56, 0) @@ -197,13 +1309,13 @@ pub fn reveal( () } - Other(payload29) => { + Other(payload179) => { mbt_ffi_store8(iter_base + 56, 3) - let ptr30 = mbt_ffi_str2ptr(payload29) - mbt_ffi_store32(iter_base + 64, payload29.length()) - mbt_ffi_store32(iter_base + 60, ptr30) - cleanup_list.push(ptr30) + let ptr180 = mbt_ffi_str2ptr(payload179) + mbt_ffi_store32(iter_base + 64, payload179.length()) + mbt_ffi_store32(iter_base + 60, ptr180) + cleanup_list.push(ptr180) () } @@ -212,27 +1324,29 @@ pub fn reveal( () } } - cleanup_list.push(ptr) + cleanup_list.push(ptr163) cleanup_list.push(address) - cleanup_list.push(address19) + cleanup_list.push(address169) } - mbt_ffi_store32(iter_base + 12, payload13.length()) - mbt_ffi_store32(iter_base + 8, address31) - cleanup_list.push(address31) + mbt_ffi_store32(iter_base + 12, payload162.length()) + mbt_ffi_store32(iter_base + 8, address181) + cleanup_list.push(address181) () } - VariantType(payload33) => { + VariantType(payload183) => { mbt_ffi_store8(iter_base + 0, 15) - let address56 = mbt_ffi_malloc(payload33.length() * 72) - for index57 = 0; index57 < payload33.length(); index57 = index57 + 1 { - let iter_elem : @types.VariantCaseType = payload33[index57] - let iter_base = address56 + index57 * 72 + let address206 = mbt_ffi_malloc(payload183.length() * 72) + for index207 = 0 + index207 < payload183.length() + index207 = index207 + 1 { + let iter_elem : @types.VariantCaseType = payload183[index207] + let iter_base = address206 + index207 * 72 - let ptr34 = mbt_ffi_str2ptr(iter_elem.name) + let ptr184 = mbt_ffi_str2ptr(iter_elem.name) mbt_ffi_store32(iter_base + 4, iter_elem.name.length()) - mbt_ffi_store32(iter_base + 0, ptr34) + mbt_ffi_store32(iter_base + 0, ptr184) match iter_elem.payload { None => { @@ -240,9 +1354,9 @@ pub fn reveal( () } - Some(payload36) => { + Some(payload186) => { mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload36) + mbt_ffi_store32(iter_base + 12, payload186) () } @@ -254,51 +1368,51 @@ pub fn reveal( () } - Some(payload38) => { + Some(payload188) => { mbt_ffi_store8(iter_base + 16, 1) - let ptr39 = mbt_ffi_str2ptr(payload38) - mbt_ffi_store32(iter_base + 24, payload38.length()) - mbt_ffi_store32(iter_base + 20, ptr39) - cleanup_list.push(ptr39) + let ptr189 = mbt_ffi_str2ptr(payload188) + mbt_ffi_store32(iter_base + 24, payload188.length()) + mbt_ffi_store32(iter_base + 20, ptr189) + cleanup_list.push(ptr189) () } } - let address41 = mbt_ffi_malloc( + let address191 = mbt_ffi_malloc( iter_elem.metadata.aliases.length() * 8, ) - for index42 = 0 - index42 < iter_elem.metadata.aliases.length() - index42 = index42 + 1 { - let iter_elem : String = iter_elem.metadata.aliases[index42] - let iter_base = address41 + index42 * 8 + for index192 = 0 + index192 < iter_elem.metadata.aliases.length() + index192 = index192 + 1 { + let iter_elem : String = iter_elem.metadata.aliases[index192] + let iter_base = address191 + index192 * 8 - let ptr40 = mbt_ffi_str2ptr(iter_elem) + let ptr190 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr40) - cleanup_list.push(ptr40) + mbt_ffi_store32(iter_base + 0, ptr190) + cleanup_list.push(ptr190) } mbt_ffi_store32(iter_base + 32, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 28, address41) + mbt_ffi_store32(iter_base + 28, address191) - let address44 = mbt_ffi_malloc( + let address194 = mbt_ffi_malloc( iter_elem.metadata.examples.length() * 8, ) - for index45 = 0 - index45 < iter_elem.metadata.examples.length() - index45 = index45 + 1 { - let iter_elem : String = iter_elem.metadata.examples[index45] - let iter_base = address44 + index45 * 8 + for index195 = 0 + index195 < iter_elem.metadata.examples.length() + index195 = index195 + 1 { + let iter_elem : String = iter_elem.metadata.examples[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 + 40, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 36, address44) + mbt_ffi_store32(iter_base + 36, address194) match iter_elem.metadata.deprecated { None => { @@ -306,13 +1420,13 @@ pub fn reveal( () } - Some(payload47) => { + Some(payload197) => { mbt_ffi_store8(iter_base + 44, 1) - let ptr48 = mbt_ffi_str2ptr(payload47) - mbt_ffi_store32(iter_base + 52, payload47.length()) - mbt_ffi_store32(iter_base + 48, ptr48) - cleanup_list.push(ptr48) + let ptr198 = mbt_ffi_str2ptr(payload197) + mbt_ffi_store32(iter_base + 52, payload197.length()) + mbt_ffi_store32(iter_base + 48, ptr198) + cleanup_list.push(ptr198) () } @@ -324,10 +1438,10 @@ pub fn reveal( () } - Some(payload50) => { + Some(payload200) => { mbt_ffi_store8(iter_base + 56, 1) - match payload50 { + match payload200 { Multimodal => { mbt_ffi_store8(iter_base + 60, 0) @@ -343,13 +1457,13 @@ pub fn reveal( () } - Other(payload54) => { + Other(payload204) => { mbt_ffi_store8(iter_base + 60, 3) - let ptr55 = mbt_ffi_str2ptr(payload54) - mbt_ffi_store32(iter_base + 68, payload54.length()) - mbt_ffi_store32(iter_base + 64, ptr55) - cleanup_list.push(ptr55) + let ptr205 = mbt_ffi_str2ptr(payload204) + mbt_ffi_store32(iter_base + 68, payload204.length()) + mbt_ffi_store32(iter_base + 64, ptr205) + cleanup_list.push(ptr205) () } @@ -358,121 +1472,127 @@ pub fn reveal( () } } - cleanup_list.push(ptr34) - cleanup_list.push(address41) - cleanup_list.push(address44) + cleanup_list.push(ptr184) + cleanup_list.push(address191) + cleanup_list.push(address194) } - mbt_ffi_store32(iter_base + 12, payload33.length()) - mbt_ffi_store32(iter_base + 8, address56) - cleanup_list.push(address56) + mbt_ffi_store32(iter_base + 12, payload183.length()) + mbt_ffi_store32(iter_base + 8, address206) + cleanup_list.push(address206) () } - EnumType(payload58) => { + EnumType(payload208) => { mbt_ffi_store8(iter_base + 0, 16) - let address60 = mbt_ffi_malloc(payload58.length() * 8) - for index61 = 0; index61 < payload58.length(); index61 = index61 + 1 { - let iter_elem : String = payload58[index61] - let iter_base = address60 + index61 * 8 + let address210 = mbt_ffi_malloc(payload208.length() * 8) + for index211 = 0 + index211 < payload208.length() + index211 = index211 + 1 { + let iter_elem : String = payload208[index211] + let iter_base = address210 + index211 * 8 - let ptr59 = mbt_ffi_str2ptr(iter_elem) + let ptr209 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr59) - cleanup_list.push(ptr59) + mbt_ffi_store32(iter_base + 0, ptr209) + cleanup_list.push(ptr209) } - mbt_ffi_store32(iter_base + 12, payload58.length()) - mbt_ffi_store32(iter_base + 8, address60) - cleanup_list.push(address60) + mbt_ffi_store32(iter_base + 12, payload208.length()) + mbt_ffi_store32(iter_base + 8, address210) + cleanup_list.push(address210) () } - FlagsType(payload62) => { + FlagsType(payload212) => { mbt_ffi_store8(iter_base + 0, 17) - let address64 = mbt_ffi_malloc(payload62.length() * 8) - for index65 = 0; index65 < payload62.length(); index65 = index65 + 1 { - let iter_elem : String = payload62[index65] - let iter_base = address64 + index65 * 8 + let address214 = mbt_ffi_malloc(payload212.length() * 8) + for index215 = 0 + index215 < payload212.length() + index215 = index215 + 1 { + let iter_elem : String = payload212[index215] + let iter_base = address214 + index215 * 8 - let ptr63 = mbt_ffi_str2ptr(iter_elem) + let ptr213 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr63) - cleanup_list.push(ptr63) + mbt_ffi_store32(iter_base + 0, ptr213) + cleanup_list.push(ptr213) } - mbt_ffi_store32(iter_base + 12, payload62.length()) - mbt_ffi_store32(iter_base + 8, address64) - cleanup_list.push(address64) + mbt_ffi_store32(iter_base + 12, payload212.length()) + mbt_ffi_store32(iter_base + 8, address214) + cleanup_list.push(address214) () } - TupleType(payload66) => { + TupleType(payload216) => { mbt_ffi_store8(iter_base + 0, 18) - let address67 = mbt_ffi_malloc(payload66.length() * 4) - for index68 = 0; index68 < payload66.length(); index68 = index68 + 1 { - let iter_elem : Int = payload66[index68] - let iter_base = address67 + index68 * 4 + let address217 = mbt_ffi_malloc(payload216.length() * 4) + for index218 = 0 + index218 < payload216.length() + index218 = index218 + 1 { + let iter_elem : Int = payload216[index218] + let iter_base = address217 + index218 * 4 mbt_ffi_store32(iter_base + 0, iter_elem) } - mbt_ffi_store32(iter_base + 12, payload66.length()) - mbt_ffi_store32(iter_base + 8, address67) - cleanup_list.push(address67) + mbt_ffi_store32(iter_base + 12, payload216.length()) + mbt_ffi_store32(iter_base + 8, address217) + cleanup_list.push(address217) () } - ListType(payload69) => { + ListType(payload219) => { mbt_ffi_store8(iter_base + 0, 19) - mbt_ffi_store32(iter_base + 8, payload69) + mbt_ffi_store32(iter_base + 8, payload219) () } - FixedListType(payload70) => { + FixedListType(payload220) => { mbt_ffi_store8(iter_base + 0, 20) - mbt_ffi_store32(iter_base + 8, payload70.element) - mbt_ffi_store32(iter_base + 12, payload70.length.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 8, payload220.element) + mbt_ffi_store32(iter_base + 12, payload220.length.reinterpret_as_int()) () } - MapType(payload71) => { + MapType(payload221) => { mbt_ffi_store8(iter_base + 0, 21) - mbt_ffi_store32(iter_base + 8, payload71.key) - mbt_ffi_store32(iter_base + 12, payload71.value) + mbt_ffi_store32(iter_base + 8, payload221.key) + mbt_ffi_store32(iter_base + 12, payload221.value) () } - OptionType(payload72) => { + OptionType(payload222) => { mbt_ffi_store8(iter_base + 0, 22) - mbt_ffi_store32(iter_base + 8, payload72) + mbt_ffi_store32(iter_base + 8, payload222) () } - ResultType(payload73) => { + ResultType(payload223) => { mbt_ffi_store8(iter_base + 0, 23) - match payload73.ok { + match payload223.ok { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload75) => { + Some(payload225) => { mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload75) + mbt_ffi_store32(iter_base + 12, payload225) () } } - match payload73.err { + match payload223.err { None => { mbt_ffi_store8(iter_base + 16, 0) () } - Some(payload77) => { + Some(payload227) => { mbt_ffi_store8(iter_base + 16, 1) - mbt_ffi_store32(iter_base + 20, payload77) + mbt_ffi_store32(iter_base + 20, payload227) () } @@ -480,77 +1600,79 @@ pub fn reveal( () } - TextType(payload78) => { + TextType(payload228) => { mbt_ffi_store8(iter_base + 0, 24) - match payload78.languages { + match payload228.languages { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload80) => { + Some(payload230) => { mbt_ffi_store8(iter_base + 8, 1) - let address82 = mbt_ffi_malloc(payload80.length() * 8) - for index83 = 0; index83 < payload80.length(); index83 = index83 + 1 { - let iter_elem : String = payload80[index83] - let iter_base = address82 + index83 * 8 + let address232 = mbt_ffi_malloc(payload230.length() * 8) + for index233 = 0 + index233 < payload230.length() + index233 = index233 + 1 { + let iter_elem : String = payload230[index233] + let iter_base = address232 + index233 * 8 - let ptr81 = mbt_ffi_str2ptr(iter_elem) + let ptr231 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr81) - cleanup_list.push(ptr81) + mbt_ffi_store32(iter_base + 0, ptr231) + cleanup_list.push(ptr231) } - mbt_ffi_store32(iter_base + 16, payload80.length()) - mbt_ffi_store32(iter_base + 12, address82) - cleanup_list.push(address82) + mbt_ffi_store32(iter_base + 16, payload230.length()) + mbt_ffi_store32(iter_base + 12, address232) + cleanup_list.push(address232) () } } - match payload78.min_length { + match payload228.min_length { None => { mbt_ffi_store8(iter_base + 20, 0) () } - Some(payload85) => { + Some(payload235) => { mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload85.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 24, payload235.reinterpret_as_int()) () } } - match payload78.max_length { + match payload228.max_length { None => { mbt_ffi_store8(iter_base + 28, 0) () } - Some(payload87) => { + Some(payload237) => { mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload87.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 32, payload237.reinterpret_as_int()) () } } - match payload78.regex { + match payload228.regex { None => { mbt_ffi_store8(iter_base + 36, 0) () } - Some(payload89) => { + Some(payload239) => { mbt_ffi_store8(iter_base + 36, 1) - let ptr90 = mbt_ffi_str2ptr(payload89) - mbt_ffi_store32(iter_base + 44, payload89.length()) - mbt_ffi_store32(iter_base + 40, ptr90) - cleanup_list.push(ptr90) + let ptr240 = mbt_ffi_str2ptr(payload239) + mbt_ffi_store32(iter_base + 44, payload239.length()) + mbt_ffi_store32(iter_base + 40, ptr240) + cleanup_list.push(ptr240) () } @@ -558,59 +1680,61 @@ pub fn reveal( () } - BinaryType(payload91) => { + BinaryType(payload241) => { mbt_ffi_store8(iter_base + 0, 25) - match payload91.mime_types { + match payload241.mime_types { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload93) => { + Some(payload243) => { mbt_ffi_store8(iter_base + 8, 1) - let address95 = mbt_ffi_malloc(payload93.length() * 8) - for index96 = 0; index96 < payload93.length(); index96 = index96 + 1 { - let iter_elem : String = payload93[index96] - let iter_base = address95 + index96 * 8 + let address245 = mbt_ffi_malloc(payload243.length() * 8) + for index246 = 0 + index246 < payload243.length() + index246 = index246 + 1 { + let iter_elem : String = payload243[index246] + let iter_base = address245 + index246 * 8 - let ptr94 = mbt_ffi_str2ptr(iter_elem) + let ptr244 = 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) + mbt_ffi_store32(iter_base + 0, ptr244) + cleanup_list.push(ptr244) } - mbt_ffi_store32(iter_base + 16, payload93.length()) - mbt_ffi_store32(iter_base + 12, address95) - cleanup_list.push(address95) + mbt_ffi_store32(iter_base + 16, payload243.length()) + mbt_ffi_store32(iter_base + 12, address245) + cleanup_list.push(address245) () } } - match payload91.min_bytes { + match payload241.min_bytes { None => { mbt_ffi_store8(iter_base + 20, 0) () } - Some(payload98) => { + Some(payload248) => { mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload98.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 24, payload248.reinterpret_as_int()) () } } - match payload91.max_bytes { + match payload241.max_bytes { None => { mbt_ffi_store8(iter_base + 28, 0) () } - Some(payload100) => { + Some(payload250) => { mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload100.reinterpret_as_int()) + mbt_ffi_store32(iter_base + 32, payload250.reinterpret_as_int()) () } @@ -618,64 +1742,64 @@ pub fn reveal( () } - PathType(payload101) => { + PathType(payload251) => { mbt_ffi_store8(iter_base + 0, 26) - mbt_ffi_store8(iter_base + 8, payload101.direction.ordinal()) - mbt_ffi_store8(iter_base + 9, payload101.kind.ordinal()) + mbt_ffi_store8(iter_base + 8, payload251.direction.ordinal()) + mbt_ffi_store8(iter_base + 9, payload251.kind.ordinal()) - match payload101.allowed_mime_types { + match payload251.allowed_mime_types { None => { mbt_ffi_store8(iter_base + 12, 0) () } - Some(payload103) => { + Some(payload253) => { mbt_ffi_store8(iter_base + 12, 1) - let address105 = mbt_ffi_malloc(payload103.length() * 8) - for index106 = 0 - index106 < payload103.length() - index106 = index106 + 1 { - let iter_elem : String = payload103[index106] - let iter_base = address105 + index106 * 8 + let address255 = mbt_ffi_malloc(payload253.length() * 8) + for index256 = 0 + index256 < payload253.length() + index256 = index256 + 1 { + let iter_elem : String = payload253[index256] + let iter_base = address255 + index256 * 8 - let ptr104 = mbt_ffi_str2ptr(iter_elem) + let ptr254 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr104) - cleanup_list.push(ptr104) + mbt_ffi_store32(iter_base + 0, ptr254) + cleanup_list.push(ptr254) } - mbt_ffi_store32(iter_base + 20, payload103.length()) - mbt_ffi_store32(iter_base + 16, address105) - cleanup_list.push(address105) + mbt_ffi_store32(iter_base + 20, payload253.length()) + mbt_ffi_store32(iter_base + 16, address255) + cleanup_list.push(address255) () } } - match payload101.allowed_extensions { + match payload251.allowed_extensions { None => { mbt_ffi_store8(iter_base + 24, 0) () } - Some(payload108) => { + Some(payload258) => { mbt_ffi_store8(iter_base + 24, 1) - let address110 = mbt_ffi_malloc(payload108.length() * 8) - for index111 = 0 - index111 < payload108.length() - index111 = index111 + 1 { - let iter_elem : String = payload108[index111] - let iter_base = address110 + index111 * 8 + let address260 = mbt_ffi_malloc(payload258.length() * 8) + for index261 = 0 + index261 < payload258.length() + index261 = index261 + 1 { + let iter_elem : String = payload258[index261] + let iter_base = address260 + index261 * 8 - let ptr109 = mbt_ffi_str2ptr(iter_elem) + let ptr259 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr109) - cleanup_list.push(ptr109) + mbt_ffi_store32(iter_base + 0, ptr259) + cleanup_list.push(ptr259) } - mbt_ffi_store32(iter_base + 32, payload108.length()) - mbt_ffi_store32(iter_base + 28, address110) - cleanup_list.push(address110) + mbt_ffi_store32(iter_base + 32, payload258.length()) + mbt_ffi_store32(iter_base + 28, address260) + cleanup_list.push(address260) () } @@ -683,62 +1807,62 @@ pub fn reveal( () } - UrlType(payload112) => { + UrlType(payload262) => { mbt_ffi_store8(iter_base + 0, 27) - match payload112.allowed_schemes { + match payload262.allowed_schemes { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload114) => { + Some(payload264) => { mbt_ffi_store8(iter_base + 8, 1) - let address116 = mbt_ffi_malloc(payload114.length() * 8) - for index117 = 0 - index117 < payload114.length() - index117 = index117 + 1 { - let iter_elem : String = payload114[index117] - let iter_base = address116 + index117 * 8 + let address266 = mbt_ffi_malloc(payload264.length() * 8) + for index267 = 0 + index267 < payload264.length() + index267 = index267 + 1 { + let iter_elem : String = payload264[index267] + let iter_base = address266 + index267 * 8 - let ptr115 = mbt_ffi_str2ptr(iter_elem) + let ptr265 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr115) - cleanup_list.push(ptr115) + mbt_ffi_store32(iter_base + 0, ptr265) + cleanup_list.push(ptr265) } - mbt_ffi_store32(iter_base + 16, payload114.length()) - mbt_ffi_store32(iter_base + 12, address116) - cleanup_list.push(address116) + mbt_ffi_store32(iter_base + 16, payload264.length()) + mbt_ffi_store32(iter_base + 12, address266) + cleanup_list.push(address266) () } } - match payload112.allowed_hosts { + match payload262.allowed_hosts { None => { mbt_ffi_store8(iter_base + 20, 0) () } - Some(payload119) => { + Some(payload269) => { mbt_ffi_store8(iter_base + 20, 1) - let address121 = mbt_ffi_malloc(payload119.length() * 8) - for index122 = 0 - index122 < payload119.length() - index122 = index122 + 1 { - let iter_elem : String = payload119[index122] - let iter_base = address121 + index122 * 8 + let address271 = mbt_ffi_malloc(payload269.length() * 8) + for index272 = 0 + index272 < payload269.length() + index272 = index272 + 1 { + let iter_elem : String = payload269[index272] + let iter_base = address271 + index272 * 8 - let ptr120 = mbt_ffi_str2ptr(iter_elem) + let ptr270 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr120) - cleanup_list.push(ptr120) + mbt_ffi_store32(iter_base + 0, ptr270) + cleanup_list.push(ptr270) } - mbt_ffi_store32(iter_base + 28, payload119.length()) - mbt_ffi_store32(iter_base + 24, address121) - cleanup_list.push(address121) + mbt_ffi_store32(iter_base + 28, payload269.length()) + mbt_ffi_store32(iter_base + 24, address271) + cleanup_list.push(address271) () } @@ -756,165 +1880,165 @@ pub fn reveal( () } - QuantityType(payload125) => { + QuantityType(payload275) => { mbt_ffi_store8(iter_base + 0, 30) - let ptr126 = mbt_ffi_str2ptr(payload125.base_unit) - mbt_ffi_store32(iter_base + 12, payload125.base_unit.length()) - mbt_ffi_store32(iter_base + 8, ptr126) + let ptr276 = mbt_ffi_str2ptr(payload275.base_unit) + mbt_ffi_store32(iter_base + 12, payload275.base_unit.length()) + mbt_ffi_store32(iter_base + 8, ptr276) - let address128 = mbt_ffi_malloc( - payload125.allowed_suffixes.length() * 8, + let address278 = mbt_ffi_malloc( + payload275.allowed_suffixes.length() * 8, ) - for index129 = 0 - index129 < payload125.allowed_suffixes.length() - index129 = index129 + 1 { - let iter_elem : String = payload125.allowed_suffixes[index129] - let iter_base = address128 + index129 * 8 + for index279 = 0 + index279 < payload275.allowed_suffixes.length() + index279 = index279 + 1 { + let iter_elem : String = payload275.allowed_suffixes[index279] + let iter_base = address278 + index279 * 8 - let ptr127 = mbt_ffi_str2ptr(iter_elem) + let ptr277 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr127) - cleanup_list.push(ptr127) + mbt_ffi_store32(iter_base + 0, ptr277) + cleanup_list.push(ptr277) } - mbt_ffi_store32(iter_base + 20, payload125.allowed_suffixes.length()) - mbt_ffi_store32(iter_base + 16, address128) + mbt_ffi_store32(iter_base + 20, payload275.allowed_suffixes.length()) + mbt_ffi_store32(iter_base + 16, address278) - match payload125.min { + match payload275.min { None => { mbt_ffi_store8(iter_base + 24, 0) () } - Some(payload131) => { + Some(payload281) => { mbt_ffi_store8(iter_base + 24, 1) - mbt_ffi_store64(iter_base + 32, payload131.mantissa) - mbt_ffi_store32(iter_base + 40, payload131.scale) + mbt_ffi_store64(iter_base + 32, payload281.mantissa) + mbt_ffi_store32(iter_base + 40, payload281.scale) - let ptr132 = mbt_ffi_str2ptr(payload131.unit) - mbt_ffi_store32(iter_base + 48, payload131.unit.length()) - mbt_ffi_store32(iter_base + 44, ptr132) - cleanup_list.push(ptr132) + let ptr282 = mbt_ffi_str2ptr(payload281.unit) + mbt_ffi_store32(iter_base + 48, payload281.unit.length()) + mbt_ffi_store32(iter_base + 44, ptr282) + cleanup_list.push(ptr282) () } } - match payload125.max { + match payload275.max { None => { mbt_ffi_store8(iter_base + 56, 0) () } - Some(payload134) => { + Some(payload284) => { mbt_ffi_store8(iter_base + 56, 1) - mbt_ffi_store64(iter_base + 64, payload134.mantissa) - mbt_ffi_store32(iter_base + 72, payload134.scale) + mbt_ffi_store64(iter_base + 64, payload284.mantissa) + mbt_ffi_store32(iter_base + 72, payload284.scale) - let ptr135 = mbt_ffi_str2ptr(payload134.unit) - mbt_ffi_store32(iter_base + 80, payload134.unit.length()) - mbt_ffi_store32(iter_base + 76, ptr135) - cleanup_list.push(ptr135) + let ptr285 = mbt_ffi_str2ptr(payload284.unit) + mbt_ffi_store32(iter_base + 80, payload284.unit.length()) + mbt_ffi_store32(iter_base + 76, ptr285) + cleanup_list.push(ptr285) () } } - cleanup_list.push(ptr126) - cleanup_list.push(address128) + cleanup_list.push(ptr276) + cleanup_list.push(address278) () } - UnionType(payload136) => { + UnionType(payload286) => { mbt_ffi_store8(iter_base + 0, 31) - let address172 = mbt_ffi_malloc(payload136.branches.length() * 92) - for index173 = 0 - index173 < payload136.branches.length() - index173 = index173 + 1 { - let iter_elem : @types.UnionBranch = payload136.branches[index173] - let iter_base = address172 + index173 * 92 + let address322 = mbt_ffi_malloc(payload286.branches.length() * 92) + for index323 = 0 + index323 < payload286.branches.length() + index323 = index323 + 1 { + let iter_elem : @types.UnionBranch = payload286.branches[index323] + let iter_base = address322 + index323 * 92 - let ptr137 = mbt_ffi_str2ptr(iter_elem.tag) + let ptr287 = mbt_ffi_str2ptr(iter_elem.tag) mbt_ffi_store32(iter_base + 4, iter_elem.tag.length()) - mbt_ffi_store32(iter_base + 0, ptr137) + mbt_ffi_store32(iter_base + 0, ptr287) mbt_ffi_store32(iter_base + 8, iter_elem.body) match iter_elem.discriminator { - Prefix(payload138) => { + Prefix(payload288) => { mbt_ffi_store8(iter_base + 12, 0) - let ptr139 = mbt_ffi_str2ptr(payload138) - mbt_ffi_store32(iter_base + 20, payload138.length()) - mbt_ffi_store32(iter_base + 16, ptr139) - cleanup_list.push(ptr139) + let ptr289 = mbt_ffi_str2ptr(payload288) + mbt_ffi_store32(iter_base + 20, payload288.length()) + mbt_ffi_store32(iter_base + 16, ptr289) + cleanup_list.push(ptr289) () } - Suffix(payload140) => { + Suffix(payload290) => { mbt_ffi_store8(iter_base + 12, 1) - let ptr141 = mbt_ffi_str2ptr(payload140) - mbt_ffi_store32(iter_base + 20, payload140.length()) - mbt_ffi_store32(iter_base + 16, ptr141) - cleanup_list.push(ptr141) + let ptr291 = mbt_ffi_str2ptr(payload290) + mbt_ffi_store32(iter_base + 20, payload290.length()) + mbt_ffi_store32(iter_base + 16, ptr291) + cleanup_list.push(ptr291) () } - Contains(payload142) => { + Contains(payload292) => { mbt_ffi_store8(iter_base + 12, 2) - let ptr143 = mbt_ffi_str2ptr(payload142) - mbt_ffi_store32(iter_base + 20, payload142.length()) - mbt_ffi_store32(iter_base + 16, ptr143) - cleanup_list.push(ptr143) + let ptr293 = mbt_ffi_str2ptr(payload292) + mbt_ffi_store32(iter_base + 20, payload292.length()) + mbt_ffi_store32(iter_base + 16, ptr293) + cleanup_list.push(ptr293) () } - Regex(payload144) => { + Regex(payload294) => { mbt_ffi_store8(iter_base + 12, 3) - let ptr145 = mbt_ffi_str2ptr(payload144) - mbt_ffi_store32(iter_base + 20, payload144.length()) - mbt_ffi_store32(iter_base + 16, ptr145) - cleanup_list.push(ptr145) + let ptr295 = mbt_ffi_str2ptr(payload294) + mbt_ffi_store32(iter_base + 20, payload294.length()) + mbt_ffi_store32(iter_base + 16, ptr295) + cleanup_list.push(ptr295) () } - FieldEquals(payload146) => { + FieldEquals(payload296) => { mbt_ffi_store8(iter_base + 12, 4) - let ptr147 = mbt_ffi_str2ptr(payload146.field_name) - mbt_ffi_store32(iter_base + 20, payload146.field_name.length()) - mbt_ffi_store32(iter_base + 16, ptr147) + let ptr297 = mbt_ffi_str2ptr(payload296.field_name) + mbt_ffi_store32(iter_base + 20, payload296.field_name.length()) + mbt_ffi_store32(iter_base + 16, ptr297) - match payload146.literal { + match payload296.literal { None => { mbt_ffi_store8(iter_base + 24, 0) () } - Some(payload149) => { + Some(payload299) => { mbt_ffi_store8(iter_base + 24, 1) - let ptr150 = mbt_ffi_str2ptr(payload149) - mbt_ffi_store32(iter_base + 32, payload149.length()) - mbt_ffi_store32(iter_base + 28, ptr150) - cleanup_list.push(ptr150) + let ptr300 = mbt_ffi_str2ptr(payload299) + mbt_ffi_store32(iter_base + 32, payload299.length()) + mbt_ffi_store32(iter_base + 28, ptr300) + cleanup_list.push(ptr300) () } } - cleanup_list.push(ptr147) + cleanup_list.push(ptr297) () } - FieldAbsent(payload151) => { + FieldAbsent(payload301) => { mbt_ffi_store8(iter_base + 12, 5) - let ptr152 = mbt_ffi_str2ptr(payload151) - mbt_ffi_store32(iter_base + 20, payload151.length()) - mbt_ffi_store32(iter_base + 16, ptr152) - cleanup_list.push(ptr152) + let ptr302 = mbt_ffi_str2ptr(payload301) + mbt_ffi_store32(iter_base + 20, payload301.length()) + mbt_ffi_store32(iter_base + 16, ptr302) + cleanup_list.push(ptr302) () } @@ -926,51 +2050,51 @@ pub fn reveal( () } - Some(payload154) => { + Some(payload304) => { mbt_ffi_store8(iter_base + 36, 1) - let ptr155 = mbt_ffi_str2ptr(payload154) - mbt_ffi_store32(iter_base + 44, payload154.length()) - mbt_ffi_store32(iter_base + 40, ptr155) - cleanup_list.push(ptr155) + let ptr305 = mbt_ffi_str2ptr(payload304) + mbt_ffi_store32(iter_base + 44, payload304.length()) + mbt_ffi_store32(iter_base + 40, ptr305) + cleanup_list.push(ptr305) () } } - let address157 = mbt_ffi_malloc( + let address307 = mbt_ffi_malloc( iter_elem.metadata.aliases.length() * 8, ) - for index158 = 0 - index158 < iter_elem.metadata.aliases.length() - index158 = index158 + 1 { - let iter_elem : String = iter_elem.metadata.aliases[index158] - let iter_base = address157 + index158 * 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 ptr156 = mbt_ffi_str2ptr(iter_elem) + let ptr306 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32(iter_base + 4, iter_elem.length()) - mbt_ffi_store32(iter_base + 0, ptr156) - cleanup_list.push(ptr156) + mbt_ffi_store32(iter_base + 0, ptr306) + cleanup_list.push(ptr306) } mbt_ffi_store32(iter_base + 52, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 48, address157) + mbt_ffi_store32(iter_base + 48, address307) - let address160 = mbt_ffi_malloc( + let address310 = mbt_ffi_malloc( iter_elem.metadata.examples.length() * 8, ) - for index161 = 0 - index161 < iter_elem.metadata.examples.length() - index161 = index161 + 1 { - let iter_elem : String = iter_elem.metadata.examples[index161] - let iter_base = address160 + index161 * 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 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 + 60, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 56, address160) + mbt_ffi_store32(iter_base + 56, address310) match iter_elem.metadata.deprecated { None => { @@ -978,13 +2102,13 @@ pub fn reveal( () } - Some(payload163) => { + Some(payload313) => { mbt_ffi_store8(iter_base + 64, 1) - let ptr164 = mbt_ffi_str2ptr(payload163) - mbt_ffi_store32(iter_base + 72, payload163.length()) - mbt_ffi_store32(iter_base + 68, ptr164) - cleanup_list.push(ptr164) + let ptr314 = mbt_ffi_str2ptr(payload313) + mbt_ffi_store32(iter_base + 72, payload313.length()) + mbt_ffi_store32(iter_base + 68, ptr314) + cleanup_list.push(ptr314) () } @@ -996,10 +2120,10 @@ pub fn reveal( () } - Some(payload166) => { + Some(payload316) => { mbt_ffi_store8(iter_base + 76, 1) - match payload166 { + match payload316 { Multimodal => { mbt_ffi_store8(iter_base + 80, 0) @@ -1015,13 +2139,13 @@ pub fn reveal( () } - Other(payload170) => { + Other(payload320) => { mbt_ffi_store8(iter_base + 80, 3) - let ptr171 = mbt_ffi_str2ptr(payload170) - mbt_ffi_store32(iter_base + 88, payload170.length()) - mbt_ffi_store32(iter_base + 84, ptr171) - cleanup_list.push(ptr171) + let ptr321 = mbt_ffi_str2ptr(payload320) + mbt_ffi_store32(iter_base + 88, payload320.length()) + mbt_ffi_store32(iter_base + 84, ptr321) + cleanup_list.push(ptr321) () } @@ -1030,33 +2154,33 @@ pub fn reveal( () } } - cleanup_list.push(ptr137) - cleanup_list.push(address157) - cleanup_list.push(address160) + cleanup_list.push(ptr287) + cleanup_list.push(address307) + cleanup_list.push(address310) } - mbt_ffi_store32(iter_base + 12, payload136.branches.length()) - mbt_ffi_store32(iter_base + 8, address172) - cleanup_list.push(address172) + mbt_ffi_store32(iter_base + 12, payload286.branches.length()) + mbt_ffi_store32(iter_base + 8, address322) + cleanup_list.push(address322) () } - SecretType(payload174) => { + SecretType(payload324) => { mbt_ffi_store8(iter_base + 0, 32) - mbt_ffi_store32(iter_base + 8, payload174.inner) + mbt_ffi_store32(iter_base + 8, payload324.inner) - match payload174.category { + match payload324.category { None => { mbt_ffi_store8(iter_base + 12, 0) () } - Some(payload176) => { + Some(payload326) => { mbt_ffi_store8(iter_base + 12, 1) - let ptr177 = mbt_ffi_str2ptr(payload176) - mbt_ffi_store32(iter_base + 20, payload176.length()) - mbt_ffi_store32(iter_base + 16, ptr177) - cleanup_list.push(ptr177) + let ptr327 = mbt_ffi_str2ptr(payload326) + mbt_ffi_store32(iter_base + 20, payload326.length()) + mbt_ffi_store32(iter_base + 16, ptr327) + cleanup_list.push(ptr327) () } @@ -1064,22 +2188,22 @@ pub fn reveal( () } - QuotaTokenType(payload178) => { + QuotaTokenType(payload328) => { mbt_ffi_store8(iter_base + 0, 33) - match payload178.resource_name { + match payload328.resource_name { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload180) => { + Some(payload330) => { mbt_ffi_store8(iter_base + 8, 1) - let ptr181 = mbt_ffi_str2ptr(payload180) - mbt_ffi_store32(iter_base + 16, payload180.length()) - mbt_ffi_store32(iter_base + 12, ptr181) - cleanup_list.push(ptr181) + let ptr331 = mbt_ffi_str2ptr(payload330) + mbt_ffi_store32(iter_base + 16, payload330.length()) + mbt_ffi_store32(iter_base + 12, ptr331) + cleanup_list.push(ptr331) () } @@ -1087,18 +2211,18 @@ pub fn reveal( () } - FutureType(payload182) => { + FutureType(payload332) => { mbt_ffi_store8(iter_base + 0, 34) - match payload182 { + match payload332 { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload184) => { + Some(payload334) => { mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload184) + mbt_ffi_store32(iter_base + 12, payload334) () } @@ -1106,18 +2230,18 @@ pub fn reveal( () } - StreamType(payload185) => { + StreamType(payload335) => { mbt_ffi_store8(iter_base + 0, 35) - 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) () } @@ -1133,47 +2257,47 @@ pub fn reveal( () } - Some(payload189) => { + Some(payload339) => { mbt_ffi_store8(iter_base + 88, 1) - let ptr190 = mbt_ffi_str2ptr(payload189) - mbt_ffi_store32(iter_base + 96, payload189.length()) - mbt_ffi_store32(iter_base + 92, ptr190) - cleanup_list.push(ptr190) + let ptr340 = mbt_ffi_str2ptr(payload339) + mbt_ffi_store32(iter_base + 96, payload339.length()) + mbt_ffi_store32(iter_base + 92, ptr340) + cleanup_list.push(ptr340) () } } - 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 address342 = mbt_ffi_malloc(iter_elem.metadata.aliases.length() * 8) + for index343 = 0 + index343 < iter_elem.metadata.aliases.length() + index343 = index343 + 1 { + let iter_elem : String = iter_elem.metadata.aliases[index343] + let iter_base = address342 + index343 * 8 - let ptr191 = mbt_ffi_str2ptr(iter_elem) + let ptr341 = 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 + 0, ptr341) + cleanup_list.push(ptr341) } mbt_ffi_store32(iter_base + 104, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 100, address192) + mbt_ffi_store32(iter_base + 100, address342) - 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 address345 = mbt_ffi_malloc(iter_elem.metadata.examples.length() * 8) + for index346 = 0 + index346 < iter_elem.metadata.examples.length() + index346 = index346 + 1 { + let iter_elem : String = iter_elem.metadata.examples[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 + 112, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 108, address195) + mbt_ffi_store32(iter_base + 108, address345) match iter_elem.metadata.deprecated { None => { @@ -1181,13 +2305,13 @@ pub fn reveal( () } - Some(payload198) => { + Some(payload348) => { mbt_ffi_store8(iter_base + 116, 1) - let ptr199 = mbt_ffi_str2ptr(payload198) - mbt_ffi_store32(iter_base + 124, payload198.length()) - mbt_ffi_store32(iter_base + 120, ptr199) - cleanup_list.push(ptr199) + let ptr349 = mbt_ffi_str2ptr(payload348) + mbt_ffi_store32(iter_base + 124, payload348.length()) + mbt_ffi_store32(iter_base + 120, ptr349) + cleanup_list.push(ptr349) () } @@ -1199,10 +2323,10 @@ pub fn reveal( () } - Some(payload201) => { + Some(payload351) => { mbt_ffi_store8(iter_base + 128, 1) - match payload201 { + match payload351 { Multimodal => { mbt_ffi_store8(iter_base + 132, 0) @@ -1218,13 +2342,13 @@ pub fn reveal( () } - Other(payload205) => { + Other(payload355) => { mbt_ffi_store8(iter_base + 132, 3) - let ptr206 = mbt_ffi_str2ptr(payload205) - mbt_ffi_store32(iter_base + 140, payload205.length()) - mbt_ffi_store32(iter_base + 136, ptr206) - cleanup_list.push(ptr206) + let ptr356 = mbt_ffi_str2ptr(payload355) + mbt_ffi_store32(iter_base + 140, payload355.length()) + mbt_ffi_store32(iter_base + 136, ptr356) + cleanup_list.push(ptr356) () } @@ -1233,18 +2357,18 @@ pub fn reveal( () } } - cleanup_list.push(address192) - cleanup_list.push(address195) + cleanup_list.push(address342) + cleanup_list.push(address345) } - let address213 = mbt_ffi_malloc(expected.defs.length() * 24) - for index214 = 0; index214 < expected.defs.length(); index214 = index214 + 1 { - let iter_elem : @types.SchemaTypeDef = expected.defs[index214] - let iter_base = address213 + index214 * 24 + let address363 = mbt_ffi_malloc(expected.defs.length() * 24) + for index364 = 0; index364 < expected.defs.length(); index364 = index364 + 1 { + let iter_elem : @types.SchemaTypeDef = expected.defs[index364] + let iter_base = address363 + index364 * 24 - let ptr209 = mbt_ffi_str2ptr(iter_elem.id) + let ptr359 = mbt_ffi_str2ptr(iter_elem.id) mbt_ffi_store32(iter_base + 4, iter_elem.id.length()) - mbt_ffi_store32(iter_base + 0, ptr209) + mbt_ffi_store32(iter_base + 0, ptr359) match iter_elem.name { None => { @@ -1252,40 +2376,40 @@ pub fn reveal( () } - Some(payload211) => { + Some(payload361) => { mbt_ffi_store8(iter_base + 8, 1) - let ptr212 = mbt_ffi_str2ptr(payload211) - mbt_ffi_store32(iter_base + 16, payload211.length()) - mbt_ffi_store32(iter_base + 12, ptr212) - cleanup_list.push(ptr212) + let ptr362 = mbt_ffi_str2ptr(payload361) + mbt_ffi_store32(iter_base + 16, payload361.length()) + mbt_ffi_store32(iter_base + 12, ptr362) + cleanup_list.push(ptr362) () } } mbt_ffi_store32(iter_base + 20, iter_elem.body) - cleanup_list.push(ptr209) + cleanup_list.push(ptr359) } let return_area = mbt_ffi_malloc(16) wasmImportReveal( handle, - address207, + address357, expected.type_nodes.length(), - address213, + address363, expected.defs.length(), expected.root, return_area, ) - let lifted247 = match mbt_ffi_load8_u(return_area + 0) { + let lifted397 = match mbt_ffi_load8_u(return_area + 0) { 0 => { - let array241 : Array[@types.SchemaValueNode] = [] - for index242 = 0 - index242 < mbt_ffi_load32(return_area + 8) - index242 = index242 + 1 { - let iter_base = mbt_ffi_load32(return_area + 4) + index242 * 32 + let array391 : Array[@types.SchemaValueNode] = [] + for index392 = 0 + index392 < mbt_ffi_load32(return_area + 8) + index392 = index392 + 1 { + let iter_base = mbt_ffi_load32(return_area + 4) + index392 * 32 - let lifted240 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted390 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -1326,10 +2450,10 @@ pub fn reveal( } 13 => { let array : 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 + for index365 = 0 + index365 < mbt_ffi_load32(iter_base + 12) + index365 = index365 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index365 * 4 array.push(mbt_ffi_load32(iter_base + 0)) } @@ -1354,170 +2478,170 @@ pub fn reveal( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array216 : Array[Bool] = [] - for index217 = 0 - index217 < mbt_ffi_load32(iter_base + 12) - index217 = index217 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index217 * 1 + let array366 : Array[Bool] = [] + for index367 = 0 + index367 < mbt_ffi_load32(iter_base + 12) + index367 = index367 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index367 * 1 - array216.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array366.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array216) + @types.SchemaValueNode::FlagsValue(array366) } 17 => { - 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 + 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 - array218.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::TupleValue(array218) + @types.SchemaValueNode::TupleValue(array368) } 18 => { - let array220 : Array[Int] = [] - for index221 = 0 - index221 < mbt_ffi_load32(iter_base + 12) - index221 = index221 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index221 * 4 + let array370 : Array[Int] = [] + for index371 = 0 + index371 < mbt_ffi_load32(iter_base + 12) + index371 = index371 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index371 * 4 - array220.push(mbt_ffi_load32(iter_base + 0)) + array370.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array220) + @types.SchemaValueNode::ListValue(array370) } 19 => { - let array222 : Array[Int] = [] - for index223 = 0 - index223 < mbt_ffi_load32(iter_base + 12) - index223 = index223 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index223 * 4 + let array372 : Array[Int] = [] + for index373 = 0 + index373 < mbt_ffi_load32(iter_base + 12) + index373 = index373 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index373 * 4 - array222.push(mbt_ffi_load32(iter_base + 0)) + array372.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array222) + @types.SchemaValueNode::FixedListValue(array372) } 20 => { - let array224 : Array[@types.MapEntry] = [] - for index225 = 0 - index225 < mbt_ffi_load32(iter_base + 12) - index225 = index225 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index225 * 8 + let array374 : Array[@types.MapEntry] = [] + for index375 = 0 + index375 < mbt_ffi_load32(iter_base + 12) + index375 = index375 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index375 * 8 - array224.push(@types.MapEntry::{ + array374.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(array224) + @types.SchemaValueNode::MapValue(array374) } 21 => { - let lifted226 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted376 : 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(lifted226) + @types.SchemaValueNode::OptionValue(lifted376) } 22 => { - let lifted229 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted379 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted227 : Int? = match mbt_ffi_load8_u(iter_base + 12) { + let lifted377 : 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(lifted227) + @types.ResultValuePayload::OkValue(lifted377) } 1 => { - let lifted228 : Int? = match mbt_ffi_load8_u(iter_base + 12) { + let lifted378 : 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(lifted228) + @types.ResultValuePayload::ErrValue(lifted378) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted229) + @types.SchemaValueNode::ResultValue(lifted379) } 23 => { - let result230 = mbt_ffi_ptr2str( + let result380 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted232 : String? = match mbt_ffi_load8_u(iter_base + 16) { + let lifted382 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result231 = mbt_ffi_ptr2str( + let result381 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result231) + Option::Some(result381) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result230, - language: lifted232, + text: result380, + language: lifted382, }) } 24 => { - let result233 = mbt_ffi_ptr2bytes( + let result383 = mbt_ffi_ptr2bytes( 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( + 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::BinaryValue(@types.BinaryValuePayload::{ - bytes: result233, - mime_type: lifted235, + bytes: result383, + mime_type: lifted385, }) } 25 => { - let result236 = mbt_ffi_ptr2str( + let result386 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result236) + @types.SchemaValueNode::PathValue(result386) } 26 => { - let result237 = mbt_ffi_ptr2str( + let result387 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result237) + @types.SchemaValueNode::UrlValue(result387) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -1529,7 +2653,7 @@ pub fn reveal( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result238 = mbt_ffi_ptr2str( + let result388 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -1537,17 +2661,17 @@ pub fn reveal( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result238, + unit: result388, }) } 30 => { - let result239 = mbt_ffi_ptr2str( + let result389 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result239, + tag: result389, body: mbt_ffi_load32(iter_base + 16), }) } @@ -1562,53 +2686,53 @@ pub fn reveal( _ => panic() } - array241.push(lifted240) + array391.push(lifted390) } mbt_ffi_free(mbt_ffi_load32(return_area + 4)) Result::Ok(@types.SchemaValueTree::{ - value_nodes: array241, + value_nodes: array391, root: mbt_ffi_load32(return_area + 12), }) } 1 => { - let lifted246 = match mbt_ffi_load8_u(return_area + 4) { + let lifted396 = match mbt_ffi_load8_u(return_area + 4) { 0 => { - let result243 = mbt_ffi_ptr2str( + let result393 = mbt_ffi_ptr2str( mbt_ffi_load32(return_area + 8), mbt_ffi_load32(return_area + 12), ) - @types0.SecretError::Unavailable(result243) + @types0.SecretError::Unavailable(result393) } 1 => { - let result244 = mbt_ffi_ptr2bytes( + let result394 = mbt_ffi_ptr2bytes( mbt_ffi_load32(return_area + 8), mbt_ffi_load32(return_area + 12), ) @types0.SecretError::VersionNotFound(@types0.SecretVersion::{ - bytes: result244, + bytes: result394, }) } 2 => { - let result245 = mbt_ffi_ptr2str( + let result395 = mbt_ffi_ptr2str( mbt_ffi_load32(return_area + 8), mbt_ffi_load32(return_area + 12), ) - @types0.SecretError::Internal(result245) + @types0.SecretError::Internal(result395) } _ => panic() } - Result::Err(lifted246) + Result::Err(lifted396) } _ => panic() } - let ret = lifted247 - mbt_ffi_free(address207) - mbt_ffi_free(address213) + let ret = lifted397 + mbt_ffi_free(address357) + mbt_ffi_free(address363) mbt_ffi_free(return_area) cleanup_list.each(mbt_ffi_free) diff --git a/sdks/moonbit/golem_sdk/interface/golem/secrets/types/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/secrets/types/ffi.mbt index 2a99f50552..cb15539d30 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/secrets/types/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/secrets/types/ffi.mbt @@ -7,8 +7,11 @@ fn wasmImportId(p0 : Int, p1 : Int) = "golem:secrets/types@0.1.0" "id" fn wasmImportMetadata(p0 : Int, p1 : Int) = "golem:secrets/types@0.1.0" "metadata" ///| -extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = - #|(func (param i32) (result i64) local.get 0 i64.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_load32(offset : Int) -> Int = @@ -22,11 +25,11 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| 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_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_free(position : Int) = @@ -37,8 +40,5 @@ 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_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) 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/pkg.generated.mbti b/sdks/moonbit/golem_sdk/interface/golem/tool/common/pkg.generated.mbti index 248690e465..75d541066f 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/tool/common/pkg.generated.mbti +++ b/sdks/moonbit/golem_sdk/interface/golem/tool/common/pkg.generated.mbti @@ -78,6 +78,13 @@ pub(all) struct Doc { examples : Array[Example] } derive(Eq, Show) +pub(all) enum DuplicateKeyPolicy { + REJECT + LAST_WINS +} derive(Eq, Show) +pub fn DuplicateKeyPolicy::from(Int) -> Self +pub fn DuplicateKeyPolicy::ordinal(Self) -> Int + pub(all) struct ErrorCase { name : String doc : Doc @@ -136,7 +143,8 @@ pub(all) struct InvocationResult { pub(all) enum OptionShape { Scalar(Int) OptionalScalar(Int) - Repeatable(RepeatableShape) + RepeatableList(RepeatableListShape) + RepeatableMap(RepeatableMapShape) } derive(Eq, Show) pub(all) struct OptionSpec { @@ -158,6 +166,7 @@ pub(all) struct Positional { type_ : Int default : @types.SchemaValueTree? required : Bool + accepts_stdio : Bool } derive(Eq, Show) pub(all) struct Positionals { @@ -181,9 +190,15 @@ pub(all) struct RefGroup { refs : Array[Ref] } derive(Eq, Show) -pub(all) struct RepeatableShape { +pub(all) struct RepeatableListShape { repetition : Repetition - type_ : Int + item_type : Int +} derive(Eq, Show) + +pub(all) struct RepeatableMapShape { + repetition : Repetition + map_type : Int + duplicate_key_policy : DuplicateKeyPolicy } derive(Eq, Show) pub(all) enum Repetition { @@ -214,6 +229,7 @@ pub(all) struct TailPositional { max : UInt? separator : String? verbatim : Bool + accepts_stdio : Bool } derive(Eq, Show) pub(all) struct Tool { 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 a894be23ba..3a0cb3f514 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/tool/common/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/tool/common/top.mbt @@ -13,6 +13,30 @@ pub(all) struct CommandAnnotations { 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 @@ -21,16 +45,24 @@ pub(all) enum Repetition { } derive(Show, Eq) ///| -pub(all) struct RepeatableShape { +pub(all) struct RepeatableListShape { repetition : Repetition - type_ : Int + 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) ///| @@ -156,6 +188,7 @@ pub(all) struct Positional { type_ : Int default : @types.SchemaValueTree? required : Bool + accepts_stdio : Bool } derive(Show, Eq) ///| @@ -168,6 +201,7 @@ pub(all) struct TailPositional { max : UInt? separator : String? verbatim : Bool + accepts_stdio : Bool } derive(Show, Eq) ///| diff --git a/sdks/moonbit/golem_sdk/interface/golem/tool/host/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/tool/host/ffi.mbt index 30c8c6a361..3ade025164 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/tool/host/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/tool/host/ffi.mbt @@ -77,74 +77,76 @@ fn wasmImportMethodFutureInvokeResultGet(p0 : Int, p1 : Int) = "golem:tool/host@ ///| fn wasmImportMethodFutureInvokeResultCancel(p0 : Int) = "golem:tool/host@0.1.0" "[method]future-invoke-result.cancel" -///| -extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = - #|(func (param i32) (result f64) local.get 0 f64.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_storef32(offset : Int, value : Float) = - #|(func (param i32) (param f32) local.get 0 local.get 1 f32.store) +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_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_load8(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_s) ///| -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_storef32(offset : Int, value : Float) = + #|(func (param i32) (param f32) local.get 0 local.get 1 f32.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_extend8(value : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.extend8_s) ///| -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_store8(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) +extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = + #|(func (param i32) (result f32) local.get 0 f32.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_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_loadf64(offset : Int) -> Double = + #|(func (param i32) (result f64) local.get 0 f64.load) ///| -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_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 = +#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_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_store32(offset : Int, value : Int) = - #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) +extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) ///| -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_load8(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_s) +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_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_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = @@ -154,24 +156,22 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| local.get 0) ///| -extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = - #|(func (param i32) (result f32) local.get 0 f32.load) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) ///| -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_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_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_storef64(offset : Int, value : Double) = + #|(func (param i32) (param f64) local.get 0 local.get 1 f64.store) ///| -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_store8(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) 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 ceee51dead..6ecc0422ce 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/tool/host/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/tool/host/top.mbt @@ -59,22 +59,22 @@ pub fn get_all_tools() -> Array[RegisteredTool] { let return_area = mbt_ffi_malloc(8) wasmImportGetAllTools(return_area) - let array678 : Array[RegisteredTool] = [] - for index679 = 0 - index679 < mbt_ffi_load32(return_area + 4) - index679 = index679 + 1 { - let iter_base = mbt_ffi_load32(return_area + 0) + index679 * 56 + let array750 : Array[RegisteredTool] = [] + for index751 = 0 + index751 < mbt_ffi_load32(return_area + 4) + index751 = index751 + 1 { + let iter_base = mbt_ffi_load32(return_area + 0) + index751 * 56 let result = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let array543 : Array[@common.CommandNode] = [] - for index544 = 0 - index544 < mbt_ffi_load32(iter_base + 12) - index544 = index544 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index544 * 324 + let array545 : Array[@common.CommandNode] = [] + for index546 = 0 + index546 < mbt_ffi_load32(iter_base + 12) + index546 = index546 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index546 * 324 let result0 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), @@ -124,11 +124,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let array56 : Array[@common.OptionSpec] = [] - for index57 = 0 - index57 < mbt_ffi_load32(iter_base + 44) - index57 = index57 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index57 * 108 + 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 * 112 let result8 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), @@ -199,7 +199,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)) 1 => @common.OptionShape::OptionalScalar(mbt_ffi_load32(iter_base + 64)) @@ -217,25 +217,47 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @common.OptionShape::Repeatable(@common.RepeatableShape::{ + @common.OptionShape::RepeatableList(@common.RepeatableListShape::{ repetition: lifted20, - type_: mbt_ffi_load32(iter_base + 72), + 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 lifted53 : @types.SchemaValueTree? = match - mbt_ffi_load8_u(iter_base + 76) { + let lifted54 : @types.SchemaValueTree? = match + mbt_ffi_load8_u(iter_base + 80) { 0 => Option::None 1 => { - let array51 : Array[@types.SchemaValueNode] = [] - for index52 = 0 - index52 < mbt_ffi_load32(iter_base + 84) - index52 = index52 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index52 * 32 + let array52 : Array[@types.SchemaValueNode] = [] + for index53 = 0 + index53 < mbt_ffi_load32(iter_base + 88) + index53 = index53 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 84) + index53 * 32 - let lifted50 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted51 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -285,28 +307,28 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result22 = mbt_ffi_ptr2str( + 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) _ => panic() @@ -314,7 +336,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted25, + payload: lifted26, }) } 15 => @@ -322,174 +344,174 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 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::{ + 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 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => 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 + let lifted38 : 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(lifted37) + @types.ResultValuePayload::OkValue(lifted38) } 1 => { - let lifted38 : Int? = match + let lifted39 : 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(lifted38) + @types.ResultValuePayload::ErrValue(lifted39) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted39) + @types.SchemaValueNode::ResultValue(lifted40) } 23 => { - let result40 = mbt_ffi_ptr2str( + let result41 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted42 : String? = match + let lifted43 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result41 = mbt_ffi_ptr2str( + 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, + text: result41, + language: lifted43, }) } 24 => { - let result43 = mbt_ffi_ptr2bytes( + let result44 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted45 : String? = match + let lifted46 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result44 = mbt_ffi_ptr2str( + 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, + bytes: result44, + mime_type: lifted46, }) } 25 => { - let result46 = mbt_ffi_ptr2str( + 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( + 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 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -501,7 +523,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result48 = mbt_ffi_ptr2str( + let result49 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -509,17 +531,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result48, + unit: result49, }) } 30 => { - let result49 = mbt_ffi_ptr2str( + let result50 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result49, + tag: result50, body: mbt_ffi_load32(iter_base + 16), }) } @@ -534,32 +556,32 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array51.push(lifted50) + array52.push(lifted51) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 84)) Option::Some(@types.SchemaValueTree::{ - value_nodes: array51, - root: mbt_ffi_load32(iter_base + 88), + value_nodes: array52, + root: mbt_ffi_load32(iter_base + 92), }) } _ => panic() } - let lifted55 : String? = match mbt_ffi_load8_u(iter_base + 96) { + let lifted56 : String? = match mbt_ffi_load8_u(iter_base + 100) { 0 => Option::None 1 => { - let result54 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 100), + let result55 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 104), + mbt_ffi_load32(iter_base + 108), ) - Option::Some(result54) + Option::Some(result55) } _ => panic() } - array56.push(@common.OptionSpec::{ + array57.push(@common.OptionSpec::{ long: result8, short: lifted, aliases: array10, @@ -569,84 +591,84 @@ pub fn get_all_tools() -> Array[RegisteredTool] { examples: array16, }, value_name: lifted19, - shape: lifted21, - default: lifted53, - required: mbt_ffi_load8_u(iter_base + 92) != 0, - env_var: lifted55, + shape: lifted22, + default: lifted54, + required: mbt_ffi_load8_u(iter_base + 96) != 0, + env_var: lifted56, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let array73 : Array[@common.FlagSpec] = [] - for index74 = 0 - index74 < mbt_ffi_load32(iter_base + 52) - index74 = index74 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 48) + index74 * 72 + 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 result58 = mbt_ffi_ptr2str( + let result59 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted59 : Char? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted60 : 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 array61 : Array[String] = [] - for index62 = 0 - index62 < mbt_ffi_load32(iter_base + 20) - index62 = index62 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + index62 * 8 + 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 result60 = mbt_ffi_ptr2str( + let result61 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array61.push(result60) + array62.push(result61) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let result63 = mbt_ffi_ptr2str( + let result64 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let result64 = mbt_ffi_ptr2str( + let result65 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array67 : Array[@common.Example] = [] - for index68 = 0 - index68 < mbt_ffi_load32(iter_base + 44) - index68 = index68 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index68 * 16 + 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 result65 = mbt_ffi_ptr2str( + let result66 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result66 = mbt_ffi_ptr2str( + let result67 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array67.push(@common.Example::{ title: result65, body: result66 }) + array68.push(@common.Example::{ title: result66, body: result67 }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let lifted70 = match mbt_ffi_load8_u(iter_base + 48) { + let lifted71 = 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 lifted69 : UInt? = match mbt_ffi_load8_u(iter_base + 52) { + let lifted70 : UInt? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => Option::Some( @@ -655,118 +677,118 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @common.FlagShape::CountFlag(lifted69) + @common.FlagShape::CountFlag(lifted70) } _ => panic() } - let lifted72 : String? = match mbt_ffi_load8_u(iter_base + 60) { + let lifted73 : String? = match mbt_ffi_load8_u(iter_base + 60) { 0 => Option::None 1 => { - let result71 = mbt_ffi_ptr2str( + let result72 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - Option::Some(result71) + Option::Some(result72) } _ => panic() } - array73.push(@common.FlagSpec::{ - long: result58, - short: lifted59, - aliases: array61, + array74.push(@common.FlagSpec::{ + long: result59, + short: lifted60, + aliases: array62, doc: @common.Doc::{ - summary: result63, - description: result64, - examples: array67, + summary: result64, + description: result65, + examples: array68, }, - shape: lifted70, - env_var: lifted72, + shape: lifted71, + env_var: lifted73, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array75 : Array[Int] = [] - for index76 = 0 - index76 < mbt_ffi_load32(iter_base + 60) - index76 = index76 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + index76 * 4 + 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 - array75.push(mbt_ffi_load32(iter_base + 0)) + array76.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted542 : @common.CommandBody? = match + let lifted544 : @common.CommandBody? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let array118 : Array[@common.Positional] = [] - for index119 = 0 - index119 < mbt_ffi_load32(iter_base + 72) - index119 = index119 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 68) + index119 * 68 + let array119 : Array[@common.Positional] = [] + for index120 = 0 + index120 < mbt_ffi_load32(iter_base + 72) + index120 = index120 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 68) + index120 * 68 - let result77 = mbt_ffi_ptr2str( + let result78 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result78 = mbt_ffi_ptr2str( + let result79 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result79 = mbt_ffi_ptr2str( + let result80 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let array82 : Array[@common.Example] = [] - for index83 = 0 - index83 < mbt_ffi_load32(iter_base + 28) - index83 = index83 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + index83 * 16 + 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 result80 = mbt_ffi_ptr2str( + let result81 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result81 = mbt_ffi_ptr2str( + let result82 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array82.push(@common.Example::{ title: result80, body: result81 }) + array83.push(@common.Example::{ title: result81, body: result82 }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let lifted85 : String? = match mbt_ffi_load8_u(iter_base + 32) { + let lifted86 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result84 = mbt_ffi_ptr2str( + let result85 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 36), mbt_ffi_load32(iter_base + 40), ) - Option::Some(result84) + Option::Some(result85) } _ => panic() } - let lifted117 : @types.SchemaValueTree? = match + let lifted118 : @types.SchemaValueTree? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => { - let array115 : Array[@types.SchemaValueNode] = [] - for index116 = 0 - index116 < mbt_ffi_load32(iter_base + 56) - index116 = index116 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 52) + index116 * 32 + let array116 : Array[@types.SchemaValueNode] = [] + for index117 = 0 + index117 < mbt_ffi_load32(iter_base + 56) + index117 = index117 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 52) + index117 * 32 - let lifted114 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted115 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -818,29 +840,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result86 = mbt_ffi_ptr2str( + let result87 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result86) + @types.SchemaValueNode::StringValue(result87) } 13 => { - let array87 : Array[Int] = [] - for index88 = 0 - index88 < mbt_ffi_load32(iter_base + 12) - index88 = index88 + 1 { + 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) + - index88 * 4 + index89 * 4 - array87.push(mbt_ffi_load32(iter_base + 0)) + array88.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array87) + @types.SchemaValueNode::RecordValue(array88) } 14 => { - let lifted89 : Int? = match + let lifted90 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -849,7 +871,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted89, + payload: lifted90, }) } 15 => @@ -857,180 +879,180 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array90 : Array[Bool] = [] - for index91 = 0 - index91 < mbt_ffi_load32(iter_base + 12) - index91 = index91 + 1 { + 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) + - index91 * 1 + index92 * 1 - array90.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array91.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array90) + @types.SchemaValueNode::FlagsValue(array91) } 17 => { - let array92 : Array[Int] = [] - for index93 = 0 - index93 < mbt_ffi_load32(iter_base + 12) - index93 = index93 + 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) + - index93 * 4 + index94 * 4 - array92.push(mbt_ffi_load32(iter_base + 0)) + array93.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array92) + @types.SchemaValueNode::TupleValue(array93) } 18 => { - let array94 : Array[Int] = [] - for index95 = 0 - index95 < mbt_ffi_load32(iter_base + 12) - index95 = index95 + 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) + - index95 * 4 + index96 * 4 - array94.push(mbt_ffi_load32(iter_base + 0)) + array95.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array94) + @types.SchemaValueNode::ListValue(array95) } 19 => { - let array96 : Array[Int] = [] - for index97 = 0 - index97 < mbt_ffi_load32(iter_base + 12) - index97 = index97 + 1 { + 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) + - index97 * 4 + index98 * 4 - array96.push(mbt_ffi_load32(iter_base + 0)) + array97.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array96) + @types.SchemaValueNode::FixedListValue(array97) } 20 => { - let array98 : Array[@types.MapEntry] = [] - for index99 = 0 - index99 < mbt_ffi_load32(iter_base + 12) - index99 = index99 + 1 { + 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) + - index99 * 8 + index100 * 8 - array98.push(@types.MapEntry::{ + 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)) - @types.SchemaValueNode::MapValue(array98) + @types.SchemaValueNode::MapValue(array99) } 21 => { - let lifted100 : Int? = match + let lifted101 : 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(lifted100) + @types.SchemaValueNode::OptionValue(lifted101) } 22 => { - let lifted103 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted104 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted101 : Int? = match + let lifted102 : 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(lifted101) + @types.ResultValuePayload::OkValue(lifted102) } 1 => { - let lifted102 : Int? = match + let lifted103 : 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(lifted102) + @types.ResultValuePayload::ErrValue(lifted103) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted103) + @types.SchemaValueNode::ResultValue(lifted104) } 23 => { - let result104 = mbt_ffi_ptr2str( + let result105 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted106 : String? = match + let lifted107 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result105 = mbt_ffi_ptr2str( + let result106 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result105) + Option::Some(result106) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result104, - language: lifted106, + text: result105, + language: lifted107, }) } 24 => { - let result107 = mbt_ffi_ptr2bytes( + let result108 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted109 : String? = match + let lifted110 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result108 = mbt_ffi_ptr2str( + let result109 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result108) + Option::Some(result109) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result107, - mime_type: lifted109, + bytes: result108, + mime_type: lifted110, }) } 25 => { - let result110 = mbt_ffi_ptr2str( + let result111 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result110) + @types.SchemaValueNode::PathValue(result111) } 26 => { - let result111 = mbt_ffi_ptr2str( + let result112 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result111) + @types.SchemaValueNode::UrlValue(result112) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -1042,7 +1064,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result112 = mbt_ffi_ptr2str( + let result113 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -1050,17 +1072,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result112, + unit: result113, }) } 30 => { - let result113 = mbt_ffi_ptr2str( + let result114 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result113, + tag: result114, body: mbt_ffi_load32(iter_base + 16), }) } @@ -1077,89 +1099,90 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array115.push(lifted114) + array116.push(lifted115) } mbt_ffi_free(mbt_ffi_load32(iter_base + 52)) Option::Some(@types.SchemaValueTree::{ - value_nodes: array115, + value_nodes: array116, root: mbt_ffi_load32(iter_base + 60), }) } _ => panic() } - array118.push(@common.Positional::{ - name: result77, + array119.push(@common.Positional::{ + name: result78, doc: @common.Doc::{ - summary: result78, - description: result79, - examples: array82, + summary: result79, + description: result80, + examples: array83, }, - value_name: lifted85, + value_name: lifted86, type_: mbt_ffi_load32(iter_base + 44), - default: lifted117, + default: lifted118, 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 lifted132 : @common.TailPositional? = match + let lifted133 : @common.TailPositional? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let result120 = mbt_ffi_ptr2str( + let result121 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 80), mbt_ffi_load32(iter_base + 84), ) - let result121 = mbt_ffi_ptr2str( + let result122 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 88), mbt_ffi_load32(iter_base + 92), ) - let result122 = mbt_ffi_ptr2str( + let result123 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 96), mbt_ffi_load32(iter_base + 100), ) - let array125 : Array[@common.Example] = [] - for index126 = 0 - index126 < mbt_ffi_load32(iter_base + 108) - index126 = index126 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 104) + index126 * 16 + let array126 : Array[@common.Example] = [] + for index127 = 0 + index127 < mbt_ffi_load32(iter_base + 108) + index127 = index127 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 104) + index127 * 16 - let result123 = mbt_ffi_ptr2str( + let result124 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result124 = mbt_ffi_ptr2str( + let result125 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array125.push(@common.Example::{ - title: result123, - body: result124, + array126.push(@common.Example::{ + title: result124, + body: result125, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 104)) - let lifted128 : String? = match mbt_ffi_load8_u(iter_base + 112) { + let lifted129 : String? = match mbt_ffi_load8_u(iter_base + 112) { 0 => Option::None 1 => { - let result127 = mbt_ffi_ptr2str( + let result128 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 116), mbt_ffi_load32(iter_base + 120), ) - Option::Some(result127) + Option::Some(result128) } _ => panic() } - let lifted129 : UInt? = match mbt_ffi_load8_u(iter_base + 132) { + let lifted130 : UInt? = match mbt_ffi_load8_u(iter_base + 132) { 0 => Option::None 1 => Option::Some( @@ -1168,49 +1191,50 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - let lifted131 : String? = match mbt_ffi_load8_u(iter_base + 140) { + let lifted132 : String? = match mbt_ffi_load8_u(iter_base + 140) { 0 => Option::None 1 => { - let result130 = mbt_ffi_ptr2str( + let result131 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 144), mbt_ffi_load32(iter_base + 148), ) - Option::Some(result130) + Option::Some(result131) } _ => panic() } Option::Some(@common.TailPositional::{ - name: result120, + name: result121, doc: @common.Doc::{ - summary: result121, - description: result122, - examples: array125, + summary: result122, + description: result123, + examples: array126, }, - value_name: lifted128, + value_name: lifted129, item_type: mbt_ffi_load32(iter_base + 124), min: mbt_ffi_load32(iter_base + 128).reinterpret_as_uint(), - max: lifted129, - separator: lifted131, + max: lifted130, + separator: lifted132, verbatim: mbt_ffi_load8_u(iter_base + 152) != 0, + accepts_stdio: mbt_ffi_load8_u(iter_base + 153) != 0, }) } _ => panic() } - let array182 : Array[@common.OptionSpec] = [] - for index183 = 0 - index183 < mbt_ffi_load32(iter_base + 160) - index183 = index183 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 156) + index183 * 108 + let array184 : Array[@common.OptionSpec] = [] + for index185 = 0 + index185 < mbt_ffi_load32(iter_base + 160) + index185 = index185 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 156) + index185 * 112 - let result133 = mbt_ffi_ptr2str( + let result134 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted134 : Char? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted135 : Char? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some( @@ -1219,75 +1243,94 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - let array136 : Array[String] = [] - for index137 = 0 - index137 < mbt_ffi_load32(iter_base + 20) - index137 = index137 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + index137 * 8 + let array137 : Array[String] = [] + for index138 = 0 + index138 < mbt_ffi_load32(iter_base + 20) + index138 = index138 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index138 * 8 - let result135 = mbt_ffi_ptr2str( + let result136 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array136.push(result135) + array137.push(result136) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let result138 = mbt_ffi_ptr2str( + let result139 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let result139 = mbt_ffi_ptr2str( + let result140 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array142 : Array[@common.Example] = [] - for index143 = 0 - index143 < mbt_ffi_load32(iter_base + 44) - index143 = index143 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index143 * 16 + let array143 : Array[@common.Example] = [] + for index144 = 0 + index144 < mbt_ffi_load32(iter_base + 44) + index144 = index144 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 40) + index144 * 16 - let result140 = mbt_ffi_ptr2str( + let result141 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result141 = mbt_ffi_ptr2str( + let result142 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array142.push(@common.Example::{ - title: result140, - body: result141, + array143.push(@common.Example::{ + title: result141, + body: result142, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let lifted145 : String? = match mbt_ffi_load8_u(iter_base + 48) { + let lifted146 : String? = match mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => { - let result144 = mbt_ffi_ptr2str( + let result145 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 52), mbt_ffi_load32(iter_base + 56), ) - Option::Some(result144) + Option::Some(result145) } _ => panic() } - let lifted147 = match mbt_ffi_load8_u(iter_base + 60) { + let lifted149 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @common.OptionShape::Scalar(mbt_ffi_load32(iter_base + 64)) 1 => @common.OptionShape::OptionalScalar( mbt_ffi_load32(iter_base + 64), ) 2 => { - let lifted146 = match mbt_ffi_load8_u(iter_base + 64) { + let lifted147 = 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: lifted147, + item_type: mbt_ffi_load32(iter_base + 72), + }) + } + 3 => { + let lifted148 = match mbt_ffi_load8_u(iter_base + 64) { 0 => @common.Repetition::Repeated 1 => @common.Repetition::Delimited( @@ -1300,25 +1343,28 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @common.OptionShape::Repeatable(@common.RepeatableShape::{ - repetition: lifted146, - type_: mbt_ffi_load32(iter_base + 72), + @common.OptionShape::RepeatableMap(@common.RepeatableMapShape::{ + repetition: lifted148, + map_type: mbt_ffi_load32(iter_base + 72), + duplicate_key_policy: @common.DuplicateKeyPolicy::from( + mbt_ffi_load8_u(iter_base + 76), + ), }) } _ => panic() } - let lifted179 : @types.SchemaValueTree? = match - mbt_ffi_load8_u(iter_base + 76) { + let lifted181 : @types.SchemaValueTree? = match + mbt_ffi_load8_u(iter_base + 80) { 0 => Option::None 1 => { - let array177 : Array[@types.SchemaValueNode] = [] - for index178 = 0 - index178 < mbt_ffi_load32(iter_base + 84) - index178 = index178 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index178 * 32 + let array179 : Array[@types.SchemaValueNode] = [] + for index180 = 0 + index180 < mbt_ffi_load32(iter_base + 88) + index180 = index180 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 84) + index180 * 32 - let lifted176 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted178 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -1370,29 +1416,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result148 = mbt_ffi_ptr2str( + let result150 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result148) + @types.SchemaValueNode::StringValue(result150) } 13 => { - let array149 : Array[Int] = [] - for index150 = 0 - index150 < mbt_ffi_load32(iter_base + 12) - index150 = index150 + 1 { + 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) + - index150 * 4 + index152 * 4 - array149.push(mbt_ffi_load32(iter_base + 0)) + array151.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array149) + @types.SchemaValueNode::RecordValue(array151) } 14 => { - let lifted151 : Int? = match + let lifted153 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -1401,7 +1447,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted151, + payload: lifted153, }) } 15 => @@ -1409,34 +1455,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array152 : Array[Bool] = [] - for index153 = 0 - index153 < mbt_ffi_load32(iter_base + 12) - index153 = index153 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index153 * 1 - - array152.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array152) - } - 17 => { - let array154 : Array[Int] = [] + 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 * 4 + index155 * 1 - array154.push(mbt_ffi_load32(iter_base + 0)) + array154.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array154) + @types.SchemaValueNode::FlagsValue(array154) } - 18 => { + 17 => { let array156 : Array[Int] = [] for index157 = 0 index157 < mbt_ffi_load32(iter_base + 12) @@ -1448,9 +1480,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array156) + @types.SchemaValueNode::TupleValue(array156) } - 19 => { + 18 => { let array158 : Array[Int] = [] for index159 = 0 index159 < mbt_ffi_load32(iter_base + 12) @@ -1462,127 +1494,141 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array158) + @types.SchemaValueNode::ListValue(array158) } - 20 => { - let array160 : Array[@types.MapEntry] = [] + 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 * 8 + index161 * 4 + + array160.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array160) + } + 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 - array160.push(@types.MapEntry::{ + array162.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(array160) + @types.SchemaValueNode::MapValue(array162) } 21 => { - let lifted162 : Int? = match + let lifted164 : 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(lifted162) + @types.SchemaValueNode::OptionValue(lifted164) } 22 => { - let lifted165 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted167 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted163 : Int? = match + let lifted165 : 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(lifted163) + @types.ResultValuePayload::OkValue(lifted165) } 1 => { - let lifted164 : Int? = match + let lifted166 : 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(lifted164) + @types.ResultValuePayload::ErrValue(lifted166) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted165) + @types.SchemaValueNode::ResultValue(lifted167) } 23 => { - let result166 = mbt_ffi_ptr2str( + let result168 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted168 : String? = match + let lifted170 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result167 = mbt_ffi_ptr2str( + let result169 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result167) + Option::Some(result169) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result166, - language: lifted168, + text: result168, + language: lifted170, }) } 24 => { - let result169 = mbt_ffi_ptr2bytes( + let result171 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted171 : String? = match + let lifted173 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result170 = mbt_ffi_ptr2str( + let result172 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result170) + Option::Some(result172) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result169, - mime_type: lifted171, + bytes: result171, + mime_type: lifted173, }) } 25 => { - let result172 = mbt_ffi_ptr2str( + let result174 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result172) + @types.SchemaValueNode::PathValue(result174) } 26 => { - let result173 = mbt_ffi_ptr2str( + let result175 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result173) + @types.SchemaValueNode::UrlValue(result175) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -1594,7 +1640,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result174 = mbt_ffi_ptr2str( + let result176 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -1602,17 +1648,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result174, + unit: result176, }) } 30 => { - let result175 = mbt_ffi_ptr2str( + let result177 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result175, + tag: result177, body: mbt_ffi_load32(iter_base + 16), }) } @@ -1629,61 +1675,61 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array177.push(lifted176) + array179.push(lifted178) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 84)) Option::Some(@types.SchemaValueTree::{ - value_nodes: array177, - root: mbt_ffi_load32(iter_base + 88), + value_nodes: array179, + root: mbt_ffi_load32(iter_base + 92), }) } _ => panic() } - let lifted181 : String? = match mbt_ffi_load8_u(iter_base + 96) { + let lifted183 : String? = match mbt_ffi_load8_u(iter_base + 100) { 0 => Option::None 1 => { - let result180 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 100), + let result182 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 104), + mbt_ffi_load32(iter_base + 108), ) - Option::Some(result180) + Option::Some(result182) } _ => panic() } - array182.push(@common.OptionSpec::{ - long: result133, - short: lifted134, - aliases: array136, + array184.push(@common.OptionSpec::{ + long: result134, + short: lifted135, + aliases: array137, doc: @common.Doc::{ - summary: result138, - description: result139, - examples: array142, + summary: result139, + description: result140, + examples: array143, }, - value_name: lifted145, - shape: lifted147, - default: lifted179, - required: mbt_ffi_load8_u(iter_base + 92) != 0, - env_var: lifted181, + value_name: lifted146, + shape: lifted149, + default: lifted181, + required: mbt_ffi_load8_u(iter_base + 96) != 0, + env_var: lifted183, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 156)) - let array199 : Array[@common.FlagSpec] = [] - for index200 = 0 - index200 < mbt_ffi_load32(iter_base + 168) - index200 = index200 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 164) + index200 * 72 + let array201 : Array[@common.FlagSpec] = [] + for index202 = 0 + index202 < mbt_ffi_load32(iter_base + 168) + index202 = index202 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 164) + index202 * 72 - let result184 = mbt_ffi_ptr2str( + let result186 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted185 : Char? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted187 : Char? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some( @@ -1692,62 +1738,62 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - let array187 : Array[String] = [] - for index188 = 0 - index188 < mbt_ffi_load32(iter_base + 20) - index188 = index188 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + index188 * 8 + let array189 : Array[String] = [] + for index190 = 0 + index190 < mbt_ffi_load32(iter_base + 20) + index190 = index190 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index190 * 8 - let result186 = mbt_ffi_ptr2str( + let result188 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array187.push(result186) + array189.push(result188) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let result189 = mbt_ffi_ptr2str( + let result191 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let result190 = mbt_ffi_ptr2str( + let result192 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array193 : Array[@common.Example] = [] - for index194 = 0 - index194 < mbt_ffi_load32(iter_base + 44) - index194 = index194 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index194 * 16 + let array195 : Array[@common.Example] = [] + for index196 = 0 + index196 < mbt_ffi_load32(iter_base + 44) + index196 = index196 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 40) + index196 * 16 - let result191 = mbt_ffi_ptr2str( + let result193 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result192 = mbt_ffi_ptr2str( + let result194 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array193.push(@common.Example::{ - title: result191, - body: result192, + array195.push(@common.Example::{ + title: result193, + body: result194, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let lifted196 = match mbt_ffi_load8_u(iter_base + 48) { + let lifted198 = 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 lifted195 : UInt? = match mbt_ffi_load8_u(iter_base + 52) { + let lifted197 : UInt? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => Option::Some( @@ -1756,76 +1802,76 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @common.FlagShape::CountFlag(lifted195) + @common.FlagShape::CountFlag(lifted197) } _ => panic() } - let lifted198 : String? = match mbt_ffi_load8_u(iter_base + 60) { + let lifted200 : String? = match mbt_ffi_load8_u(iter_base + 60) { 0 => Option::None 1 => { - let result197 = mbt_ffi_ptr2str( + let result199 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - Option::Some(result197) + Option::Some(result199) } _ => panic() } - array199.push(@common.FlagSpec::{ - long: result184, - short: lifted185, - aliases: array187, + array201.push(@common.FlagSpec::{ + long: result186, + short: lifted187, + aliases: array189, doc: @common.Doc::{ - summary: result189, - description: result190, - examples: array193, + summary: result191, + description: result192, + examples: array195, }, - shape: lifted196, - env_var: lifted198, + shape: lifted198, + env_var: lifted200, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 164)) - let array492 : Array[@common.Constraint] = [] - for index493 = 0 - index493 < mbt_ffi_load32(iter_base + 176) - index493 = index493 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 172) + index493 * 28 + let array494 : Array[@common.Constraint] = [] + for index495 = 0 + index495 < mbt_ffi_load32(iter_base + 176) + index495 = index495 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 172) + index495 * 28 - let lifted491 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted493 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let array235 : Array[@common.Ref] = [] - for index236 = 0 - index236 < mbt_ffi_load32(iter_base + 8) - index236 = index236 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 4) + index236 * 24 + let array237 : Array[@common.Ref] = [] + for index238 = 0 + index238 < mbt_ffi_load32(iter_base + 8) + index238 = index238 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 4) + index238 * 24 - let lifted234 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted236 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result201 = mbt_ffi_ptr2str( + let result203 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result201) + @common.Ref::Present(result203) } 1 => { - let result202 = mbt_ffi_ptr2str( + let result204 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array232 : Array[@types.SchemaValueNode] = [] - for index233 = 0 - index233 < mbt_ffi_load32(iter_base + 16) - index233 = index233 + 1 { + let array234 : Array[@types.SchemaValueNode] = [] + for index235 = 0 + index235 < mbt_ffi_load32(iter_base + 16) + index235 = index235 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index233 * 32 + index235 * 32 - let lifted231 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted233 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -1877,29 +1923,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result203 = mbt_ffi_ptr2str( + let result205 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result203) + @types.SchemaValueNode::StringValue(result205) } 13 => { - let array204 : Array[Int] = [] - for index205 = 0 - index205 < mbt_ffi_load32(iter_base + 12) - index205 = index205 + 1 { + 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) + - index205 * 4 + index207 * 4 - array204.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::RecordValue(array204) + @types.SchemaValueNode::RecordValue(array206) } 14 => { - let lifted206 : Int? = match + let lifted208 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -1908,7 +1954,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted206, + payload: lifted208, }) } 15 => @@ -1916,34 +1962,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - 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 - - array207.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array207) - } - 17 => { - let array209 : Array[Int] = [] + let array209 : Array[Bool] = [] for index210 = 0 index210 < mbt_ffi_load32(iter_base + 12) index210 = index210 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index210 * 4 + index210 * 1 - array209.push(mbt_ffi_load32(iter_base + 0)) + array209.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array209) + @types.SchemaValueNode::FlagsValue(array209) } - 18 => { + 17 => { let array211 : Array[Int] = [] for index212 = 0 index212 < mbt_ffi_load32(iter_base + 12) @@ -1955,9 +1987,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array211) + @types.SchemaValueNode::TupleValue(array211) } - 19 => { + 18 => { let array213 : Array[Int] = [] for index214 = 0 index214 < mbt_ffi_load32(iter_base + 12) @@ -1969,40 +2001,54 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array213) + @types.SchemaValueNode::ListValue(array213) } - 20 => { - let array215 : Array[@types.MapEntry] = [] + 19 => { + 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 * 8 + index216 * 4 + + array215.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array215) + } + 20 => { + let array217 : Array[@types.MapEntry] = [] + for index218 = 0 + index218 < mbt_ffi_load32(iter_base + 12) + index218 = index218 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index218 * 8 - array215.push(@types.MapEntry::{ + array217.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(array215) + @types.SchemaValueNode::MapValue(array217) } 21 => { - let lifted217 : Int? = match + let lifted219 : 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(lifted217) + @types.SchemaValueNode::OptionValue(lifted219) } 22 => { - let lifted220 = match + let lifted222 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted218 : Int? = match + let lifted220 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -2010,10 +2056,10 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted218) + @types.ResultValuePayload::OkValue(lifted220) } 1 => { - let lifted219 : Int? = match + let lifted221 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -2021,78 +2067,78 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted219) + @types.ResultValuePayload::ErrValue(lifted221) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted220) + @types.SchemaValueNode::ResultValue(lifted222) } 23 => { - let result221 = mbt_ffi_ptr2str( + let result223 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted223 : String? = match + let lifted225 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result222 = mbt_ffi_ptr2str( + let result224 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result222) + Option::Some(result224) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result221, - language: lifted223, + text: result223, + language: lifted225, }) } 24 => { - let result224 = mbt_ffi_ptr2bytes( + let result226 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted226 : String? = match + let lifted228 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result225 = mbt_ffi_ptr2str( + 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::BinaryValue(@types.BinaryValuePayload::{ - bytes: result224, - mime_type: lifted226, + bytes: result226, + mime_type: lifted228, }) } 25 => { - let result227 = mbt_ffi_ptr2str( + let result229 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result227) + @types.SchemaValueNode::PathValue(result229) } 26 => { - let result228 = mbt_ffi_ptr2str( + let result230 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result228) + @types.SchemaValueNode::UrlValue(result230) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -2104,7 +2150,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result229 = mbt_ffi_ptr2str( + let result231 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -2112,17 +2158,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result229, + unit: result231, }) } 30 => { - let result230 = mbt_ffi_ptr2str( + let result232 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result230, + tag: result232, body: mbt_ffi_load32(iter_base + 16), }) } @@ -2141,14 +2187,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array232.push(lifted231) + array234.push(lifted233) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result202, + name: result204, value: @types.SchemaValueTree::{ - value_nodes: array232, + value_nodes: array234, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -2156,42 +2202,42 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array235.push(lifted234) + array237.push(lifted236) } mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - @common.Constraint::RequiresAll(array235) + @common.Constraint::RequiresAll(array237) } 1 => { - let array271 : Array[@common.Ref] = [] - for index272 = 0 - index272 < mbt_ffi_load32(iter_base + 8) - index272 = index272 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 4) + index272 * 24 + let array273 : Array[@common.Ref] = [] + for index274 = 0 + index274 < mbt_ffi_load32(iter_base + 8) + index274 = index274 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 4) + index274 * 24 - let lifted270 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted272 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result237 = mbt_ffi_ptr2str( + let result239 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result237) + @common.Ref::Present(result239) } 1 => { - let result238 = mbt_ffi_ptr2str( + let result240 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array268 : Array[@types.SchemaValueNode] = [] - for index269 = 0 - index269 < mbt_ffi_load32(iter_base + 16) - index269 = index269 + 1 { + let array270 : Array[@types.SchemaValueNode] = [] + for index271 = 0 + index271 < mbt_ffi_load32(iter_base + 16) + index271 = index271 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index269 * 32 + index271 * 32 - let lifted267 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted269 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -2243,29 +2289,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result239 = mbt_ffi_ptr2str( + let result241 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result239) + @types.SchemaValueNode::StringValue(result241) } 13 => { - let array240 : Array[Int] = [] - for index241 = 0 - index241 < mbt_ffi_load32(iter_base + 12) - index241 = index241 + 1 { + let array242 : Array[Int] = [] + for index243 = 0 + index243 < mbt_ffi_load32(iter_base + 12) + index243 = index243 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index241 * 4 + index243 * 4 - array240.push(mbt_ffi_load32(iter_base + 0)) + array242.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array240) + @types.SchemaValueNode::RecordValue(array242) } 14 => { - let lifted242 : Int? = match + let lifted244 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -2274,7 +2320,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted242, + payload: lifted244, }) } 15 => @@ -2282,34 +2328,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array243 : Array[Bool] = [] - for index244 = 0 - index244 < mbt_ffi_load32(iter_base + 12) - index244 = index244 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index244 * 1 - - array243.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array243) - } - 17 => { - let array245 : Array[Int] = [] + let array245 : Array[Bool] = [] for index246 = 0 index246 < mbt_ffi_load32(iter_base + 12) index246 = index246 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index246 * 4 + index246 * 1 - array245.push(mbt_ffi_load32(iter_base + 0)) + array245.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array245) + @types.SchemaValueNode::FlagsValue(array245) } - 18 => { + 17 => { let array247 : Array[Int] = [] for index248 = 0 index248 < mbt_ffi_load32(iter_base + 12) @@ -2321,9 +2353,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array247) + @types.SchemaValueNode::TupleValue(array247) } - 19 => { + 18 => { let array249 : Array[Int] = [] for index250 = 0 index250 < mbt_ffi_load32(iter_base + 12) @@ -2335,40 +2367,54 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array249) + @types.SchemaValueNode::ListValue(array249) } - 20 => { - let array251 : Array[@types.MapEntry] = [] + 19 => { + 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 * 8 + index252 * 4 + + array251.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array251) + } + 20 => { + let array253 : Array[@types.MapEntry] = [] + for index254 = 0 + index254 < mbt_ffi_load32(iter_base + 12) + index254 = index254 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index254 * 8 - array251.push(@types.MapEntry::{ + array253.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(array251) + @types.SchemaValueNode::MapValue(array253) } 21 => { - let lifted253 : Int? = match + 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.SchemaValueNode::OptionValue(lifted253) + @types.SchemaValueNode::OptionValue(lifted255) } 22 => { - let lifted256 = match + let lifted258 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted254 : Int? = match + let lifted256 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -2376,10 +2422,10 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted254) + @types.ResultValuePayload::OkValue(lifted256) } 1 => { - let lifted255 : Int? = match + let lifted257 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -2387,78 +2433,78 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted255) + @types.ResultValuePayload::ErrValue(lifted257) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted256) + @types.SchemaValueNode::ResultValue(lifted258) } 23 => { - let result257 = mbt_ffi_ptr2str( + let result259 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted259 : String? = match + let lifted261 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result258 = mbt_ffi_ptr2str( + let result260 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result258) + Option::Some(result260) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result257, - language: lifted259, + text: result259, + language: lifted261, }) } 24 => { - let result260 = mbt_ffi_ptr2bytes( + let result262 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted262 : String? = match + let lifted264 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result261 = mbt_ffi_ptr2str( + let result263 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result261) + Option::Some(result263) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result260, - mime_type: lifted262, + bytes: result262, + mime_type: lifted264, }) } 25 => { - let result263 = mbt_ffi_ptr2str( + let result265 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result263) + @types.SchemaValueNode::PathValue(result265) } 26 => { - let result264 = mbt_ffi_ptr2str( + let result266 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result264) + @types.SchemaValueNode::UrlValue(result266) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -2470,7 +2516,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result265 = mbt_ffi_ptr2str( + let result267 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -2478,17 +2524,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result265, + unit: result267, }) } 30 => { - let result266 = mbt_ffi_ptr2str( + let result268 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result266, + tag: result268, body: mbt_ffi_load32(iter_base + 16), }) } @@ -2507,14 +2553,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array268.push(lifted267) + array270.push(lifted269) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result238, + name: result240, value: @types.SchemaValueTree::{ - value_nodes: array268, + value_nodes: array270, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -2522,42 +2568,42 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array271.push(lifted270) + array273.push(lifted272) } mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - @common.Constraint::AllOrNone(array271) + @common.Constraint::AllOrNone(array273) } 2 => { - let array307 : Array[@common.Ref] = [] - for index308 = 0 - index308 < mbt_ffi_load32(iter_base + 8) - index308 = index308 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 4) + index308 * 24 + let array309 : Array[@common.Ref] = [] + for index310 = 0 + index310 < mbt_ffi_load32(iter_base + 8) + index310 = index310 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 4) + index310 * 24 - let lifted306 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted308 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result273 = mbt_ffi_ptr2str( + let result275 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result273) + @common.Ref::Present(result275) } 1 => { - let result274 = mbt_ffi_ptr2str( + let result276 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array304 : Array[@types.SchemaValueNode] = [] - for index305 = 0 - index305 < mbt_ffi_load32(iter_base + 16) - index305 = index305 + 1 { + let array306 : Array[@types.SchemaValueNode] = [] + for index307 = 0 + index307 < mbt_ffi_load32(iter_base + 16) + index307 = index307 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index305 * 32 + index307 * 32 - let lifted303 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted305 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -2609,29 +2655,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result275 = mbt_ffi_ptr2str( + let result277 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result275) + @types.SchemaValueNode::StringValue(result277) } 13 => { - let array276 : Array[Int] = [] - for index277 = 0 - index277 < mbt_ffi_load32(iter_base + 12) - index277 = index277 + 1 { + 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) + - index277 * 4 + index279 * 4 - array276.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(array276) + @types.SchemaValueNode::RecordValue(array278) } 14 => { - let lifted278 : Int? = match + let lifted280 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -2640,7 +2686,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted278, + payload: lifted280, }) } 15 => @@ -2648,34 +2694,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array279 : Array[Bool] = [] - for index280 = 0 - index280 < mbt_ffi_load32(iter_base + 12) - index280 = index280 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index280 * 1 - - array279.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array279) - } - 17 => { - let array281 : Array[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 * 4 + index282 * 1 - array281.push(mbt_ffi_load32(iter_base + 0)) + array281.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array281) + @types.SchemaValueNode::FlagsValue(array281) } - 18 => { + 17 => { let array283 : Array[Int] = [] for index284 = 0 index284 < mbt_ffi_load32(iter_base + 12) @@ -2687,9 +2719,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array283) + @types.SchemaValueNode::TupleValue(array283) } - 19 => { + 18 => { let array285 : Array[Int] = [] for index286 = 0 index286 < mbt_ffi_load32(iter_base + 12) @@ -2701,40 +2733,54 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array285) + @types.SchemaValueNode::ListValue(array285) } - 20 => { - let array287 : Array[@types.MapEntry] = [] + 19 => { + 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 * 8 + index288 * 4 - array287.push(@types.MapEntry::{ + array287.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array287) + } + 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 + + 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(array287) + @types.SchemaValueNode::MapValue(array289) } 21 => { - let lifted289 : Int? = match + let lifted291 : 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(lifted289) + @types.SchemaValueNode::OptionValue(lifted291) } 22 => { - let lifted292 = match + let lifted294 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted290 : Int? = match + let lifted292 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -2742,10 +2788,10 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted290) + @types.ResultValuePayload::OkValue(lifted292) } 1 => { - let lifted291 : Int? = match + let lifted293 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -2753,78 +2799,78 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted291) + @types.ResultValuePayload::ErrValue(lifted293) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted292) + @types.SchemaValueNode::ResultValue(lifted294) } 23 => { - let result293 = mbt_ffi_ptr2str( + let result295 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted295 : String? = match + let lifted297 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result294 = mbt_ffi_ptr2str( + let result296 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result294) + Option::Some(result296) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result293, - language: lifted295, + text: result295, + language: lifted297, }) } 24 => { - let result296 = mbt_ffi_ptr2bytes( + let result298 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted298 : String? = match + let lifted300 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result297 = mbt_ffi_ptr2str( + let result299 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result297) + Option::Some(result299) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result296, - mime_type: lifted298, + bytes: result298, + mime_type: lifted300, }) } 25 => { - let result299 = mbt_ffi_ptr2str( + let result301 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result299) + @types.SchemaValueNode::PathValue(result301) } 26 => { - let result300 = mbt_ffi_ptr2str( + let result302 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result300) + @types.SchemaValueNode::UrlValue(result302) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -2836,7 +2882,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result301 = mbt_ffi_ptr2str( + let result303 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -2844,17 +2890,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result301, + unit: result303, }) } 30 => { - let result302 = mbt_ffi_ptr2str( + let result304 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result302, + tag: result304, body: mbt_ffi_load32(iter_base + 16), }) } @@ -2873,14 +2919,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array304.push(lifted303) + array306.push(lifted305) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result274, + name: result276, value: @types.SchemaValueTree::{ - value_nodes: array304, + value_nodes: array306, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -2888,49 +2934,49 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array307.push(lifted306) + array309.push(lifted308) } mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - @common.Constraint::RequiresAny(array307) + @common.Constraint::RequiresAny(array309) } 3 => { - let array345 : Array[@common.RefGroup] = [] - for index346 = 0 - index346 < mbt_ffi_load32(iter_base + 8) - index346 = index346 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 4) + index346 * 8 - - let array343 : Array[@common.Ref] = [] - for index344 = 0 - index344 < mbt_ffi_load32(iter_base + 4) - index344 = index344 + 1 { + let array347 : Array[@common.RefGroup] = [] + for index348 = 0 + index348 < mbt_ffi_load32(iter_base + 8) + index348 = index348 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 4) + index348 * 8 + + let array345 : Array[@common.Ref] = [] + for index346 = 0 + index346 < mbt_ffi_load32(iter_base + 4) + index346 = index346 + 1 { let iter_base = mbt_ffi_load32(iter_base + 0) + - index344 * 24 + index346 * 24 - let lifted342 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted344 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result309 = mbt_ffi_ptr2str( + let result311 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result309) + @common.Ref::Present(result311) } 1 => { - let result310 = mbt_ffi_ptr2str( + let result312 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array340 : Array[@types.SchemaValueNode] = [] - for index341 = 0 - index341 < mbt_ffi_load32(iter_base + 16) - index341 = index341 + 1 { + let array342 : Array[@types.SchemaValueNode] = [] + for index343 = 0 + index343 < mbt_ffi_load32(iter_base + 16) + index343 = index343 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index341 * 32 + index343 * 32 - let lifted339 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted341 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -2984,29 +3030,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { ), ) 12 => { - let result311 = mbt_ffi_ptr2str( + let result313 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result311) + @types.SchemaValueNode::StringValue(result313) } 13 => { - let array312 : Array[Int] = [] - for index313 = 0 - index313 < mbt_ffi_load32(iter_base + 12) - index313 = index313 + 1 { + let array314 : Array[Int] = [] + for index315 = 0 + index315 < mbt_ffi_load32(iter_base + 12) + index315 = index315 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index313 * 4 + index315 * 4 - array312.push(mbt_ffi_load32(iter_base + 0)) + array314.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array312) + @types.SchemaValueNode::RecordValue(array314) } 14 => { - let lifted314 : Int? = match + let lifted316 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -3016,7 +3062,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted314, + payload: lifted316, }) } 15 => @@ -3024,36 +3070,22 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array315 : Array[Bool] = [] - for index316 = 0 - index316 < mbt_ffi_load32(iter_base + 12) - index316 = index316 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index316 * 1 - - array315.push( - mbt_ffi_load8_u(iter_base + 0) != 0, - ) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array315) - } - 17 => { - let array317 : Array[Int] = [] + let array317 : Array[Bool] = [] for index318 = 0 index318 < mbt_ffi_load32(iter_base + 12) index318 = index318 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index318 * 4 + index318 * 1 - array317.push(mbt_ffi_load32(iter_base + 0)) + array317.push( + mbt_ffi_load8_u(iter_base + 0) != 0, + ) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array317) + @types.SchemaValueNode::FlagsValue(array317) } - 18 => { + 17 => { let array319 : Array[Int] = [] for index320 = 0 index320 < mbt_ffi_load32(iter_base + 12) @@ -3065,9 +3097,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array319) + @types.SchemaValueNode::TupleValue(array319) } - 19 => { + 18 => { let array321 : Array[Int] = [] for index322 = 0 index322 < mbt_ffi_load32(iter_base + 12) @@ -3079,27 +3111,41 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array321) + @types.SchemaValueNode::ListValue(array321) } - 20 => { - let array323 : Array[@types.MapEntry] = [] + 19 => { + 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 * 8 + index324 * 4 - array323.push(@types.MapEntry::{ + array323.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array323) + } + 20 => { + let array325 : Array[@types.MapEntry] = [] + for index326 = 0 + index326 < mbt_ffi_load32(iter_base + 12) + index326 = index326 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index326 * 8 + + array325.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(array323) + @types.SchemaValueNode::MapValue(array325) } 21 => { - let lifted325 : Int? = match + let lifted327 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => @@ -3107,13 +3153,13 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted325) + @types.SchemaValueNode::OptionValue(lifted327) } 22 => { - let lifted328 = match + let lifted330 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted326 : Int? = match + let lifted328 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -3123,10 +3169,10 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted326) + @types.ResultValuePayload::OkValue(lifted328) } 1 => { - let lifted327 : Int? = match + let lifted329 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -3136,78 +3182,78 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted327) + @types.ResultValuePayload::ErrValue(lifted329) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted328) + @types.SchemaValueNode::ResultValue(lifted330) } 23 => { - let result329 = mbt_ffi_ptr2str( + let result331 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted331 : String? = match + let lifted333 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result330 = mbt_ffi_ptr2str( + let result332 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result330) + Option::Some(result332) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result329, - language: lifted331, + text: result331, + language: lifted333, }) } 24 => { - let result332 = mbt_ffi_ptr2bytes( + let result334 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted334 : String? = match + let lifted336 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result333 = mbt_ffi_ptr2str( + let result335 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result333) + Option::Some(result335) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result332, - mime_type: lifted334, + bytes: result334, + mime_type: lifted336, }) } 25 => { - let result335 = mbt_ffi_ptr2str( + let result337 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result335) + @types.SchemaValueNode::PathValue(result337) } 26 => { - let result336 = mbt_ffi_ptr2str( + let result338 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result336) + @types.SchemaValueNode::UrlValue(result338) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -3219,7 +3265,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result337 = mbt_ffi_ptr2str( + let result339 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -3227,17 +3273,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result337, + unit: result339, }) } 30 => { - let result338 = mbt_ffi_ptr2str( + let result340 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result338, + tag: result340, body: mbt_ffi_load32(iter_base + 16), }) } @@ -3256,14 +3302,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array340.push(lifted339) + array342.push(lifted341) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result310, + name: result312, value: @types.SchemaValueTree::{ - value_nodes: array340, + value_nodes: array342, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -3271,46 +3317,46 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array343.push(lifted342) + array345.push(lifted344) } mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array345.push(@common.RefGroup::{ refs: array343 }) + array347.push(@common.RefGroup::{ refs: array345 }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - @common.Constraint::MutexGroups(array345) + @common.Constraint::MutexGroups(array347) } 4 => { - let array381 : Array[@common.Ref] = [] - for index382 = 0 - index382 < mbt_ffi_load32(iter_base + 12) - index382 = index382 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index382 * 24 + let array383 : Array[@common.Ref] = [] + for index384 = 0 + index384 < mbt_ffi_load32(iter_base + 12) + index384 = index384 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index384 * 24 - let lifted380 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted382 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result347 = mbt_ffi_ptr2str( + let result349 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result347) + @common.Ref::Present(result349) } 1 => { - let result348 = mbt_ffi_ptr2str( + let result350 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array378 : Array[@types.SchemaValueNode] = [] - for index379 = 0 - index379 < mbt_ffi_load32(iter_base + 16) - index379 = index379 + 1 { + let array380 : Array[@types.SchemaValueNode] = [] + for index381 = 0 + index381 < mbt_ffi_load32(iter_base + 16) + index381 = index381 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index379 * 32 + index381 * 32 - let lifted377 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted379 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -3362,29 +3408,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result349 = mbt_ffi_ptr2str( + let result351 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result349) + @types.SchemaValueNode::StringValue(result351) } 13 => { - let array350 : Array[Int] = [] - for index351 = 0 - index351 < mbt_ffi_load32(iter_base + 12) - index351 = index351 + 1 { + let array352 : Array[Int] = [] + for index353 = 0 + index353 < mbt_ffi_load32(iter_base + 12) + index353 = index353 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index351 * 4 + index353 * 4 - array350.push(mbt_ffi_load32(iter_base + 0)) + array352.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array350) + @types.SchemaValueNode::RecordValue(array352) } 14 => { - let lifted352 : Int? = match + let lifted354 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -3393,7 +3439,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted352, + payload: lifted354, }) } 15 => @@ -3401,34 +3447,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array353 : Array[Bool] = [] - for index354 = 0 - index354 < mbt_ffi_load32(iter_base + 12) - index354 = index354 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index354 * 1 - - array353.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array353) - } - 17 => { - let array355 : Array[Int] = [] + let array355 : Array[Bool] = [] for index356 = 0 index356 < mbt_ffi_load32(iter_base + 12) index356 = index356 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index356 * 4 + index356 * 1 - array355.push(mbt_ffi_load32(iter_base + 0)) + array355.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array355) + @types.SchemaValueNode::FlagsValue(array355) } - 18 => { + 17 => { let array357 : Array[Int] = [] for index358 = 0 index358 < mbt_ffi_load32(iter_base + 12) @@ -3440,9 +3472,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array357) + @types.SchemaValueNode::TupleValue(array357) } - 19 => { + 18 => { let array359 : Array[Int] = [] for index360 = 0 index360 < mbt_ffi_load32(iter_base + 12) @@ -3454,40 +3486,54 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array359) + @types.SchemaValueNode::ListValue(array359) } - 20 => { - let array361 : Array[@types.MapEntry] = [] + 19 => { + let array361 : Array[Int] = [] for index362 = 0 index362 < mbt_ffi_load32(iter_base + 12) index362 = index362 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index362 * 8 + index362 * 4 - array361.push(@types.MapEntry::{ + array361.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array361) + } + 20 => { + let array363 : Array[@types.MapEntry] = [] + for index364 = 0 + index364 < mbt_ffi_load32(iter_base + 12) + index364 = index364 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index364 * 8 + + array363.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(array361) + @types.SchemaValueNode::MapValue(array363) } 21 => { - let lifted363 : Int? = match + let lifted365 : 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(lifted363) + @types.SchemaValueNode::OptionValue(lifted365) } 22 => { - let lifted366 = match + let lifted368 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted364 : Int? = match + let lifted366 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -3495,10 +3541,10 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted364) + @types.ResultValuePayload::OkValue(lifted366) } 1 => { - let lifted365 : Int? = match + let lifted367 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -3506,78 +3552,78 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted365) + @types.ResultValuePayload::ErrValue(lifted367) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted366) + @types.SchemaValueNode::ResultValue(lifted368) } 23 => { - let result367 = mbt_ffi_ptr2str( + let result369 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted369 : String? = match + let lifted371 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result368 = mbt_ffi_ptr2str( + let result370 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result368) + Option::Some(result370) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result367, - language: lifted369, + text: result369, + language: lifted371, }) } 24 => { - let result370 = mbt_ffi_ptr2bytes( + let result372 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted372 : String? = match + let lifted374 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result371 = mbt_ffi_ptr2str( + let result373 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result371) + Option::Some(result373) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result370, - mime_type: lifted372, + bytes: result372, + mime_type: lifted374, }) } 25 => { - let result373 = mbt_ffi_ptr2str( + let result375 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result373) + @types.SchemaValueNode::PathValue(result375) } 26 => { - let result374 = mbt_ffi_ptr2str( + let result376 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result374) + @types.SchemaValueNode::UrlValue(result376) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -3589,7 +3635,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result375 = mbt_ffi_ptr2str( + let result377 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -3597,17 +3643,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result375, + unit: result377, }) } 30 => { - let result376 = mbt_ffi_ptr2str( + let result378 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result376, + tag: result378, body: mbt_ffi_load32(iter_base + 16), }) } @@ -3626,14 +3672,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array378.push(lifted377) + array380.push(lifted379) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result348, + name: result350, value: @types.SchemaValueTree::{ - value_nodes: array378, + value_nodes: array380, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -3641,39 +3687,39 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array381.push(lifted380) + array383.push(lifted382) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let array417 : Array[@common.Ref] = [] - for index418 = 0 - index418 < mbt_ffi_load32(iter_base + 24) - index418 = index418 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 20) + index418 * 24 + let array419 : Array[@common.Ref] = [] + for index420 = 0 + index420 < mbt_ffi_load32(iter_base + 24) + index420 = index420 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 20) + index420 * 24 - let lifted416 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted418 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result383 = mbt_ffi_ptr2str( + let result385 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result383) + @common.Ref::Present(result385) } 1 => { - let result384 = mbt_ffi_ptr2str( + let result386 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array414 : Array[@types.SchemaValueNode] = [] - for index415 = 0 - index415 < mbt_ffi_load32(iter_base + 16) - index415 = index415 + 1 { + let array416 : Array[@types.SchemaValueNode] = [] + for index417 = 0 + index417 < mbt_ffi_load32(iter_base + 16) + index417 = index417 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index415 * 32 + index417 * 32 - let lifted413 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted415 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -3725,29 +3771,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result385 = mbt_ffi_ptr2str( + let result387 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result385) + @types.SchemaValueNode::StringValue(result387) } 13 => { - let array386 : Array[Int] = [] - for index387 = 0 - index387 < mbt_ffi_load32(iter_base + 12) - index387 = index387 + 1 { + let array388 : Array[Int] = [] + for index389 = 0 + index389 < mbt_ffi_load32(iter_base + 12) + index389 = index389 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index387 * 4 + index389 * 4 - array386.push(mbt_ffi_load32(iter_base + 0)) + array388.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array386) + @types.SchemaValueNode::RecordValue(array388) } 14 => { - let lifted388 : Int? = match + let lifted390 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -3756,7 +3802,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted388, + payload: lifted390, }) } 15 => @@ -3764,34 +3810,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array389 : Array[Bool] = [] - for index390 = 0 - index390 < mbt_ffi_load32(iter_base + 12) - index390 = index390 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index390 * 1 - - array389.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array389) - } - 17 => { - let array391 : Array[Int] = [] + let array391 : Array[Bool] = [] for index392 = 0 index392 < mbt_ffi_load32(iter_base + 12) index392 = index392 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index392 * 4 + index392 * 1 - array391.push(mbt_ffi_load32(iter_base + 0)) + array391.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array391) + @types.SchemaValueNode::FlagsValue(array391) } - 18 => { + 17 => { let array393 : Array[Int] = [] for index394 = 0 index394 < mbt_ffi_load32(iter_base + 12) @@ -3803,9 +3835,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array393) + @types.SchemaValueNode::TupleValue(array393) } - 19 => { + 18 => { let array395 : Array[Int] = [] for index396 = 0 index396 < mbt_ffi_load32(iter_base + 12) @@ -3817,40 +3849,54 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array395) + @types.SchemaValueNode::ListValue(array395) } - 20 => { - let array397 : Array[@types.MapEntry] = [] + 19 => { + let array397 : Array[Int] = [] for index398 = 0 index398 < mbt_ffi_load32(iter_base + 12) index398 = index398 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index398 * 8 + index398 * 4 - array397.push(@types.MapEntry::{ + array397.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array397) + } + 20 => { + let array399 : Array[@types.MapEntry] = [] + for index400 = 0 + index400 < mbt_ffi_load32(iter_base + 12) + index400 = index400 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index400 * 8 + + array399.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(array397) + @types.SchemaValueNode::MapValue(array399) } 21 => { - let lifted399 : Int? = match + let lifted401 : 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(lifted399) + @types.SchemaValueNode::OptionValue(lifted401) } 22 => { - let lifted402 = match + let lifted404 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted400 : Int? = match + let lifted402 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -3858,10 +3904,10 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted400) + @types.ResultValuePayload::OkValue(lifted402) } 1 => { - let lifted401 : Int? = match + let lifted403 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -3869,78 +3915,78 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted401) + @types.ResultValuePayload::ErrValue(lifted403) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted402) + @types.SchemaValueNode::ResultValue(lifted404) } 23 => { - let result403 = mbt_ffi_ptr2str( + let result405 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted405 : String? = match + let lifted407 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result404 = mbt_ffi_ptr2str( + let result406 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result404) + Option::Some(result406) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result403, - language: lifted405, + text: result405, + language: lifted407, }) } 24 => { - let result406 = mbt_ffi_ptr2bytes( + let result408 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted408 : String? = match + let lifted410 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result407 = mbt_ffi_ptr2str( + let result409 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result407) + Option::Some(result409) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result406, - mime_type: lifted408, + bytes: result408, + mime_type: lifted410, }) } 25 => { - let result409 = mbt_ffi_ptr2str( + let result411 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result409) + @types.SchemaValueNode::PathValue(result411) } 26 => { - let result410 = mbt_ffi_ptr2str( + let result412 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result410) + @types.SchemaValueNode::UrlValue(result412) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -3952,7 +3998,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result411 = mbt_ffi_ptr2str( + let result413 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -3960,17 +4006,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result411, + unit: result413, }) } 30 => { - let result412 = mbt_ffi_ptr2str( + let result414 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result412, + tag: result414, body: mbt_ffi_load32(iter_base + 16), }) } @@ -3989,14 +4035,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array414.push(lifted413) + array416.push(lifted415) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result384, + name: result386, value: @types.SchemaValueTree::{ - value_nodes: array414, + value_nodes: array416, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -4004,7 +4050,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array417.push(lifted416) + array419.push(lifted418) } mbt_ffi_free(mbt_ffi_load32(iter_base + 20)) @@ -4012,43 +4058,43 @@ pub fn get_all_tools() -> Array[RegisteredTool] { lhs_quant: @common.Quantifier::from( mbt_ffi_load8_u(iter_base + 4), ), - lhs: array381, + lhs: array383, rhs_quant: @common.Quantifier::from( mbt_ffi_load8_u(iter_base + 16), ), - rhs: array417, + rhs: array419, }) } 5 => { - let array453 : Array[@common.Ref] = [] - for index454 = 0 - index454 < mbt_ffi_load32(iter_base + 12) - index454 = index454 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + index454 * 24 + let array455 : Array[@common.Ref] = [] + for index456 = 0 + index456 < mbt_ffi_load32(iter_base + 12) + index456 = index456 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index456 * 24 - let lifted452 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted454 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result419 = mbt_ffi_ptr2str( + let result421 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result419) + @common.Ref::Present(result421) } 1 => { - let result420 = mbt_ffi_ptr2str( + let result422 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array450 : Array[@types.SchemaValueNode] = [] - for index451 = 0 - index451 < mbt_ffi_load32(iter_base + 16) - index451 = index451 + 1 { + let array452 : Array[@types.SchemaValueNode] = [] + for index453 = 0 + index453 < mbt_ffi_load32(iter_base + 16) + index453 = index453 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index451 * 32 + index453 * 32 - let lifted449 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted451 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -4100,29 +4146,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result421 = mbt_ffi_ptr2str( + let result423 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result421) + @types.SchemaValueNode::StringValue(result423) } 13 => { - let array422 : Array[Int] = [] - for index423 = 0 - index423 < mbt_ffi_load32(iter_base + 12) - index423 = index423 + 1 { + let array424 : Array[Int] = [] + for index425 = 0 + index425 < mbt_ffi_load32(iter_base + 12) + index425 = index425 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index423 * 4 + index425 * 4 - array422.push(mbt_ffi_load32(iter_base + 0)) + array424.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array422) + @types.SchemaValueNode::RecordValue(array424) } 14 => { - let lifted424 : Int? = match + let lifted426 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -4131,7 +4177,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted424, + payload: lifted426, }) } 15 => @@ -4139,34 +4185,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array425 : Array[Bool] = [] - for index426 = 0 - index426 < mbt_ffi_load32(iter_base + 12) - index426 = index426 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index426 * 1 - - array425.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array425) - } - 17 => { - let array427 : Array[Int] = [] + let array427 : Array[Bool] = [] for index428 = 0 index428 < mbt_ffi_load32(iter_base + 12) index428 = index428 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index428 * 4 + index428 * 1 - array427.push(mbt_ffi_load32(iter_base + 0)) + array427.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array427) + @types.SchemaValueNode::FlagsValue(array427) } - 18 => { + 17 => { let array429 : Array[Int] = [] for index430 = 0 index430 < mbt_ffi_load32(iter_base + 12) @@ -4178,9 +4210,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array429) + @types.SchemaValueNode::TupleValue(array429) } - 19 => { + 18 => { let array431 : Array[Int] = [] for index432 = 0 index432 < mbt_ffi_load32(iter_base + 12) @@ -4192,40 +4224,54 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array431) + @types.SchemaValueNode::ListValue(array431) } - 20 => { - let array433 : Array[@types.MapEntry] = [] + 19 => { + 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 * 8 + index434 * 4 + + array433.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array433) + } + 20 => { + let array435 : Array[@types.MapEntry] = [] + for index436 = 0 + index436 < mbt_ffi_load32(iter_base + 12) + index436 = index436 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index436 * 8 - array433.push(@types.MapEntry::{ + array435.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(array433) + @types.SchemaValueNode::MapValue(array435) } 21 => { - let lifted435 : Int? = match + let lifted437 : 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(lifted435) + @types.SchemaValueNode::OptionValue(lifted437) } 22 => { - let lifted438 = match + let lifted440 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted436 : Int? = match + let lifted438 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -4233,10 +4279,10 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted436) + @types.ResultValuePayload::OkValue(lifted438) } 1 => { - let lifted437 : Int? = match + let lifted439 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -4244,78 +4290,78 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted437) + @types.ResultValuePayload::ErrValue(lifted439) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted438) + @types.SchemaValueNode::ResultValue(lifted440) } 23 => { - let result439 = mbt_ffi_ptr2str( + let result441 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted441 : String? = match + let lifted443 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result440 = mbt_ffi_ptr2str( + let result442 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result440) + Option::Some(result442) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result439, - language: lifted441, + text: result441, + language: lifted443, }) } 24 => { - let result442 = mbt_ffi_ptr2bytes( + let result444 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted444 : String? = match + let lifted446 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result443 = mbt_ffi_ptr2str( + let result445 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result443) + Option::Some(result445) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result442, - mime_type: lifted444, + bytes: result444, + mime_type: lifted446, }) } 25 => { - let result445 = mbt_ffi_ptr2str( + let result447 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result445) + @types.SchemaValueNode::PathValue(result447) } 26 => { - let result446 = mbt_ffi_ptr2str( + let result448 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result446) + @types.SchemaValueNode::UrlValue(result448) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -4327,7 +4373,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result447 = mbt_ffi_ptr2str( + let result449 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -4335,17 +4381,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result447, + unit: result449, }) } 30 => { - let result448 = mbt_ffi_ptr2str( + let result450 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result448, + tag: result450, body: mbt_ffi_load32(iter_base + 16), }) } @@ -4364,14 +4410,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array450.push(lifted449) + array452.push(lifted451) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result420, + name: result422, value: @types.SchemaValueTree::{ - value_nodes: array450, + value_nodes: array452, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -4379,39 +4425,39 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array453.push(lifted452) + array455.push(lifted454) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let array489 : Array[@common.Ref] = [] - for index490 = 0 - index490 < mbt_ffi_load32(iter_base + 20) - index490 = index490 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + index490 * 24 + let array491 : Array[@common.Ref] = [] + for index492 = 0 + index492 < mbt_ffi_load32(iter_base + 20) + index492 = index492 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index492 * 24 - let lifted488 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted490 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result455 = mbt_ffi_ptr2str( + let result457 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result455) + @common.Ref::Present(result457) } 1 => { - let result456 = mbt_ffi_ptr2str( + let result458 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array486 : Array[@types.SchemaValueNode] = [] - for index487 = 0 - index487 < mbt_ffi_load32(iter_base + 16) - index487 = index487 + 1 { + let array488 : Array[@types.SchemaValueNode] = [] + for index489 = 0 + index489 < mbt_ffi_load32(iter_base + 16) + index489 = index489 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index487 * 32 + index489 * 32 - let lifted485 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted487 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -4463,29 +4509,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result457 = mbt_ffi_ptr2str( + let result459 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result457) + @types.SchemaValueNode::StringValue(result459) } 13 => { - let array458 : Array[Int] = [] - for index459 = 0 - index459 < mbt_ffi_load32(iter_base + 12) - index459 = index459 + 1 { + let array460 : Array[Int] = [] + for index461 = 0 + index461 < mbt_ffi_load32(iter_base + 12) + index461 = index461 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index459 * 4 + index461 * 4 - array458.push(mbt_ffi_load32(iter_base + 0)) + array460.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array458) + @types.SchemaValueNode::RecordValue(array460) } 14 => { - let lifted460 : Int? = match + let lifted462 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -4494,7 +4540,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted460, + payload: lifted462, }) } 15 => @@ -4502,34 +4548,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - 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 - - array461.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array461) - } - 17 => { - let array463 : Array[Int] = [] + let array463 : Array[Bool] = [] for index464 = 0 index464 < mbt_ffi_load32(iter_base + 12) index464 = index464 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index464 * 4 + index464 * 1 - array463.push(mbt_ffi_load32(iter_base + 0)) + array463.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array463) + @types.SchemaValueNode::FlagsValue(array463) } - 18 => { + 17 => { let array465 : Array[Int] = [] for index466 = 0 index466 < mbt_ffi_load32(iter_base + 12) @@ -4541,9 +4573,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array465) + @types.SchemaValueNode::TupleValue(array465) } - 19 => { + 18 => { let array467 : Array[Int] = [] for index468 = 0 index468 < mbt_ffi_load32(iter_base + 12) @@ -4555,40 +4587,54 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array467) + @types.SchemaValueNode::ListValue(array467) } - 20 => { - let array469 : Array[@types.MapEntry] = [] + 19 => { + let array469 : Array[Int] = [] for index470 = 0 index470 < mbt_ffi_load32(iter_base + 12) index470 = index470 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index470 * 8 + index470 * 4 + + array469.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array469) + } + 20 => { + let array471 : Array[@types.MapEntry] = [] + for index472 = 0 + index472 < mbt_ffi_load32(iter_base + 12) + index472 = index472 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index472 * 8 - array469.push(@types.MapEntry::{ + array471.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(array469) + @types.SchemaValueNode::MapValue(array471) } 21 => { - let lifted471 : Int? = match + let lifted473 : 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(lifted471) + @types.SchemaValueNode::OptionValue(lifted473) } 22 => { - let lifted474 = match + let lifted476 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted472 : Int? = match + let lifted474 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -4596,10 +4642,10 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted472) + @types.ResultValuePayload::OkValue(lifted474) } 1 => { - let lifted473 : Int? = match + let lifted475 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -4607,78 +4653,78 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted473) + @types.ResultValuePayload::ErrValue(lifted475) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted474) + @types.SchemaValueNode::ResultValue(lifted476) } 23 => { - let result475 = mbt_ffi_ptr2str( + let result477 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted477 : String? = match + let lifted479 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result476 = mbt_ffi_ptr2str( + let result478 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result476) + Option::Some(result478) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result475, - language: lifted477, + text: result477, + language: lifted479, }) } 24 => { - let result478 = mbt_ffi_ptr2bytes( + let result480 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted480 : String? = match + let lifted482 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result479 = mbt_ffi_ptr2str( + let result481 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result479) + Option::Some(result481) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result478, - mime_type: lifted480, + bytes: result480, + mime_type: lifted482, }) } 25 => { - let result481 = mbt_ffi_ptr2str( + let result483 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result481) + @types.SchemaValueNode::PathValue(result483) } 26 => { - let result482 = mbt_ffi_ptr2str( + let result484 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result482) + @types.SchemaValueNode::UrlValue(result484) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -4690,7 +4736,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result483 = mbt_ffi_ptr2str( + let result485 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -4698,17 +4744,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result483, + unit: result485, }) } 30 => { - let result484 = mbt_ffi_ptr2str( + let result486 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result484, + tag: result486, body: mbt_ffi_load32(iter_base + 16), }) } @@ -4727,14 +4773,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array486.push(lifted485) + array488.push(lifted487) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result456, + name: result458, value: @types.SchemaValueTree::{ - value_nodes: array486, + value_nodes: array488, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -4742,7 +4788,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array489.push(lifted488) + array491.push(lifted490) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) @@ -4750,240 +4796,240 @@ pub fn get_all_tools() -> Array[RegisteredTool] { lhs_quant: @common.Quantifier::from( mbt_ffi_load8_u(iter_base + 4), ), - lhs: array453, - rhs: array489, + lhs: array455, + rhs: array491, }) } _ => panic() } - array492.push(lifted491) + array494.push(lifted493) } mbt_ffi_free(mbt_ffi_load32(iter_base + 172)) - let lifted503 : @common.StreamSpec? = match + let lifted505 : @common.StreamSpec? = match mbt_ffi_load8_u(iter_base + 180) { 0 => Option::None 1 => { - let result494 = mbt_ffi_ptr2str( + let result496 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 184), mbt_ffi_load32(iter_base + 188), ) - let result495 = mbt_ffi_ptr2str( + let result497 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 192), mbt_ffi_load32(iter_base + 196), ) - let array498 : Array[@common.Example] = [] - for index499 = 0 - index499 < mbt_ffi_load32(iter_base + 204) - index499 = index499 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 200) + index499 * 16 + let array500 : Array[@common.Example] = [] + for index501 = 0 + index501 < mbt_ffi_load32(iter_base + 204) + index501 = index501 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 200) + index501 * 16 - let result496 = mbt_ffi_ptr2str( + let result498 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result497 = mbt_ffi_ptr2str( + let result499 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array498.push(@common.Example::{ - title: result496, - body: result497, + array500.push(@common.Example::{ + title: result498, + body: result499, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 200)) - let array501 : Array[String] = [] - for index502 = 0 - index502 < mbt_ffi_load32(iter_base + 212) - index502 = index502 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 208) + index502 * 8 + let array503 : Array[String] = [] + for index504 = 0 + index504 < mbt_ffi_load32(iter_base + 212) + index504 = index504 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 208) + index504 * 8 - let result500 = mbt_ffi_ptr2str( + let result502 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array501.push(result500) + array503.push(result502) } mbt_ffi_free(mbt_ffi_load32(iter_base + 208)) Option::Some(@common.StreamSpec::{ doc: @common.Doc::{ - summary: result494, - description: result495, - examples: array498, + summary: result496, + description: result497, + examples: array500, }, - mime: array501, + mime: array503, required: mbt_ffi_load8_u(iter_base + 216) != 0, }) } _ => panic() } - let lifted513 : @common.StreamSpec? = match + let lifted515 : @common.StreamSpec? = match mbt_ffi_load8_u(iter_base + 220) { 0 => Option::None 1 => { - let result504 = mbt_ffi_ptr2str( + let result506 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 224), mbt_ffi_load32(iter_base + 228), ) - let result505 = mbt_ffi_ptr2str( + let result507 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 232), mbt_ffi_load32(iter_base + 236), ) - let array508 : Array[@common.Example] = [] - for index509 = 0 - index509 < mbt_ffi_load32(iter_base + 244) - index509 = index509 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 240) + index509 * 16 + let array510 : Array[@common.Example] = [] + for index511 = 0 + index511 < mbt_ffi_load32(iter_base + 244) + index511 = index511 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 240) + index511 * 16 - let result506 = mbt_ffi_ptr2str( + let result508 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result507 = mbt_ffi_ptr2str( + let result509 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array508.push(@common.Example::{ - title: result506, - body: result507, + array510.push(@common.Example::{ + title: result508, + body: result509, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 240)) - let array511 : Array[String] = [] - for index512 = 0 - index512 < mbt_ffi_load32(iter_base + 252) - index512 = index512 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 248) + index512 * 8 + let array513 : Array[String] = [] + for index514 = 0 + index514 < mbt_ffi_load32(iter_base + 252) + index514 = index514 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 248) + index514 * 8 - let result510 = mbt_ffi_ptr2str( + let result512 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array511.push(result510) + array513.push(result512) } mbt_ffi_free(mbt_ffi_load32(iter_base + 248)) Option::Some(@common.StreamSpec::{ doc: @common.Doc::{ - summary: result504, - description: result505, - examples: array508, + summary: result506, + description: result507, + examples: array510, }, - mime: array511, + mime: array513, required: mbt_ffi_load8_u(iter_base + 256) != 0, }) } _ => panic() } - let lifted530 : @common.ResultSpec? = match + let lifted532 : @common.ResultSpec? = match mbt_ffi_load8_u(iter_base + 260) { 0 => Option::None 1 => { - let result514 = mbt_ffi_ptr2str( + let result516 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 268), mbt_ffi_load32(iter_base + 272), ) - let result515 = mbt_ffi_ptr2str( + let result517 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 276), mbt_ffi_load32(iter_base + 280), ) - let array518 : Array[@common.Example] = [] - for index519 = 0 - index519 < mbt_ffi_load32(iter_base + 288) - index519 = index519 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 284) + index519 * 16 + let array520 : Array[@common.Example] = [] + for index521 = 0 + index521 < mbt_ffi_load32(iter_base + 288) + index521 = index521 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 284) + index521 * 16 - let result516 = mbt_ffi_ptr2str( + let result518 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result517 = mbt_ffi_ptr2str( + let result519 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array518.push(@common.Example::{ - title: result516, - body: result517, + array520.push(@common.Example::{ + title: result518, + body: result519, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 284)) - let array527 : Array[@common.Formatter] = [] - for index528 = 0 - index528 < mbt_ffi_load32(iter_base + 296) - index528 = index528 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 292) + index528 * 32 + let array529 : Array[@common.Formatter] = [] + for index530 = 0 + index530 < mbt_ffi_load32(iter_base + 296) + index530 = index530 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 292) + index530 * 32 - let result520 = mbt_ffi_ptr2str( + let result522 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result521 = mbt_ffi_ptr2str( + let result523 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result522 = mbt_ffi_ptr2str( + let result524 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let array525 : Array[@common.Example] = [] - for index526 = 0 - index526 < mbt_ffi_load32(iter_base + 28) - index526 = index526 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + index526 * 16 + let array527 : Array[@common.Example] = [] + for index528 = 0 + index528 < mbt_ffi_load32(iter_base + 28) + index528 = index528 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + index528 * 16 - let result523 = mbt_ffi_ptr2str( + let result525 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result524 = mbt_ffi_ptr2str( + let result526 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array525.push(@common.Example::{ - title: result523, - body: result524, + array527.push(@common.Example::{ + title: result525, + body: result526, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - array527.push(@common.Formatter::{ - name: result520, + array529.push(@common.Formatter::{ + name: result522, doc: @common.Doc::{ - summary: result521, - description: result522, - examples: array525, + summary: result523, + description: result524, + examples: array527, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 292)) - let result529 = mbt_ffi_ptr2str( + let result531 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 300), mbt_ffi_load32(iter_base + 304), ) @@ -4991,82 +5037,82 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Option::Some(@common.ResultSpec::{ type_: mbt_ffi_load32(iter_base + 264), doc: @common.Doc::{ - summary: result514, - description: result515, - examples: array518, + summary: result516, + description: result517, + examples: array520, }, - formatters: array527, - default_formatter: result529, + formatters: array529, + default_formatter: result531, }) } _ => panic() } - let array539 : Array[@common.ErrorCase] = [] - for index540 = 0 - index540 < mbt_ffi_load32(iter_base + 312) - index540 = index540 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 308) + index540 * 44 + let array541 : Array[@common.ErrorCase] = [] + for index542 = 0 + index542 < mbt_ffi_load32(iter_base + 312) + index542 = index542 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 308) + index542 * 44 - let result531 = mbt_ffi_ptr2str( + let result533 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result532 = mbt_ffi_ptr2str( + let result534 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let result533 = mbt_ffi_ptr2str( + 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( + let result536 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result535 = mbt_ffi_ptr2str( + 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)) - let lifted538 : Int? = match mbt_ffi_load8_u(iter_base + 36) { + let lifted540 : Int? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 40)) _ => panic() } - array539.push(@common.ErrorCase::{ - name: result531, + array541.push(@common.ErrorCase::{ + name: result533, doc: @common.Doc::{ - summary: result532, - description: result533, - examples: array536, + summary: result534, + description: result535, + examples: array538, }, kind: @common.ErrorKind::from(mbt_ffi_load8_u(iter_base + 32)), exit_code: mbt_ffi_load8_u(iter_base + 33).to_byte(), - payload: lifted538, + payload: lifted540, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 308)) - let lifted541 : @common.CommandAnnotations? = match + let lifted543 : @common.CommandAnnotations? = match mbt_ffi_load8_u(iter_base + 316) { 0 => Option::None 1 => @@ -5081,23 +5127,23 @@ pub fn get_all_tools() -> Array[RegisteredTool] { Option::Some(@common.CommandBody::{ positionals: @common.Positionals::{ - fixed: array118, - tail: lifted132, + fixed: array119, + tail: lifted133, }, - options: array182, - flags: array199, - constraints: array492, - stdin: lifted503, - stdout: lifted513, - result: lifted530, - errors: array539, - annotations: lifted541, + options: array184, + flags: array201, + constraints: array494, + stdin: lifted505, + stdout: lifted515, + result: lifted532, + errors: array541, + annotations: lifted543, }) } _ => panic() } - array543.push(@common.CommandNode::{ + array545.push(@common.CommandNode::{ name: result0, aliases: array, doc: @common.Doc::{ @@ -5105,2294 +5151,2540 @@ pub fn get_all_tools() -> Array[RegisteredTool] { description: result3, examples: array6, }, - globals: @common.Globals::{ options: array56, flags: array73 }, - subcommands: array75, - body: lifted542, + globals: @common.Globals::{ options: array57, flags: array74 }, + subcommands: array76, + body: lifted544, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let array671 : Array[@types.SchemaTypeNode] = [] - for index672 = 0 - index672 < mbt_ffi_load32(iter_base + 20) - index672 = index672 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + index672 * 144 + let array743 : Array[@types.SchemaTypeNode] = [] + for index744 = 0 + index744 < mbt_ffi_load32(iter_base + 20) + index744 = index744 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index744 * 144 - let lifted657 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted729 = 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 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 + 2 => { + let lifted553 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted548 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted547 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result545 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted547) + } + _ => panic() + } - 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), - ) + let lifted550 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted549 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result546) + Option::Some(lifted549) + } + _ => panic() } - _ => 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 lifted552 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result551 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let result548 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result551) + } + _ => panic() + } - array549.push(result548) + Option::Some(@types.NumericRestrictions::{ + min: lifted548, + max: lifted550, + unit: lifted552, + }) } - 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 + _ => panic() + } - let result551 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::S8Type(lifted553) + } + 3 => { + let lifted560 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted555 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted554 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array552.push(result551) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + Option::Some(lifted554) + } + _ => panic() + } - 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), - ) + let lifted557 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted556 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result554) + Option::Some(lifted556) + } + _ => panic() } - _ => 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 => @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), - ) + let lifted559 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result558 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.Role::Other(result556) - } - _ => panic() + Option::Some(result558) } - - Option::Some(lifted557) + _ => panic() } - _ => 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, - }, - }) + Option::Some(@types.NumericRestrictions::{ + min: lifted555, + max: lifted557, + unit: lifted559, + }) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array559) + @types.SchemaTypeBody::S16Type(lifted560) } - 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 result561 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 4 => { + let lifted567 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted562 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted561 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 lifted562 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + Option::Some(lifted561) + } + _ => panic() + } - let lifted564 : String? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result563 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + let lifted564 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted563 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result563) + Option::Some(lifted563) + } + _ => panic() } - _ => 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 + 40) - index570 = index570 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + index570 * 8 + let lifted566 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result565 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let result568 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result565) + } + _ => panic() + } - array569.push(result568) + Option::Some(@types.NumericRestrictions::{ + min: lifted562, + max: lifted564, + unit: lifted566, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + _ => panic() + } - 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), - ) + @types.SchemaTypeBody::S32Type(lifted567) + } + 5 => { + let lifted574 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted569 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted568 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result571) + Option::Some(lifted568) + } + _ => panic() } - _ => 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) + let lifted571 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted570 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::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(lifted574) + Option::Some(lifted570) + } + _ => panic() } - _ => 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 lifted573 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result572 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let result578 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result572) + } + _ => panic() + } - array579.push(result578) + Option::Some(@types.NumericRestrictions::{ + min: lifted569, + max: lifted571, + unit: lifted573, + }) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array579) + @types.SchemaTypeBody::S64Type(lifted574) } - 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 + 6 => { + let lifted581 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted576 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted575 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result581 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted575) + } + _ => panic() + } - array582.push(result581) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted578 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted577 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::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.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 + Option::Some(lifted577) + } + _ => panic() + } - array584.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted580 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result579 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @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() - } + Option::Some(result579) + } + _ => panic() + } - let lifted587 : Int? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + Option::Some(@types.NumericRestrictions::{ + min: lifted576, + max: lifted578, + unit: lifted580, + }) + } _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted586, - err: lifted587, - }) + @types.SchemaTypeBody::U8Type(lifted581) } - 24 => { - let lifted591 : Array[String]? = match + 7 => { + let lifted588 : @types.NumericRestrictions? = 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), - ) + let lifted583 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted582 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array589.push(result588) + Option::Some(lifted582) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array589) - } - _ => panic() - } + let lifted585 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted584 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => 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() - } + Option::Some(lifted584) + } + _ => 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 lifted587 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result586 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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(result586) + } + _ => panic() + } - Option::Some(result594) + Option::Some(@types.NumericRestrictions::{ + min: lifted583, + max: lifted585, + unit: lifted587, + }) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted591, - min_length: lifted592, - max_length: lifted593, - regex: lifted595, - }) + @types.SchemaTypeBody::U16Type(lifted588) } - 25 => { - let lifted599 : Array[String]? = match + 8 => { + let lifted595 : @types.NumericRestrictions? = 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), - ) + let lifted590 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted589 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array597.push(result596) + Option::Some(lifted589) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array597) - } - _ => panic() - } + let lifted592 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted591 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => 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() - } + Option::Some(lifted591) + } + _ => 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()) + let lifted594 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result593 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result593) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted590, + max: lifted592, + unit: lifted594, + }) + } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted599, - min_bytes: lifted600, - max_bytes: lifted601, - }) + @types.SchemaTypeBody::U32Type(lifted595) } - 26 => { - let lifted605 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 12) { + 9 => { + let lifted602 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { 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), - ) + let lifted597 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted596 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array603.push(result602) + Option::Some(lifted596) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array603) - } - _ => panic() - } + let lifted599 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted598 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => 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 + Option::Some(lifted598) + } + _ => panic() + } - let result606 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted601 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result600 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - array607.push(result606) + Option::Some(result600) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array607) + Option::Some(@types.NumericRestrictions::{ + min: lifted597, + max: lifted599, + unit: lifted601, + }) } _ => 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, - }) + @types.SchemaTypeBody::U64Type(lifted602) } - 27 => { - let lifted613 : Array[String]? = match + 10 => { + let lifted609 : @types.NumericRestrictions? = 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), - ) + let lifted604 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted603 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - array611.push(result610) + Option::Some(lifted603) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array611) - } - _ => panic() - } + let lifted606 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted605 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => 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 + Option::Some(lifted605) + } + _ => panic() + } - let result614 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted608 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result607 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - array615.push(result614) + Option::Some(result607) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array615) + Option::Some(@types.NumericRestrictions::{ + min: lifted604, + max: lifted606, + unit: lifted608, + }) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted613, - allowed_hosts: lifted617, - }) + @types.SchemaTypeBody::F32Type(lifted609) } - 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 + 11 => { + let lifted616 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted611 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted610 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result619 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted610) + } + _ => panic() + } - array620.push(result619) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + let lifted613 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted612 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - 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(lifted612) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 32), - scale: mbt_ffi_load32(iter_base + 40), - unit: result622, - }) - } - _ => panic() - } + let lifted615 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result614 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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(result614) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result624, + Option::Some(@types.NumericRestrictions::{ + min: lifted611, + max: lifted613, + unit: lifted615, }) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result618, - allowed_suffixes: array620, - min: lifted623, - max: lifted625, - }) + @types.SchemaTypeBody::F64Type(lifted616) } - 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 + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + let array631 : Array[@types.NamedFieldType] = [] + for index632 = 0 + index632 < mbt_ffi_load32(iter_base + 12) + index632 = index632 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index632 * 68 - let result626 = mbt_ffi_ptr2str( + let result617 = 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) - } + let lifted619 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None 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( + let result618 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result629) + Option::Some(result618) } - 3 => { - let result630 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + _ => panic() + } - @types.DiscriminatorRule::Regex(result630) - } - 4 => { - let result631 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let array621 : Array[String] = [] + for index622 = 0 + index622 < mbt_ffi_load32(iter_base + 28) + index622 = index622 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + index622 * 8 - 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), - ) + let result620 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(result632) - } - _ => panic() - } + array621.push(result620) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - @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), - ) + let array624 : Array[String] = [] + for index625 = 0 + index625 < mbt_ffi_load32(iter_base + 36) + index625 = index625 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 32) + index625 * 8 - @types.DiscriminatorRule::FieldAbsent(result634) + let result623 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array624.push(result623) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + + let lifted627 : String? = match mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result626 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) + + Option::Some(result626) } _ => panic() } - let lifted637 : String? = match mbt_ffi_load8_u(iter_base + 36) { + let lifted630 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let result636 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), + let lifted629 = match mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result628 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) + + @types.Role::Other(result628) + } + _ => panic() + } + + Option::Some(lifted629) + } + _ => panic() + } + + array631.push(@types.NamedFieldType::{ + name: result617, + body: mbt_ffi_load32(iter_base + 8), + metadata: @types.MetadataEnvelope::{ + doc: lifted619, + aliases: array621, + examples: array624, + deprecated: lifted627, + role: lifted630, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::RecordType(array631) + } + 15 => { + let array648 : Array[@types.VariantCaseType] = [] + for index649 = 0 + index649 < mbt_ffi_load32(iter_base + 12) + index649 = index649 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index649 * 72 + + let result633 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted634 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + let lifted636 : String? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result635 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), ) - Option::Some(result636) + Option::Some(result635) } _ => 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 array638 : Array[String] = [] + for index639 = 0 + index639 < mbt_ffi_load32(iter_base + 32) + index639 = index639 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + index639 * 8 - let result638 = mbt_ffi_ptr2str( + let result637 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array639.push(result638) + array638.push(result637) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - 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 array641 : Array[String] = [] + for index642 = 0 + index642 < mbt_ffi_load32(iter_base + 40) + index642 = index642 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + index642 * 8 - let result641 = mbt_ffi_ptr2str( + let result640 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array642.push(result641) + array641.push(result640) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted645 : String? = match mbt_ffi_load8_u(iter_base + 64) { + let lifted644 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result644 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), + let result643 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), ) - Option::Some(result644) + Option::Some(result643) } _ => panic() } - let lifted648 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { + let lifted647 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted647 = match mbt_ffi_load8_u(iter_base + 80) { + let lifted646 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result646 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), + let result645 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result646) + @types.Role::Other(result645) } _ => panic() } - Option::Some(lifted647) + Option::Some(lifted646) } _ => panic() } - array649.push(@types.UnionBranch::{ - tag: result626, - body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted635, + array648.push(@types.VariantCaseType::{ + name: result633, + payload: lifted634, metadata: @types.MetadataEnvelope::{ - doc: lifted637, - aliases: array639, - examples: array642, - deprecated: lifted645, - role: lifted648, + doc: lifted636, + aliases: array638, + examples: array641, + deprecated: lifted644, + role: lifted647, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array649, - }) + @types.SchemaTypeBody::VariantType(array648) } - 32 => { - let lifted652 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 16 => { + let array651 : Array[String] = [] + for index652 = 0 + index652 < mbt_ffi_load32(iter_base + 12) + index652 = index652 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index652 * 8 + + let result650 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array651.push(result650) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::EnumType(array651) + } + 17 => { + let array654 : Array[String] = [] + for index655 = 0 + index655 < mbt_ffi_load32(iter_base + 12) + index655 = index655 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index655 * 8 + + let result653 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array654.push(result653) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::FlagsType(array654) + } + 18 => { + 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.SchemaTypeBody::TupleType(array656) + } + 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 lifted658 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 1 => { - let result651 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - Option::Some(result651) - } + let lifted659 : Int? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted652, + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ + ok: lifted658, + err: lifted659, }) } - 33 => { - let lifted654 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 24 => { + let lifted663 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result653 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + let array661 : Array[String] = [] + for index662 = 0 + index662 < mbt_ffi_load32(iter_base + 16) + index662 = index662 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + index662 * 8 + + let result660 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array661.push(result660) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(result653) + Option::Some(array661) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted654, - }) - } - 34 => { - let lifted655 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted664 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + 1 => + Option::Some(mbt_ffi_load32(iter_base + 24).reinterpret_as_uint()) _ => panic() } - @types.SchemaTypeBody::FutureType(lifted655) - } - 35 => { - let lifted656 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted665 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + 1 => + Option::Some(mbt_ffi_load32(iter_base + 32).reinterpret_as_uint()) _ => panic() } - @types.SchemaTypeBody::StreamType(lifted656) - } - _ => panic() - } + let lifted667 : String? = match mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result666 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - let lifted659 : String? = match mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result658 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), - ) + Option::Some(result666) + } + _ => panic() + } - Option::Some(result658) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted663, + min_length: lifted664, + max_length: lifted665, + regex: lifted667, + }) } - _ => panic() - } - - 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 result660 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 25 => { + let lifted671 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array669 : Array[String] = [] + for index670 = 0 + index670 < mbt_ffi_load32(iter_base + 16) + index670 = index670 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + index670 * 8 - array661.push(result660) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + let result668 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array669.push(result668) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - let result663 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(array669) + } + _ => panic() + } - array664.push(result663) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + let lifted672 : 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 lifted667 : String? = match mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result666 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) + let lifted673 : 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() + } - Option::Some(result666) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ + mime_types: lifted671, + min_bytes: lifted672, + max_bytes: lifted673, + }) } - _ => panic() - } + 26 => { + let lifted677 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let array675 : Array[String] = [] + for index676 = 0 + index676 < mbt_ffi_load32(iter_base + 20) + index676 = index676 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index676 * 8 - let lifted670 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted669 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result668 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + let result674 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array675.push(result674) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - @types.Role::Other(result668) + Option::Some(array675) } _ => panic() } - Option::Some(lifted669) - } - _ => panic() - } - - 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 + 16)) + let lifted681 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let array679 : Array[String] = [] + for index680 = 0 + index680 < mbt_ffi_load32(iter_base + 32) + index680 = index680 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + index680 * 8 - let array676 : Array[@types.SchemaTypeDef] = [] - for index677 = 0 - index677 < mbt_ffi_load32(iter_base + 28) - index677 = index677 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + index677 * 24 + let result678 = 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), - ) + array679.push(result678) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let lifted675 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result674 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + Option::Some(array679) + } + _ => panic() + } - Option::Some(result674) + @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: lifted677, + allowed_extensions: lifted681, + }) } - _ => panic() - } - - array676.push(@types.SchemaTypeDef::{ - id: result673, - name: lifted675, - body: mbt_ffi_load32(iter_base + 20), - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + 27 => { + let lifted685 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array683 : Array[String] = [] + for index684 = 0 + index684 < mbt_ffi_load32(iter_base + 16) + index684 = index684 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + index684 * 8 - array678.push(RegisteredTool::{ - definition: @common.Tool::{ - version: result, - commands: @common.CommandTree::{ nodes: array543 }, - schema: @types.SchemaGraph::{ - type_nodes: array671, - defs: array676, - 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 = array678 - mbt_ffi_free(return_area) - return ret -} + let result682 = 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 ptr = mbt_ffi_str2ptr(name) - let return_area = mbt_ffi_malloc(64) - wasmImportGetTool(ptr, name.length(), return_area) + array683.push(result682) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - let lifted678 : RegisteredTool? = 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), - ) + Option::Some(array683) + } + _ => panic() + } - let array543 : Array[@common.CommandNode] = [] - for index544 = 0 - index544 < mbt_ffi_load32(return_area + 20) - index544 = index544 + 1 { - let iter_base = mbt_ffi_load32(return_area + 16) + index544 * 324 + let lifted689 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + let array687 : Array[String] = [] + for index688 = 0 + index688 < mbt_ffi_load32(iter_base + 28) + index688 = index688 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + index688 * 8 - let result0 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let result686 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array687.push(result686) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let result1 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(array687) + } + _ => panic() + } - array.push(result1) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted685, + allowed_hosts: lifted689, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - let result2 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - - 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( + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result690 = 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 array56 : Array[@common.OptionSpec] = [] - for index57 = 0 - index57 < mbt_ffi_load32(iter_base + 44) - index57 = index57 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index57 * 108 - - let result8 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - let lifted : 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 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 array692 : Array[String] = [] + for index693 = 0 + index693 < mbt_ffi_load32(iter_base + 20) + index693 = index693 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index693 * 8 - let result9 = mbt_ffi_ptr2str( + let result691 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array10.push(result9) + array692.push(result691) } 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), - ) - - let result13 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 32), - mbt_ffi_load32(iter_base + 36), - ) - - 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 result14 = 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), - ) - - array16.push(@common.Example::{ title: result14, body: result15 }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - - let lifted19 : String? = match mbt_ffi_load8_u(iter_base + 48) { + let lifted695 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result18 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 52), - mbt_ffi_load32(iter_base + 56), + let result694 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), ) - Option::Some(result18) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result694, + }) } _ => panic() } - let lifted21 = match mbt_ffi_load8_u(iter_base + 60) { - 0 => @common.OptionShape::Scalar(mbt_ffi_load32(iter_base + 64)) - 1 => - @common.OptionShape::OptionalScalar( - mbt_ffi_load32(iter_base + 64), + let lifted697 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result696 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 76), + mbt_ffi_load32(iter_base + 80), ) - 2 => { - let lifted20 = 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::Repeatable(@common.RepeatableShape::{ - repetition: lifted20, - type_: 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: result696, }) } _ => panic() } - let lifted53 : @types.SchemaValueTree? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let array51 : Array[@types.SchemaValueNode] = [] - for index52 = 0 - index52 < mbt_ffi_load32(iter_base + 84) - index52 = index52 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + index52 * 32 + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result690, + allowed_suffixes: array692, + min: lifted695, + max: lifted697, + }) + } + 31 => { + let array721 : Array[@types.UnionBranch] = [] + for index722 = 0 + index722 < mbt_ffi_load32(iter_base + 12) + index722 = index722 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index722 * 92 - let lifted50 = 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 result22 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::StringValue(result22) - } - 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 - - array23.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::RecordValue(array23) - } - 14 => { - let lifted25 : 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: lifted25, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 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 - - array26.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array26) - } - 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 - - array28.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let result698 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaValueNode::TupleValue(array28) - } - 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 lifted707 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result699 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - array30.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.DiscriminatorRule::Prefix(result699) + } + 1 => { + let result700 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - @types.SchemaValueNode::ListValue(array30) - } - 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 + @types.DiscriminatorRule::Suffix(result700) + } + 2 => { + let result701 = 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::Contains(result701) + } + 3 => { + let result702 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - @types.SchemaValueNode::FixedListValue(array32) - } - 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::Regex(result702) + } + 4 => { + let result703 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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 lifted705 : String? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result704 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), + ) - @types.SchemaValueNode::MapValue(array34) + Option::Some(result704) } - 21 => { - let lifted36 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + _ => panic() + } - @types.SchemaValueNode::OptionValue(lifted36) - } - 22 => { - let lifted39 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted37 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result703, + literal: lifted705, + }) + } + 5 => { + let result706 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - @types.ResultValuePayload::OkValue(lifted37) - } - 1 => { - let lifted38 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + @types.DiscriminatorRule::FieldAbsent(result706) + } + _ => panic() + } - @types.ResultValuePayload::ErrValue(lifted38) - } - _ => panic() - } + let lifted709 : String? = match mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result708 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - @types.SchemaValueNode::ResultValue(lifted39) - } - 23 => { - let result40 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + Option::Some(result708) + } + _ => panic() + } - let lifted42 : 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 array711 : Array[String] = [] + for index712 = 0 + index712 < mbt_ffi_load32(iter_base + 52) + index712 = index712 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 48) + index712 * 8 - Option::Some(result41) - } - _ => panic() - } + let result710 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @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), - ) + array711.push(result710) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - 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), - ) + let array714 : Array[String] = [] + for index715 = 0 + index715 < mbt_ffi_load32(iter_base + 60) + index715 = index715 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + index715 * 8 - Option::Some(result44) - } - _ => panic() - } + let result713 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result43, - mime_type: lifted45, - }) - } - 25 => { - let result46 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + array714.push(result713) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - @types.SchemaValueNode::PathValue(result46) - } - 26 => { - let result47 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let lifted717 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result716 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.SchemaValueNode::UrlValue(result47) - } - 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 result48 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + Option::Some(result716) + } + _ => panic() + } - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result48, - }) - } - 30 => { - let result49 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + let lifted720 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { + 0 => Option::None + 1 => { + let lifted719 = match mbt_ffi_load8_u(iter_base + 80) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result718 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), ) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result49, - body: mbt_ffi_load32(iter_base + 16), - }) + @types.Role::Other(result718) } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) _ => panic() } - array51.push(lifted50) + Option::Some(lifted719) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) + _ => panic() + } - Option::Some(@types.SchemaValueTree::{ - value_nodes: array51, - root: mbt_ffi_load32(iter_base + 88), - }) + array721.push(@types.UnionBranch::{ + tag: result698, + body: mbt_ffi_load32(iter_base + 8), + discriminator: lifted707, + metadata: @types.MetadataEnvelope::{ + doc: lifted709, + aliases: array711, + examples: array714, + deprecated: lifted717, + role: lifted720, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array721, + }) + } + 32 => { + let lifted724 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result723 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result723) } _ => panic() } - let lifted55 : String? = match mbt_ffi_load8_u(iter_base + 96) { + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted724, + }) + } + 33 => { + let lifted726 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result54 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 100), - mbt_ffi_load32(iter_base + 104), + let result725 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), ) - Option::Some(result54) + Option::Some(result725) } _ => panic() } - array56.push(@common.OptionSpec::{ - long: result8, - short: lifted, - aliases: array10, - doc: @common.Doc::{ - summary: result12, - description: result13, - examples: array16, - }, - value_name: lifted19, - shape: lifted21, - default: lifted53, - required: mbt_ffi_load8_u(iter_base + 92) != 0, - env_var: lifted55, + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted726, }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) + 34 => { + let lifted727 : 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(lifted727) + } + 35 => { + let lifted728 : 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(lifted728) + } + _ => panic() + } + + let lifted731 : String? = match mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result730 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) + + Option::Some(result730) + } + _ => panic() + } + + let array733 : Array[String] = [] + for index734 = 0 + index734 < mbt_ffi_load32(iter_base + 104) + index734 = index734 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 100) + index734 * 8 + + let result732 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array733.push(result732) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + + let array736 : Array[String] = [] + for index737 = 0 + index737 < mbt_ffi_load32(iter_base + 112) + index737 = index737 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 108) + index737 * 8 + + let result735 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array736.push(result735) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + + let lifted739 : String? = match mbt_ffi_load8_u(iter_base + 116) { + 0 => Option::None + 1 => { + let result738 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 120), + mbt_ffi_load32(iter_base + 124), + ) + + Option::Some(result738) + } + _ => panic() + } + + let lifted742 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted741 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result740 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) + + @types.Role::Other(result740) + } + _ => panic() + } + + Option::Some(lifted741) + } + _ => panic() + } + + array743.push(@types.SchemaTypeNode::{ + body: lifted729, + metadata: @types.MetadataEnvelope::{ + doc: lifted731, + aliases: array733, + examples: array736, + deprecated: lifted739, + role: lifted742, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + let array748 : Array[@types.SchemaTypeDef] = [] + for index749 = 0 + index749 < mbt_ffi_load32(iter_base + 28) + index749 = index749 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + index749 * 24 + + let result745 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted747 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result746 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result746) + } + _ => panic() + } + + array748.push(@types.SchemaTypeDef::{ + id: result745, + name: lifted747, + body: mbt_ffi_load32(iter_base + 20), + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + array750.push(RegisteredTool::{ + definition: @common.Tool::{ + version: result, + commands: @common.CommandTree::{ nodes: array545 }, + schema: @types.SchemaGraph::{ + type_nodes: array743, + defs: array748, + 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 = array750 + mbt_ffi_free(return_area) + return ret +} + +///| +/// 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 ptr = mbt_ffi_str2ptr(name) + let return_area = mbt_ffi_malloc(64) + wasmImportGetTool(ptr, name.length(), return_area) + + let lifted750 : RegisteredTool? = 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 array545 : Array[@common.CommandNode] = [] + for index546 = 0 + index546 < mbt_ffi_load32(return_area + 20) + index546 = index546 + 1 { + let iter_base = mbt_ffi_load32(return_area + 16) + index546 * 324 + + let result0 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + 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 result1 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array.push(result1) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + let result2 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + 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 array73 : Array[@common.FlagSpec] = [] - for index74 = 0 - index74 < mbt_ffi_load32(iter_base + 52) - index74 = index74 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 48) + index74 * 72 + 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 * 112 - let result58 = mbt_ffi_ptr2str( + let result8 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted59 : Char? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted : 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 array61 : Array[String] = [] - for index62 = 0 - index62 < mbt_ffi_load32(iter_base + 20) - index62 = index62 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + index62 * 8 + 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 result60 = mbt_ffi_ptr2str( + let result9 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array61.push(result60) + array10.push(result9) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let result63 = mbt_ffi_ptr2str( + let result12 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let result64 = mbt_ffi_ptr2str( + let result13 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array67 : Array[@common.Example] = [] - for index68 = 0 - index68 < mbt_ffi_load32(iter_base + 44) - index68 = index68 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index68 * 16 + 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 result65 = mbt_ffi_ptr2str( + let result14 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result66 = mbt_ffi_ptr2str( + let result15 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array67.push(@common.Example::{ title: result65, body: result66 }) + array16.push(@common.Example::{ title: result14, body: result15 }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let lifted70 = 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, - }) + let lifted19 : String? = match mbt_ffi_load8_u(iter_base + 48) { + 0 => Option::None 1 => { - let lifted69 : 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() - } + let result18 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 52), + mbt_ffi_load32(iter_base + 56), + ) - @common.FlagShape::CountFlag(lifted69) + Option::Some(result18) } _ => panic() } - let lifted72 : String? = match mbt_ffi_load8_u(iter_base + 60) { - 0 => Option::None - 1 => { - let result71 = mbt_ffi_ptr2str( + let lifted22 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @common.OptionShape::Scalar(mbt_ffi_load32(iter_base + 64)) + 1 => + @common.OptionShape::OptionalScalar( mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), ) + 2 => { + let lifted20 = 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: 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() + } - Option::Some(result71) + @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() } - array73.push(@common.FlagSpec::{ - long: result58, - short: lifted59, - aliases: array61, - doc: @common.Doc::{ - summary: result63, - description: result64, - examples: array67, - }, - shape: lifted70, - env_var: lifted72, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - - let array75 : Array[Int] = [] - for index76 = 0 - index76 < mbt_ffi_load32(iter_base + 60) - index76 = index76 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + index76 * 4 + let lifted54 : @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 + 88) + index53 = index53 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 84) + index53 * 32 - array75.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + let lifted51 = 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 result23 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let lifted542 : @common.CommandBody? = match - mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let array118 : Array[@common.Positional] = [] - for index119 = 0 - index119 < mbt_ffi_load32(iter_base + 72) - index119 = index119 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 68) + index119 * 68 + @types.SchemaValueNode::StringValue(result23) + } + 13 => { + 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 result77 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + array24.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let result78 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::RecordValue(array24) + } + 14 => { + let lifted26 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - let result79 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ + case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + payload: lifted26, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + 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 - let array82 : Array[@common.Example] = [] - for index83 = 0 - index83 < mbt_ffi_load32(iter_base + 28) - index83 = index83 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + index83 * 16 + array27.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let result80 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaValueNode::FlagsValue(array27) + } + 17 => { + 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 result81 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + array29.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array82.push(@common.Example::{ - title: result80, - body: result81, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + @types.SchemaValueNode::TupleValue(array29) + } + 18 => { + 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 - let lifted85 : String? = match mbt_ffi_load8_u(iter_base + 32) { - 0 => Option::None - 1 => { - let result84 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 36), - mbt_ffi_load32(iter_base + 40), - ) + array31.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - Option::Some(result84) - } - _ => panic() - } + @types.SchemaValueNode::ListValue(array31) + } + 19 => { + 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 - let lifted117 : @types.SchemaValueTree? = match - mbt_ffi_load8_u(iter_base + 48) { - 0 => Option::None - 1 => { - let array115 : Array[@types.SchemaValueNode] = [] - for index116 = 0 - index116 < mbt_ffi_load32(iter_base + 56) - index116 = index116 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 52) + - index116 * 32 + array33.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let lifted114 = 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 result86 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::FixedListValue(array33) + } + 20 => { + 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 - @types.SchemaValueNode::StringValue(result86) - } - 13 => { - let array87 : Array[Int] = [] - for index88 = 0 - index88 < mbt_ffi_load32(iter_base + 12) - index88 = index88 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index88 * 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)) - array87.push(mbt_ffi_load32(iter_base + 0)) + @types.SchemaValueNode::MapValue(array35) + } + 21 => { + let lifted37 : 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(lifted37) + } + 22 => { + let lifted40 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted38 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array87) + @types.ResultValuePayload::OkValue(lifted38) } - 14 => { - let lifted89 : Int? = match + 1 => { + let lifted39 : 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: lifted89, - }) + @types.ResultValuePayload::ErrValue(lifted39) } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - let array90 : Array[Bool] = [] - for index91 = 0 - index91 < mbt_ffi_load32(iter_base + 12) - index91 = index91 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index91 * 1 + _ => panic() + } - array90.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::ResultValue(lifted40) + } + 23 => { + let result41 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + 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), + ) - @types.SchemaValueNode::FlagsValue(array90) + Option::Some(result42) } - 17 => { - let array92 : Array[Int] = [] - for index93 = 0 - index93 < mbt_ffi_load32(iter_base + 12) - index93 = index93 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index93 * 4 + _ => panic() + } - array92.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result41, + language: lifted43, + }) + } + 24 => { + 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), + ) - @types.SchemaValueNode::TupleValue(array92) + Option::Some(result45) } - 18 => { - 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 + _ => panic() + } - array94.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @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::ListValue(array94) - } - 19 => { - 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 + @types.SchemaValueNode::PathValue(result47) + } + 26 => { + let result48 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - array96.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @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::FixedListValue(array96) - } - 20 => { - let array98 : Array[@types.MapEntry] = [] - for index99 = 0 - index99 < mbt_ffi_load32(iter_base + 12) - index99 = index99 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index99 * 8 + @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), + ) - array98.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::UnionValue(@types.UnionValuePayload::{ + tag: result50, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => panic() + } - @types.SchemaValueNode::MapValue(array98) - } - 21 => { - let lifted100 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + array52.push(lifted51) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 84)) - @types.SchemaValueNode::OptionValue(lifted100) - } - 22 => { - let lifted103 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted101 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + Option::Some(@types.SchemaValueTree::{ + value_nodes: array52, + root: mbt_ffi_load32(iter_base + 92), + }) + } + _ => panic() + } - @types.ResultValuePayload::OkValue(lifted101) - } - 1 => { - let lifted102 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + let lifted56 : String? = match mbt_ffi_load8_u(iter_base + 100) { + 0 => Option::None + 1 => { + let result55 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 104), + mbt_ffi_load32(iter_base + 108), + ) - @types.ResultValuePayload::ErrValue(lifted102) - } - _ => panic() - } + Option::Some(result55) + } + _ => panic() + } - @types.SchemaValueNode::ResultValue(lifted103) - } - 23 => { - let result104 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + array57.push(@common.OptionSpec::{ + long: result8, + short: lifted, + aliases: array10, + doc: @common.Doc::{ + summary: result12, + description: result13, + examples: array16, + }, + value_name: lifted19, + shape: lifted22, + default: lifted54, + required: mbt_ffi_load8_u(iter_base + 96) != 0, + env_var: lifted56, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let lifted106 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result105 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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 - Option::Some(result105) - } - _ => panic() - } + let result59 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result104, - language: lifted106, - }) - } - 24 => { - let result107 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let lifted60 : 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 lifted109 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result108 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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 - Option::Some(result108) - } - _ => panic() - } + let result61 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result107, - mime_type: lifted109, - }) - } - 25 => { - let result110 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + array62.push(result61) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - @types.SchemaValueNode::PathValue(result110) - } - 26 => { - let result111 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let result64 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 24), + mbt_ffi_load32(iter_base + 28), + ) - @types.SchemaValueNode::UrlValue(result111) - } - 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 result112 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + let result65 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 32), + mbt_ffi_load32(iter_base + 36), + ) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result112, - }) - } - 30 => { - let result113 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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 - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result113, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) - _ => panic() - } + let result66 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - array115.push(lifted114) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 52)) + let result67 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - Option::Some(@types.SchemaValueTree::{ - value_nodes: array115, - root: mbt_ffi_load32(iter_base + 60), - }) - } - _ => panic() - } + array68.push(@common.Example::{ title: result66, body: result67 }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - array118.push(@common.Positional::{ - name: result77, - doc: @common.Doc::{ - summary: result78, - description: result79, - examples: array82, - }, - value_name: lifted85, - type_: mbt_ffi_load32(iter_base + 44), - default: lifted117, - required: mbt_ffi_load8_u(iter_base + 64) != 0, + let lifted71 = 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, }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 68)) - - let lifted132 : @common.TailPositional? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let result120 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 80), - mbt_ffi_load32(iter_base + 84), - ) - - let result121 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 88), - mbt_ffi_load32(iter_base + 92), - ) - - let result122 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 96), - mbt_ffi_load32(iter_base + 100), - ) - - let array125 : Array[@common.Example] = [] - for index126 = 0 - index126 < mbt_ffi_load32(iter_base + 108) - index126 = index126 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 104) + - index126 * 16 - - let result123 = 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 + 8), - mbt_ffi_load32(iter_base + 12), + 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() + } - array125.push(@common.Example::{ - title: result123, - body: result124, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 104)) - - let lifted128 : String? = match - mbt_ffi_load8_u(iter_base + 112) { - 0 => Option::None - 1 => { - let result127 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 116), - mbt_ffi_load32(iter_base + 120), - ) + @common.FlagShape::CountFlag(lifted70) + } + _ => panic() + } - Option::Some(result127) - } - _ => panic() - } + let lifted73 : 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 lifted129 : 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() - } + Option::Some(result72) + } + _ => panic() + } - let lifted131 : String? = match - mbt_ffi_load8_u(iter_base + 140) { - 0 => Option::None - 1 => { - let result130 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 144), - mbt_ffi_load32(iter_base + 148), - ) + array74.push(@common.FlagSpec::{ + long: result59, + short: lifted60, + aliases: array62, + doc: @common.Doc::{ + summary: result64, + description: result65, + examples: array68, + }, + shape: lifted71, + env_var: lifted73, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - Option::Some(result130) - } - _ => 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 - Option::Some(@common.TailPositional::{ - name: result120, - doc: @common.Doc::{ - summary: result121, - description: result122, - examples: array125, - }, - value_name: lifted128, - item_type: mbt_ffi_load32(iter_base + 124), - min: mbt_ffi_load32(iter_base + 128).reinterpret_as_uint(), - max: lifted129, - separator: lifted131, - verbatim: mbt_ffi_load8_u(iter_base + 152) != 0, - }) - } - _ => panic() - } + array76.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let array182 : Array[@common.OptionSpec] = [] - for index183 = 0 - index183 < mbt_ffi_load32(iter_base + 160) - index183 = index183 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 156) + index183 * 108 + let lifted544 : @common.CommandBody? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let array119 : Array[@common.Positional] = [] + for index120 = 0 + index120 < mbt_ffi_load32(iter_base + 72) + index120 = index120 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 68) + index120 * 68 - let result133 = mbt_ffi_ptr2str( + let result78 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted134 : 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 array136 : Array[String] = [] - for index137 = 0 - index137 < mbt_ffi_load32(iter_base + 20) - index137 = index137 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + 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 + 16)) - - let result138 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 24), - mbt_ffi_load32(iter_base + 28), + let result79 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), ) - let result139 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 32), - mbt_ffi_load32(iter_base + 36), + let result80 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), ) - let array142 : Array[@common.Example] = [] - for index143 = 0 - index143 < mbt_ffi_load32(iter_base + 44) - index143 = index143 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index143 * 16 + 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 result140 = mbt_ffi_ptr2str( + let result81 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result141 = mbt_ffi_ptr2str( + let result82 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array142.push(@common.Example::{ - title: result140, - body: result141, + array83.push(@common.Example::{ + title: result81, + body: result82, }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let lifted145 : String? = match mbt_ffi_load8_u(iter_base + 48) { + let lifted86 : String? = match mbt_ffi_load8_u(iter_base + 32) { 0 => Option::None 1 => { - let result144 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 52), - mbt_ffi_load32(iter_base + 56), - ) - - Option::Some(result144) - } - _ => panic() - } - - let lifted147 = match mbt_ffi_load8_u(iter_base + 60) { - 0 => @common.OptionShape::Scalar(mbt_ffi_load32(iter_base + 64)) - 1 => - @common.OptionShape::OptionalScalar( - mbt_ffi_load32(iter_base + 64), + let result85 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 36), + mbt_ffi_load32(iter_base + 40), ) - 2 => { - let lifted146 = 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::Repeatable(@common.RepeatableShape::{ - repetition: lifted146, - type_: mbt_ffi_load32(iter_base + 72), - }) + Option::Some(result85) } _ => panic() } - let lifted179 : @types.SchemaValueTree? = match - mbt_ffi_load8_u(iter_base + 76) { + let lifted118 : @types.SchemaValueTree? = match + mbt_ffi_load8_u(iter_base + 48) { 0 => Option::None 1 => { - let array177 : Array[@types.SchemaValueNode] = [] - for index178 = 0 - index178 < mbt_ffi_load32(iter_base + 84) - index178 = index178 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 80) + - index178 * 32 - - let lifted176 = match mbt_ffi_load8_u(iter_base + 0) { + let array116 : Array[@types.SchemaValueNode] = [] + for index117 = 0 + index117 < mbt_ffi_load32(iter_base + 56) + index117 = index117 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 52) + + index117 * 32 + + let lifted115 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -7444,29 +7736,29 @@ pub fn get_tool(name : String) -> RegisteredTool? { Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result148 = mbt_ffi_ptr2str( + let result87 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result148) + @types.SchemaValueNode::StringValue(result87) } 13 => { - let array149 : Array[Int] = [] - for index150 = 0 - index150 < mbt_ffi_load32(iter_base + 12) - index150 = index150 + 1 { + 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) + - index150 * 4 + index89 * 4 - array149.push(mbt_ffi_load32(iter_base + 0)) + array88.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array149) + @types.SchemaValueNode::RecordValue(array88) } 14 => { - let lifted151 : Int? = match + let lifted90 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -7475,7 +7767,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted151, + payload: lifted90, }) } 15 => @@ -7483,180 +7775,180 @@ pub fn get_tool(name : String) -> RegisteredTool? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array152 : Array[Bool] = [] - for index153 = 0 - index153 < mbt_ffi_load32(iter_base + 12) - index153 = index153 + 1 { + 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) + - index153 * 1 + index92 * 1 - array152.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array91.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array152) + @types.SchemaValueNode::FlagsValue(array91) } 17 => { - let array154 : Array[Int] = [] - for index155 = 0 - index155 < mbt_ffi_load32(iter_base + 12) - index155 = index155 + 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) + - index155 * 4 + index94 * 4 - array154.push(mbt_ffi_load32(iter_base + 0)) + array93.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array154) + @types.SchemaValueNode::TupleValue(array93) } 18 => { - let array156 : Array[Int] = [] - for index157 = 0 - index157 < mbt_ffi_load32(iter_base + 12) - index157 = index157 + 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) + - index157 * 4 + index96 * 4 - array156.push(mbt_ffi_load32(iter_base + 0)) + array95.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array156) + @types.SchemaValueNode::ListValue(array95) } 19 => { - let array158 : Array[Int] = [] - for index159 = 0 - index159 < mbt_ffi_load32(iter_base + 12) - index159 = index159 + 1 { + 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) + - index159 * 4 + index98 * 4 - array158.push(mbt_ffi_load32(iter_base + 0)) + array97.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array158) + @types.SchemaValueNode::FixedListValue(array97) } 20 => { - let array160 : Array[@types.MapEntry] = [] - for index161 = 0 - index161 < mbt_ffi_load32(iter_base + 12) - index161 = index161 + 1 { + 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) + - index161 * 8 + index100 * 8 - array160.push(@types.MapEntry::{ + 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)) - @types.SchemaValueNode::MapValue(array160) + @types.SchemaValueNode::MapValue(array99) } 21 => { - let lifted162 : Int? = match + let lifted101 : 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(lifted162) + @types.SchemaValueNode::OptionValue(lifted101) } 22 => { - let lifted165 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted104 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted163 : Int? = match + let lifted102 : 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(lifted163) + @types.ResultValuePayload::OkValue(lifted102) } 1 => { - let lifted164 : Int? = match + let lifted103 : 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(lifted164) + @types.ResultValuePayload::ErrValue(lifted103) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted165) + @types.SchemaValueNode::ResultValue(lifted104) } 23 => { - let result166 = mbt_ffi_ptr2str( + let result105 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted168 : String? = match + let lifted107 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result167 = mbt_ffi_ptr2str( + let result106 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result167) + Option::Some(result106) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result166, - language: lifted168, + text: result105, + language: lifted107, }) } 24 => { - let result169 = mbt_ffi_ptr2bytes( + let result108 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted171 : String? = match + let lifted110 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result170 = mbt_ffi_ptr2str( + let result109 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result170) + Option::Some(result109) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result169, - mime_type: lifted171, + bytes: result108, + mime_type: lifted110, }) } 25 => { - let result172 = mbt_ffi_ptr2str( + let result111 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result172) + @types.SchemaValueNode::PathValue(result111) } 26 => { - let result173 = mbt_ffi_ptr2str( + let result112 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result173) + @types.SchemaValueNode::UrlValue(result112) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -7668,7 +7960,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result174 = mbt_ffi_ptr2str( + let result113 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -7676,17 +7968,17 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result174, + unit: result113, }) } 30 => { - let result175 = mbt_ffi_ptr2str( + let result114 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result175, + tag: result114, body: mbt_ffi_load32(iter_base + 16), }) } @@ -7703,61 +7995,145 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array177.push(lifted176) + array116.push(lifted115) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 80)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 52)) Option::Some(@types.SchemaValueTree::{ - value_nodes: array177, - root: mbt_ffi_load32(iter_base + 88), + value_nodes: array116, + root: mbt_ffi_load32(iter_base + 60), }) } _ => panic() } - let lifted181 : String? = match mbt_ffi_load8_u(iter_base + 96) { - 0 => Option::None - 1 => { - let result180 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 100), - mbt_ffi_load32(iter_base + 104), + array119.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: lifted118, + 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 lifted133 : @common.TailPositional? = match + mbt_ffi_load8_u(iter_base + 76) { + 0 => Option::None + 1 => { + let result121 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 80), + mbt_ffi_load32(iter_base + 84), + ) + + let result122 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 88), + mbt_ffi_load32(iter_base + 92), + ) + + let result123 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 96), + mbt_ffi_load32(iter_base + 100), + ) + + let array126 : Array[@common.Example] = [] + for index127 = 0 + index127 < mbt_ffi_load32(iter_base + 108) + index127 = index127 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 104) + + index127 * 16 + + let result124 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let result125 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), ) - Option::Some(result180) + array126.push(@common.Example::{ + title: result124, + body: result125, + }) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 104)) - array182.push(@common.OptionSpec::{ - long: result133, - short: lifted134, - aliases: array136, - doc: @common.Doc::{ - summary: result138, - description: result139, - examples: array142, - }, - value_name: lifted145, - shape: lifted147, - default: lifted179, - required: mbt_ffi_load8_u(iter_base + 92) != 0, - env_var: lifted181, - }) + let lifted129 : String? = match + mbt_ffi_load8_u(iter_base + 112) { + 0 => Option::None + 1 => { + let result128 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 116), + mbt_ffi_load32(iter_base + 120), + ) + + Option::Some(result128) + } + _ => panic() + } + + let lifted130 : 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 lifted132 : String? = match + mbt_ffi_load8_u(iter_base + 140) { + 0 => Option::None + 1 => { + let result131 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 144), + mbt_ffi_load32(iter_base + 148), + ) + + Option::Some(result131) + } + _ => panic() + } + + Option::Some(@common.TailPositional::{ + name: result121, + doc: @common.Doc::{ + summary: result122, + description: result123, + examples: array126, + }, + value_name: lifted129, + item_type: mbt_ffi_load32(iter_base + 124), + min: mbt_ffi_load32(iter_base + 128).reinterpret_as_uint(), + max: lifted130, + separator: lifted132, + 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 array199 : Array[@common.FlagSpec] = [] - for index200 = 0 - index200 < mbt_ffi_load32(iter_base + 168) - index200 = index200 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 164) + index200 * 72 + let array184 : Array[@common.OptionSpec] = [] + for index185 = 0 + index185 < mbt_ffi_load32(iter_base + 160) + index185 = index185 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 156) + index185 * 112 - let result184 = mbt_ffi_ptr2str( + let result134 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted185 : Char? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted135 : Char? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some( @@ -7766,519 +8142,638 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - let array187 : Array[String] = [] - for index188 = 0 - index188 < mbt_ffi_load32(iter_base + 20) - index188 = index188 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + index188 * 8 + let array137 : Array[String] = [] + for index138 = 0 + index138 < mbt_ffi_load32(iter_base + 20) + index138 = index138 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index138 * 8 - let result186 = mbt_ffi_ptr2str( + let result136 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array187.push(result186) + array137.push(result136) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let result189 = mbt_ffi_ptr2str( + let result139 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 24), mbt_ffi_load32(iter_base + 28), ) - let result190 = mbt_ffi_ptr2str( + let result140 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 32), mbt_ffi_load32(iter_base + 36), ) - let array193 : Array[@common.Example] = [] - for index194 = 0 - index194 < mbt_ffi_load32(iter_base + 44) - index194 = index194 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 40) + index194 * 16 + let array143 : Array[@common.Example] = [] + for index144 = 0 + index144 < mbt_ffi_load32(iter_base + 44) + index144 = index144 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 40) + index144 * 16 - let result191 = mbt_ffi_ptr2str( + let result141 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let result192 = mbt_ffi_ptr2str( + let result142 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - array193.push(@common.Example::{ - title: result191, - body: result192, + array143.push(@common.Example::{ + title: result141, + body: result142, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - let lifted196 = 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, - }) + let lifted146 : String? = match mbt_ffi_load8_u(iter_base + 48) { + 0 => Option::None 1 => { - let lifted195 : 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() - } + let result145 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 52), + mbt_ffi_load32(iter_base + 56), + ) - @common.FlagShape::CountFlag(lifted195) + Option::Some(result145) } _ => panic() } - let lifted198 : String? = match mbt_ffi_load8_u(iter_base + 60) { - 0 => Option::None - 1 => { - let result197 = mbt_ffi_ptr2str( + let lifted149 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @common.OptionShape::Scalar(mbt_ffi_load32(iter_base + 64)) + 1 => + @common.OptionShape::OptionalScalar( mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), ) + 2 => { + let lifted147 = 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: lifted147, + item_type: mbt_ffi_load32(iter_base + 72), + }) + } + 3 => { + let lifted148 = 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() + } - Option::Some(result197) + @common.OptionShape::RepeatableMap(@common.RepeatableMapShape::{ + repetition: lifted148, + map_type: mbt_ffi_load32(iter_base + 72), + duplicate_key_policy: @common.DuplicateKeyPolicy::from( + mbt_ffi_load8_u(iter_base + 76), + ), + }) } _ => panic() } - array199.push(@common.FlagSpec::{ - long: result184, - short: lifted185, - aliases: array187, - doc: @common.Doc::{ - summary: result189, - description: result190, - examples: array193, - }, - shape: lifted196, - env_var: lifted198, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 164)) + let lifted181 : @types.SchemaValueTree? = match + mbt_ffi_load8_u(iter_base + 80) { + 0 => Option::None + 1 => { + let array179 : Array[@types.SchemaValueNode] = [] + for index180 = 0 + index180 < mbt_ffi_load32(iter_base + 88) + index180 = index180 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 84) + + index180 * 32 + + let lifted178 = 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 result150 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let array492 : Array[@common.Constraint] = [] - for index493 = 0 - index493 < mbt_ffi_load32(iter_base + 176) - index493 = index493 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 172) + index493 * 28 + @types.SchemaValueNode::StringValue(result150) + } + 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 lifted491 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => { - let array235 : Array[@common.Ref] = [] - for index236 = 0 - index236 < mbt_ffi_load32(iter_base + 8) - index236 = index236 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 4) + - index236 * 24 + array151.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let lifted234 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => { - let result201 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + @types.SchemaValueNode::RecordValue(array151) + } + 14 => { + let lifted153 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - @common.Ref::Present(result201) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ + case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + payload: lifted153, + }) } - 1 => { - let result202 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) + 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 array232 : Array[@types.SchemaValueNode] = [] - for index233 = 0 - index233 < mbt_ffi_load32(iter_base + 16) - index233 = index233 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index233 * 32 + array154.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let lifted231 = 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 result203 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::StringValue(result203) - } - 13 => { - 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 + @types.SchemaValueNode::FlagsValue(array154) + } + 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 - array204.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + array156.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array204) - } - 14 => { - let lifted206 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => - Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + @types.SchemaValueNode::TupleValue(array156) + } + 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 - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted206, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - 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 + array158.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array207.push( - mbt_ffi_load8_u(iter_base + 0) != 0, - ) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::ListValue(array158) + } + 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 - @types.SchemaValueNode::FlagsValue(array207) - } - 17 => { - 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 + array160.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array209.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::FixedListValue(array160) + } + 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 - @types.SchemaValueNode::TupleValue(array209) - } - 18 => { - 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 + array162.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)) - array211.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::MapValue(array162) + } + 21 => { + let lifted164 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - @types.SchemaValueNode::ListValue(array211) + @types.SchemaValueNode::OptionValue(lifted164) + } + 22 => { + let lifted167 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted165 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() } - 19 => { - 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 - - array213.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array213) + @types.ResultValuePayload::OkValue(lifted165) + } + 1 => { + let lifted166 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() } - 20 => { - 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 - - 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(array215) - } - 21 => { - let lifted217 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => - Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + @types.ResultValuePayload::ErrValue(lifted166) + } + _ => panic() + } - @types.SchemaValueNode::OptionValue(lifted217) - } - 22 => { - let lifted220 = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted218 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 16), - ) - _ => panic() - } + @types.SchemaValueNode::ResultValue(lifted167) + } + 23 => { + let result168 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.ResultValuePayload::OkValue(lifted218) - } - 1 => { - let lifted219 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 16), - ) - _ => panic() - } + let lifted170 : 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), + ) - @types.ResultValuePayload::ErrValue(lifted219) - } - _ => panic() - } + Option::Some(result169) + } + _ => panic() + } - @types.SchemaValueNode::ResultValue(lifted220) - } - 23 => { - let result221 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result168, + language: lifted170, + }) + } + 24 => { + let result171 = 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), - ) + let lifted173 : 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), + ) - Option::Some(result222) - } - _ => panic() - } + Option::Some(result172) + } + _ => panic() + } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result221, - language: lifted223, - }) - } - 24 => { - let result224 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result171, + mime_type: lifted173, + }) + } + 25 => { + let result174 = 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) { - 0 => Option::None - 1 => { - let result225 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + @types.SchemaValueNode::PathValue(result174) + } + 26 => { + let result175 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - Option::Some(result225) - } - _ => panic() - } + @types.SchemaValueNode::UrlValue(result175) + } + 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 result176 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result224, - mime_type: lifted226, - }) - } - 25 => { - let result227 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 8), + scale: mbt_ffi_load32(iter_base + 16), + unit: result176, + }) + } + 30 => { + let result177 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaValueNode::PathValue(result227) - } - 26 => { - let result228 = 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), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => panic() + } - @types.SchemaValueNode::UrlValue(result228) - } - 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 result229 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + array179.push(lifted178) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 84)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result229, - }) - } - 30 => { - let result230 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + Option::Some(@types.SchemaValueTree::{ + value_nodes: array179, + root: mbt_ffi_load32(iter_base + 92), + }) + } + _ => panic() + } - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result230, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret( - mbt_ffi_load32(iter_base + 8), - ), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) - _ => panic() - } + let lifted183 : String? = match mbt_ffi_load8_u(iter_base + 100) { + 0 => Option::None + 1 => { + let result182 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 104), + mbt_ffi_load32(iter_base + 108), + ) - array232.push(lifted231) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + Option::Some(result182) + } + _ => panic() + } - @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result202, - value: @types.SchemaValueTree::{ - value_nodes: array232, - root: mbt_ffi_load32(iter_base + 20), - }, - }) - } - _ => panic() - } + array184.push(@common.OptionSpec::{ + long: result134, + short: lifted135, + aliases: array137, + doc: @common.Doc::{ + summary: result139, + description: result140, + examples: array143, + }, + value_name: lifted146, + shape: lifted149, + default: lifted181, + required: mbt_ffi_load8_u(iter_base + 96) != 0, + env_var: lifted183, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 156)) + + let array201 : Array[@common.FlagSpec] = [] + for index202 = 0 + index202 < mbt_ffi_load32(iter_base + 168) + index202 = index202 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 164) + index202 * 72 + + let result186 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted187 : 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 array189 : Array[String] = [] + for index190 = 0 + index190 < mbt_ffi_load32(iter_base + 20) + index190 = index190 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index190 * 8 + + let result188 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array189.push(result188) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + let result191 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 24), + mbt_ffi_load32(iter_base + 28), + ) + + let result192 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 32), + mbt_ffi_load32(iter_base + 36), + ) + + let array195 : Array[@common.Example] = [] + for index196 = 0 + index196 < mbt_ffi_load32(iter_base + 44) + index196 = index196 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 40) + index196 * 16 + + let result193 = 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 + 8), + mbt_ffi_load32(iter_base + 12), + ) + + array195.push(@common.Example::{ + title: result193, + body: result194, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 40)) - array235.push(lifted234) + let lifted198 = 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 lifted197 : 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(array235) + @common.FlagShape::CountFlag(lifted197) } + _ => panic() + } + + let lifted200 : String? = match mbt_ffi_load8_u(iter_base + 60) { + 0 => Option::None 1 => { - let array271 : Array[@common.Ref] = [] - for index272 = 0 - index272 < mbt_ffi_load32(iter_base + 8) - index272 = index272 + 1 { + let result199 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) + + Option::Some(result199) + } + _ => panic() + } + + array201.push(@common.FlagSpec::{ + long: result186, + short: lifted187, + aliases: array189, + doc: @common.Doc::{ + summary: result191, + description: result192, + examples: array195, + }, + shape: lifted198, + env_var: lifted200, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 164)) + + let array494 : Array[@common.Constraint] = [] + for index495 = 0 + index495 < mbt_ffi_load32(iter_base + 176) + index495 = index495 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 172) + index495 * 28 + + let lifted493 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let array237 : Array[@common.Ref] = [] + for index238 = 0 + index238 < mbt_ffi_load32(iter_base + 8) + index238 = index238 + 1 { let iter_base = mbt_ffi_load32(iter_base + 4) + - index272 * 24 + index238 * 24 - let lifted270 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted236 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result237 = mbt_ffi_ptr2str( + let result203 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result237) + @common.Ref::Present(result203) } 1 => { - let result238 = mbt_ffi_ptr2str( + let result204 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array268 : Array[@types.SchemaValueNode] = [] - for index269 = 0 - index269 < mbt_ffi_load32(iter_base + 16) - index269 = index269 + 1 { + let array234 : Array[@types.SchemaValueNode] = [] + for index235 = 0 + index235 < mbt_ffi_load32(iter_base + 16) + index235 = index235 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index269 * 32 + index235 * 32 - let lifted267 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted233 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -8332,29 +8827,29 @@ pub fn get_tool(name : String) -> RegisteredTool? { ), ) 12 => { - let result239 = mbt_ffi_ptr2str( + let result205 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result239) + @types.SchemaValueNode::StringValue(result205) } 13 => { - let array240 : Array[Int] = [] - for index241 = 0 - index241 < mbt_ffi_load32(iter_base + 12) - index241 = index241 + 1 { + 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) + - index241 * 4 + index207 * 4 - array240.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::RecordValue(array240) + @types.SchemaValueNode::RecordValue(array206) } 14 => { - let lifted242 : Int? = match + let lifted208 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -8364,7 +8859,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted242, + payload: lifted208, }) } 15 => @@ -8372,82 +8867,82 @@ pub fn get_tool(name : String) -> RegisteredTool? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array243 : Array[Bool] = [] - for index244 = 0 - index244 < mbt_ffi_load32(iter_base + 12) - index244 = index244 + 1 { + let array209 : Array[Bool] = [] + for index210 = 0 + index210 < mbt_ffi_load32(iter_base + 12) + index210 = index210 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index244 * 1 + index210 * 1 - array243.push( + array209.push( mbt_ffi_load8_u(iter_base + 0) != 0, ) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array243) + @types.SchemaValueNode::FlagsValue(array209) } 17 => { - let array245 : Array[Int] = [] - for index246 = 0 - index246 < mbt_ffi_load32(iter_base + 12) - index246 = index246 + 1 { + 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) + - index246 * 4 + index212 * 4 - array245.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::TupleValue(array245) + @types.SchemaValueNode::TupleValue(array211) } 18 => { - let array247 : Array[Int] = [] - for index248 = 0 - index248 < mbt_ffi_load32(iter_base + 12) - index248 = index248 + 1 { + 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) + - index248 * 4 + index214 * 4 - array247.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::ListValue(array247) + @types.SchemaValueNode::ListValue(array213) } 19 => { - let array249 : Array[Int] = [] - for index250 = 0 - index250 < mbt_ffi_load32(iter_base + 12) - index250 = index250 + 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) + - index250 * 4 + index216 * 4 - array249.push(mbt_ffi_load32(iter_base + 0)) + array215.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array249) + @types.SchemaValueNode::FixedListValue(array215) } 20 => { - let array251 : Array[@types.MapEntry] = [] - for index252 = 0 - index252 < mbt_ffi_load32(iter_base + 12) - index252 = index252 + 1 { + let array217 : Array[@types.MapEntry] = [] + for index218 = 0 + index218 < mbt_ffi_load32(iter_base + 12) + index218 = index218 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index252 * 8 + index218 * 8 - array251.push(@types.MapEntry::{ + array217.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(array251) + @types.SchemaValueNode::MapValue(array217) } 21 => { - let lifted253 : Int? = match + let lifted219 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => @@ -8455,13 +8950,13 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted253) + @types.SchemaValueNode::OptionValue(lifted219) } 22 => { - let lifted256 = match + let lifted222 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted254 : Int? = match + let lifted220 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -8471,10 +8966,10 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted254) + @types.ResultValuePayload::OkValue(lifted220) } 1 => { - let lifted255 : Int? = match + let lifted221 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -8484,78 +8979,78 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted255) + @types.ResultValuePayload::ErrValue(lifted221) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted256) + @types.SchemaValueNode::ResultValue(lifted222) } 23 => { - let result257 = mbt_ffi_ptr2str( + let result223 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted259 : String? = match + let lifted225 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result258 = mbt_ffi_ptr2str( + let result224 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result258) + Option::Some(result224) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result257, - language: lifted259, + text: result223, + language: lifted225, }) } 24 => { - let result260 = mbt_ffi_ptr2bytes( + let result226 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted262 : String? = match + let lifted228 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result261 = mbt_ffi_ptr2str( + let result227 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result261) + Option::Some(result227) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result260, - mime_type: lifted262, + bytes: result226, + mime_type: lifted228, }) } 25 => { - let result263 = mbt_ffi_ptr2str( + let result229 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result263) + @types.SchemaValueNode::PathValue(result229) } 26 => { - let result264 = mbt_ffi_ptr2str( + let result230 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result264) + @types.SchemaValueNode::UrlValue(result230) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -8567,7 +9062,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result265 = mbt_ffi_ptr2str( + let result231 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -8575,17 +9070,17 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result265, + unit: result231, }) } 30 => { - let result266 = mbt_ffi_ptr2str( + let result232 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result266, + tag: result232, body: mbt_ffi_load32(iter_base + 16), }) } @@ -8604,14 +9099,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array268.push(lifted267) + array234.push(lifted233) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result238, + name: result204, value: @types.SchemaValueTree::{ - value_nodes: array268, + value_nodes: array234, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -8619,43 +9114,43 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array271.push(lifted270) + array237.push(lifted236) } mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - @common.Constraint::AllOrNone(array271) + @common.Constraint::RequiresAll(array237) } - 2 => { - let array307 : Array[@common.Ref] = [] - for index308 = 0 - index308 < mbt_ffi_load32(iter_base + 8) - index308 = index308 + 1 { + 1 => { + let array273 : Array[@common.Ref] = [] + for index274 = 0 + index274 < mbt_ffi_load32(iter_base + 8) + index274 = index274 + 1 { let iter_base = mbt_ffi_load32(iter_base + 4) + - index308 * 24 + index274 * 24 - let lifted306 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted272 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result273 = mbt_ffi_ptr2str( + let result239 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result273) + @common.Ref::Present(result239) } 1 => { - let result274 = mbt_ffi_ptr2str( + let result240 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array304 : Array[@types.SchemaValueNode] = [] - for index305 = 0 - index305 < mbt_ffi_load32(iter_base + 16) - index305 = index305 + 1 { + let array270 : Array[@types.SchemaValueNode] = [] + for index271 = 0 + index271 < mbt_ffi_load32(iter_base + 16) + index271 = index271 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index305 * 32 + index271 * 32 - let lifted303 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted269 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -8709,29 +9204,29 @@ pub fn get_tool(name : String) -> RegisteredTool? { ), ) 12 => { - let result275 = mbt_ffi_ptr2str( + let result241 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result275) + @types.SchemaValueNode::StringValue(result241) } 13 => { - let array276 : Array[Int] = [] - for index277 = 0 - index277 < mbt_ffi_load32(iter_base + 12) - index277 = index277 + 1 { + let array242 : Array[Int] = [] + for index243 = 0 + index243 < mbt_ffi_load32(iter_base + 12) + index243 = index243 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index277 * 4 + index243 * 4 - array276.push(mbt_ffi_load32(iter_base + 0)) + array242.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array276) + @types.SchemaValueNode::RecordValue(array242) } 14 => { - let lifted278 : Int? = match + let lifted244 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -8741,7 +9236,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted278, + payload: lifted244, }) } 15 => @@ -8749,82 +9244,82 @@ pub fn get_tool(name : String) -> RegisteredTool? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array279 : Array[Bool] = [] - for index280 = 0 - index280 < mbt_ffi_load32(iter_base + 12) - index280 = index280 + 1 { + let array245 : Array[Bool] = [] + for index246 = 0 + index246 < mbt_ffi_load32(iter_base + 12) + index246 = index246 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index280 * 1 + index246 * 1 - array279.push( + array245.push( mbt_ffi_load8_u(iter_base + 0) != 0, ) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array279) + @types.SchemaValueNode::FlagsValue(array245) } 17 => { - let array281 : Array[Int] = [] - for index282 = 0 - index282 < mbt_ffi_load32(iter_base + 12) - index282 = index282 + 1 { + let array247 : Array[Int] = [] + for index248 = 0 + index248 < mbt_ffi_load32(iter_base + 12) + index248 = index248 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index282 * 4 + index248 * 4 - array281.push(mbt_ffi_load32(iter_base + 0)) + array247.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array281) + @types.SchemaValueNode::TupleValue(array247) } 18 => { - let array283 : Array[Int] = [] - for index284 = 0 - index284 < mbt_ffi_load32(iter_base + 12) - index284 = index284 + 1 { + 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) + - index284 * 4 + index250 * 4 - array283.push(mbt_ffi_load32(iter_base + 0)) + array249.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array283) + @types.SchemaValueNode::ListValue(array249) } 19 => { - let array285 : Array[Int] = [] - for index286 = 0 - index286 < mbt_ffi_load32(iter_base + 12) - index286 = index286 + 1 { + 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) + - index286 * 4 + index252 * 4 - array285.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::FixedListValue(array285) + @types.SchemaValueNode::FixedListValue(array251) } 20 => { - let array287 : Array[@types.MapEntry] = [] - for index288 = 0 - index288 < mbt_ffi_load32(iter_base + 12) - index288 = index288 + 1 { + let array253 : Array[@types.MapEntry] = [] + for index254 = 0 + index254 < mbt_ffi_load32(iter_base + 12) + index254 = index254 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index288 * 8 + index254 * 8 - array287.push(@types.MapEntry::{ + array253.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(array287) + @types.SchemaValueNode::MapValue(array253) } 21 => { - let lifted289 : Int? = match + let lifted255 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => @@ -8832,13 +9327,13 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted289) + @types.SchemaValueNode::OptionValue(lifted255) } 22 => { - let lifted292 = match + let lifted258 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted290 : Int? = match + let lifted256 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -8848,10 +9343,10 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted290) + @types.ResultValuePayload::OkValue(lifted256) } 1 => { - let lifted291 : Int? = match + let lifted257 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -8861,78 +9356,78 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted291) + @types.ResultValuePayload::ErrValue(lifted257) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted292) + @types.SchemaValueNode::ResultValue(lifted258) } 23 => { - let result293 = mbt_ffi_ptr2str( + let result259 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted295 : String? = match + let lifted261 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result294 = mbt_ffi_ptr2str( + let result260 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result294) + Option::Some(result260) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result293, - language: lifted295, + text: result259, + language: lifted261, }) } 24 => { - let result296 = mbt_ffi_ptr2bytes( + let result262 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted298 : String? = match + let lifted264 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result297 = mbt_ffi_ptr2str( + let result263 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result297) + Option::Some(result263) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result296, - mime_type: lifted298, + bytes: result262, + mime_type: lifted264, }) } 25 => { - let result299 = mbt_ffi_ptr2str( + let result265 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result299) + @types.SchemaValueNode::PathValue(result265) } 26 => { - let result300 = mbt_ffi_ptr2str( + let result266 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result300) + @types.SchemaValueNode::UrlValue(result266) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -8944,7 +9439,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result301 = mbt_ffi_ptr2str( + let result267 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -8952,17 +9447,17 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result301, + unit: result267, }) } 30 => { - let result302 = mbt_ffi_ptr2str( + let result268 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result302, + tag: result268, body: mbt_ffi_load32(iter_base + 16), }) } @@ -8981,14 +9476,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array304.push(lifted303) + array270.push(lifted269) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result274, + name: result240, value: @types.SchemaValueTree::{ - value_nodes: array304, + value_nodes: array270, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -8996,712 +9491,320 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array307.push(lifted306) + array273.push(lifted272) } mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - @common.Constraint::RequiresAny(array307) + @common.Constraint::AllOrNone(array273) } - 3 => { - let array345 : Array[@common.RefGroup] = [] - for index346 = 0 - index346 < mbt_ffi_load32(iter_base + 8) - index346 = index346 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 4) + index346 * 8 - - let array343 : Array[@common.Ref] = [] - for index344 = 0 - index344 < mbt_ffi_load32(iter_base + 4) - index344 = index344 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 0) + - index344 * 24 + 2 => { + let array309 : Array[@common.Ref] = [] + for index310 = 0 + index310 < mbt_ffi_load32(iter_base + 8) + index310 = index310 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 4) + + index310 * 24 - let lifted342 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => { - let result309 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + let lifted308 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result275 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - @common.Ref::Present(result309) - } - 1 => { - let result310 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + @common.Ref::Present(result275) + } + 1 => { + let result276 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - let array340 : Array[@types.SchemaValueNode] = [] - for index341 = 0 - index341 < mbt_ffi_load32(iter_base + 16) - index341 = index341 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index341 * 32 + let array306 : Array[@types.SchemaValueNode] = [] + for index307 = 0 + index307 < mbt_ffi_load32(iter_base + 16) + index307 = index307 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index307 * 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 result311 = mbt_ffi_ptr2str( + let lifted305 = 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), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::StringValue(result311) - } - 13 => { - let array312 : Array[Int] = [] - for index313 = 0 - index313 < mbt_ffi_load32(iter_base + 12) - index313 = index313 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index313 * 4 + ), + ) + 12 => { + let result277 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - array312.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::StringValue(result277) + } + 13 => { + 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 - @types.SchemaValueNode::RecordValue(array312) + array278.push(mbt_ffi_load32(iter_base + 0)) } - 14 => { - let lifted314 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => - Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + 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: lifted314, - }) + @types.SchemaValueNode::RecordValue(array278) + } + 14 => { + let lifted280 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => + Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - let array315 : Array[Bool] = [] - for index316 = 0 - index316 < mbt_ffi_load32(iter_base + 12) - index316 = index316 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index316 * 1 - array315.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: lifted280, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + 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 - @types.SchemaValueNode::FlagsValue(array315) + array281.push( + mbt_ffi_load8_u(iter_base + 0) != 0, + ) } - 17 => { - 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 + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array317.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::FlagsValue(array281) + } + 17 => { + 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::TupleValue(array317) + array283.push(mbt_ffi_load32(iter_base + 0)) } - 18 => { - let array319 : Array[Int] = [] - for index320 = 0 - index320 < mbt_ffi_load32(iter_base + 12) - index320 = index320 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index320 * 4 + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array319.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::TupleValue(array283) + } + 18 => { + 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 - @types.SchemaValueNode::ListValue(array319) + array285.push(mbt_ffi_load32(iter_base + 0)) } - 19 => { - let array321 : Array[Int] = [] - for index322 = 0 - index322 < mbt_ffi_load32(iter_base + 12) - index322 = index322 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index322 * 4 + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array321.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaValueNode::ListValue(array285) + } + 19 => { + 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 - @types.SchemaValueNode::FixedListValue(array321) + array287.push(mbt_ffi_load32(iter_base + 0)) } - 20 => { - let array323 : Array[@types.MapEntry] = [] - for index324 = 0 - index324 < mbt_ffi_load32(iter_base + 12) - index324 = index324 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index324 * 8 + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array323.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::FixedListValue(array287) + } + 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 - @types.SchemaValueNode::MapValue(array323) + array289.push(@types.MapEntry::{ + key: mbt_ffi_load32(iter_base + 0), + value: mbt_ffi_load32(iter_base + 4), + }) } - 21 => { - let lifted325 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => - Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::OptionValue(lifted325) + @types.SchemaValueNode::MapValue(array289) + } + 21 => { + let lifted291 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => + Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() } - 22 => { - let lifted328 = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => { - 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::OkValue( - lifted326, - ) + @types.SchemaValueNode::OptionValue(lifted291) + } + 22 => { + let lifted294 = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted292 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => + Option::Some( + mbt_ffi_load32(iter_base + 16), + ) + _ => panic() } - 1 => { - let lifted327 : 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( - lifted327, - ) - } - _ => panic() + @types.ResultValuePayload::OkValue(lifted292) } - - @types.SchemaValueNode::ResultValue(lifted328) - } - 23 => { - let result329 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let lifted331 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result330 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) - - Option::Some(result330) + 1 => { + let lifted293 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => + Option::Some( + mbt_ffi_load32(iter_base + 16), + ) + _ => panic() } - _ => panic() - } - - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result329, - language: lifted331, - }) - } - 24 => { - let result332 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let lifted334 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result333 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) - Option::Some(result333) - } - _ => panic() + @types.ResultValuePayload::ErrValue(lifted293) } - - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result332, - mime_type: lifted334, - }) + _ => panic() } - 25 => { - let result335 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - @types.SchemaValueNode::PathValue(result335) - } - 26 => { - let result336 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::ResultValue(lifted294) + } + 23 => { + let result295 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaValueNode::UrlValue(result336) - } - 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 result337 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + let lifted297 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result296 = 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: result337, - }) + Option::Some(result296) + } + _ => panic() } - 30 => { - let result338 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result338, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret( - mbt_ffi_load32(iter_base + 8), - ), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) - _ => panic() + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result295, + language: lifted297, + }) } + 24 => { + let result298 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - array340.push(lifted339) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + let lifted300 : 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), + ) - @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result310, - value: @types.SchemaValueTree::{ - value_nodes: array340, - root: mbt_ffi_load32(iter_base + 20), - }, - }) - } - _ => panic() - } + Option::Some(result299) + } + _ => panic() + } - array343.push(lifted342) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result298, + mime_type: lifted300, + }) + } + 25 => { + let result301 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - array345.push(@common.RefGroup::{ refs: array343 }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) + @types.SchemaValueNode::PathValue(result301) + } + 26 => { + let result302 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @common.Constraint::MutexGroups(array345) - } - 4 => { - let array381 : Array[@common.Ref] = [] - for index382 = 0 - index382 < mbt_ffi_load32(iter_base + 12) - index382 = index382 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index382 * 24 - - let lifted380 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => { - let result347 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) - - @common.Ref::Present(result347) - } - 1 => { - let result348 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) - - let array378 : Array[@types.SchemaValueNode] = [] - for index379 = 0 - index379 < mbt_ffi_load32(iter_base + 16) - index379 = index379 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index379 * 32 - - let lifted377 = 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 result349 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::StringValue(result349) - } - 13 => { - let array350 : Array[Int] = [] - for index351 = 0 - index351 < mbt_ffi_load32(iter_base + 12) - index351 = index351 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index351 * 4 - - array350.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::RecordValue(array350) - } - 14 => { - let lifted352 : 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: lifted352, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - let array353 : Array[Bool] = [] - for index354 = 0 - index354 < mbt_ffi_load32(iter_base + 12) - index354 = index354 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index354 * 1 - - array353.push( - mbt_ffi_load8_u(iter_base + 0) != 0, - ) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FlagsValue(array353) - } - 17 => { - let array355 : Array[Int] = [] - for index356 = 0 - index356 < mbt_ffi_load32(iter_base + 12) - index356 = index356 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index356 * 4 - - array355.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::TupleValue(array355) - } - 18 => { - 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 - - array357.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::ListValue(array357) - } - 19 => { - 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 - - array359.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::FixedListValue(array359) - } - 20 => { - let array361 : Array[@types.MapEntry] = [] - for index362 = 0 - index362 < mbt_ffi_load32(iter_base + 12) - index362 = index362 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index362 * 8 - - array361.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(array361) - } - 21 => { - let lifted363 : 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(lifted363) - } - 22 => { - let lifted366 = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted364 : 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(lifted364) - } - 1 => { - let lifted365 : 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(lifted365) - } - _ => panic() - } - - @types.SchemaValueNode::ResultValue(lifted366) - } - 23 => { - let result367 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let lifted369 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result368 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) - - Option::Some(result368) - } - _ => panic() - } - - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result367, - language: lifted369, - }) - } - 24 => { - let result370 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let lifted372 : 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), - ) - - Option::Some(result371) - } - _ => panic() - } - - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result370, - mime_type: lifted372, - }) - } - 25 => { - let result373 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::PathValue(result373) - } - 26 => { - let result374 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - @types.SchemaValueNode::UrlValue(result374) + @types.SchemaValueNode::UrlValue(result302) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -9713,7 +9816,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result375 = mbt_ffi_ptr2str( + let result303 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -9721,17 +9824,17 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result375, + unit: result303, }) } 30 => { - let result376 = mbt_ffi_ptr2str( + let result304 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result376, + tag: result304, body: mbt_ffi_load32(iter_base + 16), }) } @@ -9750,14 +9853,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array378.push(lifted377) + array306.push(lifted305) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result348, + name: result276, value: @types.SchemaValueTree::{ - value_nodes: array378, + value_nodes: array306, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -9765,426 +9868,435 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array381.push(lifted380) + array309.push(lifted308) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - let array417 : Array[@common.Ref] = [] - for index418 = 0 - index418 < mbt_ffi_load32(iter_base + 24) - index418 = index418 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 20) + - index418 * 24 + mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - let lifted416 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => { - let result383 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + @common.Constraint::RequiresAny(array309) + } + 3 => { + let array347 : Array[@common.RefGroup] = [] + for index348 = 0 + index348 < mbt_ffi_load32(iter_base + 8) + index348 = index348 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 4) + index348 * 8 + + let array345 : Array[@common.Ref] = [] + for index346 = 0 + index346 < mbt_ffi_load32(iter_base + 4) + index346 = index346 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 0) + + index346 * 24 - @common.Ref::Present(result383) - } - 1 => { - let result384 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 4), - mbt_ffi_load32(iter_base + 8), - ) + let lifted344 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result311 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - let array414 : Array[@types.SchemaValueNode] = [] - for index415 = 0 - index415 < mbt_ffi_load32(iter_base + 16) - index415 = index415 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index415 * 32 + @common.Ref::Present(result311) + } + 1 => { + let result312 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) - let lifted413 = 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( + let array342 : Array[@types.SchemaValueNode] = [] + for index343 = 0 + index343 < mbt_ffi_load32(iter_base + 16) + index343 = index343 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index343 * 32 + + let lifted341 = 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), - ), - ) - 12 => { - let result385 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + ) + 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 result313 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaValueNode::StringValue(result385) - } - 13 => { - 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 + @types.SchemaValueNode::StringValue(result313) + } + 13 => { + let array314 : Array[Int] = [] + for index315 = 0 + index315 < mbt_ffi_load32(iter_base + 12) + index315 = index315 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index315 * 4 - array386.push(mbt_ffi_load32(iter_base + 0)) + array314.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::RecordValue(array314) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 14 => { + let lifted316 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => + Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - @types.SchemaValueNode::RecordValue(array386) - } - 14 => { - let lifted388 : 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: lifted316, + }) } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + let array317 : Array[Bool] = [] + for index318 = 0 + index318 < mbt_ffi_load32(iter_base + 12) + index318 = index318 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index318 * 1 - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted388, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - let array389 : Array[Bool] = [] - for index390 = 0 - index390 < mbt_ffi_load32(iter_base + 12) - index390 = index390 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index390 * 1 + array317.push( + mbt_ffi_load8_u(iter_base + 0) != 0, + ) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array389.push( - mbt_ffi_load8_u(iter_base + 0) != 0, - ) + @types.SchemaValueNode::FlagsValue(array317) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 17 => { + let array319 : Array[Int] = [] + for index320 = 0 + index320 < mbt_ffi_load32(iter_base + 12) + index320 = index320 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index320 * 4 - @types.SchemaValueNode::FlagsValue(array389) - } - 17 => { - let array391 : Array[Int] = [] - for index392 = 0 - index392 < mbt_ffi_load32(iter_base + 12) - index392 = index392 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index392 * 4 + array319.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array391.push(mbt_ffi_load32(iter_base + 0)) + @types.SchemaValueNode::TupleValue(array319) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 18 => { + let array321 : Array[Int] = [] + for index322 = 0 + index322 < mbt_ffi_load32(iter_base + 12) + index322 = index322 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index322 * 4 - @types.SchemaValueNode::TupleValue(array391) - } - 18 => { - let array393 : Array[Int] = [] - for index394 = 0 - index394 < mbt_ffi_load32(iter_base + 12) - index394 = index394 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index394 * 4 + array321.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array393.push(mbt_ffi_load32(iter_base + 0)) + @types.SchemaValueNode::ListValue(array321) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 19 => { + 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 - @types.SchemaValueNode::ListValue(array393) - } - 19 => { - let array395 : Array[Int] = [] - for index396 = 0 - index396 < mbt_ffi_load32(iter_base + 12) - index396 = index396 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index396 * 4 + array323.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array395.push(mbt_ffi_load32(iter_base + 0)) + @types.SchemaValueNode::FixedListValue(array323) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 20 => { + let array325 : Array[@types.MapEntry] = [] + for index326 = 0 + index326 < mbt_ffi_load32(iter_base + 12) + index326 = index326 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index326 * 8 - @types.SchemaValueNode::FixedListValue(array395) - } - 20 => { - let array397 : Array[@types.MapEntry] = [] - for index398 = 0 - index398 < mbt_ffi_load32(iter_base + 12) - index398 = index398 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index398 * 8 + array325.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)) - array397.push(@types.MapEntry::{ - key: mbt_ffi_load32(iter_base + 0), - value: mbt_ffi_load32(iter_base + 4), - }) + @types.SchemaValueNode::MapValue(array325) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - - @types.SchemaValueNode::MapValue(array397) - } - 21 => { - let lifted399 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => - Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + 21 => { + let lifted327 : 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(lifted327) } + 22 => { + let lifted330 = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted328 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => + Option::Some( + mbt_ffi_load32(iter_base + 16), + ) + _ => panic() + } - @types.SchemaValueNode::OptionValue(lifted399) - } - 22 => { - let lifted402 = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted400 : 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( + lifted328, + ) } + 1 => { + let lifted329 : 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(lifted400) - } - 1 => { - let lifted401 : 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( + lifted329, + ) } - - @types.ResultValuePayload::ErrValue(lifted401) + _ => panic() } - _ => panic() - } - @types.SchemaValueNode::ResultValue(lifted402) - } - 23 => { - let result403 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::ResultValue(lifted330) + } + 23 => { + let result331 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let lifted405 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result404 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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(result404) + Option::Some(result332) + } + _ => panic() } - _ => panic() - } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result403, - language: lifted405, - }) - } - 24 => { - let result406 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result331, + language: lifted333, + }) + } + 24 => { + let result334 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let lifted408 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result407 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + let lifted336 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result335 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - Option::Some(result407) + Option::Some(result335) + } + _ => panic() } - _ => panic() + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result334, + mime_type: lifted336, + }) } + 25 => { + let result337 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result406, - mime_type: lifted408, - }) - } - 25 => { - let result409 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::PathValue(result337) + } + 26 => { + let result338 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaValueNode::PathValue(result409) - } - 26 => { - let result410 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaValueNode::UrlValue(result338) + } + 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 result339 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - @types.SchemaValueNode::UrlValue(result410) - } - 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 result411 = 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: result339, + }) + } + 30 => { + let result340 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result411, - }) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result340, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret( + mbt_ffi_load32(iter_base + 8), + ), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => panic() } - 30 => { - let result412 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result412, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret( - mbt_ffi_load32(iter_base + 8), - ), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) - _ => panic() + array342.push(lifted341) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - array414.push(lifted413) + @common.Ref::ValueIs(@common.ValueIsRef::{ + name: result312, + value: @types.SchemaValueTree::{ + value_nodes: array342, + root: mbt_ffi_load32(iter_base + 20), + }, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - - @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result384, - value: @types.SchemaValueTree::{ - value_nodes: array414, - root: mbt_ffi_load32(iter_base + 20), - }, - }) + _ => panic() } - _ => panic() + + array345.push(lifted344) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 0)) - array417.push(lifted416) + array347.push(@common.RefGroup::{ refs: array345 }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 20)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 4)) - @common.Constraint::Implies(@common.ImpliesC::{ - lhs_quant: @common.Quantifier::from( - mbt_ffi_load8_u(iter_base + 4), - ), - lhs: array381, - rhs_quant: @common.Quantifier::from( - mbt_ffi_load8_u(iter_base + 16), - ), - rhs: array417, - }) + @common.Constraint::MutexGroups(array347) } - 5 => { - let array453 : Array[@common.Ref] = [] - for index454 = 0 - index454 < mbt_ffi_load32(iter_base + 12) - index454 = index454 + 1 { + 4 => { + let array383 : Array[@common.Ref] = [] + for index384 = 0 + index384 < mbt_ffi_load32(iter_base + 12) + index384 = index384 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index454 * 24 + index384 * 24 - let lifted452 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted382 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result419 = mbt_ffi_ptr2str( + let result349 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result419) + @common.Ref::Present(result349) } 1 => { - let result420 = mbt_ffi_ptr2str( + let result350 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array450 : Array[@types.SchemaValueNode] = [] - for index451 = 0 - index451 < mbt_ffi_load32(iter_base + 16) - index451 = index451 + 1 { + let array380 : Array[@types.SchemaValueNode] = [] + for index381 = 0 + index381 < mbt_ffi_load32(iter_base + 16) + index381 = index381 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index451 * 32 + index381 * 32 - let lifted449 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted379 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -10238,29 +10350,29 @@ pub fn get_tool(name : String) -> RegisteredTool? { ), ) 12 => { - let result421 = mbt_ffi_ptr2str( + let result351 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result421) + @types.SchemaValueNode::StringValue(result351) } 13 => { - let array422 : Array[Int] = [] - for index423 = 0 - index423 < mbt_ffi_load32(iter_base + 12) - index423 = index423 + 1 { + let array352 : Array[Int] = [] + for index353 = 0 + index353 < mbt_ffi_load32(iter_base + 12) + index353 = index353 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index423 * 4 + index353 * 4 - array422.push(mbt_ffi_load32(iter_base + 0)) + array352.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array422) + @types.SchemaValueNode::RecordValue(array352) } 14 => { - let lifted424 : Int? = match + let lifted354 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -10270,7 +10382,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted424, + payload: lifted354, }) } 15 => @@ -10278,82 +10390,82 @@ pub fn get_tool(name : String) -> RegisteredTool? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array425 : Array[Bool] = [] - for index426 = 0 - index426 < mbt_ffi_load32(iter_base + 12) - index426 = index426 + 1 { + let array355 : Array[Bool] = [] + for index356 = 0 + index356 < mbt_ffi_load32(iter_base + 12) + index356 = index356 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index426 * 1 + index356 * 1 - array425.push( + array355.push( mbt_ffi_load8_u(iter_base + 0) != 0, ) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array425) + @types.SchemaValueNode::FlagsValue(array355) } 17 => { - let array427 : Array[Int] = [] - for index428 = 0 - index428 < mbt_ffi_load32(iter_base + 12) - index428 = index428 + 1 { + 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) + - index428 * 4 + index358 * 4 - array427.push(mbt_ffi_load32(iter_base + 0)) + array357.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array427) + @types.SchemaValueNode::TupleValue(array357) } 18 => { - let array429 : Array[Int] = [] - for index430 = 0 - index430 < mbt_ffi_load32(iter_base + 12) - index430 = index430 + 1 { + 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) + - index430 * 4 + index360 * 4 - array429.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::ListValue(array429) + @types.SchemaValueNode::ListValue(array359) } 19 => { - let array431 : Array[Int] = [] - for index432 = 0 - index432 < mbt_ffi_load32(iter_base + 12) - index432 = index432 + 1 { + let array361 : Array[Int] = [] + for index362 = 0 + index362 < mbt_ffi_load32(iter_base + 12) + index362 = index362 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index432 * 4 + index362 * 4 - array431.push(mbt_ffi_load32(iter_base + 0)) + array361.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array431) + @types.SchemaValueNode::FixedListValue(array361) } 20 => { - let array433 : Array[@types.MapEntry] = [] - for index434 = 0 - index434 < mbt_ffi_load32(iter_base + 12) - index434 = index434 + 1 { + let array363 : Array[@types.MapEntry] = [] + for index364 = 0 + index364 < mbt_ffi_load32(iter_base + 12) + index364 = index364 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index434 * 8 + index364 * 8 - array433.push(@types.MapEntry::{ + array363.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(array433) + @types.SchemaValueNode::MapValue(array363) } 21 => { - let lifted435 : Int? = match + let lifted365 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => @@ -10361,13 +10473,13 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted435) + @types.SchemaValueNode::OptionValue(lifted365) } 22 => { - let lifted438 = match + let lifted368 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted436 : Int? = match + let lifted366 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -10377,10 +10489,10 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted436) + @types.ResultValuePayload::OkValue(lifted366) } 1 => { - let lifted437 : Int? = match + let lifted367 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -10390,78 +10502,78 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted437) + @types.ResultValuePayload::ErrValue(lifted367) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted438) + @types.SchemaValueNode::ResultValue(lifted368) } 23 => { - let result439 = mbt_ffi_ptr2str( + let result369 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted441 : String? = match + let lifted371 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result440 = mbt_ffi_ptr2str( + let result370 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result440) + Option::Some(result370) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result439, - language: lifted441, + text: result369, + language: lifted371, }) } 24 => { - let result442 = mbt_ffi_ptr2bytes( + let result372 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted444 : String? = match + let lifted374 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result443 = mbt_ffi_ptr2str( + let result373 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result443) + Option::Some(result373) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result442, - mime_type: lifted444, + bytes: result372, + mime_type: lifted374, }) } 25 => { - let result445 = mbt_ffi_ptr2str( + let result375 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result445) + @types.SchemaValueNode::PathValue(result375) } 26 => { - let result446 = mbt_ffi_ptr2str( + let result376 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result446) + @types.SchemaValueNode::UrlValue(result376) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -10473,7 +10585,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result447 = mbt_ffi_ptr2str( + let result377 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -10481,17 +10593,17 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result447, + unit: result377, }) } 30 => { - let result448 = mbt_ffi_ptr2str( + let result378 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result448, + tag: result378, body: mbt_ffi_load32(iter_base + 16), }) } @@ -10510,14 +10622,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array450.push(lifted449) + array380.push(lifted379) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result420, + name: result350, value: @types.SchemaValueTree::{ - value_nodes: array450, + value_nodes: array380, root: mbt_ffi_load32(iter_base + 20), }, }) @@ -10525,40 +10637,40 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array453.push(lifted452) + array383.push(lifted382) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let array489 : Array[@common.Ref] = [] - for index490 = 0 - index490 < mbt_ffi_load32(iter_base + 20) - index490 = index490 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + - index490 * 24 + let array419 : Array[@common.Ref] = [] + for index420 = 0 + index420 < mbt_ffi_load32(iter_base + 24) + index420 = index420 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 20) + + index420 * 24 - let lifted488 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted418 = match mbt_ffi_load8_u(iter_base + 0) { 0 => { - let result455 = mbt_ffi_ptr2str( + let result385 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - @common.Ref::Present(result455) + @common.Ref::Present(result385) } 1 => { - let result456 = mbt_ffi_ptr2str( + let result386 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 4), mbt_ffi_load32(iter_base + 8), ) - let array486 : Array[@types.SchemaValueNode] = [] - for index487 = 0 - index487 < mbt_ffi_load32(iter_base + 16) - index487 = index487 + 1 { + let array416 : Array[@types.SchemaValueNode] = [] + for index417 = 0 + index417 < mbt_ffi_load32(iter_base + 16) + index417 = index417 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index487 * 32 + index417 * 32 - let lifted485 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted415 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -10612,29 +10724,29 @@ pub fn get_tool(name : String) -> RegisteredTool? { ), ) 12 => { - let result457 = mbt_ffi_ptr2str( + let result387 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result457) + @types.SchemaValueNode::StringValue(result387) } 13 => { - let array458 : Array[Int] = [] - for index459 = 0 - index459 < mbt_ffi_load32(iter_base + 12) - index459 = index459 + 1 { + let array388 : Array[Int] = [] + for index389 = 0 + index389 < mbt_ffi_load32(iter_base + 12) + index389 = index389 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index459 * 4 + index389 * 4 - array458.push(mbt_ffi_load32(iter_base + 0)) + array388.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array458) + @types.SchemaValueNode::RecordValue(array388) } 14 => { - let lifted460 : Int? = match + let lifted390 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -10644,7 +10756,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted460, + payload: lifted390, }) } 15 => @@ -10652,82 +10764,82 @@ pub fn get_tool(name : String) -> RegisteredTool? { mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array461 : Array[Bool] = [] - for index462 = 0 - index462 < mbt_ffi_load32(iter_base + 12) - index462 = index462 + 1 { + let array391 : Array[Bool] = [] + for index392 = 0 + index392 < mbt_ffi_load32(iter_base + 12) + index392 = index392 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index462 * 1 + index392 * 1 - array461.push( + array391.push( mbt_ffi_load8_u(iter_base + 0) != 0, ) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array461) + @types.SchemaValueNode::FlagsValue(array391) } 17 => { - let array463 : Array[Int] = [] - for index464 = 0 - index464 < mbt_ffi_load32(iter_base + 12) - index464 = index464 + 1 { + let array393 : Array[Int] = [] + for index394 = 0 + index394 < mbt_ffi_load32(iter_base + 12) + index394 = index394 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index464 * 4 + index394 * 4 - array463.push(mbt_ffi_load32(iter_base + 0)) + array393.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array463) + @types.SchemaValueNode::TupleValue(array393) } 18 => { - let array465 : Array[Int] = [] - for index466 = 0 - index466 < mbt_ffi_load32(iter_base + 12) - index466 = index466 + 1 { + let array395 : Array[Int] = [] + for index396 = 0 + index396 < mbt_ffi_load32(iter_base + 12) + index396 = index396 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index466 * 4 + index396 * 4 - array465.push(mbt_ffi_load32(iter_base + 0)) + array395.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array465) + @types.SchemaValueNode::ListValue(array395) } 19 => { - let array467 : Array[Int] = [] - for index468 = 0 - index468 < mbt_ffi_load32(iter_base + 12) - index468 = index468 + 1 { + let array397 : Array[Int] = [] + for index398 = 0 + index398 < mbt_ffi_load32(iter_base + 12) + index398 = index398 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index468 * 4 + index398 * 4 - array467.push(mbt_ffi_load32(iter_base + 0)) + array397.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array467) + @types.SchemaValueNode::FixedListValue(array397) } 20 => { - let array469 : Array[@types.MapEntry] = [] - for index470 = 0 - index470 < mbt_ffi_load32(iter_base + 12) - index470 = index470 + 1 { + let array399 : Array[@types.MapEntry] = [] + for index400 = 0 + index400 < mbt_ffi_load32(iter_base + 12) + index400 = index400 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index470 * 8 + index400 * 8 - array469.push(@types.MapEntry::{ + array399.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(array469) + @types.SchemaValueNode::MapValue(array399) } 21 => { - let lifted471 : Int? = match + let lifted401 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => @@ -10735,13 +10847,13 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted471) + @types.SchemaValueNode::OptionValue(lifted401) } 22 => { - let lifted474 = match + let lifted404 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted472 : Int? = match + let lifted402 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -10751,10 +10863,10 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted472) + @types.ResultValuePayload::OkValue(lifted402) } 1 => { - let lifted473 : Int? = match + let lifted403 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => @@ -10764,78 +10876,78 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted473) + @types.ResultValuePayload::ErrValue(lifted403) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted474) + @types.SchemaValueNode::ResultValue(lifted404) } 23 => { - let result475 = mbt_ffi_ptr2str( + let result405 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted477 : String? = match + let lifted407 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result476 = mbt_ffi_ptr2str( + let result406 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result476) + Option::Some(result406) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result475, - language: lifted477, + text: result405, + language: lifted407, }) } 24 => { - let result478 = mbt_ffi_ptr2bytes( + let result408 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted480 : String? = match + let lifted410 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result479 = mbt_ffi_ptr2str( + let result409 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result479) + Option::Some(result409) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result478, - mime_type: lifted480, + bytes: result408, + mime_type: lifted410, }) } 25 => { - let result481 = mbt_ffi_ptr2str( + let result411 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result481) + @types.SchemaValueNode::PathValue(result411) } 26 => { - let result482 = mbt_ffi_ptr2str( + let result412 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result482) + @types.SchemaValueNode::UrlValue(result412) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -10847,7 +10959,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result483 = mbt_ffi_ptr2str( + let result413 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -10855,17 +10967,17 @@ pub fn get_tool(name : String) -> RegisteredTool? { @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result483, + unit: result413, }) } 30 => { - let result484 = mbt_ffi_ptr2str( + let result414 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result484, + tag: result414, body: mbt_ffi_load32(iter_base + 16), }) } @@ -10884,2959 +10996,10472 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array486.push(lifted485) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + array416.push(lifted415) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + @common.Ref::ValueIs(@common.ValueIsRef::{ + name: result386, + value: @types.SchemaValueTree::{ + value_nodes: array416, + root: mbt_ffi_load32(iter_base + 20), + }, + }) + } + _ => panic() + } + + array419.push(lifted418) + } + 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: array383, + rhs_quant: @common.Quantifier::from( + mbt_ffi_load8_u(iter_base + 16), + ), + rhs: array419, + }) + } + 5 => { + let array455 : Array[@common.Ref] = [] + for index456 = 0 + index456 < mbt_ffi_load32(iter_base + 12) + index456 = index456 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index456 * 24 + + let lifted454 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result421 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) + + @common.Ref::Present(result421) + } + 1 => { + let result422 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) + + let array452 : Array[@types.SchemaValueNode] = [] + for index453 = 0 + index453 < mbt_ffi_load32(iter_base + 16) + index453 = index453 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index453 * 32 + + let lifted451 = 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 result423 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::StringValue(result423) + } + 13 => { + let array424 : Array[Int] = [] + for index425 = 0 + index425 < mbt_ffi_load32(iter_base + 12) + index425 = index425 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index425 * 4 + + array424.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::RecordValue(array424) + } + 14 => { + let lifted426 : 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: lifted426, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + let array427 : Array[Bool] = [] + for index428 = 0 + index428 < mbt_ffi_load32(iter_base + 12) + index428 = index428 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index428 * 1 + + array427.push( + mbt_ffi_load8_u(iter_base + 0) != 0, + ) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FlagsValue(array427) + } + 17 => { + let array429 : Array[Int] = [] + for index430 = 0 + index430 < mbt_ffi_load32(iter_base + 12) + index430 = index430 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index430 * 4 + + array429.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::TupleValue(array429) + } + 18 => { + 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 + + array431.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::ListValue(array431) + } + 19 => { + 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 + + array433.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array433) + } + 20 => { + let array435 : Array[@types.MapEntry] = [] + for index436 = 0 + index436 < mbt_ffi_load32(iter_base + 12) + index436 = index436 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index436 * 8 + + array435.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(array435) + } + 21 => { + let lifted437 : 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(lifted437) + } + 22 => { + let lifted440 = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted438 : 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(lifted438) + } + 1 => { + let lifted439 : 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(lifted439) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted440) + } + 23 => { + let result441 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted443 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result442 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result442) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result441, + language: lifted443, + }) + } + 24 => { + let result444 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted446 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result445 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result445) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result444, + mime_type: lifted446, + }) + } + 25 => { + let result447 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::PathValue(result447) + } + 26 => { + let result448 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UrlValue(result448) + } + 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 result449 = 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: result449, + }) + } + 30 => { + let result450 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result450, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret( + mbt_ffi_load32(iter_base + 8), + ), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => panic() + } + + array452.push(lifted451) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + @common.Ref::ValueIs(@common.ValueIsRef::{ + name: result422, + value: @types.SchemaValueTree::{ + value_nodes: array452, + root: mbt_ffi_load32(iter_base + 20), + }, + }) + } + _ => panic() + } + + array455.push(lifted454) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + let array491 : Array[@common.Ref] = [] + for index492 = 0 + index492 < mbt_ffi_load32(iter_base + 20) + index492 = index492 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + + index492 * 24 + + let lifted490 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => { + let result457 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) + + @common.Ref::Present(result457) + } + 1 => { + let result458 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 4), + mbt_ffi_load32(iter_base + 8), + ) + + let array488 : Array[@types.SchemaValueNode] = [] + for index489 = 0 + index489 < mbt_ffi_load32(iter_base + 16) + index489 = index489 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index489 * 32 + + let lifted487 = 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 result459 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::StringValue(result459) + } + 13 => { + let array460 : Array[Int] = [] + for index461 = 0 + index461 < mbt_ffi_load32(iter_base + 12) + index461 = index461 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index461 * 4 + + array460.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::RecordValue(array460) + } + 14 => { + let lifted462 : 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: lifted462, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + let array463 : Array[Bool] = [] + for index464 = 0 + index464 < mbt_ffi_load32(iter_base + 12) + index464 = index464 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index464 * 1 + + array463.push( + mbt_ffi_load8_u(iter_base + 0) != 0, + ) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FlagsValue(array463) + } + 17 => { + 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 + + array465.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::TupleValue(array465) + } + 18 => { + 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 + + array467.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::ListValue(array467) + } + 19 => { + let array469 : Array[Int] = [] + for index470 = 0 + index470 < mbt_ffi_load32(iter_base + 12) + index470 = index470 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index470 * 4 + + array469.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array469) + } + 20 => { + let array471 : Array[@types.MapEntry] = [] + for index472 = 0 + index472 < mbt_ffi_load32(iter_base + 12) + index472 = index472 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index472 * 8 + + array471.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(array471) + } + 21 => { + let lifted473 : 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(lifted473) + } + 22 => { + let lifted476 = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted474 : 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(lifted474) + } + 1 => { + let lifted475 : 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(lifted475) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted476) + } + 23 => { + let result477 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted479 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result478 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result478) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result477, + language: lifted479, + }) + } + 24 => { + let result480 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let lifted482 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result481 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result481) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result480, + mime_type: lifted482, + }) + } + 25 => { + let result483 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::PathValue(result483) + } + 26 => { + let result484 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UrlValue(result484) + } + 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 result485 = 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: result485, + }) + } + 30 => { + let result486 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result486, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret( + mbt_ffi_load32(iter_base + 8), + ), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => panic() + } + + array488.push(lifted487) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + @common.Ref::ValueIs(@common.ValueIsRef::{ + name: result458, + value: @types.SchemaValueTree::{ + value_nodes: array488, + root: mbt_ffi_load32(iter_base + 20), + }, + }) + } + _ => panic() + } + + array491.push(lifted490) + } + 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: array455, + rhs: array491, + }) + } + _ => panic() + } + + array494.push(lifted493) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 172)) + + let lifted505 : @common.StreamSpec? = match + mbt_ffi_load8_u(iter_base + 180) { + 0 => Option::None + 1 => { + let result496 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 184), + mbt_ffi_load32(iter_base + 188), + ) + + let result497 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 192), + mbt_ffi_load32(iter_base + 196), + ) + + let array500 : Array[@common.Example] = [] + for index501 = 0 + index501 < mbt_ffi_load32(iter_base + 204) + index501 = index501 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 200) + + index501 * 16 + + let result498 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let result499 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + array500.push(@common.Example::{ + title: result498, + body: result499, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 200)) + + let array503 : Array[String] = [] + for index504 = 0 + index504 < mbt_ffi_load32(iter_base + 212) + index504 = index504 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 208) + 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 + 208)) + + Option::Some(@common.StreamSpec::{ + doc: @common.Doc::{ + summary: result496, + description: result497, + examples: array500, + }, + mime: array503, + required: mbt_ffi_load8_u(iter_base + 216) != 0, + }) + } + _ => panic() + } + + let lifted515 : @common.StreamSpec? = match + mbt_ffi_load8_u(iter_base + 220) { + 0 => Option::None + 1 => { + let result506 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 224), + mbt_ffi_load32(iter_base + 228), + ) + + let result507 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 232), + mbt_ffi_load32(iter_base + 236), + ) + + let array510 : Array[@common.Example] = [] + for index511 = 0 + index511 < mbt_ffi_load32(iter_base + 244) + index511 = index511 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 240) + + index511 * 16 + + let result508 = 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 + 8), + mbt_ffi_load32(iter_base + 12), + ) + + array510.push(@common.Example::{ + title: result508, + body: result509, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 240)) + + let array513 : Array[String] = [] + for index514 = 0 + index514 < mbt_ffi_load32(iter_base + 252) + index514 = index514 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 248) + index514 * 8 + + let result512 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array513.push(result512) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 248)) + + Option::Some(@common.StreamSpec::{ + doc: @common.Doc::{ + summary: result506, + description: result507, + examples: array510, + }, + mime: array513, + required: mbt_ffi_load8_u(iter_base + 256) != 0, + }) + } + _ => panic() + } + + let lifted532 : @common.ResultSpec? = match + mbt_ffi_load8_u(iter_base + 260) { + 0 => Option::None + 1 => { + let result516 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 268), + mbt_ffi_load32(iter_base + 272), + ) + + let result517 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 276), + mbt_ffi_load32(iter_base + 280), + ) + + let array520 : Array[@common.Example] = [] + for index521 = 0 + index521 < mbt_ffi_load32(iter_base + 288) + index521 = index521 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 284) + + index521 * 16 + + let result518 = 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 + 8), + mbt_ffi_load32(iter_base + 12), + ) + + array520.push(@common.Example::{ + title: result518, + body: result519, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 284)) + + let array529 : Array[@common.Formatter] = [] + for index530 = 0 + index530 < mbt_ffi_load32(iter_base + 296) + index530 = index530 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 292) + + index530 * 32 + + let result522 = 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 + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let result524 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + let array527 : Array[@common.Example] = [] + for index528 = 0 + index528 < mbt_ffi_load32(iter_base + 28) + index528 = index528 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + + index528 * 16 + + let result525 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let result526 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + array527.push(@common.Example::{ + title: result525, + body: result526, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + array529.push(@common.Formatter::{ + name: result522, + doc: @common.Doc::{ + summary: result523, + description: result524, + examples: array527, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 292)) + + let result531 = 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: result516, + description: result517, + examples: array520, + }, + formatters: array529, + default_formatter: result531, + }) + } + _ => panic() + } + + let array541 : Array[@common.ErrorCase] = [] + for index542 = 0 + index542 < mbt_ffi_load32(iter_base + 312) + index542 = index542 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 308) + index542 * 44 + + let result533 = 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 + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let result535 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + 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 result536 = 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 + 8), + mbt_ffi_load32(iter_base + 12), + ) + + array538.push(@common.Example::{ + title: result536, + body: result537, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + let lifted540 : Int? = match mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 40)) + _ => panic() + } + + array541.push(@common.ErrorCase::{ + name: result533, + doc: @common.Doc::{ + summary: result534, + description: result535, + examples: array538, + }, + kind: @common.ErrorKind::from(mbt_ffi_load8_u(iter_base + 32)), + exit_code: mbt_ffi_load8_u(iter_base + 33).to_byte(), + payload: lifted540, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 308)) + + let lifted543 : @common.CommandAnnotations? = match + mbt_ffi_load8_u(iter_base + 316) { + 0 => Option::None + 1 => + Option::Some(@common.CommandAnnotations::{ + read_only: mbt_ffi_load8_u(iter_base + 317) != 0, + destructive: mbt_ffi_load8_u(iter_base + 318) != 0, + idempotent: mbt_ffi_load8_u(iter_base + 319) != 0, + open_world: mbt_ffi_load8_u(iter_base + 320) != 0, + }) + _ => panic() + } + + Option::Some(@common.CommandBody::{ + positionals: @common.Positionals::{ + fixed: array119, + tail: lifted133, + }, + options: array184, + flags: array201, + constraints: array494, + stdin: lifted505, + stdout: lifted515, + result: lifted532, + errors: array541, + annotations: lifted543, + }) + } + _ => panic() + } + + array545.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: lifted544, + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 16)) + + let array743 : Array[@types.SchemaTypeNode] = [] + for index744 = 0 + index744 < mbt_ffi_load32(return_area + 28) + index744 = index744 + 1 { + let iter_base = mbt_ffi_load32(return_area + 24) + index744 * 144 + + let lifted729 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @types.SchemaTypeBody::RefType(mbt_ffi_load32(iter_base + 8)) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted553 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted548 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted547 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted547) + } + _ => panic() + } + + let lifted550 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted549 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted549) + } + _ => panic() + } + + let lifted552 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result551 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result551) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted548, + max: lifted550, + unit: lifted552, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted553) + } + 3 => { + let lifted560 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted555 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted554 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted554) + } + _ => panic() + } + + let lifted557 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted556 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted556) + } + _ => panic() + } + + let lifted559 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result558 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result558) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted555, + max: lifted557, + unit: lifted559, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted560) + } + 4 => { + let lifted567 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted562 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted561 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted561) + } + _ => panic() + } + + let lifted564 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted563 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted563) + } + _ => panic() + } + + let lifted566 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result565 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result565) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted562, + max: lifted564, + unit: lifted566, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted567) + } + 5 => { + let lifted574 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted569 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted568 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted568) + } + _ => panic() + } + + let lifted571 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted570 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted570) + } + _ => panic() + } + + let lifted573 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result572 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result572) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted569, + max: lifted571, + unit: lifted573, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted574) + } + 6 => { + let lifted581 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted576 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted575 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted575) + } + _ => panic() + } + + let lifted578 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted577 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted577) + } + _ => panic() + } + + let lifted580 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result579 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result579) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted576, + max: lifted578, + unit: lifted580, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted581) + } + 7 => { + let lifted588 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted583 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted582 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted582) + } + _ => panic() + } + + let lifted585 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted584 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted584) + } + _ => panic() + } + + let lifted587 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result586 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result586) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted583, + max: lifted585, + unit: lifted587, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted588) + } + 8 => { + let lifted595 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted590 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted589 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted589) + } + _ => panic() + } + + let lifted592 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted591 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted591) + } + _ => panic() + } + + let lifted594 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result593 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result593) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted590, + max: lifted592, + unit: lifted594, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted595) + } + 9 => { + let lifted602 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted597 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted596 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted596) + } + _ => panic() + } + + let lifted599 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted598 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted598) + } + _ => panic() + } + + let lifted601 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result600 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result600) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted597, + max: lifted599, + unit: lifted601, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted602) + } + 10 => { + let lifted609 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted604 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted603 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted603) + } + _ => panic() + } + + let lifted606 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted605 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted605) + } + _ => panic() + } + + let lifted608 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result607 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result607) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted604, + max: lifted606, + unit: lifted608, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted609) + } + 11 => { + let lifted616 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted611 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted610 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted610) + } + _ => panic() + } + + let lifted613 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted612 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted612) + } + _ => panic() + } + + let lifted615 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result614 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result614) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted611, + max: lifted613, + unit: lifted615, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted616) + } + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + let array631 : Array[@types.NamedFieldType] = [] + for index632 = 0 + index632 < mbt_ffi_load32(iter_base + 12) + index632 = index632 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index632 * 68 + + let result617 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted619 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result618 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result618) + } + _ => panic() + } + + let array621 : Array[String] = [] + for index622 = 0 + index622 < mbt_ffi_load32(iter_base + 28) + index622 = index622 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + index622 * 8 + + let result620 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array621.push(result620) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + let array624 : Array[String] = [] + for index625 = 0 + index625 < mbt_ffi_load32(iter_base + 36) + index625 = index625 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 32) + index625 * 8 + + let result623 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array624.push(result623) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + + let lifted627 : String? = match mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result626 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) + + Option::Some(result626) + } + _ => panic() + } + + let lifted630 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted629 = match mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result628 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) + + @types.Role::Other(result628) + } + _ => panic() + } + + Option::Some(lifted629) + } + _ => panic() + } + + array631.push(@types.NamedFieldType::{ + name: result617, + body: mbt_ffi_load32(iter_base + 8), + metadata: @types.MetadataEnvelope::{ + doc: lifted619, + aliases: array621, + examples: array624, + deprecated: lifted627, + role: lifted630, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::RecordType(array631) + } + 15 => { + let array648 : Array[@types.VariantCaseType] = [] + for index649 = 0 + index649 < mbt_ffi_load32(iter_base + 12) + index649 = index649 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index649 * 72 + + let result633 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted634 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + let lifted636 : String? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result635 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) + + Option::Some(result635) + } + _ => panic() + } + + let array638 : Array[String] = [] + for index639 = 0 + index639 < mbt_ffi_load32(iter_base + 32) + index639 = index639 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + 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 + 28)) + + let array641 : Array[String] = [] + for index642 = 0 + index642 < mbt_ffi_load32(iter_base + 40) + index642 = index642 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + 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 + 36)) + + let lifted644 : String? = match mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result643 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) + + Option::Some(result643) + } + _ => panic() + } + + let lifted647 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted646 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result645 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) + + @types.Role::Other(result645) + } + _ => panic() + } + + Option::Some(lifted646) + } + _ => panic() + } + + array648.push(@types.VariantCaseType::{ + name: result633, + payload: lifted634, + metadata: @types.MetadataEnvelope::{ + doc: lifted636, + aliases: array638, + examples: array641, + deprecated: lifted644, + role: lifted647, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::VariantType(array648) + } + 16 => { + let array651 : Array[String] = [] + for index652 = 0 + index652 < mbt_ffi_load32(iter_base + 12) + index652 = index652 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index652 * 8 + + let result650 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array651.push(result650) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::EnumType(array651) + } + 17 => { + let array654 : Array[String] = [] + for index655 = 0 + index655 < mbt_ffi_load32(iter_base + 12) + index655 = index655 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index655 * 8 + + let result653 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array654.push(result653) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::FlagsType(array654) + } + 18 => { + 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.SchemaTypeBody::TupleType(array656) + } + 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 lifted658 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } + + let lifted659 : 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: lifted658, + err: lifted659, + }) + } + 24 => { + let lifted663 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array661 : Array[String] = [] + for index662 = 0 + index662 < mbt_ffi_load32(iter_base + 16) + index662 = index662 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + index662 * 8 + + let result660 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array661.push(result660) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array661) + } + _ => panic() + } + + let lifted664 : 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 lifted665 : 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 lifted667 : String? = match mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result666 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) + + Option::Some(result666) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted663, + min_length: lifted664, + max_length: lifted665, + regex: lifted667, + }) + } + 25 => { + let lifted671 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array669 : Array[String] = [] + for index670 = 0 + index670 < mbt_ffi_load32(iter_base + 16) + index670 = index670 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + index670 * 8 + + let result668 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array669.push(result668) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array669) + } + _ => panic() + } + + let lifted672 : 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 lifted673 : 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: lifted671, + min_bytes: lifted672, + max_bytes: lifted673, + }) + } + 26 => { + let lifted677 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let array675 : Array[String] = [] + for index676 = 0 + index676 < mbt_ffi_load32(iter_base + 20) + index676 = index676 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index676 * 8 + + let result674 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array675.push(result674) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + Option::Some(array675) + } + _ => panic() + } + + let lifted681 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let array679 : Array[String] = [] + for index680 = 0 + index680 < mbt_ffi_load32(iter_base + 32) + index680 = index680 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + index680 * 8 + + let result678 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array679.push(result678) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + + Option::Some(array679) + } + _ => 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: lifted677, + allowed_extensions: lifted681, + }) + } + 27 => { + let lifted685 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array683 : Array[String] = [] + for index684 = 0 + index684 < mbt_ffi_load32(iter_base + 16) + index684 = index684 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + index684 * 8 + + let result682 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array683.push(result682) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + + Option::Some(array683) + } + _ => panic() + } + + let lifted689 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + let array687 : Array[String] = [] + for index688 = 0 + index688 < mbt_ffi_load32(iter_base + 28) + index688 = index688 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + index688 * 8 + + let result686 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array687.push(result686) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + + Option::Some(array687) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted685, + allowed_hosts: lifted689, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result690 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + let array692 : Array[String] = [] + for index693 = 0 + index693 < mbt_ffi_load32(iter_base + 20) + index693 = index693 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + index693 * 8 + + let result691 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array692.push(result691) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + + let lifted695 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result694 = 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: result694, + }) + } + _ => panic() + } + + let lifted697 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result696 = 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: result696, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result690, + allowed_suffixes: array692, + min: lifted695, + max: lifted697, + }) + } + 31 => { + let array721 : Array[@types.UnionBranch] = [] + for index722 = 0 + index722 < mbt_ffi_load32(iter_base + 12) + index722 = index722 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + index722 * 92 + + let result698 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted707 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result699 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Prefix(result699) + } + 1 => { + let result700 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Suffix(result700) + } + 2 => { + let result701 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Contains(result701) + } + 3 => { + let result702 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Regex(result702) + } + 4 => { + let result703 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + let lifted705 : String? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result704 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), + ) + + Option::Some(result704) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result703, + literal: lifted705, + }) + } + 5 => { + let result706 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::FieldAbsent(result706) + } + _ => panic() + } + + let lifted709 : String? = match mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result708 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) + + Option::Some(result708) + } + _ => panic() + } + + let array711 : Array[String] = [] + for index712 = 0 + index712 < mbt_ffi_load32(iter_base + 52) + index712 = index712 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 48) + index712 * 8 + + let result710 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array711.push(result710) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + + let array714 : Array[String] = [] + for index715 = 0 + index715 < mbt_ffi_load32(iter_base + 60) + index715 = index715 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + index715 * 8 + + let result713 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array714.push(result713) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + + let lifted717 : String? = match mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result716 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result716) + } + _ => panic() + } + + let lifted720 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { + 0 => Option::None + 1 => { + let lifted719 = match mbt_ffi_load8_u(iter_base + 80) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result718 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), + ) + + @types.Role::Other(result718) + } + _ => panic() + } + + Option::Some(lifted719) + } + _ => panic() + } + + array721.push(@types.UnionBranch::{ + tag: result698, + body: mbt_ffi_load32(iter_base + 8), + discriminator: lifted707, + metadata: @types.MetadataEnvelope::{ + doc: lifted709, + aliases: array711, + examples: array714, + deprecated: lifted717, + role: lifted720, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array721, + }) + } + 32 => { + let lifted724 : String? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result723 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result723) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted724, + }) + } + 33 => { + let lifted726 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result725 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result725) + } + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted726, + }) + } + 34 => { + let lifted727 : 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(lifted727) + } + 35 => { + let lifted728 : 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(lifted728) + } + _ => panic() + } + + let lifted731 : String? = match mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result730 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) + + Option::Some(result730) + } + _ => panic() + } + + let array733 : Array[String] = [] + for index734 = 0 + index734 < mbt_ffi_load32(iter_base + 104) + index734 = index734 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 100) + index734 * 8 + + let result732 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array733.push(result732) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + + let array736 : Array[String] = [] + for index737 = 0 + index737 < mbt_ffi_load32(iter_base + 112) + index737 = index737 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 108) + index737 * 8 + + let result735 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array736.push(result735) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + + let lifted739 : String? = match mbt_ffi_load8_u(iter_base + 116) { + 0 => Option::None + 1 => { + let result738 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 120), + mbt_ffi_load32(iter_base + 124), + ) + + Option::Some(result738) + } + _ => panic() + } + + let lifted742 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted741 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result740 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) + + @types.Role::Other(result740) + } + _ => panic() + } + + Option::Some(lifted741) + } + _ => panic() + } + + array743.push(@types.SchemaTypeNode::{ + body: lifted729, + metadata: @types.MetadataEnvelope::{ + doc: lifted731, + aliases: array733, + examples: array736, + deprecated: lifted739, + role: lifted742, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 24)) + + let array748 : Array[@types.SchemaTypeDef] = [] + for index749 = 0 + index749 < mbt_ffi_load32(return_area + 36) + index749 = index749 + 1 { + let iter_base = mbt_ffi_load32(return_area + 32) + index749 * 24 + + let result745 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted747 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result746 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result746) + } + _ => panic() + } + + array748.push(@types.SchemaTypeDef::{ + id: result745, + name: lifted747, + body: mbt_ffi_load32(iter_base + 20), + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 32)) + + Option::Some(RegisteredTool::{ + definition: @common.Tool::{ + version: result, + commands: @common.CommandTree::{ nodes: array545 }, + schema: @types.SchemaGraph::{ + type_nodes: array743, + defs: array748, + 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 = lifted750 + mbt_ffi_free(ptr) + mbt_ffi_free(return_area) + return ret +} + +///| +pub fn ToolRpc::tool_rpc(tool_name : String) -> ToolRpc { + 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 +} + +///| +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 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) + mbt_ffi_store32(iter_base + 8, payload327.inner) + + match payload327.category { + None => { + mbt_ffi_store8(iter_base + 12, 0) + + () + } + Some(payload329) => { + mbt_ffi_store8(iter_base + 12, 1) + + let ptr330 = mbt_ffi_str2ptr(payload329) + mbt_ffi_store32(iter_base + 20, payload329.length()) + mbt_ffi_store32(iter_base + 16, 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 @types.Secret(handle435) = payload434 + mbt_ffi_store32(iter_base + 8, handle435) + + () + } + 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(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 lifted924 = match mbt_ffi_load8_u(return_area + 0) { + 0 => { + let lifted675 : @types.TypedSchemaValue? = match + mbt_ffi_load8_u(return_area + 4) { + 0 => Option::None + 1 => { + 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 lifted623 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => @types.SchemaTypeBody::RefType(mbt_ffi_load32(iter_base + 8)) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted448 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted444 : @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 lifted446 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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() + } + + let lifted447 : 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: lifted444, + max: lifted446, + unit: lifted447, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted448) + } + 3 => { + let lifted455 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted450 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted449 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted449) + } + _ => panic() + } + + let lifted452 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted451 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted451) + } + _ => panic() + } + + let lifted454 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result453 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result453) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted450, + max: lifted452, + unit: lifted454, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted455) + } + 4 => { + let lifted462 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted457 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted456 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted456) + } + _ => panic() + } + + let lifted459 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted458 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted458) + } + _ => panic() + } + + let lifted461 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result460 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result460) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted457, + max: lifted459, + unit: lifted461, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted462) + } + 5 => { + let lifted469 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted464 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted463 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted463) + } + _ => panic() + } + + let lifted466 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted465 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted465) + } + _ => panic() + } + + let lifted468 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result467 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result467) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted464, + max: lifted466, + unit: lifted468, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted469) + } + 6 => { + let lifted476 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted471 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted470 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted470) + } + _ => panic() + } + + let lifted473 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted472 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted472) + } + _ => panic() + } + + let lifted475 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result474 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result474) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted471, + max: lifted473, + unit: lifted475, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted476) + } + 7 => { + let lifted483 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted478 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted477 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted477) + } + _ => panic() + } + + let lifted480 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted479 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted479) + } + _ => panic() + } + + let lifted482 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result481 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result481) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted478, + max: lifted480, + unit: lifted482, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted483) + } + 8 => { + let lifted490 : @types.NumericRestrictions? = 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 => { + let lifted484 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted484) + } + _ => panic() + } + + let lifted487 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted486 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted486) + } + _ => panic() + } + + let lifted489 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result488 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result488) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted485, + max: lifted487, + unit: lifted489, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted490) + } + 9 => { + let lifted497 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted492 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted491 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted491) + } + _ => panic() + } + + let lifted494 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted493 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted493) + } + _ => panic() + } + + let lifted496 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result495 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result495) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted492, + max: lifted494, + unit: lifted496, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted497) + } + 10 => { + 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 lifted498 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted498) + } + _ => panic() + } + + let lifted501 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted500 = match mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_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 lifted503 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result502 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result502) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted499, + max: lifted501, + unit: lifted503, + }) + } + _ => panic() + } + + @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 lifted505 = match mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted505) + } + _ => panic() + } + + let lifted508 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + 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 lifted510 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result509 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result509) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted506, + max: lifted508, + unit: lifted510, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted511) + } + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + 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 + + let result512 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @common.Ref::ValueIs(@common.ValueIsRef::{ - name: result456, - value: @types.SchemaValueTree::{ - value_nodes: array486, - root: mbt_ffi_load32(iter_base + 20), - }, - }) - } - _ => panic() + let lifted514 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result513 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result513) } + _ => panic() + } + + 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 + + let result515 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - array489.push(lifted488) + array.push(result515) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - @common.Constraint::Forbids(@common.ForbidsC::{ - lhs_quant: @common.Quantifier::from( - mbt_ffi_load8_u(iter_base + 4), - ), - lhs: array453, - rhs: array489, - }) - } - _ => panic() - } + 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 - array492.push(lifted491) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 172)) + let result517 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted503 : @common.StreamSpec? = match - mbt_ffi_load8_u(iter_base + 180) { - 0 => Option::None - 1 => { - let result494 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 184), - mbt_ffi_load32(iter_base + 188), - ) + array518.push(result517) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let result495 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 192), - mbt_ffi_load32(iter_base + 196), - ) + let lifted521 : String? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result520 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) - let array498 : Array[@common.Example] = [] - for index499 = 0 - index499 < mbt_ffi_load32(iter_base + 204) - index499 = index499 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 200) + - index499 * 16 + Option::Some(result520) + } + _ => panic() + } - let result496 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted524 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted523 = match mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result522 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) - let result497 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.Role::Other(result522) + } + _ => panic() + } + + Option::Some(lifted523) + } + _ => panic() + } - array498.push(@common.Example::{ - title: result496, - body: result497, + 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 + 200)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let array501 : Array[String] = [] - for index502 = 0 - index502 < mbt_ffi_load32(iter_base + 212) - index502 = index502 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 208) + index502 * 8 + @types.SchemaTypeBody::RecordType(array525) + } + 15 => { + 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 result500 = mbt_ffi_ptr2str( + let result527 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array501.push(result500) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 208)) + let lifted528 : 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.StreamSpec::{ - doc: @common.Doc::{ - summary: result494, - description: result495, - examples: array498, - }, - mime: array501, - required: mbt_ffi_load8_u(iter_base + 216) != 0, - }) - } - _ => panic() - } + let lifted530 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result529 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - let lifted513 : @common.StreamSpec? = match - mbt_ffi_load8_u(iter_base + 220) { - 0 => Option::None - 1 => { - let result504 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 224), - mbt_ffi_load32(iter_base + 228), - ) + Option::Some(result529) + } + _ => panic() + } - let result505 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 232), - mbt_ffi_load32(iter_base + 236), - ) + 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 array508 : Array[@common.Example] = [] - for index509 = 0 - index509 < mbt_ffi_load32(iter_base + 244) - index509 = index509 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 240) + - index509 * 16 + let result531 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let result506 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + array532.push(result531) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let result507 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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 - array508.push(@common.Example::{ - title: result506, - body: result507, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 240)) + let result534 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let array511 : Array[String] = [] - for index512 = 0 - index512 < mbt_ffi_load32(iter_base + 252) - index512 = index512 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 248) + index512 * 8 + array535.push(result534) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let result510 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted538 : String? = match + mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result537 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) - array511.push(result510) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 248)) + Option::Some(result537) + } + _ => panic() + } - Option::Some(@common.StreamSpec::{ - doc: @common.Doc::{ - summary: result504, - description: result505, - examples: array508, - }, - mime: array511, - required: mbt_ffi_load8_u(iter_base + 256) != 0, - }) - } - _ => panic() - } + let lifted541 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted540 = match mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result539 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) - let lifted530 : @common.ResultSpec? = match - mbt_ffi_load8_u(iter_base + 260) { - 0 => Option::None - 1 => { - let result514 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 268), - mbt_ffi_load32(iter_base + 272), - ) + @types.Role::Other(result539) + } + _ => panic() + } - let result515 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 276), - mbt_ffi_load32(iter_base + 280), - ) + Option::Some(lifted540) + } + _ => panic() + } - let array518 : Array[@common.Example] = [] - for index519 = 0 - index519 < mbt_ffi_load32(iter_base + 288) - index519 = index519 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 284) + - index519 * 16 + 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)) + + @types.SchemaTypeBody::VariantType(array542) + } + 16 => { + 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 result516 = mbt_ffi_ptr2str( + let result544 = 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 + 8), - mbt_ffi_load32(iter_base + 12), - ) - - array518.push(@common.Example::{ - title: result516, - body: result517, - }) + array545.push(result544) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 284)) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let array527 : Array[@common.Formatter] = [] - for index528 = 0 - index528 < mbt_ffi_load32(iter_base + 296) - index528 = index528 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 292) + - index528 * 32 + @types.SchemaTypeBody::EnumType(array545) + } + 17 => { + 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 - let result520 = mbt_ffi_ptr2str( + let result547 = 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 + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let result522 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) - - let array525 : Array[@common.Example] = [] - for index526 = 0 - index526 < mbt_ffi_load32(iter_base + 28) - index526 = index526 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index526 * 16 - - let result523 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + array548.push(result547) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let result524 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + @types.SchemaTypeBody::FlagsType(array548) + } + 18 => { + 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 - array525.push(@common.Example::{ - title: result523, - body: result524, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + array550.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array527.push(@common.Formatter::{ - name: result520, - doc: @common.Doc::{ - summary: result521, - description: result522, - examples: array525, - }, - }) + @types.SchemaTypeBody::TupleType(array550) + } + 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 lifted552 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 292)) - let result529 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 300), - mbt_ffi_load32(iter_base + 304), - ) + let lifted553 : Int? = match mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + _ => panic() + } - Option::Some(@common.ResultSpec::{ - type_: mbt_ffi_load32(iter_base + 264), - doc: @common.Doc::{ - summary: result514, - description: result515, - examples: array518, - }, - formatters: array527, - default_formatter: result529, + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ + ok: lifted552, + err: lifted553, }) } - _ => panic() - } + 24 => { + let lifted557 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + 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 - let array539 : Array[@common.ErrorCase] = [] - for index540 = 0 - index540 < mbt_ffi_load32(iter_base + 312) - index540 = index540 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 308) + index540 * 44 + let result554 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let result531 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + array555.push(result554) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - let result532 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + Option::Some(array555) + } + _ => panic() + } - let result533 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted558 : 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 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 lifted559 : 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 result534 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted561 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result560 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - let result535 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + Option::Some(result560) + } + _ => panic() + } - array536.push(@common.Example::{ - title: result534, - body: result535, + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted557, + min_length: lifted558, + max_length: lifted559, + regex: lifted561, }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - - let lifted538 : Int? = match mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 40)) - _ => panic() - } - - array539.push(@common.ErrorCase::{ - name: result531, - doc: @common.Doc::{ - summary: result532, - description: result533, - examples: array536, - }, - kind: @common.ErrorKind::from(mbt_ffi_load8_u(iter_base + 32)), - exit_code: mbt_ffi_load8_u(iter_base + 33).to_byte(), - payload: lifted538, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 308)) - - let lifted541 : @common.CommandAnnotations? = match - mbt_ffi_load8_u(iter_base + 316) { - 0 => Option::None - 1 => - Option::Some(@common.CommandAnnotations::{ - read_only: mbt_ffi_load8_u(iter_base + 317) != 0, - destructive: mbt_ffi_load8_u(iter_base + 318) != 0, - idempotent: mbt_ffi_load8_u(iter_base + 319) != 0, - open_world: mbt_ffi_load8_u(iter_base + 320) != 0, - }) - _ => panic() - } - - Option::Some(@common.CommandBody::{ - positionals: @common.Positionals::{ - fixed: array118, - tail: lifted132, - }, - options: array182, - flags: array199, - constraints: array492, - stdin: lifted503, - stdout: lifted513, - result: lifted530, - errors: array539, - annotations: lifted541, - }) - } - _ => panic() - } - - array543.push(@common.CommandNode::{ - name: result0, - aliases: array, - doc: @common.Doc::{ - summary: result2, - description: result3, - examples: array6, - }, - globals: @common.Globals::{ options: array56, flags: array73 }, - subcommands: array75, - body: lifted542, - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 16)) + 25 => { + let lifted565 : 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 array671 : Array[@types.SchemaTypeNode] = [] - for index672 = 0 - index672 < mbt_ffi_load32(return_area + 28) - index672 = index672 + 1 { - let iter_base = mbt_ffi_load32(return_area + 24) + index672 * 144 + let result562 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted657 = 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 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 + array563.push(result562) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - let result545 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(array563) + } + _ => panic() + } - 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), - ) + let lifted566 : 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() + } - Option::Some(result546) + let lifted567 : 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() - } - 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 + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ + mime_types: lifted565, + min_bytes: lifted566, + max_bytes: lifted567, + }) + } + 26 => { + let lifted571 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + 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 - let result548 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let result568 = 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)) + array569.push(result568) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - 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 + Option::Some(array569) + } + _ => panic() + } - let result551 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted575 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + 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 - array552.push(result551) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + let result572 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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), - ) + array573.push(result572) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(result554) + Option::Some(array573) + } + _ => 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: lifted571, + allowed_extensions: lifted575, + }) } + 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 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 => @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), + let result576 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - @types.Role::Other(result556) + array577.push(result576) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(lifted557) + Option::Some(array577) + } + _ => panic() } - _ => 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)) + let lifted583 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + 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 - @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 result580 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let result561 = 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)) - let lifted562 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + Option::Some(array581) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted579, + allowed_hosts: lifted583, + }) } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result584 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let lifted564 : String? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result563 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), + 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 + + let result585 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result563) + array586.push(result585) } - _ => 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 + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let result565 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted589 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result588 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) - array566.push(result565) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result588, + }) + } + _ => panic() + } - let array569 : Array[String] = [] - 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 lifted591 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result590 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 76), + mbt_ffi_load32(iter_base + 80), + ) - let result568 = 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: result590, + }) + } + _ => panic() + } - array569.push(result568) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result584, + allowed_suffixes: array586, + min: lifted589, + max: lifted591, + }) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + 31 => { + 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 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), + let result592 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result571) - } - _ => panic() - } + let lifted601 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result593 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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 + @types.DiscriminatorRule::Prefix(result593) + } + 1 => { + let result594 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Suffix(result594) + } + 2 => { + let result595 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Contains(result595) + } 3 => { - let result573 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), + let result596 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), ) - @types.Role::Other(result573) + @types.DiscriminatorRule::Regex(result596) } - _ => panic() - } + 4 => { + let result597 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - Option::Some(lifted574) - } - _ => panic() - } + 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), + ) - 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)) + Option::Some(result598) + } + _ => panic() + } - @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 + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result597, + literal: lifted599, + }) + } + 5 => { + let result600 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - let result578 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.DiscriminatorRule::FieldAbsent(result600) + } + _ => panic() + } - array579.push(result578) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted603 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result602 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - @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 + Option::Some(result602) + } + _ => panic() + } - let result581 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 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 - array582.push(result581) - } - 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.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 + array605.push(result604) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - array584.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 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 - @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 result607 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted587 : Int? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) - _ => panic() - } + array608.push(result607) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - @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 lifted611 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result610 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let result588 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(result610) + } + _ => panic() + } - array589.push(result588) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + let lifted614 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { + 0 => Option::None + 1 => { + let lifted613 = match mbt_ffi_load8_u(iter_base + 80) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result612 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), + ) - Option::Some(array589) - } - _ => panic() - } + @types.Role::Other(result612) + } + _ => 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() - } + Option::Some(lifted613) + } + _ => 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() - } + 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 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), - ) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array615, + }) + } + 32 => { + let lifted618 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result617 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - Option::Some(result594) + Option::Some(result617) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted618, + }) } - _ => panic() - } + 33 => { + let lifted620 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result619 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - @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 + Option::Some(result619) + } + _ => panic() + } - let result596 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted620, + }) + } + 34 => { + let lifted621 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - array597.push(result596) + @types.SchemaTypeBody::FutureType(lifted621) + } + 35 => { + let lifted622 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array597) + @types.SchemaTypeBody::StreamType(lifted622) } _ => panic() } - let lifted600 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { + let lifted625 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 24).reinterpret_as_uint(), + 1 => { + let result624 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), ) - _ => 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(), - ) + Option::Some(result624) + } _ => 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), - ) + 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 - array603.push(result602) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + let result626 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(array603) - } - _ => panic() + array627.push(result626) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - 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), - ) + 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 - array607.push(result606) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + let result629 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - Option::Some(array607) - } - _ => panic() + array630.push(result629) } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - @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) { + let lifted633 : String? = match mbt_ffi_load8_u(iter_base + 116) { 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)) + let result632 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 120), + mbt_ffi_load32(iter_base + 124), + ) - Option::Some(array611) + Option::Some(result632) } _ => panic() } - let lifted617 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { + let lifted636 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 128) { 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), - ) + let lifted635 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result634 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) - array615.push(result614) + @types.Role::Other(result634) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array615) + Option::Some(lifted635) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted613, - allowed_hosts: lifted617, + array637.push(@types.SchemaTypeNode::{ + body: lifted623, + metadata: @types.MetadataEnvelope::{ + doc: lifted625, + aliases: array627, + examples: array630, + deprecated: lifted633, + role: lifted636, + }, }) } - 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)) + mbt_ffi_free(mbt_ffi_load32(return_area + 8)) - 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), - ) + 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 - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 32), - scale: mbt_ffi_load32(iter_base + 40), - unit: result622, - }) - } - _ => panic() - } + let result639 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted625 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 56) { + let lifted641 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result624 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 76), - mbt_ffi_load32(iter_base + 80), + let result640 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), ) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result624, - }) + Option::Some(result640) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result618, - allowed_suffixes: array620, - min: lifted623, - max: lifted625, + array642.push(@types.SchemaTypeDef::{ + id: result639, + name: lifted641, + body: mbt_ffi_load32(iter_base + 20), }) } - 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), - ) + mbt_ffi_free(mbt_ffi_load32(return_area + 16)) - 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), - ) + let array673 : Array[@types.SchemaValueNode] = [] + for index674 = 0 + index674 < mbt_ffi_load32(return_area + 32) + index674 = index674 + 1 { + let iter_base = mbt_ffi_load32(return_area + 28) + index674 * 32 - @types.DiscriminatorRule::Prefix(result627) - } - 1 => { - let result628 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted672 = 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 result644 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.DiscriminatorRule::Suffix(result628) - } - 2 => { - let result629 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + @types.SchemaValueNode::StringValue(result644) + } + 13 => { + 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 - @types.DiscriminatorRule::Contains(result629) + array645.push(mbt_ffi_load32(iter_base + 0)) } - 3 => { - let result630 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.DiscriminatorRule::Regex(result630) + @types.SchemaValueNode::RecordValue(array645) + } + 14 => { + let lifted647 : Int? = match mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() } - 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.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ + case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + payload: lifted647, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + 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 - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result631, - literal: lifted633, - }) + array648.push(mbt_ffi_load8_u(iter_base + 0) != 0) } - 5 => { - let result634 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @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 - @types.DiscriminatorRule::FieldAbsent(result634) + array650.push(mbt_ffi_load32(iter_base + 0)) } - _ => panic() + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::TupleValue(array650) } + 18 => { + 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 - 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), - ) + array652.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - Option::Some(result636) + @types.SchemaValueNode::ListValue(array652) + } + 19 => { + 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 + + array654.push(mbt_ffi_load32(iter_base + 0)) } - _ => panic() + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + + @types.SchemaValueNode::FixedListValue(array654) } + 20 => { + 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 - 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 + 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)) - let result638 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaValueNode::MapValue(array656) + } + 21 => { + let lifted658 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - array639.push(result638) + @types.SchemaValueNode::OptionValue(lifted658) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + 22 => { + 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 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - 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 + @types.ResultValuePayload::OkValue(lifted659) + } + 1 => { + let lifted660 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - let result641 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.ResultValuePayload::ErrValue(lifted660) + } + _ => panic() + } - array642.push(result641) + @types.SchemaValueNode::ResultValue(lifted661) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + 23 => { + let result662 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let lifted645 : String? = match mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result644 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), - ) + let lifted664 : 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), + ) - Option::Some(result644) + Option::Some(result663) + } + _ => panic() } - _ => panic() + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result662, + language: lifted664, + }) } + 24 => { + let result665 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let lifted648 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted647 = match mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result646 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + let lifted667 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result666 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - @types.Role::Other(result646) - } - _ => panic() + Option::Some(result666) } - - Option::Some(lifted647) + _ => panic() } - _ => panic() + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result665, + mime_type: lifted667, + }) } + 25 => { + let result668 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - 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.SchemaValueNode::PathValue(result668) + } + 26 => { + let result669 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array649, - }) - } - 32 => { - let lifted652 : String? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result651 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), + @types.SchemaValueNode::UrlValue(result669) + } + 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 result670 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), ) - Option::Some(result651) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 8), + scale: mbt_ffi_load32(iter_base + 16), + unit: result670, + }) } - _ => panic() - } - - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted652, - }) - } - 33 => { - let lifted654 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result653 = mbt_ffi_ptr2str( + 30 => { + let result671 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), ) - Option::Some(result653) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result671, + body: mbt_ffi_load32(iter_base + 16), + }) } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), + ) _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted654, - }) + array673.push(lifted672) } - 34 => { - let lifted655 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32(return_area + 28)) - @types.SchemaTypeBody::FutureType(lifted655) - } - 35 => { - let lifted656 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + Option::Some(@types.TypedSchemaValue::{ + graph: @types.SchemaGraph::{ + type_nodes: array637, + defs: array642, + root: mbt_ffi_load32(return_area + 24), + }, + value: @types.SchemaValueTree::{ + value_nodes: array673, + root: mbt_ffi_load32(return_area + 36), + }, + }) + } + _ => panic() + } + + let lifted676 : @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() + } + + Result::Ok(@common.InvocationResult::{ + result: lifted675, + stdout: lifted676, + }) + } + 1 => { + let lifted923 = match mbt_ffi_load8_u(return_area + 4) { + 0 => { + let result677 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), + ) - @types.SchemaTypeBody::StreamType(lifted656) - } - _ => panic() + RpcError::ProtocolError(result677) } + 1 => { + let result678 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), + ) - let lifted659 : String? = match mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result658 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), - ) - - Option::Some(result658) - } - _ => panic() + RpcError::Denied(result678) } - - 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 result660 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + 2 => { + let result679 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), ) - array661.push(result660) + RpcError::NotFound(result679) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - - 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 result663 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + 3 => { + let result680 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), ) - array664.push(result663) + RpcError::RemoteInternalError(result680) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - - let lifted667 : String? = match mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result666 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) + 4 => { + let lifted922 = match mbt_ffi_load8_u(return_area + 8) { + 0 => { + let result681 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) - Option::Some(result666) - } - _ => panic() - } + @common.ToolError::InvalidToolName(result681) + } + 1 => { + let array683 : Array[String] = [] + for index684 = 0 + index684 < mbt_ffi_load32(return_area + 16) + index684 = index684 + 1 { + let iter_base = mbt_ffi_load32(return_area + 12) + index684 * 8 - let lifted670 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted669 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result668 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), + let result682 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - @types.Role::Other(result668) + array683.push(result682) } - _ => panic() - } - - Option::Some(lifted669) - } - _ => panic() - } - - 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(return_area + 24)) - - let array676 : Array[@types.SchemaTypeDef] = [] - for index677 = 0 - index677 < mbt_ffi_load32(return_area + 36) - index677 = index677 + 1 { - let iter_base = mbt_ffi_load32(return_area + 32) + index677 * 24 - - let result673 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + mbt_ffi_free(mbt_ffi_load32(return_area + 12)) - let lifted675 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result674 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + @common.ToolError::InvalidCommandPath(array683) + } + 2 => { + let result685 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) - Option::Some(result674) - } - _ => panic() - } + @common.ToolError::InvalidInput(result685) + } + 3 => { + let result686 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) - array676.push(@types.SchemaTypeDef::{ - id: result673, - name: lifted675, - body: mbt_ffi_load32(iter_base + 20), - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 32)) + @common.ToolError::ConstraintViolation(result686) + } + 4 => { + let result687 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) - Option::Some(RegisteredTool::{ - definition: @common.Tool::{ - version: result, - commands: @common.CommandTree::{ nodes: array543 }, - schema: @types.SchemaGraph::{ - type_nodes: array671, - defs: array676, - 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 = lifted678 - mbt_ffi_free(ptr) - mbt_ffi_free(return_area) - return ret -} + @common.ToolError::InvalidResult(result687) + } + 5 => { + let array884 : Array[@types.SchemaTypeNode] = [] + for index885 = 0 + index885 < mbt_ffi_load32(return_area + 16) + index885 = index885 + 1 { + let iter_base = mbt_ffi_load32(return_area + 12) + + index885 * 144 -///| -pub fn ToolRpc::tool_rpc(tool_name : String) -> ToolRpc { - 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 -} + let lifted870 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => + @types.SchemaTypeBody::RefType( + mbt_ffi_load32(iter_base + 8), + ) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted694 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted689 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted688 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } -///| -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(lifted688) + } + _ => panic() + } - let ToolRpc(handle) = self + let lifted691 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted690 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - 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 + Option::Some(lifted690) + } + _ => panic() + } - 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 lifted693 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result692 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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 + Option::Some(result692) + } + _ => panic() + } - match iter_elem.body { - RefType(payload) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store32(iter_base + 8, payload) + Option::Some(@types.NumericRestrictions::{ + min: lifted689, + max: lifted691, + unit: lifted693, + }) + } + _ => panic() + } - () - } - BoolType => { - mbt_ffi_store8(iter_base + 0, 1) + @types.SchemaTypeBody::S8Type(lifted694) + } + 3 => { + let lifted701 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted696 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted695 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - S8Type => { - mbt_ffi_store8(iter_base + 0, 2) + Option::Some(lifted695) + } + _ => panic() + } - () - } - S16Type => { - mbt_ffi_store8(iter_base + 0, 3) + let lifted698 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted697 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - S32Type => { - mbt_ffi_store8(iter_base + 0, 4) + Option::Some(lifted697) + } + _ => panic() + } - () - } - S64Type => { - mbt_ffi_store8(iter_base + 0, 5) + let lifted700 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result699 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - U8Type => { - mbt_ffi_store8(iter_base + 0, 6) + Option::Some(result699) + } + _ => panic() + } - () - } - U16Type => { - mbt_ffi_store8(iter_base + 0, 7) + Option::Some(@types.NumericRestrictions::{ + min: lifted696, + max: lifted698, + unit: lifted700, + }) + } + _ => panic() + } - () - } - U32Type => { - mbt_ffi_store8(iter_base + 0, 8) + @types.SchemaTypeBody::S16Type(lifted701) + } + 4 => { + let lifted708 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted703 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted702 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - U64Type => { - mbt_ffi_store8(iter_base + 0, 9) + Option::Some(lifted702) + } + _ => panic() + } - () - } - F32Type => { - mbt_ffi_store8(iter_base + 0, 10) + let lifted705 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted704 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - F64Type => { - mbt_ffi_store8(iter_base + 0, 11) + Option::Some(lifted704) + } + _ => panic() + } - () - } - CharType => { - mbt_ffi_store8(iter_base + 0, 12) + let lifted707 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result706 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - StringType => { - mbt_ffi_store8(iter_base + 0, 13) + Option::Some(result706) + } + _ => panic() + } - () - } - RecordType(payload13) => { - mbt_ffi_store8(iter_base + 0, 14) + Option::Some(@types.NumericRestrictions::{ + min: lifted703, + max: lifted705, + unit: lifted707, + }) + } + _ => panic() + } - 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.SchemaTypeBody::S32Type(lifted708) + } + 5 => { + let lifted715 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted710 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted709 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 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) + Option::Some(lifted709) + } + _ => panic() + } - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 12, 0) + let lifted712 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted711 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - Some(payload16) => { - mbt_ffi_store8(iter_base + 12, 1) + Option::Some(lifted711) + } + _ => panic() + } - 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 lifted714 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result713 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - } + Option::Some(result713) + } + _ => panic() + } - 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 + Option::Some(@types.NumericRestrictions::{ + min: lifted710, + max: lifted712, + unit: lifted714, + }) + } + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 28, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 24, address19) + @types.SchemaTypeBody::S64Type(lifted715) + } + 6 => { + let lifted722 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted717 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted716 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 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 + Option::Some(lifted716) + } + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 36, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 32, address22) + let lifted719 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted718 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 40, 0) + Option::Some(lifted718) + } + _ => panic() + } - () - } - Some(payload25) => { - mbt_ffi_store8(iter_base + 40, 1) + let lifted721 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result720 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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) + Option::Some(result720) + } + _ => panic() + } - () - } - } + Option::Some(@types.NumericRestrictions::{ + min: lifted717, + max: lifted719, + unit: lifted721, + }) + } + _ => panic() + } - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 52, 0) + @types.SchemaTypeBody::U8Type(lifted722) + } + 7 => { + let lifted729 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted724 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted723 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - Some(payload28) => { - mbt_ffi_store8(iter_base + 52, 1) + Option::Some(lifted723) + } + _ => panic() + } - match payload28 { - Multimodal => { - mbt_ffi_store8(iter_base + 56, 0) + let lifted726 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted725 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 56, 1) + Option::Some(lifted725) + } + _ => panic() + } - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 56, 2) + 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), + ) - () - } - Other(payload32) => { - mbt_ffi_store8(iter_base + 56, 3) + Option::Some(result727) + } + _ => 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) + Option::Some(@types.NumericRestrictions::{ + min: lifted724, + max: lifted726, + unit: lifted728, + }) + } + _ => panic() + } - () - } - } + @types.SchemaTypeBody::U16Type(lifted729) + } + 8 => { + let lifted736 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted731 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted730 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - } - 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) + Option::Some(lifted730) + } + _ => panic() + } - () - } - VariantType(payload36) => { - mbt_ffi_store8(iter_base + 0, 15) + let lifted733 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted732 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - 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 + Option::Some(lifted732) + } + _ => panic() + } - 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 lifted735 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result734 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - match iter_elem.payload { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(result734) + } + _ => panic() + } - () - } - Some(payload39) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload39) + Option::Some(@types.NumericRestrictions::{ + min: lifted731, + max: lifted733, + unit: lifted735, + }) + } + _ => panic() + } - () - } - } + @types.SchemaTypeBody::U32Type(lifted736) + } + 9 => { + let lifted743 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted738 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted737 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 16, 0) + Option::Some(lifted737) + } + _ => panic() + } - () - } - Some(payload41) => { - mbt_ffi_store8(iter_base + 16, 1) + let lifted740 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted739 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - 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) + Option::Some(lifted739) + } + _ => panic() + } - () - } - } + let lifted742 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result741 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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(result741) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 32, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 28, address44) + Option::Some(@types.NumericRestrictions::{ + min: lifted738, + max: lifted740, + unit: lifted742, + }) + } + _ => 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 + @types.SchemaTypeBody::U64Type(lifted743) + } + 10 => { + let lifted750 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted745 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted744 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 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) - } - mbt_ffi_store32(iter_base + 40, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 36, address47) + Option::Some(lifted744) + } + _ => panic() + } - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 44, 0) + let lifted747 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted746 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - Some(payload50) => { - mbt_ffi_store8(iter_base + 44, 1) + Option::Some(lifted746) + } + _ => panic() + } - 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 lifted749 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result748 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - } + Option::Some(result748) + } + _ => panic() + } - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 56, 0) + Option::Some(@types.NumericRestrictions::{ + min: lifted745, + max: lifted747, + unit: lifted749, + }) + } + _ => panic() + } - () - } - Some(payload53) => { - mbt_ffi_store8(iter_base + 56, 1) + @types.SchemaTypeBody::F32Type(lifted750) + } + 11 => { + let lifted757 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted752 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted751 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 payload53 { - Multimodal => { - mbt_ffi_store8(iter_base + 60, 0) + Option::Some(lifted751) + } + _ => panic() + } - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 60, 1) + let lifted754 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted753 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 60, 2) + Option::Some(lifted753) + } + _ => panic() + } - () - } - Other(payload57) => { - mbt_ffi_store8(iter_base + 60, 3) + let lifted756 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result755 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - 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) + Option::Some(result755) + } + _ => panic() + } - () - } - } + Option::Some(@types.NumericRestrictions::{ + min: lifted752, + max: lifted754, + unit: lifted756, + }) + } + _ => panic() + } - () - } - } - 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) + @types.SchemaTypeBody::F64Type(lifted757) + } + 12 => @types.SchemaTypeBody::CharType + 13 => @types.SchemaTypeBody::StringType + 14 => { + let array772 : Array[@types.NamedFieldType] = [] + for index773 = 0 + index773 < mbt_ffi_load32(iter_base + 12) + index773 = index773 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index773 * 68 - () - } - EnumType(payload61) => { - mbt_ffi_store8(iter_base + 0, 16) + let result758 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 lifted760 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result759 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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) - } - mbt_ffi_store32(iter_base + 12, payload61.length()) - mbt_ffi_store32(iter_base + 8, address63) - cleanup_list.push(address63) + Option::Some(result759) + } + _ => panic() + } - () - } - FlagsType(payload65) => { - mbt_ffi_store8(iter_base + 0, 17) + let array762 : Array[String] = [] + for index763 = 0 + index763 < mbt_ffi_load32(iter_base + 28) + index763 = index763 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + + index763 * 8 - 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 result761 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) - } - mbt_ffi_store32(iter_base + 12, payload65.length()) - mbt_ffi_store32(iter_base + 8, address67) - cleanup_list.push(address67) + array762.push(result761) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - () - } - TupleType(payload69) => { - mbt_ffi_store8(iter_base + 0, 18) + let array765 : Array[String] = [] + for index766 = 0 + index766 < mbt_ffi_load32(iter_base + 36) + index766 = index766 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 32) + + index766 * 8 - 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) + let result764 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - ListType(payload72) => { - mbt_ffi_store8(iter_base + 0, 19) - mbt_ffi_store32(iter_base + 8, payload72) + array765.push(result764) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - () - } - 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()) + let lifted768 : String? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let result767 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) - () - } - 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) + Option::Some(result767) + } + _ => panic() + } - () - } - OptionType(payload75) => { - mbt_ffi_store8(iter_base + 0, 22) - mbt_ffi_store32(iter_base + 8, payload75) + let lifted771 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 52) { + 0 => Option::None + 1 => { + let lifted770 = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result769 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 60), + mbt_ffi_load32(iter_base + 64), + ) - () - } - ResultType(payload76) => { - mbt_ffi_store8(iter_base + 0, 23) + @types.Role::Other(result769) + } + _ => panic() + } - match payload76.ok { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(lifted770) + } + _ => panic() + } - () - } - Some(payload78) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload78) + array772.push(@types.NamedFieldType::{ + name: result758, + body: mbt_ffi_load32(iter_base + 8), + metadata: @types.MetadataEnvelope::{ + doc: lifted760, + aliases: array762, + examples: array765, + deprecated: lifted768, + role: lifted771, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - } + @types.SchemaTypeBody::RecordType(array772) + } + 15 => { + let array789 : Array[@types.VariantCaseType] = [] + for index790 = 0 + index790 < mbt_ffi_load32(iter_base + 12) + index790 = index790 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index790 * 72 - match payload76.err { - None => { - mbt_ffi_store8(iter_base + 16, 0) + let result774 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - Some(payload80) => { - mbt_ffi_store8(iter_base + 16, 1) - mbt_ffi_store32(iter_base + 20, payload80) + let lifted775 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - () - } - } + let lifted777 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result776 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - () - } - TextType(payload81) => { - mbt_ffi_store8(iter_base + 0, 24) + Option::Some(result776) + } + _ => panic() + } - match payload81.languages { - None => { - mbt_ffi_store8(iter_base + 8, 0) + let array779 : Array[String] = [] + for index780 = 0 + index780 < mbt_ffi_load32(iter_base + 32) + index780 = index780 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 28) + + index780 * 8 - () - } - Some(payload83) => { - mbt_ffi_store8(iter_base + 8, 1) + let result778 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array779.push(result778) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - 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) + let array782 : Array[String] = [] + for index783 = 0 + index783 < mbt_ffi_load32(iter_base + 40) + index783 = index783 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 36) + + index783 * 8 - () - } - } + let result781 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - match payload81.min_length { - None => { - mbt_ffi_store8(iter_base + 20, 0) + array782.push(result781) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - () - } - Some(payload88) => { - mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload88.reinterpret_as_int()) + let lifted785 : String? = match + mbt_ffi_load8_u(iter_base + 44) { + 0 => Option::None + 1 => { + let result784 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 48), + mbt_ffi_load32(iter_base + 52), + ) - () - } - } + Option::Some(result784) + } + _ => panic() + } - match payload81.max_length { - None => { - mbt_ffi_store8(iter_base + 28, 0) + let lifted788 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let lifted787 = match + mbt_ffi_load8_u(iter_base + 60) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result786 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 64), + mbt_ffi_load32(iter_base + 68), + ) - () - } - Some(payload90) => { - mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload90.reinterpret_as_int()) + @types.Role::Other(result786) + } + _ => panic() + } - () - } - } + Option::Some(lifted787) + } + _ => panic() + } - match payload81.regex { - None => { - mbt_ffi_store8(iter_base + 36, 0) + array789.push(@types.VariantCaseType::{ + name: result774, + payload: lifted775, + metadata: @types.MetadataEnvelope::{ + doc: lifted777, + aliases: array779, + examples: array782, + deprecated: lifted785, + role: lifted788, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - Some(payload92) => { - mbt_ffi_store8(iter_base + 36, 1) + @types.SchemaTypeBody::VariantType(array789) + } + 16 => { + let array792 : Array[String] = [] + for index793 = 0 + index793 < mbt_ffi_load32(iter_base + 12) + index793 = index793 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index793 * 8 - 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 result791 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - } + array792.push(result791) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - BinaryType(payload94) => { - mbt_ffi_store8(iter_base + 0, 25) + @types.SchemaTypeBody::EnumType(array792) + } + 17 => { + let array795 : Array[String] = [] + for index796 = 0 + index796 < mbt_ffi_load32(iter_base + 12) + index796 = index796 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index796 * 8 - match payload94.mime_types { - None => { - mbt_ffi_store8(iter_base + 8, 0) + let result794 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - Some(payload96) => { - mbt_ffi_store8(iter_base + 8, 1) + array795.push(result794) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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::FlagsType(array795) + } + 18 => { + let array797 : Array[Int] = [] + for index798 = 0 + index798 < mbt_ffi_load32(iter_base + 12) + index798 = index798 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index798 * 4 - 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) + array797.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - } + @types.SchemaTypeBody::TupleType(array797) + } + 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 lifted799 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - match payload94.min_bytes { - None => { - mbt_ffi_store8(iter_base + 20, 0) + let lifted800 : Int? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + _ => panic() + } - () - } - Some(payload101) => { - mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload101.reinterpret_as_int()) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ + ok: lifted799, + err: lifted800, + }) + } + 24 => { + let lifted804 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array802 : Array[String] = [] + for index803 = 0 + index803 < mbt_ffi_load32(iter_base + 16) + index803 = index803 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index803 * 8 - () - } - } + let result801 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - match payload94.max_bytes { - None => { - mbt_ffi_store8(iter_base + 28, 0) + array802.push(result801) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - () - } - Some(payload103) => { - mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload103.reinterpret_as_int()) + Option::Some(array802) + } + _ => panic() + } - () - } - } + let lifted805 : 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() + } - () - } - 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()) + let lifted806 : 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() + } - match payload104.allowed_mime_types { - None => { - mbt_ffi_store8(iter_base + 12, 0) + let lifted808 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result807 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - () - } - Some(payload106) => { - mbt_ffi_store8(iter_base + 12, 1) + Option::Some(result807) + } + _ => 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 + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ + languages: lifted804, + min_length: lifted805, + max_length: lifted806, + regex: lifted808, + }) + } + 25 => { + let lifted812 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array810 : Array[String] = [] + for index811 = 0 + index811 < mbt_ffi_load32(iter_base + 16) + index811 = index811 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index811 * 8 - 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) + let result809 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - } + array810.push(result809) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - match payload104.allowed_extensions { - None => { - mbt_ffi_store8(iter_base + 24, 0) + Option::Some(array810) + } + _ => panic() + } - () - } - Some(payload111) => { - mbt_ffi_store8(iter_base + 24, 1) + let lifted813 : 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 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 lifted814 : 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 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) - } - mbt_ffi_store32(iter_base + 32, payload111.length()) - mbt_ffi_store32(iter_base + 28, address113) - cleanup_list.push(address113) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ + mime_types: lifted812, + min_bytes: lifted813, + max_bytes: lifted814, + }) + } + 26 => { + let lifted818 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let array816 : Array[String] = [] + for index817 = 0 + index817 < mbt_ffi_load32(iter_base + 20) + index817 = index817 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + + index817 * 8 - () - } - } + let result815 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - UrlType(payload115) => { - mbt_ffi_store8(iter_base + 0, 27) + array816.push(result815) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - match payload115.allowed_schemes { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(array816) + } + _ => panic() + } - () - } - Some(payload117) => { - mbt_ffi_store8(iter_base + 8, 1) + let lifted822 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + 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 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 result819 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + array820.push(result819) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - () - } - } + Option::Some(array820) + } + _ => panic() + } - match payload115.allowed_hosts { - None => { - mbt_ffi_store8(iter_base + 20, 0) + @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: lifted818, + allowed_extensions: lifted822, + }) + } + 27 => { + let lifted826 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let array824 : Array[String] = [] + for index825 = 0 + index825 < mbt_ffi_load32(iter_base + 16) + index825 = index825 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 12) + + index825 * 8 - () - } - Some(payload122) => { - mbt_ffi_store8(iter_base + 20, 1) + let result823 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array824.push(result823) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - 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) + Option::Some(array824) + } + _ => panic() + } - () - } - } + let lifted830 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + let array828 : Array[String] = [] + for index829 = 0 + index829 < mbt_ffi_load32(iter_base + 28) + index829 = index829 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 24) + + index829 * 8 - () - } - DatetimeType => { - mbt_ffi_store8(iter_base + 0, 28) + let result827 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - DurationType => { - mbt_ffi_store8(iter_base + 0, 29) + array828.push(result827) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - () - } - QuantityType(payload128) => { - mbt_ffi_store8(iter_base + 0, 30) + Option::Some(array828) + } + _ => panic() + } - 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) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted826, + allowed_hosts: lifted830, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result831 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - 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 array833 : Array[String] = [] + for index834 = 0 + index834 < mbt_ffi_load32(iter_base + 20) + index834 = index834 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 16) + + index834 * 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) + let result832 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - match payload128.min { - None => { - mbt_ffi_store8(iter_base + 24, 0) + array833.push(result832) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - () - } - 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 lifted836 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result835 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 44), + mbt_ffi_load32(iter_base + 48), + ) - 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) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result835, + }) + } + _ => panic() + } - () - } - } + let lifted838 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result837 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 76), + mbt_ffi_load32(iter_base + 80), + ) - match payload128.max { - None => { - mbt_ffi_store8(iter_base + 56, 0) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 64), + scale: mbt_ffi_load32(iter_base + 72), + unit: result837, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result831, + allowed_suffixes: array833, + min: lifted836, + max: lifted838, + }) + } + 31 => { + let array862 : Array[@types.UnionBranch] = [] + for index863 = 0 + index863 < mbt_ffi_load32(iter_base + 12) + index863 = index863 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index863 * 92 - () - } - 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 result839 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 lifted848 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result840 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - } - cleanup_list.push(ptr129) - cleanup_list.push(address131) + @types.DiscriminatorRule::Prefix(result840) + } + 1 => { + let result841 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - UnionType(payload139) => { - mbt_ffi_store8(iter_base + 0, 31) + @types.DiscriminatorRule::Suffix(result841) + } + 2 => { + let result842 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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 + @types.DiscriminatorRule::Contains(result842) + } + 3 => { + let result843 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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) + @types.DiscriminatorRule::Regex(result843) + } + 4 => { + let result844 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - match iter_elem.discriminator { - Prefix(payload141) => { - mbt_ffi_store8(iter_base + 12, 0) + let lifted846 : String? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result845 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), + ) - 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) + Option::Some(result845) + } + _ => panic() + } - () - } - Suffix(payload143) => { - mbt_ffi_store8(iter_base + 12, 1) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result844, + literal: lifted846, + }) + } + 5 => { + let result847 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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) + @types.DiscriminatorRule::FieldAbsent(result847) + } + _ => panic() + } - () - } - Contains(payload145) => { - mbt_ffi_store8(iter_base + 12, 2) + let lifted850 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result849 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) - 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) + Option::Some(result849) + } + _ => panic() + } - () - } - Regex(payload147) => { - mbt_ffi_store8(iter_base + 12, 3) + let array852 : Array[String] = [] + for index853 = 0 + index853 < mbt_ffi_load32(iter_base + 52) + index853 = index853 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 48) + + index853 * 8 - 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 result851 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - FieldEquals(payload149) => { - mbt_ffi_store8(iter_base + 12, 4) + array852.push(result851) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - 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 array855 : Array[String] = [] + for index856 = 0 + index856 < mbt_ffi_load32(iter_base + 60) + index856 = index856 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 56) + + index856 * 8 - match payload149.literal { - None => { - mbt_ffi_store8(iter_base + 24, 0) + let result854 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - Some(payload152) => { - mbt_ffi_store8(iter_base + 24, 1) + array855.push(result854) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - 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 lifted858 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result857 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - () - } - } - cleanup_list.push(ptr150) + Option::Some(result857) + } + _ => panic() + } - () - } - FieldAbsent(payload154) => { - mbt_ffi_store8(iter_base + 12, 5) + let lifted861 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { + 0 => Option::None + 1 => { + let lifted860 = match + mbt_ffi_load8_u(iter_base + 80) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result859 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), + ) - 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) + @types.Role::Other(result859) + } + _ => panic() + } - () - } - } + Option::Some(lifted860) + } + _ => panic() + } - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 36, 0) + array862.push(@types.UnionBranch::{ + tag: result839, + body: mbt_ffi_load32(iter_base + 8), + discriminator: lifted848, + metadata: @types.MetadataEnvelope::{ + doc: lifted850, + aliases: array852, + examples: array855, + deprecated: lifted858, + role: lifted861, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - Some(payload157) => { - mbt_ffi_store8(iter_base + 36, 1) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ + branches: array862, + }) + } + 32 => { + let lifted865 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result864 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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) + Option::Some(result864) + } + _ => panic() + } - () - } - } + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted865, + }) + } + 33 => { + let lifted867 : String? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result866 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - 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 + Option::Some(result866) + } + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 52, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 48, address160) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted867, + }) + } + 34 => { + let lifted868 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - 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.SchemaTypeBody::FutureType(lifted868) + } + 35 => { + let lifted869 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 60, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 56, address163) + @types.SchemaTypeBody::StreamType(lifted869) + } + _ => panic() + } - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 64, 0) + let lifted872 : String? = match + mbt_ffi_load8_u(iter_base + 88) { + 0 => Option::None + 1 => { + let result871 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 92), + mbt_ffi_load32(iter_base + 96), + ) - () - } - Some(payload166) => { - mbt_ffi_store8(iter_base + 64, 1) + Option::Some(result871) + } + _ => panic() + } - 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 array874 : Array[String] = [] + for index875 = 0 + index875 < mbt_ffi_load32(iter_base + 104) + index875 = index875 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 100) + index875 * 8 - () - } - } + let result873 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 76, 0) + array874.push(result873) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - () - } - Some(payload169) => { - mbt_ffi_store8(iter_base + 76, 1) + let array877 : Array[String] = [] + for index878 = 0 + index878 < mbt_ffi_load32(iter_base + 112) + index878 = index878 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 108) + index878 * 8 - match payload169 { - Multimodal => { - mbt_ffi_store8(iter_base + 80, 0) + let result876 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () + array877.push(result876) } - UnstructuredText => { - mbt_ffi_store8(iter_base + 80, 1) + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 80, 2) + let lifted880 : String? = match + mbt_ffi_load8_u(iter_base + 116) { + 0 => Option::None + 1 => { + let result879 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 120), + mbt_ffi_load32(iter_base + 124), + ) - () + Option::Some(result879) + } + _ => panic() } - 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) + let lifted883 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 128) { + 0 => Option::None + 1 => { + let lifted882 = match mbt_ffi_load8_u(iter_base + 132) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result881 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), + ) - () + @types.Role::Other(result881) + } + _ => panic() + } + + Option::Some(lifted882) + } + _ => panic() } - } - () - } - } - 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) + array884.push(@types.SchemaTypeNode::{ + body: lifted870, + metadata: @types.MetadataEnvelope::{ + doc: lifted872, + aliases: array874, + examples: array877, + deprecated: lifted880, + role: lifted883, + }, + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 12)) - () - } - SecretType(payload177) => { - mbt_ffi_store8(iter_base + 0, 32) - mbt_ffi_store32(iter_base + 8, payload177.inner) + let array889 : Array[@types.SchemaTypeDef] = [] + for index890 = 0 + index890 < mbt_ffi_load32(return_area + 24) + index890 = index890 + 1 { + let iter_base = mbt_ffi_load32(return_area + 20) + index890 * 24 - match payload177.category { - None => { - mbt_ffi_store8(iter_base + 12, 0) + let result886 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - Some(payload179) => { - mbt_ffi_store8(iter_base + 12, 1) + let lifted888 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result887 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - let ptr180 = mbt_ffi_str2ptr(payload179) - mbt_ffi_store32(iter_base + 20, payload179.length()) - mbt_ffi_store32(iter_base + 16, ptr180) - cleanup_list.push(ptr180) + Option::Some(result887) + } + _ => panic() + } - () - } - } + array889.push(@types.SchemaTypeDef::{ + id: result886, + name: lifted888, + body: mbt_ffi_load32(iter_base + 20), + }) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 20)) - () - } - QuotaTokenType(payload181) => { - mbt_ffi_store8(iter_base + 0, 33) + let array920 : Array[@types.SchemaValueNode] = [] + for index921 = 0 + index921 < mbt_ffi_load32(return_area + 36) + index921 = index921 + 1 { + let iter_base = mbt_ffi_load32(return_area + 32) + index921 * 32 - match payload181.resource_name { - None => { - mbt_ffi_store8(iter_base + 8, 0) + let lifted919 = 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 result891 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - () - } - Some(payload183) => { - mbt_ffi_store8(iter_base + 8, 1) + @types.SchemaValueNode::StringValue(result891) + } + 13 => { + let array892 : Array[Int] = [] + for index893 = 0 + index893 < mbt_ffi_load32(iter_base + 12) + index893 = index893 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index893 * 4 - 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) + array892.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - } + @types.SchemaValueNode::RecordValue(array892) + } + 14 => { + let lifted894 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - () - } - FutureType(payload185) => { - mbt_ffi_store8(iter_base + 0, 34) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ + case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + payload: lifted894, + }) + } + 15 => + @types.SchemaValueNode::EnumValue( + mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + ) + 16 => { + let array895 : Array[Bool] = [] + for index896 = 0 + index896 < mbt_ffi_load32(iter_base + 12) + index896 = index896 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index896 * 1 - match payload185 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + array895.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - Some(payload187) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload187) + @types.SchemaValueNode::FlagsValue(array895) + } + 17 => { + let array897 : Array[Int] = [] + for index898 = 0 + index898 < mbt_ffi_load32(iter_base + 12) + index898 = index898 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index898 * 4 - () - } - } + array897.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - StreamType(payload188) => { - mbt_ffi_store8(iter_base + 0, 35) + @types.SchemaValueNode::TupleValue(array897) + } + 18 => { + let array899 : Array[Int] = [] + for index900 = 0 + index900 < mbt_ffi_load32(iter_base + 12) + index900 = index900 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index900 * 4 - match payload188 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + array899.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - Some(payload190) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload190) + @types.SchemaValueNode::ListValue(array899) + } + 19 => { + let array901 : Array[Int] = [] + for index902 = 0 + index902 < mbt_ffi_load32(iter_base + 12) + index902 = index902 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index902 * 4 - () - } - } + array901.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - } + @types.SchemaValueNode::FixedListValue(array901) + } + 20 => { + let array903 : Array[@types.MapEntry] = [] + for index904 = 0 + index904 < mbt_ffi_load32(iter_base + 12) + index904 = index904 + 1 { + let iter_base = mbt_ffi_load32(iter_base + 8) + + index904 * 8 - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 88, 0) + array903.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(payload192) => { - mbt_ffi_store8(iter_base + 88, 1) + @types.SchemaValueNode::MapValue(array903) + } + 21 => { + let lifted905 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - 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.SchemaValueNode::OptionValue(lifted905) + } + 22 => { + let lifted908 = match mbt_ffi_load8_u(iter_base + 8) { + 0 => { + let lifted906 : 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(lifted906) + } + 1 => { + let lifted907 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => 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 + @types.ResultValuePayload::ErrValue(lifted907) + } + _ => panic() + } - 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) + @types.SchemaValueNode::ResultValue(lifted908) + } + 23 => { + let result909 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - 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 lifted911 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result910 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - 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 + 112, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 108, address198) + Option::Some(result910) + } + _ => panic() + } - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 116, 0) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result909, + language: lifted911, + }) + } + 24 => { + let result912 = mbt_ffi_ptr2bytes( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - () - } - Some(payload201) => { - mbt_ffi_store8(iter_base + 116, 1) + let lifted914 : String? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let result913 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - 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(result913) + } + _ => panic() + } - () - } - } + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result912, + mime_type: lifted914, + }) + } + 25 => { + let result915 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 128, 0) + @types.SchemaValueNode::PathValue(result915) + } + 26 => { + let result916 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - () - } - Some(payload204) => { - mbt_ffi_store8(iter_base + 128, 1) + @types.SchemaValueNode::UrlValue(result916) + } + 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 result917 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), + ) - match payload204 { - Multimodal => { - mbt_ffi_store8(iter_base + 132, 0) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 8), + scale: mbt_ffi_load32(iter_base + 16), + unit: result917, + }) + } + 30 => { + let result918 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 132, 1) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result918, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => panic() + } - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 132, 2) + array920.push(lifted919) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 32)) - () + @common.ToolError::CustomError(@types.TypedSchemaValue::{ + graph: @types.SchemaGraph::{ + type_nodes: array884, + defs: array889, + root: mbt_ffi_load32(return_area + 28), + }, + value: @types.SchemaValueTree::{ + value_nodes: array920, + root: mbt_ffi_load32(return_area + 40), + }, + }) + } + _ => panic() } - Other(payload208) => { - 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) - () - } + RpcError::RemoteToolError(lifted922) } - - () + _ => panic() } + + Result::Err(lifted923) } - cleanup_list.push(address195) - cleanup_list.push(address198) + _ => panic() } + let ret = lifted924 + mbt_ffi_free(address) + mbt_ffi_free(address360) + mbt_ffi_free(address366) + mbt_ffi_free(address438) + mbt_ffi_free(return_area) - 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 ptr212 = mbt_ffi_str2ptr(iter_elem.id) - mbt_ffi_store32(iter_base + 4, iter_elem.id.length()) - mbt_ffi_store32(iter_base + 0, ptr212) + cleanup_list.each(mbt_ffi_free) + return ret +} - match iter_elem.name { - None => { - mbt_ffi_store8(iter_base + 8, 0) +///| +pub fn ToolRpc::invoke( + self : ToolRpc, + command_path : Array[String], + input : @types.TypedSchemaValue, + stdin : @streams.InputStream?, +) -> Result[Unit, RpcError] { + let cleanup_list : Array[Int] = [] - () - } - Some(payload214) => { - mbt_ffi_store8(iter_base + 8, 1) + let ToolRpc(handle) = self - 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 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 - () - } - } - mbt_ffi_store32(iter_base + 20, iter_elem.body) - cleanup_list.push(ptr212) + 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 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 + 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 { - BoolValue(payload218) => { + match iter_elem.body { + RefType(payload) => { mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store8(iter_base + 8, if payload218 { 1 } else { 0 }) + mbt_ffi_store32(iter_base + 8, payload) () } - S8Value(payload219) => { + BoolType => { mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload219)) () } - S16Value(payload220) => { + S8Type(payload1) => { mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload220)) - - () - } - S32Value(payload221) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload221) - - () - } - S64Value(payload222) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload222) - - () - } - 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()) - - () - } - U64Value(payload226) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload226.reinterpret_as_int64()) - - () - } - F32Value(payload227) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload227) - - () - } - F64Value(payload228) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload228) + match payload1 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - () - } - CharValue(payload229) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload229.to_int()) + () + } + Some(payload3) => { + mbt_ffi_store8(iter_base + 8, 1) - () - } - StringValue(payload230) => { - mbt_ffi_store8(iter_base + 0, 12) + match payload3.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - 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) + () + } + Some(payload5) => { + mbt_ffi_store8(iter_base + 16, 1) - () - } - RecordValue(payload232) => { - mbt_ffi_store8(iter_base + 0, 13) + match payload5 { + Signed(payload6) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload6) - 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) + () + } + Unsigned(payload7) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload7.reinterpret_as_int64(), + ) - () - } - VariantValue(payload235) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload235.case.reinterpret_as_int()) + () + } + FloatBits(payload8) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload8.reinterpret_as_int64(), + ) - match payload235.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + () + } + } - () - } - Some(payload237) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload237) + () + } + } - () - } - } + match payload3.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - () - } - EnumValue(payload238) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload238.reinterpret_as_int()) + () + } + Some(payload10) => { + mbt_ffi_store8(iter_base + 40, 1) - () - } - FlagsValue(payload239) => { - mbt_ffi_store8(iter_base + 0, 16) + match payload10 { + Signed(payload11) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload11) - 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) + () + } + Unsigned(payload12) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload12.reinterpret_as_int64(), + ) - () - } - TupleValue(payload242) => { - mbt_ffi_store8(iter_base + 0, 17) + () + } + FloatBits(payload13) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload13.reinterpret_as_int64(), + ) - 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) - } - mbt_ffi_store32(iter_base + 12, payload242.length()) - mbt_ffi_store32(iter_base + 8, address243) - cleanup_list.push(address243) + () + } + } - () - } - ListValue(payload245) => { - mbt_ffi_store8(iter_base + 0, 18) + () + } + } - 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) - } - mbt_ffi_store32(iter_base + 12, payload245.length()) - mbt_ffi_store32(iter_base + 8, address246) - cleanup_list.push(address246) + match payload3.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - FixedListValue(payload248) => { - mbt_ffi_store8(iter_base + 0, 19) + () + } + Some(payload15) => { + mbt_ffi_store8(iter_base + 64, 1) - 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) - } - mbt_ffi_store32(iter_base + 12, payload248.length()) - mbt_ffi_store32(iter_base + 8, address249) - cleanup_list.push(address249) + 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) - () - } - MapValue(payload251) => { - mbt_ffi_store8(iter_base + 0, 20) + () + } + } - 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) + () + } } - mbt_ffi_store32(iter_base + 12, payload251.length()) - mbt_ffi_store32(iter_base + 8, address252) - cleanup_list.push(address252) () } - OptionValue(payload254) => { - mbt_ffi_store8(iter_base + 0, 21) + S16Type(payload17) => { + mbt_ffi_store8(iter_base + 0, 3) - match payload254 { + match payload17 { None => { mbt_ffi_store8(iter_base + 8, 0) () } - Some(payload256) => { + Some(payload19) => { mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload256) - () - } - } + match payload19.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - ResultValue(payload257) => { - mbt_ffi_store8(iter_base + 0, 22) + () + } + Some(payload21) => { + mbt_ffi_store8(iter_base + 16, 1) - match payload257 { - OkValue(payload258) => { - mbt_ffi_store8(iter_base + 8, 0) + 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 payload258 { + match payload19.max { None => { - mbt_ffi_store8(iter_base + 12, 0) + mbt_ffi_store8(iter_base + 40, 0) () } - Some(payload260) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload260) + 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(), + ) + + () + } + } () } } - () - } - ErrValue(payload261) => { - mbt_ffi_store8(iter_base + 8, 1) - - match payload261 { + match payload19.unit { None => { - mbt_ffi_store8(iter_base + 12, 0) + mbt_ffi_store8(iter_base + 64, 0) () } - Some(payload263) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload263) + 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) () } @@ -13848,6259 +21473,6064 @@ pub fn ToolRpc::invoke_and_await( () } - TextValue(payload264) => { - mbt_ffi_store8(iter_base + 0, 23) - - let ptr265 = mbt_ffi_str2ptr(payload264.text) - mbt_ffi_store32(iter_base + 12, payload264.text.length()) - mbt_ffi_store32(iter_base + 8, ptr265) + S32Type(payload33) => { + mbt_ffi_store8(iter_base + 0, 4) - match payload264.language { + match payload33 { 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) + mbt_ffi_store8(iter_base + 8, 0) () } - } - cleanup_list.push(ptr265) - - () - } - BinaryValue(payload269) => { - mbt_ffi_store8(iter_base + 0, 24) - - let ptr270 = mbt_ffi_bytes2ptr(payload269.bytes) + Some(payload35) => { + mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload269.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr270) + match payload35.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - match payload269.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + () + } + Some(payload37) => { + mbt_ffi_store8(iter_base + 16, 1) - () - } - Some(payload272) => { - 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) - 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) + () + } + Unsigned(payload39) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload39.reinterpret_as_int64(), + ) - () - } - } - cleanup_list.push(ptr270) + () + } + FloatBits(payload40) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload40.reinterpret_as_int64(), + ) - () - } - PathValue(payload274) => { - mbt_ffi_store8(iter_base + 0, 25) + () + } + } - 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) + () + } + } - () - } - UrlValue(payload276) => { - mbt_ffi_store8(iter_base + 0, 26) + match payload35.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - 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) + () + } + Some(payload42) => { + mbt_ffi_store8(iter_base + 40, 1) - () - } - 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(), - ) + match payload42 { + Signed(payload43) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload43) - () - } - DurationValue(payload279) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload279.nanoseconds) + () + } + Unsigned(payload44) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload44.reinterpret_as_int64(), + ) - () - } - 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) + () + } + FloatBits(payload45) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload45.reinterpret_as_int64(), + ) - 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) + () + } + } - () - } - UnionValue(payload282) => { - mbt_ffi_store8(iter_base + 0, 30) + () + } + } - 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) + match payload35.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - () - } - SecretValue(payload284) => { - mbt_ffi_store8(iter_base + 0, 31) + () + } + Some(payload47) => { + mbt_ffi_store8(iter_base + 64, 1) - let @types.Secret(handle285) = payload284 - mbt_ffi_store32(iter_base + 8, handle285) + 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) - () - } - QuotaTokenHandle(payload286) => { - mbt_ffi_store8(iter_base + 0, 32) + () + } + } - 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 + S64Type(payload49) => { + mbt_ffi_store8(iter_base + 0, 5) - (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, - ) + match payload49 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted634 = match mbt_ffi_load8_u(return_area + 0) { - 0 => { - let lifted455 : @types.TypedSchemaValue? = match - mbt_ffi_load8_u(return_area + 4) { - 0 => Option::None - 1 => { - 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 + () + } + Some(payload51) => { + mbt_ffi_store8(iter_base + 8, 1) - let lifted403 = 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 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 + match payload51.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - let result = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload53) => { + mbt_ffi_store8(iter_base + 16, 1) - let lifted : String? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result294 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match payload53 { + Signed(payload54) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload54) - Option::Some(result294) - } - _ => panic() + () } - - 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 - - let result295 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + Unsigned(payload55) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload55.reinterpret_as_int64(), ) - array.push(result295) + () } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - - 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 - - let result297 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + FloatBits(payload56) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload56.reinterpret_as_int64(), ) - array298.push(result297) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - - let lifted301 : String? = match - mbt_ffi_load8_u(iter_base + 40) { - 0 => Option::None - 1 => { - let result300 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) - - Option::Some(result300) - } - _ => panic() + () } + } - let lifted304 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { - 0 => Option::None - 1 => { - let lifted303 = match mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result302 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), - ) - - @types.Role::Other(result302) - } - _ => panic() - } - - Option::Some(lifted303) - } - _ => panic() - } + () + } + } - 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)) + match payload51.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - @types.SchemaTypeBody::RecordType(array305) + () } - 15 => { - 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 + Some(payload58) => { + mbt_ffi_store8(iter_base + 40, 1) - let result307 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload58 { + Signed(payload59) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload59) - let lifted308 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + () } + Unsigned(payload60) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload60.reinterpret_as_int64(), + ) - let lifted310 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result309 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + () + } + FloatBits(payload61) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload61.reinterpret_as_int64(), + ) - Option::Some(result309) - } - _ => panic() + () } + } - 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 + () + } + } - let result311 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload51.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - array312.push(result311) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + () + } + Some(payload63) => { + mbt_ffi_store8(iter_base + 64, 1) - 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 + 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 result314 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array315.push(result314) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + () + } + } - let lifted318 : String? = match - mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result317 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + () + } + U8Type(payload65) => { + mbt_ffi_store8(iter_base + 0, 6) - Option::Some(result317) - } - _ => panic() - } + match payload65 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted321 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted320 = match mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result319 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + () + } + Some(payload67) => { + mbt_ffi_store8(iter_base + 8, 1) - @types.Role::Other(result319) - } - _ => panic() - } + match payload67.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - Option::Some(lifted320) - } - _ => panic() + () + } + 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(), + ) - array322.push(@types.VariantCaseType::{ - name: result307, - payload: lifted308, - metadata: @types.MetadataEnvelope::{ - doc: lifted310, - aliases: array312, - examples: array315, - deprecated: lifted318, - role: lifted321, - }, - }) + () + } + FloatBits(payload72) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload72.reinterpret_as_int64(), + ) + + () + } } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @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 - - let result324 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + } - array325.push(result324) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload67.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - @types.SchemaTypeBody::EnumType(array325) + () } - 17 => { - 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 + Some(payload74) => { + mbt_ffi_store8(iter_base + 40, 1) - let result327 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload74 { + Signed(payload75) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload75) - array328.push(result327) + () + } + 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(), + ) + + () + } } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array328) + () } - 18 => { - 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 + } - array330.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload67.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - @types.SchemaTypeBody::TupleType(array330) + () } - 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 lifted332 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + Some(payload79) => { + mbt_ffi_store8(iter_base + 64, 1) - let lifted333 : Int? = match mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) - _ => panic() - } + 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.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 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 + } - let result334 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array335.push(result334) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + () + } + U16Type(payload81) => { + mbt_ffi_store8(iter_base + 0, 7) - Option::Some(array335) - } - _ => panic() - } + match payload81 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted338 : 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() - } + () + } + Some(payload83) => { + mbt_ffi_store8(iter_base + 8, 1) - let lifted339 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { - 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 32).reinterpret_as_uint(), + 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(), ) - _ => panic() - } - let lifted341 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result340 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), + () + } + FloatBits(payload88) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload88.reinterpret_as_int64(), ) - Option::Some(result340) + () } - _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted337, - min_length: lifted338, - max_length: lifted339, - regex: lifted341, - }) + () } - 25 => { - let lifted345 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - 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 + } - let result342 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload83.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - array343.push(result342) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + () + } + Some(payload90) => { + mbt_ffi_store8(iter_base + 40, 1) - Option::Some(array343) - } - _ => panic() - } + match payload90 { + Signed(payload91) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload91) - 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(), + () + } + Unsigned(payload92) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload92.reinterpret_as_int64(), ) - _ => panic() - } - let lifted347 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { - 0 => Option::None - 1 => - Option::Some( - mbt_ffi_load32(iter_base + 32).reinterpret_as_uint(), + () + } + FloatBits(payload93) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload93.reinterpret_as_int64(), ) - _ => panic() + + () + } } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted345, - min_bytes: lifted346, - max_bytes: lifted347, - }) + () } - 26 => { - 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 + } - let result348 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload83.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - array349.push(result348) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + () + } + Some(payload95) => { + mbt_ffi_store8(iter_base + 64, 1) - Option::Some(array349) - } - _ => panic() - } + 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) - 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 + () + } + } - let result352 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } + + () + } + U32Type(payload97) => { + mbt_ffi_store8(iter_base + 0, 8) + + match payload97 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - array353.push(result352) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + () + } + Some(payload99) => { + mbt_ffi_store8(iter_base + 8, 1) - Option::Some(array353) - } - _ => panic() - } + match payload99.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - @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 => { - 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 - - let result356 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Some(payload101) => { + mbt_ffi_store8(iter_base + 16, 1) - array357.push(result356) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + match payload101 { + Signed(payload102) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload102) - Option::Some(array357) + () } - _ => panic() - } - - let lifted363 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { - 0 => Option::None - 1 => { - 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), - ) + Unsigned(payload103) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload103.reinterpret_as_int64(), + ) - array361.push(result360) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + () + } + FloatBits(payload104) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload104.reinterpret_as_int64(), + ) - Option::Some(array361) + () } - _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted359, - allowed_hosts: lifted363, - }) + () } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result364 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + } - 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 + match payload99.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let result365 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload106) => { + mbt_ffi_store8(iter_base + 40, 1) - array366.push(result365) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + match payload106 { + Signed(payload107) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload107) - let lifted369 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result368 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), + () + } + Unsigned(payload108) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload108.reinterpret_as_int64(), ) - 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), + FloatBits(payload109) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload109.reinterpret_as_int64(), ) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result370, - }) + () } - _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result364, - allowed_suffixes: array366, - min: lifted369, - max: lifted371, - }) + () } - 31 => { - 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), - ) + match payload99.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - let lifted381 = match mbt_ffi_load8_u(iter_base + 12) { - 0 => { - let result373 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + Some(payload111) => { + mbt_ffi_store8(iter_base + 64, 1) - @types.DiscriminatorRule::Prefix(result373) - } - 1 => { - let result374 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 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) - @types.DiscriminatorRule::Suffix(result374) - } - 2 => { - let result375 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + } - @types.DiscriminatorRule::Contains(result375) - } - 3 => { - let result376 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + } - @types.DiscriminatorRule::Regex(result376) - } - 4 => { - let result377 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + U64Type(payload113) => { + mbt_ffi_store8(iter_base + 0, 9) - let lifted379 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result378 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) + match payload113 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - Option::Some(result378) - } - _ => panic() - } + () + } + Some(payload115) => { + mbt_ffi_store8(iter_base + 8, 1) - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result377, - literal: lifted379, - }) - } - 5 => { - let result380 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match payload115.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - @types.DiscriminatorRule::FieldAbsent(result380) - } - _ => panic() - } + () + } + Some(payload117) => { + mbt_ffi_store8(iter_base + 16, 1) - 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), - ) + match payload117 { + Signed(payload118) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload118) - Option::Some(result382) - } - _ => panic() + () } + Unsigned(payload119) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload119.reinterpret_as_int64(), + ) - 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 result384 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + () + } + FloatBits(payload120) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload120.reinterpret_as_int64(), ) - array385.push(result384) + () } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + } - 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 + () + } + } - let result387 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload115.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) + + () + } + Some(payload122) => { + mbt_ffi_store8(iter_base + 40, 1) - array388.push(result387) + match payload122 { + Signed(payload123) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload123) + + () } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + Unsigned(payload124) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload124.reinterpret_as_int64(), + ) - 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), - ) + () + } + FloatBits(payload125) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload125.reinterpret_as_int64(), + ) - Option::Some(result390) - } - _ => panic() + () } + } - let lifted394 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted393 = match mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result392 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + () + } + } - @types.Role::Other(result392) - } - _ => panic() - } + match payload115.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - Option::Some(lifted393) - } - _ => panic() - } + () + } + Some(payload127) => { + mbt_ffi_store8(iter_base + 64, 1) - 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)) + 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) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array395, - }) + () } - 32 => { - let lifted398 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result397 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + } + + () + } + } + + () + } + 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) - Option::Some(result397) + () } - _ => panic() - } + Unsigned(payload135) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload135.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted398, - }) - } - 33 => { - let lifted400 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result399 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), + () + } + FloatBits(payload136) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload136.reinterpret_as_int64(), ) - Option::Some(result399) + () } - _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted400, - }) + () } - 34 => { - let lifted401 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + } + + match payload131.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - @types.SchemaTypeBody::FutureType(lifted401) + () } - 35 => { - let lifted402 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() + 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(), + ) + + () + } } - @types.SchemaTypeBody::StreamType(lifted402) + () } - _ => panic() } - let lifted405 : String? = match mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result404 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), - ) + match payload131.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - Option::Some(result404) + () + } + 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) + + () } - _ => panic() } - 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 result406 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + F64Type(payload145) => { + mbt_ffi_store8(iter_base + 0, 11) - array407.push(result406) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + match payload145 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - 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 + () + } + Some(payload147) => { + mbt_ffi_store8(iter_base + 8, 1) - let result409 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload147.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - array410.push(result409) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + () + } + Some(payload149) => { + mbt_ffi_store8(iter_base + 16, 1) - let lifted413 : String? = match mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result412 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) + 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(), + ) + + () + } + } - Option::Some(result412) + () } - _ => panic() } - let lifted416 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted415 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result414 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), + 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(), ) - @types.Role::Other(result414) + () + } + FloatBits(payload157) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload157.reinterpret_as_int64(), + ) + + () } - _ => panic() } - 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 + match payload147.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - let result419 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload159) => { + mbt_ffi_store8(iter_base + 64, 1) - let lifted421 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result420 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + 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) - 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 array453 : Array[@types.SchemaValueNode] = [] - for index454 = 0 - index454 < mbt_ffi_load32(return_area + 32) - index454 = index454 + 1 { - let iter_base = mbt_ffi_load32(return_area + 28) + index454 * 32 + () + } + CharType => { + mbt_ffi_store8(iter_base + 0, 12) - let lifted452 = 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 result424 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + StringType => { + mbt_ffi_store8(iter_base + 0, 13) - @types.SchemaValueNode::StringValue(result424) - } - 13 => { - 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 + () + } + RecordType(payload163) => { + mbt_ffi_store8(iter_base + 0, 14) - array425.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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 - @types.SchemaValueNode::RecordValue(array425) - } - 14 => { - let lifted427 : Int? = match mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + 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) - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted427, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - 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 + match iter_elem.metadata.doc { + None => { + mbt_ffi_store8(iter_base + 12, 0) - array428.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Some(payload166) => { + mbt_ffi_store8(iter_base + 12, 1) - @types.SchemaValueNode::FlagsValue(array428) - } - 17 => { - 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 ptr167 = mbt_ffi_str2ptr(payload166) + mbt_ffi_store32(iter_base + 20, payload166.length()) + mbt_ffi_store32(iter_base + 16, ptr167) + cleanup_list.push(ptr167) - 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 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 - array432.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 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) - @types.SchemaValueNode::ListValue(array432) - } - 19 => { - 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 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) - array434.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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) - @types.SchemaValueNode::FixedListValue(array434) - } - 20 => { - 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 + () + } + } - 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)) + match iter_elem.metadata.role { + None => { + mbt_ffi_store8(iter_base + 52, 0) - @types.SchemaValueNode::MapValue(array436) - } - 21 => { - let lifted438 : Int? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + () + } + Some(payload178) => { + mbt_ffi_store8(iter_base + 52, 1) - @types.SchemaValueNode::OptionValue(lifted438) - } - 22 => { - let lifted441 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted439 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + match payload178 { + Multimodal => { + mbt_ffi_store8(iter_base + 56, 0) - @types.ResultValuePayload::OkValue(lifted439) - } - 1 => { - let lifted440 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + () + } + UnstructuredText => { + mbt_ffi_store8(iter_base + 56, 1) - @types.ResultValuePayload::ErrValue(lifted440) - } - _ => panic() + () } + UnstructuredBinary => { + mbt_ffi_store8(iter_base + 56, 2) - @types.SchemaValueNode::ResultValue(lifted441) - } - 23 => { - let result442 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + Other(payload182) => { + mbt_ffi_store8(iter_base + 56, 3) - let lifted444 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result443 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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) - Option::Some(result443) - } - _ => panic() + () } - - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result442, - language: lifted444, - }) } - 24 => { - let result445 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) - - let lifted447 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result446 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) - Option::Some(result446) - } - _ => panic() - } + () + } + } + 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) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result445, - mime_type: lifted447, - }) - } - 25 => { - let result448 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + VariantType(payload186) => { + mbt_ffi_store8(iter_base + 0, 15) - @types.SchemaValueNode::PathValue(result448) - } - 26 => { - let result449 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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 - @types.SchemaValueNode::UrlValue(result449) - } - 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 result450 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result450, - }) - } - 30 => { - let result451 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + match iter_elem.payload { + None => { + mbt_ffi_store8(iter_base + 8, 0) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result451, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken(mbt_ffi_load32(iter_base + 8)), - ) - _ => panic() + () } + Some(payload189) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload189) - array453.push(lifted452) + () + } } - mbt_ffi_free(mbt_ffi_load32(return_area + 28)) - Option::Some(@types.TypedSchemaValue::{ - graph: @types.SchemaGraph::{ - type_nodes: array417, - defs: array422, - root: mbt_ffi_load32(return_area + 24), - }, - value: @types.SchemaValueTree::{ - value_nodes: array453, - root: mbt_ffi_load32(return_area + 36), - }, - }) - } - _ => panic() - } + match iter_elem.metadata.doc { + None => { + mbt_ffi_store8(iter_base + 16, 0) - let lifted456 : @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() - } + () + } + Some(payload191) => { + mbt_ffi_store8(iter_base + 16, 1) - Result::Ok(@common.InvocationResult::{ - result: lifted455, - stdout: lifted456, - }) - } - 1 => { - let lifted633 = match mbt_ffi_load8_u(return_area + 4) { - 0 => { - let result457 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + 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) - RpcError::ProtocolError(result457) - } - 1 => { - let result458 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + () + } + } - RpcError::Denied(result458) - } - 2 => { - let result459 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), + 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 - RpcError::NotFound(result459) - } - 3 => { - let result460 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), + 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 - RpcError::RemoteInternalError(result460) - } - 4 => { - let lifted632 = match mbt_ffi_load8_u(return_area + 8) { - 0 => { - let result461 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + 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) - @common.ToolError::InvalidToolName(result461) - } - 1 => { - let array463 : Array[String] = [] - for index464 = 0 - index464 < mbt_ffi_load32(return_area + 16) - index464 = index464 + 1 { - let iter_base = mbt_ffi_load32(return_area + 12) + index464 * 8 + match iter_elem.metadata.deprecated { + None => { + mbt_ffi_store8(iter_base + 44, 0) - let result462 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload200) => { + mbt_ffi_store8(iter_base + 44, 1) - array463.push(result462) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 12)) + 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) - @common.ToolError::InvalidCommandPath(array463) + () } - 2 => { - let result465 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + } - @common.ToolError::InvalidInput(result465) - } - 3 => { - let result466 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + match iter_elem.metadata.role { + None => { + mbt_ffi_store8(iter_base + 56, 0) - @common.ToolError::ConstraintViolation(result466) + () } - 4 => { - let result467 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + 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) - @common.ToolError::InvalidResult(result467) - } - 5 => { - let array594 : Array[@types.SchemaTypeNode] = [] - for index595 = 0 - index595 < mbt_ffi_load32(return_area + 16) - index595 = index595 + 1 { - let iter_base = mbt_ffi_load32(return_area + 12) + - index595 * 144 + () + } + UnstructuredBinary => { + mbt_ffi_store8(iter_base + 60, 2) - let lifted580 = 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 array482 : Array[@types.NamedFieldType] = [] - for index483 = 0 - index483 < mbt_ffi_load32(iter_base + 12) - index483 = index483 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index483 * 68 + () + } + Other(payload207) => { + mbt_ffi_store8(iter_base + 60, 3) - let result468 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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) - let lifted470 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result469 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + } - Option::Some(result469) - } - _ => panic() - } + () + } + } + 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) - let array472 : Array[String] = [] - for index473 = 0 - index473 < mbt_ffi_load32(iter_base + 28) - index473 = index473 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index473 * 8 + () + } + EnumType(payload211) => { + mbt_ffi_store8(iter_base + 0, 16) - let result471 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array472.push(result471) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + 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) - let array475 : Array[String] = [] - for index476 = 0 - index476 < mbt_ffi_load32(iter_base + 36) - index476 = index476 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 32) + - index476 * 8 + () + } + FlagsType(payload215) => { + mbt_ffi_store8(iter_base + 0, 17) - let result474 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array475.push(result474) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) + 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) - let lifted478 : String? = match - mbt_ffi_load8_u(iter_base + 40) { - 0 => Option::None - 1 => { - let result477 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + () + } + TupleType(payload219) => { + mbt_ffi_store8(iter_base + 0, 18) - Option::Some(result477) - } - _ => panic() - } + 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) - let lifted481 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 52) { - 0 => Option::None - 1 => { - let lifted480 = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result479 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 60), - mbt_ffi_load32(iter_base + 64), - ) + () + } + ListType(payload222) => { + mbt_ffi_store8(iter_base + 0, 19) + mbt_ffi_store32(iter_base + 8, payload222) - @types.Role::Other(result479) - } - _ => panic() - } + () + } + 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()) - Option::Some(lifted480) - } - _ => panic() - } + () + } + 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) - array482.push(@types.NamedFieldType::{ - name: result468, - body: mbt_ffi_load32(iter_base + 8), - metadata: @types.MetadataEnvelope::{ - doc: lifted470, - aliases: array472, - examples: array475, - deprecated: lifted478, - role: lifted481, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + OptionType(payload225) => { + mbt_ffi_store8(iter_base + 0, 22) + mbt_ffi_store32(iter_base + 8, payload225) - @types.SchemaTypeBody::RecordType(array482) - } - 15 => { - let array499 : Array[@types.VariantCaseType] = [] - for index500 = 0 - index500 < mbt_ffi_load32(iter_base + 12) - index500 = index500 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index500 * 72 + () + } + ResultType(payload226) => { + mbt_ffi_store8(iter_base + 0, 23) - let result484 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload226.ok { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted485 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + () + } + Some(payload228) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload228) - let lifted487 : 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), - ) + () + } + } - Option::Some(result486) - } - _ => panic() - } + match payload226.err { + None => { + mbt_ffi_store8(iter_base + 16, 0) - let array489 : Array[String] = [] - for index490 = 0 - index490 < mbt_ffi_load32(iter_base + 32) - index490 = index490 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + - index490 * 8 + () + } + Some(payload230) => { + mbt_ffi_store8(iter_base + 16, 1) + mbt_ffi_store32(iter_base + 20, payload230) - let result488 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array489.push(result488) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + () + } + TextType(payload231) => { + mbt_ffi_store8(iter_base + 0, 24) - let array492 : Array[String] = [] - for index493 = 0 - index493 < mbt_ffi_load32(iter_base + 40) - index493 = index493 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 36) + - index493 * 8 + match payload231.languages { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let result491 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload233) => { + mbt_ffi_store8(iter_base + 8, 1) - array492.push(result491) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + 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 lifted495 : String? = match - mbt_ffi_load8_u(iter_base + 44) { - 0 => Option::None - 1 => { - let result494 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 48), - mbt_ffi_load32(iter_base + 52), - ) + 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) - Option::Some(result494) - } - _ => panic() - } + () + } + } - let lifted498 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted497 = match - mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result496 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + match payload231.min_length { + None => { + mbt_ffi_store8(iter_base + 20, 0) - @types.Role::Other(result496) - } - _ => panic() - } + () + } + Some(payload238) => { + mbt_ffi_store8(iter_base + 20, 1) + mbt_ffi_store32(iter_base + 24, payload238.reinterpret_as_int()) - Option::Some(lifted497) - } - _ => panic() - } + () + } + } - array499.push(@types.VariantCaseType::{ - name: result484, - payload: lifted485, - metadata: @types.MetadataEnvelope::{ - doc: lifted487, - aliases: array489, - examples: array492, - deprecated: lifted495, - role: lifted498, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload231.max_length { + None => { + mbt_ffi_store8(iter_base + 28, 0) - @types.SchemaTypeBody::VariantType(array499) - } - 16 => { - let array502 : Array[String] = [] - for index503 = 0 - index503 < mbt_ffi_load32(iter_base + 12) - index503 = index503 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index503 * 8 + () + } + Some(payload240) => { + mbt_ffi_store8(iter_base + 28, 1) + mbt_ffi_store32(iter_base + 32, payload240.reinterpret_as_int()) - let result501 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array502.push(result501) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload231.regex { + None => { + mbt_ffi_store8(iter_base + 36, 0) - @types.SchemaTypeBody::EnumType(array502) - } - 17 => { - let array505 : Array[String] = [] - for index506 = 0 - index506 < mbt_ffi_load32(iter_base + 12) - index506 = index506 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index506 * 8 + () + } + Some(payload242) => { + mbt_ffi_store8(iter_base + 36, 1) - let result504 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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) - array505.push(result504) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaTypeBody::FlagsType(array505) - } - 18 => { - let array507 : Array[Int] = [] - for index508 = 0 - index508 < mbt_ffi_load32(iter_base + 12) - index508 = index508 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index508 * 4 + () + } + BinaryType(payload244) => { + mbt_ffi_store8(iter_base + 0, 25) + + match payload244.mime_types { + None => { + mbt_ffi_store8(iter_base + 8, 0) - array507.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Some(payload246) => { + mbt_ffi_store8(iter_base + 8, 1) - @types.SchemaTypeBody::TupleType(array507) - } - 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 lifted509 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + 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 lifted510 : Int? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) - _ => 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) + } + mbt_ffi_store32(iter_base + 16, payload246.length()) + mbt_ffi_store32(iter_base + 12, address248) + cleanup_list.push(address248) - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted509, - err: lifted510, - }) - } - 24 => { - let lifted514 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let array512 : Array[String] = [] - for index513 = 0 - index513 < mbt_ffi_load32(iter_base + 16) - index513 = index513 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index513 * 8 + () + } + } - let result511 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload244.min_bytes { + None => { + mbt_ffi_store8(iter_base + 20, 0) - array512.push(result511) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + () + } + Some(payload251) => { + mbt_ffi_store8(iter_base + 20, 1) + mbt_ffi_store32(iter_base + 24, payload251.reinterpret_as_int()) - Option::Some(array512) - } - _ => panic() - } + () + } + } - let lifted515 : 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() - } + match payload244.max_bytes { + None => { + mbt_ffi_store8(iter_base + 28, 0) - let lifted516 : 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() - } + () + } + Some(payload253) => { + mbt_ffi_store8(iter_base + 28, 1) + mbt_ffi_store32(iter_base + 32, payload253.reinterpret_as_int()) - let lifted518 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result517 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + () + } + } - Option::Some(result517) - } - _ => 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()) - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted514, - min_length: lifted515, - max_length: lifted516, - regex: lifted518, - }) - } - 25 => { - let lifted522 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let array520 : Array[String] = [] - for index521 = 0 - index521 < mbt_ffi_load32(iter_base + 16) - index521 = index521 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index521 * 8 + match payload254.allowed_mime_types { + None => { + mbt_ffi_store8(iter_base + 12, 0) - let result519 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload256) => { + mbt_ffi_store8(iter_base + 12, 1) - array520.push(result519) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + 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 - Option::Some(array520) - } - _ => panic() - } + 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) - let lifted523 : 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 lifted524 : 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() - } + match payload254.allowed_extensions { + None => { + mbt_ffi_store8(iter_base + 24, 0) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted522, - min_bytes: lifted523, - max_bytes: lifted524, - }) - } - 26 => { - let lifted528 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let array526 : Array[String] = [] - for index527 = 0 - index527 < mbt_ffi_load32(iter_base + 20) - index527 = index527 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + - index527 * 8 + () + } + Some(payload261) => { + mbt_ffi_store8(iter_base + 24, 1) - let result525 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array526.push(result525) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + 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) - Option::Some(array526) - } - _ => panic() - } + () + } + } - let lifted532 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let array530 : Array[String] = [] - for index531 = 0 - index531 < mbt_ffi_load32(iter_base + 32) - index531 = index531 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 28) + - index531 * 8 + () + } + UrlType(payload265) => { + mbt_ffi_store8(iter_base + 0, 27) - let result529 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload265.allowed_schemes { + None => { + mbt_ffi_store8(iter_base + 8, 0) - array530.push(result529) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + () + } + Some(payload267) => { + mbt_ffi_store8(iter_base + 8, 1) - Option::Some(array530) - } - _ => panic() - } + 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 - @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: lifted528, - allowed_extensions: lifted532, - }) - } - 27 => { - let lifted536 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let array534 : Array[String] = [] - for index535 = 0 - index535 < mbt_ffi_load32(iter_base + 16) - index535 = index535 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 12) + - index535 * 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) - let result533 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array534.push(result533) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + match payload265.allowed_hosts { + None => { + mbt_ffi_store8(iter_base + 20, 0) - Option::Some(array534) - } - _ => panic() - } + () + } + Some(payload272) => { + mbt_ffi_store8(iter_base + 20, 1) - let lifted540 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { - 0 => Option::None - 1 => { - let array538 : Array[String] = [] - for index539 = 0 - index539 < mbt_ffi_load32(iter_base + 28) - index539 = index539 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index539 * 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 result537 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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) - array538.push(result537) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + () + } + } - Option::Some(array538) - } - _ => panic() - } + () + } + DatetimeType => { + mbt_ffi_store8(iter_base + 0, 28) - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted536, - allowed_hosts: lifted540, - }) - } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result541 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + DurationType => { + mbt_ffi_store8(iter_base + 0, 29) - let array543 : Array[String] = [] - for index544 = 0 - index544 < mbt_ffi_load32(iter_base + 20) - index544 = index544 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 16) + - index544 * 8 + () + } + QuantityType(payload278) => { + mbt_ffi_store8(iter_base + 0, 30) - let result542 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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) - array543.push(result542) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + 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 lifted546 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result545 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + 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) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 32), - scale: mbt_ffi_load32(iter_base + 40), - unit: result545, - }) - } - _ => panic() - } + match payload278.min { + None => { + mbt_ffi_store8(iter_base + 24, 0) - let lifted548 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let result547 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 76), - mbt_ffi_load32(iter_base + 80), - ) + () + } + 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) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result547, - }) - } - _ => panic() - } + 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::QuantityType(@types.QuantitySpec::{ - base_unit: result541, - allowed_suffixes: array543, - min: lifted546, - max: lifted548, - }) - } - 31 => { - let array572 : Array[@types.UnionBranch] = [] - for index573 = 0 - index573 < mbt_ffi_load32(iter_base + 12) - index573 = index573 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index573 * 92 + () + } + } - let result549 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload278.max { + None => { + mbt_ffi_store8(iter_base + 56, 0) - let lifted558 = match mbt_ffi_load8_u(iter_base + 12) { - 0 => { - let result550 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + 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) - @types.DiscriminatorRule::Prefix(result550) - } - 1 => { - let result551 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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.DiscriminatorRule::Suffix(result551) - } - 2 => { - let result552 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + } + cleanup_list.push(ptr279) + cleanup_list.push(address281) - @types.DiscriminatorRule::Contains(result552) - } - 3 => { - let result553 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + UnionType(payload289) => { + mbt_ffi_store8(iter_base + 0, 31) - @types.DiscriminatorRule::Regex(result553) - } - 4 => { - let result554 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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 lifted556 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result555 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) + 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) - Option::Some(result555) - } - _ => panic() - } + match iter_elem.discriminator { + Prefix(payload291) => { + mbt_ffi_store8(iter_base + 12, 0) - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result554, - literal: lifted556, - }) - } - 5 => { - let result557 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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) - @types.DiscriminatorRule::FieldAbsent(result557) - } - _ => panic() - } + () + } + Suffix(payload293) => { + mbt_ffi_store8(iter_base + 12, 1) - let lifted560 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result559 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + 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) - Option::Some(result559) - } - _ => panic() - } + () + } + Contains(payload295) => { + mbt_ffi_store8(iter_base + 12, 2) - let array562 : Array[String] = [] - for index563 = 0 - index563 < mbt_ffi_load32(iter_base + 52) - index563 = index563 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 48) + - index563 * 8 + 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) - let result561 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Regex(payload297) => { + mbt_ffi_store8(iter_base + 12, 3) - array562.push(result561) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + 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 array565 : Array[String] = [] - for index566 = 0 - index566 < mbt_ffi_load32(iter_base + 60) - index566 = index566 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 56) + - index566 * 8 + () + } + FieldEquals(payload299) => { + mbt_ffi_store8(iter_base + 12, 4) - let result564 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 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) - array565.push(result564) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + match payload299.literal { + None => { + mbt_ffi_store8(iter_base + 24, 0) - let lifted568 : String? = match - mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result567 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), - ) + () + } + Some(payload302) => { + mbt_ffi_store8(iter_base + 24, 1) - Option::Some(result567) - } - _ => panic() - } + 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 lifted571 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted570 = match - mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result569 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + () + } + } + cleanup_list.push(ptr300) - @types.Role::Other(result569) - } - _ => panic() - } + () + } + FieldAbsent(payload304) => { + mbt_ffi_store8(iter_base + 12, 5) - Option::Some(lifted570) - } - _ => panic() - } + 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) - array572.push(@types.UnionBranch::{ - tag: result549, - body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted558, - metadata: @types.MetadataEnvelope::{ - doc: lifted560, - aliases: array562, - examples: array565, - deprecated: lifted568, - role: lifted571, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array572, - }) - } - 32 => { - let lifted575 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result574 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match iter_elem.metadata.doc { + None => { + mbt_ffi_store8(iter_base + 36, 0) - Option::Some(result574) - } - _ => panic() - } + () + } + Some(payload307) => { + mbt_ffi_store8(iter_base + 36, 1) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted575, - }) - } - 33 => { - let lifted577 : String? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result576 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + 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(result576) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted577, - }) - } - 34 => { - let lifted578 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + 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 - @types.SchemaTypeBody::FutureType(lifted578) - } - 35 => { - let lifted579 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + 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) - @types.SchemaTypeBody::StreamType(lifted579) - } - _ => panic() - } + 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 lifted582 : String? = match - mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result581 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), - ) + 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) - Option::Some(result581) - } - _ => panic() - } + match iter_elem.metadata.deprecated { + None => { + mbt_ffi_store8(iter_base + 64, 0) - let array584 : Array[String] = [] - for index585 = 0 - index585 < mbt_ffi_load32(iter_base + 104) - index585 = index585 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 100) + index585 * 8 + () + } + Some(payload316) => { + mbt_ffi_store8(iter_base + 64, 1) - let result583 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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) - array584.push(result583) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + () + } + } - let array587 : Array[String] = [] - for index588 = 0 - index588 < mbt_ffi_load32(iter_base + 112) - index588 = index588 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 108) + index588 * 8 + match iter_elem.metadata.role { + None => { + mbt_ffi_store8(iter_base + 76, 0) - let result586 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload319) => { + mbt_ffi_store8(iter_base + 76, 1) - array587.push(result586) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + match payload319 { + Multimodal => { + mbt_ffi_store8(iter_base + 80, 0) - let lifted590 : String? = match - mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result589 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) + () + } + UnstructuredText => { + mbt_ffi_store8(iter_base + 80, 1) - Option::Some(result589) - } - _ => panic() + () } + UnstructuredBinary => { + mbt_ffi_store8(iter_base + 80, 2) - let lifted593 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted592 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result591 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + () + } + Other(payload323) => { + mbt_ffi_store8(iter_base + 80, 3) - @types.Role::Other(result591) - } - _ => panic() - } + 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(lifted592) - } - _ => panic() + () } - - array594.push(@types.SchemaTypeNode::{ - body: lifted580, - metadata: @types.MetadataEnvelope::{ - doc: lifted582, - aliases: array584, - examples: array587, - deprecated: lifted590, - role: lifted593, - }, - }) } - mbt_ffi_free(mbt_ffi_load32(return_area + 12)) - let array599 : Array[@types.SchemaTypeDef] = [] - for index600 = 0 - index600 < mbt_ffi_load32(return_area + 24) - index600 = index600 + 1 { - let iter_base = mbt_ffi_load32(return_area + 20) + index600 * 24 + () + } + } + 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) - let result596 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + SecretType(payload327) => { + mbt_ffi_store8(iter_base + 0, 32) + mbt_ffi_store32(iter_base + 8, payload327.inner) - let lifted598 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result597 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + match payload327.category { + None => { + mbt_ffi_store8(iter_base + 12, 0) - Option::Some(result597) - } - _ => panic() - } + () + } + Some(payload329) => { + mbt_ffi_store8(iter_base + 12, 1) - array599.push(@types.SchemaTypeDef::{ - id: result596, - name: lifted598, - body: mbt_ffi_load32(iter_base + 20), - }) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 20)) + let ptr330 = mbt_ffi_str2ptr(payload329) + mbt_ffi_store32(iter_base + 20, payload329.length()) + mbt_ffi_store32(iter_base + 16, ptr330) + cleanup_list.push(ptr330) - let array630 : Array[@types.SchemaValueNode] = [] - for index631 = 0 - index631 < mbt_ffi_load32(return_area + 36) - index631 = index631 + 1 { - let iter_base = mbt_ffi_load32(return_area + 32) + index631 * 32 + () + } + } - let lifted629 = 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 result601 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + QuotaTokenType(payload331) => { + mbt_ffi_store8(iter_base + 0, 33) - @types.SchemaValueNode::StringValue(result601) - } - 13 => { - 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 + match payload331.resource_name { + None => { + mbt_ffi_store8(iter_base + 8, 0) - array602.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Some(payload333) => { + mbt_ffi_store8(iter_base + 8, 1) - @types.SchemaValueNode::RecordValue(array602) - } - 14 => { - let lifted604 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + 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.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted604, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - let array605 : Array[Bool] = [] - for index606 = 0 - index606 < mbt_ffi_load32(iter_base + 12) - index606 = index606 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index606 * 1 + () + } + } - array605.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + FutureType(payload335) => { + mbt_ffi_store8(iter_base + 0, 34) - @types.SchemaValueNode::FlagsValue(array605) - } - 17 => { - let array607 : Array[Int] = [] - for index608 = 0 - index608 < mbt_ffi_load32(iter_base + 12) - index608 = index608 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index608 * 4 + match payload335 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - array607.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Some(payload337) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload337) - @types.SchemaValueNode::TupleValue(array607) - } - 18 => { - 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 + () + } + } - array609.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + StreamType(payload338) => { + mbt_ffi_store8(iter_base + 0, 35) - @types.SchemaValueNode::ListValue(array609) - } - 19 => { - let array611 : Array[Int] = [] - for index612 = 0 - index612 < mbt_ffi_load32(iter_base + 12) - index612 = index612 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index612 * 4 + match payload338 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - array611.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Some(payload340) => { + mbt_ffi_store8(iter_base + 8, 1) + mbt_ffi_store32(iter_base + 12, payload340) - @types.SchemaValueNode::FixedListValue(array611) - } - 20 => { - let array613 : Array[@types.MapEntry] = [] - for index614 = 0 - index614 < mbt_ffi_load32(iter_base + 12) - index614 = index614 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 8) + - index614 * 8 + () + } + } - array613.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(array613) - } - 21 => { - let lifted615 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + match iter_elem.metadata.doc { + None => { + mbt_ffi_store8(iter_base + 88, 0) - @types.SchemaValueNode::OptionValue(lifted615) - } - 22 => { - let lifted618 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted616 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + () + } + Some(payload342) => { + mbt_ffi_store8(iter_base + 88, 1) - @types.ResultValuePayload::OkValue(lifted616) - } - 1 => { - let lifted617 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + 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) - @types.ResultValuePayload::ErrValue(lifted617) - } - _ => panic() - } + () + } + } - @types.SchemaValueNode::ResultValue(lifted618) - } - 23 => { - let result619 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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 lifted621 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result620 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + 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) - Option::Some(result620) - } - _ => panic() - } + 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 - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result619, - language: lifted621, - }) - } - 24 => { - let result622 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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) - let lifted624 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result623 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + match iter_elem.metadata.deprecated { + None => { + mbt_ffi_store8(iter_base + 116, 0) - Option::Some(result623) - } - _ => panic() - } + () + } + Some(payload351) => { + mbt_ffi_store8(iter_base + 116, 1) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result622, - mime_type: lifted624, - }) - } - 25 => { - let result625 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + 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.SchemaValueNode::PathValue(result625) - } - 26 => { - let result626 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + } - @types.SchemaValueNode::UrlValue(result626) - } - 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 result627 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + match iter_elem.metadata.role { + None => { + mbt_ffi_store8(iter_base + 128, 0) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result627, - }) - } - 30 => { - let result628 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + Some(payload354) => { + mbt_ffi_store8(iter_base + 128, 1) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result628, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) - _ => panic() - } + match payload354 { + Multimodal => { + mbt_ffi_store8(iter_base + 132, 0) - array630.push(lifted629) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 32)) + () + } + UnstructuredText => { + mbt_ffi_store8(iter_base + 132, 1) - @common.ToolError::CustomError(@types.TypedSchemaValue::{ - graph: @types.SchemaGraph::{ - type_nodes: array594, - defs: array599, - root: mbt_ffi_load32(return_area + 28), - }, - value: @types.SchemaValueTree::{ - value_nodes: array630, - root: mbt_ffi_load32(return_area + 40), - }, - }) - } - _ => panic() + () + } + 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) - RpcError::RemoteToolError(lifted632) + () + } } - _ => panic() - } - Result::Err(lifted633) + () + } } - _ => panic() + cleanup_list.push(address345) + cleanup_list.push(address348) } - let ret = lifted634 - mbt_ffi_free(address) - mbt_ffi_free(address210) - mbt_ffi_free(address216) - mbt_ffi_free(address288) - mbt_ffi_free(return_area) - cleanup_list.each(mbt_ffi_free) - return ret -} + 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 -///| -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 ptr362 = mbt_ffi_str2ptr(iter_elem.id) + mbt_ffi_store32(iter_base + 4, iter_elem.id.length()) + mbt_ffi_store32(iter_base + 0, ptr362) - let ToolRpc(handle) = self + match iter_elem.name { + None => { + mbt_ffi_store8(iter_base + 8, 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 + () + } + Some(payload364) => { + mbt_ffi_store8(iter_base + 8, 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 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 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 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.body { - RefType(payload) => { + match iter_elem { + BoolValue(payload368) => { mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store32(iter_base + 8, payload) + mbt_ffi_store8(iter_base + 8, if payload368 { 1 } else { 0 }) () } - BoolType => { + S8Value(payload369) => { mbt_ffi_store8(iter_base + 0, 1) + mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload369)) () } - S8Type => { + S16Value(payload370) => { mbt_ffi_store8(iter_base + 0, 2) + mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload370)) () } - S16Type => { + S32Value(payload371) => { mbt_ffi_store8(iter_base + 0, 3) + mbt_ffi_store32(iter_base + 8, payload371) () } - S32Type => { + S64Value(payload372) => { mbt_ffi_store8(iter_base + 0, 4) + mbt_ffi_store64(iter_base + 8, payload372) () } - S64Type => { + U8Value(payload373) => { mbt_ffi_store8(iter_base + 0, 5) + mbt_ffi_store8(iter_base + 8, payload373.to_int()) () } - U8Type => { + U16Value(payload374) => { mbt_ffi_store8(iter_base + 0, 6) + mbt_ffi_store16(iter_base + 8, payload374.reinterpret_as_int()) () } - U16Type => { + U32Value(payload375) => { mbt_ffi_store8(iter_base + 0, 7) + mbt_ffi_store32(iter_base + 8, payload375.reinterpret_as_int()) () } - U32Type => { + 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) () } - U64Type => { - mbt_ffi_store8(iter_base + 0, 9) + ListValue(payload395) => { + mbt_ffi_store8(iter_base + 0, 18) - () - } - F32Type => { - mbt_ffi_store8(iter_base + 0, 10) + 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) () } - F64Type => { - mbt_ffi_store8(iter_base + 0, 11) + 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) () } - CharType => { - mbt_ffi_store8(iter_base + 0, 12) + 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) () } - StringType => { - mbt_ffi_store8(iter_base + 0, 13) + 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) + + () + } + } () } - RecordType(payload13) => { - mbt_ffi_store8(iter_base + 0, 14) + ResultValue(payload407) => { + mbt_ffi_store8(iter_base + 0, 22) - 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 + match payload407 { + OkValue(payload408) => { + mbt_ffi_store8(iter_base + 8, 0) - 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 payload408 { + None => { + mbt_ffi_store8(iter_base + 12, 0) - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 12, 0) + () + } + Some(payload410) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload410) - () + () + } } - 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) - () - } + () } + ErrValue(payload411) => { + mbt_ffi_store8(iter_base + 8, 1) - 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 + match payload411 { + None => { + mbt_ffi_store8(iter_base + 12, 0) - 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) - } - mbt_ffi_store32(iter_base + 28, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 24, address19) + () + } + Some(payload413) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload413) - 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 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) + () } - mbt_ffi_store32(iter_base + 36, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 32, address22) + } - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 40, 0) + () + } + TextValue(payload414) => { + mbt_ffi_store8(iter_base + 0, 23) - () - } - Some(payload25) => { - mbt_ffi_store8(iter_base + 40, 1) + let ptr415 = mbt_ffi_str2ptr(payload414.text) + mbt_ffi_store32(iter_base + 12, payload414.text.length()) + mbt_ffi_store32(iter_base + 8, ptr415) - 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 payload414.language { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } + () } + Some(payload417) => { + mbt_ffi_store8(iter_base + 16, 1) - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 52, 0) + 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) - () - } - Some(payload28) => { - mbt_ffi_store8(iter_base + 52, 1) + () + } + } + cleanup_list.push(ptr415) - match payload28 { - Multimodal => { - mbt_ffi_store8(iter_base + 56, 0) + () + } + BinaryValue(payload419) => { + mbt_ffi_store8(iter_base + 0, 24) - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 56, 1) + let ptr420 = mbt_ffi_bytes2ptr(payload419.bytes) - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 56, 2) + mbt_ffi_store32(iter_base + 12, payload419.bytes.length()) + mbt_ffi_store32(iter_base + 8, ptr420) - () - } - Other(payload32) => { - mbt_ffi_store8(iter_base + 56, 3) + match payload419.mime_type { + None => { + mbt_ffi_store8(iter_base + 16, 0) - 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) + () + } + 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(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) + cleanup_list.push(ptr420) () } - VariantType(payload36) => { - mbt_ffi_store8(iter_base + 0, 15) + PathValue(payload424) => { + mbt_ffi_store8(iter_base + 0, 25) - 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 ptr425 = mbt_ffi_str2ptr(payload424) + mbt_ffi_store32(iter_base + 12, payload424.length()) + mbt_ffi_store32(iter_base + 8, ptr425) + cleanup_list.push(ptr425) - 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) + () + } + UrlValue(payload426) => { + mbt_ffi_store8(iter_base + 0, 26) - match iter_elem.payload { - None => { - mbt_ffi_store8(iter_base + 8, 0) + 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) - () - } - Some(payload39) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload39) + () + } + 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) - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 16, 0) + () + } + 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) - () - } - Some(payload41) => { - mbt_ffi_store8(iter_base + 16, 1) + 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 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 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 address44 = mbt_ffi_malloc( - iter_elem.metadata.aliases.length() * 8, + let @types.Secret(handle435) = payload434 + mbt_ffi_store32(iter_base + 8, handle435) + + () + } + 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 lifted688 = match mbt_ffi_load8_u(return_area + 0) { + 0 => Result::Ok(()) + 1 => { + let lifted687 = 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), ) - 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) - } - mbt_ffi_store32(iter_base + 32, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 28, address44) + RpcError::ProtocolError(result) + } + 1 => { + let result444 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), + ) - let address47 = mbt_ffi_malloc( - iter_elem.metadata.examples.length() * 8, + RpcError::Denied(result444) + } + 2 => { + let result445 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), ) - 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 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) - } - mbt_ffi_store32(iter_base + 40, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 36, address47) + RpcError::NotFound(result445) + } + 3 => { + let result446 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 8), + mbt_ffi_load32(return_area + 12), + ) - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 44, 0) + RpcError::RemoteInternalError(result446) + } + 4 => { + let lifted686 = 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) } - Some(payload50) => { - mbt_ffi_store8(iter_base + 44, 1) + 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 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 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)) - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 56, 0) + @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) } - Some(payload53) => { - mbt_ffi_store8(iter_base + 56, 1) - - match payload53 { - Multimodal => { - mbt_ffi_store8(iter_base + 60, 0) + 3 => { + let result451 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 60, 1) + @common.ToolError::ConstraintViolation(result451) + } + 4 => { + let result452 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 60, 2) + @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 - () - } - Other(payload57) => { - mbt_ffi_store8(iter_base + 60, 3) + 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() + } - 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) + 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() + } - () - } - } - 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) + Option::Some(lifted454) + } + _ => panic() + } - () - } - EnumType(payload61) => { - mbt_ffi_store8(iter_base + 0, 16) + 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), + ) - 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 + Option::Some(result456) + } + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 12, payload61.length()) - mbt_ffi_store32(iter_base + 8, address63) - cleanup_list.push(address63) + Option::Some(@types.NumericRestrictions::{ + min: lifted453, + max: lifted455, + unit: lifted457, + }) + } + _ => panic() + } - () - } - FlagsType(payload65) => { - mbt_ffi_store8(iter_base + 0, 17) + @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() + } - 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(lifted459) + } + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 12, payload65.length()) - mbt_ffi_store32(iter_base + 8, address67) - cleanup_list.push(address67) + 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() + } - () - } - TupleType(payload69) => { - mbt_ffi_store8(iter_base + 0, 18) + Option::Some(lifted461) + } + _ => panic() + } - 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) + 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), + ) - () - } - ListType(payload72) => { - mbt_ffi_store8(iter_base + 0, 19) - mbt_ffi_store32(iter_base + 8, payload72) + Option::Some(result463) + } + _ => 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()) + Option::Some(@types.NumericRestrictions::{ + min: lifted460, + max: lifted462, + unit: lifted464, + }) + } + _ => panic() + } - () - } - 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) + @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() + } - () - } - OptionType(payload75) => { - mbt_ffi_store8(iter_base + 0, 22) - mbt_ffi_store32(iter_base + 8, payload75) + Option::Some(lifted466) + } + _ => panic() + } - () - } - ResultType(payload76) => { - mbt_ffi_store8(iter_base + 0, 23) + 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() + } - match payload76.ok { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(lifted468) + } + _ => panic() + } - () - } - Some(payload78) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload78) + 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() + } - match payload76.err { - None => { - mbt_ffi_store8(iter_base + 16, 0) + Option::Some(@types.NumericRestrictions::{ + min: lifted467, + max: lifted469, + unit: lifted471, + }) + } + _ => panic() + } - () - } - Some(payload80) => { - mbt_ffi_store8(iter_base + 16, 1) - mbt_ffi_store32(iter_base + 20, payload80) + @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() + } - () - } - TextType(payload81) => { - mbt_ffi_store8(iter_base + 0, 24) + 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() + } - match payload81.languages { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(lifted475) + } + _ => panic() + } - () - } - Some(payload83) => { - mbt_ffi_store8(iter_base + 8, 1) + 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), + ) - 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 + Option::Some(result477) + } + _ => panic() + } - 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) + 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() + } - match payload81.min_length { - None => { - mbt_ffi_store8(iter_base + 20, 0) + Option::Some(lifted480) + } + _ => panic() + } - () - } - Some(payload88) => { - mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload88.reinterpret_as_int()) + 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() + } - match payload81.max_length { - None => { - mbt_ffi_store8(iter_base + 28, 0) + 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), + ) - () - } - Some(payload90) => { - mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload90.reinterpret_as_int()) + Option::Some(result484) + } + _ => panic() + } - () - } - } + Option::Some(@types.NumericRestrictions::{ + min: lifted481, + max: lifted483, + unit: lifted485, + }) + } + _ => panic() + } - match payload81.regex { - None => { - mbt_ffi_store8(iter_base + 36, 0) + @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() + } - () - } - Some(payload92) => { - mbt_ffi_store8(iter_base + 36, 1) + Option::Some(lifted487) + } + _ => panic() + } - 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 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() + } - () - } - BinaryType(payload94) => { - mbt_ffi_store8(iter_base + 0, 25) + 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), + ) - match payload94.mime_types { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(result491) + } + _ => panic() + } - () - } - Some(payload96) => { - mbt_ffi_store8(iter_base + 8, 1) + Option::Some(@types.NumericRestrictions::{ + min: lifted488, + max: lifted490, + unit: lifted492, + }) + } + _ => panic() + } - 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::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() + } - 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) + 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() + } - match payload94.min_bytes { - None => { - mbt_ffi_store8(iter_base + 20, 0) + Option::Some(lifted496) + } + _ => panic() + } - () - } - Some(payload101) => { - mbt_ffi_store8(iter_base + 20, 1) - mbt_ffi_store32(iter_base + 24, payload101.reinterpret_as_int()) + 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() + } - match payload94.max_bytes { - None => { - mbt_ffi_store8(iter_base + 28, 0) + Option::Some(@types.NumericRestrictions::{ + min: lifted495, + max: lifted497, + unit: lifted499, + }) + } + _ => panic() + } - () - } - Some(payload103) => { - mbt_ffi_store8(iter_base + 28, 1) - mbt_ffi_store32(iter_base + 32, payload103.reinterpret_as_int()) + @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() + } - () - } - 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()) + 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() + } - match payload104.allowed_mime_types { - None => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(lifted503) + } + _ => panic() + } - () - } - Some(payload106) => { - mbt_ffi_store8(iter_base + 12, 1) + 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), + ) - 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(result505) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 20, payload106.length()) - mbt_ffi_store32(iter_base + 16, address108) - cleanup_list.push(address108) + 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() + } - match payload104.allowed_extensions { - None => { - mbt_ffi_store8(iter_base + 24, 0) + Option::Some(lifted508) + } + _ => panic() + } - () - } - Some(payload111) => { - mbt_ffi_store8(iter_base + 24, 1) + 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() + } - 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 + Option::Some(lifted510) + } + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 32, payload111.length()) - mbt_ffi_store32(iter_base + 28, address113) - cleanup_list.push(address113) + 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() + } - () - } - UrlType(payload115) => { - mbt_ffi_store8(iter_base + 0, 27) + Option::Some(@types.NumericRestrictions::{ + min: lifted509, + max: lifted511, + unit: lifted513, + }) + } + _ => panic() + } - match payload115.allowed_schemes { - None => { - mbt_ffi_store8(iter_base + 8, 0) + @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() + } - () - } - Some(payload117) => { - mbt_ffi_store8(iter_base + 8, 1) + Option::Some(lifted515) + } + _ => 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 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() + } - 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) + 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), + ) - match payload115.allowed_hosts { - None => { - mbt_ffi_store8(iter_base + 20, 0) + Option::Some(result519) + } + _ => panic() + } - () - } - Some(payload122) => { - mbt_ffi_store8(iter_base + 20, 1) + Option::Some(@types.NumericRestrictions::{ + min: lifted516, + max: lifted518, + unit: lifted520, + }) + } + _ => 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 + @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 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) + 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), + ) - () - } - DatetimeType => { - mbt_ffi_store8(iter_base + 0, 28) + Option::Some(result523) + } + _ => panic() + } - () - } - DurationType => { - mbt_ffi_store8(iter_base + 0, 29) + 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 - () - } - QuantityType(payload128) => { - mbt_ffi_store8(iter_base + 0, 30) + let result525 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + array526.push(result525) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - 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 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 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) + let result528 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - match payload128.min { - None => { - mbt_ffi_store8(iter_base + 24, 0) + array529.push(result528) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - () - } - 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 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), + ) - 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) + 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), + ) - match payload128.max { - None => { - mbt_ffi_store8(iter_base + 56, 0) + @types.Role::Other(result533) + } + _ => panic() + } - () - } - 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) + Option::Some(lifted534) + } + _ => panic() + } - 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) + 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)) - () - } - } - cleanup_list.push(ptr129) - cleanup_list.push(address131) + @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 - () - } - UnionType(payload139) => { - mbt_ffi_store8(iter_base + 0, 31) + let result538 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 lifted539 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - 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) + 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), + ) - match iter_elem.discriminator { - Prefix(payload141) => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(result540) + } + _ => 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) + 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 - () - } - Suffix(payload143) => { - mbt_ffi_store8(iter_base + 12, 1) + let result542 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + array543.push(result542) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - () - } - Contains(payload145) => { - mbt_ffi_store8(iter_base + 12, 2) + 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 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 result545 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - Regex(payload147) => { - mbt_ffi_store8(iter_base + 12, 3) + 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), + ) - 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) + Option::Some(result548) + } + _ => panic() + } - () - } - FieldEquals(payload149) => { - mbt_ffi_store8(iter_base + 12, 4) + 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), + ) - 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) + @types.Role::Other(result550) + } + _ => panic() + } - match payload149.literal { - None => { - mbt_ffi_store8(iter_base + 24, 0) + Option::Some(lifted551) + } + _ => panic() + } - () - } - Some(payload152) => { - mbt_ffi_store8(iter_base + 24, 1) + 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)) - 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.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 - () - } - } - cleanup_list.push(ptr150) + let result555 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - FieldAbsent(payload154) => { - mbt_ffi_store8(iter_base + 12, 5) + array556.push(result555) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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) + @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), + ) - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 36, 0) + array559.push(result558) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - Some(payload157) => { - mbt_ffi_store8(iter_base + 36, 1) + @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 - 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) + 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 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 lifted564 : Int? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 52, iter_elem.metadata.aliases.length()) - mbt_ffi_store32(iter_base + 48, address160) + @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 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 result565 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) - } - mbt_ffi_store32(iter_base + 60, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 56, address163) + array566.push(result565) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - match iter_elem.metadata.deprecated { - None => { - mbt_ffi_store8(iter_base + 64, 0) + Option::Some(array566) + } + _ => panic() + } - () - } - Some(payload166) => { - mbt_ffi_store8(iter_base + 64, 1) + 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 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 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), + ) - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 76, 0) + Option::Some(result571) + } + _ => panic() + } - () - } - Some(payload169) => { - mbt_ffi_store8(iter_base + 76, 1) + @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 - match payload169 { - Multimodal => { - mbt_ffi_store8(iter_base + 80, 0) + let result573 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 80, 1) + array574.push(result573) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 80, 2) + Option::Some(array574) + } + _ => panic() + } - () - } - Other(payload173) => { - mbt_ffi_store8(iter_base + 80, 3) + 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 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 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 - () - } - } - 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) + let result579 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - SecretType(payload177) => { - mbt_ffi_store8(iter_base + 0, 32) - mbt_ffi_store32(iter_base + 8, payload177.inner) + array580.push(result579) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - match payload177.category { - None => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(array580) + } + _ => panic() + } - () - } - Some(payload179) => { - mbt_ffi_store8(iter_base + 12, 1) + 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 ptr180 = mbt_ffi_str2ptr(payload179) - mbt_ffi_store32(iter_base + 20, payload179.length()) - mbt_ffi_store32(iter_base + 16, ptr180) - cleanup_list.push(ptr180) + 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)) - () - } - QuotaTokenType(payload181) => { - mbt_ffi_store8(iter_base + 0, 33) + Option::Some(array584) + } + _ => panic() + } - match payload181.resource_name { - None => { - mbt_ffi_store8(iter_base + 8, 0) + @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 - () - } - Some(payload183) => { - mbt_ffi_store8(iter_base + 8, 1) + let result587 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + array588.push(result587) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - () - } - } + Option::Some(array588) + } + _ => panic() + } - () - } - FutureType(payload185) => { - mbt_ffi_store8(iter_base + 0, 34) + 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 - match payload185 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + let result591 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - Some(payload187) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload187) + array592.push(result591) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - () - } - } + Option::Some(array592) + } + _ => panic() + } - () - } - StreamType(payload188) => { - mbt_ffi_store8(iter_base + 0, 35) + @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), + ) - match payload188 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + 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 - () - } - Some(payload190) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload190) + 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), + ) - match iter_elem.metadata.doc { - None => { - mbt_ffi_store8(iter_base + 88, 0) + Option::Some(@types.QuantityValue::{ + mantissa: mbt_ffi_load64(iter_base + 32), + scale: mbt_ffi_load32(iter_base + 40), + unit: result599, + }) + } + _ => panic() + } - () - } - Some(payload192) => { - mbt_ffi_store8(iter_base + 88, 1) + 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), + ) - 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) + 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 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 result603 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + 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), + ) - 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.DiscriminatorRule::Prefix(result604) + } + 1 => { + let result605 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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 + 112, iter_elem.metadata.examples.length()) - mbt_ffi_store32(iter_base + 108, address198) + @types.DiscriminatorRule::Suffix(result605) + } + 2 => { + let result606 = 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(result606) + } + 3 => { + let result607 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - Some(payload201) => { - mbt_ffi_store8(iter_base + 116, 1) + @types.DiscriminatorRule::Regex(result607) + } + 4 => { + let result608 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - 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 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() + } - match iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 128, 0) + @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), + ) - () - } - Some(payload204) => { - mbt_ffi_store8(iter_base + 128, 1) + @types.DiscriminatorRule::FieldAbsent(result611) + } + _ => panic() + } - match payload204 { - Multimodal => { - mbt_ffi_store8(iter_base + 132, 0) + 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), + ) - () - } - UnstructuredText => { - mbt_ffi_store8(iter_base + 132, 1) + Option::Some(result613) + } + _ => panic() + } - () - } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 132, 2) + 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 - () - } - Other(payload208) => { - mbt_ffi_store8(iter_base + 132, 3) + let result615 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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) + 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 - () - } - } - cleanup_list.push(address195) - cleanup_list.push(address198) - } + let result618 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - 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 + array619.push(result618) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - 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 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), + ) - match iter_elem.name { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(result621) + } + _ => panic() + } - () - } - Some(payload214) => { - mbt_ffi_store8(iter_base + 8, 1) + 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), + ) - 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) + @types.Role::Other(result623) + } + _ => panic() + } - () - } - } - mbt_ffi_store32(iter_base + 20, iter_elem.body) - cleanup_list.push(ptr212) - } + Option::Some(lifted624) + } + _ => 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 + 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)) - 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::UnionType(@types.UnionSpec::{ + branches: array626, + }) + } + 32 => { + let lifted629 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result628 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) - () - } - S8Value(payload219) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload219)) + Option::Some(result628) + } + _ => panic() + } - () - } - S16Value(payload220) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload220)) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + 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), + ) - () - } - S32Value(payload221) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload221) + Option::Some(result630) + } + _ => panic() + } - () - } - S64Value(payload222) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload222) + @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() + } - () - } - U8Value(payload223) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload223.to_int()) + @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() + } - () - } - U16Value(payload224) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload224.reinterpret_as_int()) + @types.SchemaTypeBody::StreamType(lifted633) + } + _ => panic() + } - () - } - U32Value(payload225) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload225.reinterpret_as_int()) + 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), + ) - () - } - U64Value(payload226) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload226.reinterpret_as_int64()) + Option::Some(result635) + } + _ => panic() + } - () - } - F32Value(payload227) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload227) + 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 - () - } - F64Value(payload228) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload228) + let result637 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - CharValue(payload229) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload229.to_int()) + array638.push(result637) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - () - } - StringValue(payload230) => { - mbt_ffi_store8(iter_base + 0, 12) + 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 ptr231 = mbt_ffi_str2ptr(payload230) - mbt_ffi_store32(iter_base + 12, payload230.length()) - mbt_ffi_store32(iter_base + 8, ptr231) - cleanup_list.push(ptr231) + let result640 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - RecordValue(payload232) => { - mbt_ffi_store8(iter_base + 0, 13) + array641.push(result640) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - 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) + 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), + ) - () - } - VariantValue(payload235) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload235.case.reinterpret_as_int()) + Option::Some(result643) + } + _ => panic() + } - match payload235.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) + 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), + ) - () - } - Some(payload237) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload237) + @types.Role::Other(result645) + } + _ => panic() + } - () - } - } + Option::Some(lifted646) + } + _ => panic() + } - () - } - EnumValue(payload238) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload238.reinterpret_as_int()) + 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)) - () - } - FlagsValue(payload239) => { - mbt_ffi_store8(iter_base + 0, 16) + 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 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) + let result650 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - () - } - TupleValue(payload242) => { - mbt_ffi_store8(iter_base + 0, 17) + 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), + ) - 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) - } - mbt_ffi_store32(iter_base + 12, payload242.length()) - mbt_ffi_store32(iter_base + 8, address243) - cleanup_list.push(address243) + Option::Some(result651) + } + _ => panic() + } - () - } - ListValue(payload245) => { - mbt_ffi_store8(iter_base + 0, 18) + 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 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) - } - mbt_ffi_store32(iter_base + 12, payload245.length()) - mbt_ffi_store32(iter_base + 8, address246) - cleanup_list.push(address246) + let array684 : Array[@types.SchemaValueNode] = [] + for index685 = 0 + index685 < mbt_ffi_load32(return_area + 36) + index685 = index685 + 1 { + let iter_base = mbt_ffi_load32(return_area + 32) + index685 * 32 - () - } - FixedListValue(payload248) => { - mbt_ffi_store8(iter_base + 0, 19) + let lifted683 = 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), + ) - 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) - } - mbt_ffi_store32(iter_base + 12, payload248.length()) - mbt_ffi_store32(iter_base + 8, address249) - cleanup_list.push(address249) + @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 - () - } - MapValue(payload251) => { - mbt_ffi_store8(iter_base + 0, 20) + array656.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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) - } - mbt_ffi_store32(iter_base + 12, payload251.length()) - mbt_ffi_store32(iter_base + 8, address252) - cleanup_list.push(address252) + @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() + } - () - } - OptionValue(payload254) => { - mbt_ffi_store8(iter_base + 0, 21) + @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 - match payload254 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + array659.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - () - } - Some(payload256) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload256) + @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)) - () - } - ResultValue(payload257) => { - mbt_ffi_store8(iter_base + 0, 22) + @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 - match payload257 { - OkValue(payload258) => { - mbt_ffi_store8(iter_base + 8, 0) + array663.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - match payload258 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + @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 - () - } - Some(payload260) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload260) + 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 - () - } - ErrValue(payload261) => { - mbt_ffi_store8(iter_base + 8, 1) + 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)) - match payload261 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + @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() + } - () - } - Some(payload263) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload263) + @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() + } - () - } - TextValue(payload264) => { - mbt_ffi_store8(iter_base + 0, 23) + @types.SchemaValueNode::ResultValue(lifted672) + } + 23 => { + let result673 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - let ptr265 = mbt_ffi_str2ptr(payload264.text) - mbt_ffi_store32(iter_base + 12, payload264.text.length()) - mbt_ffi_store32(iter_base + 8, ptr265) + 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), + ) - match payload264.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + Option::Some(result674) + } + _ => panic() + } - () - } - Some(payload267) => { - mbt_ffi_store8(iter_base + 16, 1) + @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 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 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), + ) - () - } - } - cleanup_list.push(ptr265) + Option::Some(result677) + } + _ => panic() + } - () - } - BinaryValue(payload269) => { - mbt_ffi_store8(iter_base + 0, 24) + @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), + ) - let ptr270 = mbt_ffi_bytes2ptr(payload269.bytes) + @types.SchemaValueNode::PathValue(result679) + } + 26 => { + let result680 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - mbt_ffi_store32(iter_base + 12, payload269.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr270) + @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), + ) - match payload269.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + @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), + ) - () - } - Some(payload272) => { - mbt_ffi_store8(iter_base + 16, 1) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result682, + body: mbt_ffi_load32(iter_base + 16), + }) + } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) + _ => 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) + array684.push(lifted683) + } + 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: array684, + root: mbt_ffi_load32(return_area + 40), + }, + }) + } + _ => panic() } - } - cleanup_list.push(ptr270) - - () - } - PathValue(payload274) => { - mbt_ffi_store8(iter_base + 0, 25) - - 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) - () + RpcError::RemoteToolError(lifted686) + } + _ => panic() } - UrlValue(payload276) => { - mbt_ffi_store8(iter_base + 0, 26) - 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) - - () - } - 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(), - ) + Result::Err(lifted687) + } + _ => panic() + } + let ret = lifted688 + mbt_ffi_free(address) + mbt_ffi_free(address360) + mbt_ffi_free(address366) + mbt_ffi_free(address438) + mbt_ffi_free(return_area) - () - } - DurationValue(payload279) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload279.nanoseconds) + cleanup_list.each(mbt_ffi_free) + return ret +} - () - } - 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) +///| +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 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 ToolRpc(handle) = self - () - } - UnionValue(payload282) => { - mbt_ffi_store8(iter_base + 0, 30) + 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 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) + 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) + } - () - } - SecretValue(payload284) => { - mbt_ffi_store8(iter_base + 0, 31) + 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 - let @types.Secret(handle285) = payload284 - mbt_ffi_store32(iter_base + 8, handle285) + match iter_elem.body { + RefType(payload) => { + mbt_ffi_store8(iter_base + 0, 0) + mbt_ffi_store32(iter_base + 8, payload) () } - QuotaTokenHandle(payload286) => { - mbt_ffi_store8(iter_base + 0, 32) - - let @types.QuotaToken(handle287) = payload286 - mbt_ffi_store32(iter_base + 8, handle287) + BoolType => { + mbt_ffi_store8(iter_base + 0, 1) () } - } - } - - let (lowered, lowered293) = match stdin { - None => (0, 0) - Some(payload291) => { - let @streams.InputStream(handle292) = payload291 + S8Type(payload1) => { + mbt_ffi_store8(iter_base + 0, 2) - (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, - ) + match payload1 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted468 = match mbt_ffi_load8_u(return_area + 0) { - 0 => Result::Ok(()) - 1 => { - let lifted467 = 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), - ) + () + } + Some(payload3) => { + mbt_ffi_store8(iter_base + 8, 1) - RpcError::ProtocolError(result) - } - 1 => { - let result294 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + match payload3.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - RpcError::Denied(result294) - } - 2 => { - let result295 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + () + } + Some(payload5) => { + mbt_ffi_store8(iter_base + 16, 1) - RpcError::NotFound(result295) - } - 3 => { - let result296 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 8), - mbt_ffi_load32(return_area + 12), - ) + match payload5 { + Signed(payload6) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload6) - RpcError::RemoteInternalError(result296) - } - 4 => { - let lifted466 = 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), - ) + () + } + Unsigned(payload7) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload7.reinterpret_as_int64(), + ) - @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 + () + } + FloatBits(payload8) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload8.reinterpret_as_int64(), + ) - 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), - ) + match payload3.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - @common.ToolError::ConstraintViolation(result301) - } - 4 => { - let result302 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + () + } + Some(payload10) => { + mbt_ffi_store8(iter_base + 40, 1) - @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 + match payload10 { + Signed(payload11) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload11) - let lifted414 = match mbt_ffi_load8_u(iter_base + 0) { - 0 => - @types.SchemaTypeBody::RefType( - mbt_ffi_load32(iter_base + 8), + () + } + Unsigned(payload12) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload12.reinterpret_as_int64(), ) - 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), - ) + () + } + FloatBits(payload13) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload13.reinterpret_as_int64(), + ) - 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), - ) + match payload3.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - array306.push(result305) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + () + } + Some(payload15) => { + mbt_ffi_store8(iter_base + 64, 1) - 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 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 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), - ) + () + } + S16Type(payload17) => { + mbt_ffi_store8(iter_base + 0, 3) - Option::Some(result311) - } - _ => panic() - } + match payload17 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - 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), - ) + () + } + Some(payload19) => { + mbt_ffi_store8(iter_base + 8, 1) - @types.Role::Other(result313) - } - _ => panic() - } + match payload19.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - Option::Some(lifted314) - } - _ => panic() - } + () + } + Some(payload21) => { + mbt_ffi_store8(iter_base + 16, 1) - 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)) + match payload21 { + Signed(payload22) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload22) - @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), - ) + Unsigned(payload23) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload23.reinterpret_as_int64(), + ) - Option::Some(result320) - } - _ => panic() - } + () + } + FloatBits(payload24) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload24.reinterpret_as_int64(), + ) - 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)) + match payload19.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - 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 + () + } + Some(payload26) => { + mbt_ffi_store8(iter_base + 40, 1) - let result325 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload26 { + Signed(payload27) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload27) - array326.push(result325) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) + () + } + Unsigned(payload28) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload28.reinterpret_as_int64(), + ) - let lifted329 : 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), - ) + () + } + FloatBits(payload29) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload29.reinterpret_as_int64(), + ) - Option::Some(result328) - } - _ => panic() - } + () + } + } - let lifted332 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let lifted331 = match - mbt_ffi_load8_u(iter_base + 60) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result330 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 64), - mbt_ffi_load32(iter_base + 68), - ) + () + } + } - @types.Role::Other(result330) - } - _ => panic() - } + match payload19.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - Option::Some(lifted331) - } - _ => panic() - } + () + } + Some(payload31) => { + mbt_ffi_store8(iter_base + 64, 1) - array333.push(@types.VariantCaseType::{ - name: result318, - payload: lifted319, - metadata: @types.MetadataEnvelope::{ - doc: lifted321, - aliases: array323, - examples: array326, - deprecated: lifted329, - role: lifted332, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + 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.SchemaTypeBody::VariantType(array333) - } - 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 result335 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array336.push(result335) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + S32Type(payload33) => { + mbt_ffi_store8(iter_base + 0, 4) - @types.SchemaTypeBody::EnumType(array336) - } - 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 + match payload33 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let result338 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload35) => { + mbt_ffi_store8(iter_base + 8, 1) - array339.push(result338) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload35.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - @types.SchemaTypeBody::FlagsType(array339) - } - 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 + () + } + Some(payload37) => { + mbt_ffi_store8(iter_base + 16, 1) - array341.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload37 { + Signed(payload38) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload38) - @types.SchemaTypeBody::TupleType(array341) + () } - 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), + Unsigned(payload39) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload39.reinterpret_as_int64(), ) - 23 => { - let lifted343 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } - - let lifted344 : 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: lifted343, - err: lifted344, - }) + () } - 24 => { - let lifted348 : 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 result345 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + FloatBits(payload40) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload40.reinterpret_as_int64(), + ) - array346.push(result345) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + () + } + } - Option::Some(array346) - } - _ => panic() - } + () + } + } - let lifted349 : 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() - } + match payload35.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let lifted350 : 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() - } + () + } + Some(payload42) => { + mbt_ffi_store8(iter_base + 40, 1) - let lifted352 : 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), - ) + match payload42 { + Signed(payload43) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload43) - Option::Some(result351) - } - _ => panic() - } + () + } + Unsigned(payload44) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload44.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted348, - min_length: lifted349, - max_length: lifted350, - regex: lifted352, - }) + () } - 25 => { - let lifted356 : 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 + FloatBits(payload45) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload45.reinterpret_as_int64(), + ) - 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 + 12)) + () + } + } - Option::Some(array354) - } - _ => panic() - } + match payload35.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - let lifted357 : 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() - } + () + } + Some(payload47) => { + mbt_ffi_store8(iter_base + 64, 1) - let lifted358 : 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 ptr48 = mbt_ffi_str2ptr(payload47) + mbt_ffi_store32(iter_base + 72, payload47.length()) + mbt_ffi_store32(iter_base + 68, ptr48) + cleanup_list.push(ptr48) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted356, - min_bytes: lifted357, - max_bytes: lifted358, - }) - } - 26 => { - let lifted362 : 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 result359 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array360.push(result359) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + () + } + S64Type(payload49) => { + mbt_ffi_store8(iter_base + 0, 5) - Option::Some(array360) - } - _ => panic() - } + match payload49 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted366 : 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 + () + } + Some(payload51) => { + mbt_ffi_store8(iter_base + 8, 1) - let result363 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload51.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - array364.push(result363) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) + () + } + Some(payload53) => { + mbt_ffi_store8(iter_base + 16, 1) - Option::Some(array364) - } - _ => panic() - } + match payload53 { + Signed(payload54) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload54) - @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, - }) + () } - 27 => { - let lifted370 : 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 + Unsigned(payload55) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload55.reinterpret_as_int64(), + ) - let result367 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + FloatBits(payload56) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload56.reinterpret_as_int64(), + ) - array368.push(result367) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) + () + } + } - Option::Some(array368) - } - _ => panic() - } + () + } + } - let lifted374 : 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 + match payload51.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let result371 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Some(payload58) => { + mbt_ffi_store8(iter_base + 40, 1) - array372.push(result371) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + match payload58 { + Signed(payload59) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload59) - Option::Some(array372) - } - _ => panic() - } + () + } + Unsigned(payload60) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload60.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted370, - allowed_hosts: lifted374, - }) + () } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result375 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + FloatBits(payload61) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload61.reinterpret_as_int64(), ) - 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 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 + 16)) + match payload51.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - let lifted380 : @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), - ) + () + } + Some(payload63) => { + mbt_ffi_store8(iter_base + 64, 1) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 32), - scale: mbt_ffi_load32(iter_base + 40), - unit: result379, - }) - } - _ => 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) - let lifted382 : @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), - ) + () + } + } - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result381, - }) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result375, - allowed_suffixes: array377, - min: lifted380, - max: lifted382, - }) - } - 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 + () + } + U8Type(payload65) => { + mbt_ffi_store8(iter_base + 0, 6) - let result383 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload65 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - let lifted392 = 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), - ) + () + } + Some(payload67) => { + mbt_ffi_store8(iter_base + 8, 1) - @types.DiscriminatorRule::Prefix(result384) - } - 1 => { - let result385 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match payload67.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - @types.DiscriminatorRule::Suffix(result385) - } - 2 => { - let result386 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + Some(payload69) => { + mbt_ffi_store8(iter_base + 16, 1) - @types.DiscriminatorRule::Contains(result386) - } - 3 => { - let result387 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + match payload69 { + Signed(payload70) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload70) - @types.DiscriminatorRule::Regex(result387) - } - 4 => { - let result388 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + Unsigned(payload71) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload71.reinterpret_as_int64(), + ) - let lifted390 : 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), - ) + () + } + FloatBits(payload72) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload72.reinterpret_as_int64(), + ) - Option::Some(result389) - } - _ => panic() - } + () + } + } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result388, - literal: lifted390, - }) - } - 5 => { - let result391 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + () + } + } - @types.DiscriminatorRule::FieldAbsent(result391) - } - _ => panic() - } + match payload67.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let lifted394 : 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), - ) + () + } + Some(payload74) => { + mbt_ffi_store8(iter_base + 40, 1) - Option::Some(result393) - } - _ => panic() - } + match payload74 { + Signed(payload75) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload75) - 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 + () + } + Unsigned(payload76) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload76.reinterpret_as_int64(), + ) - let result395 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + FloatBits(payload77) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload77.reinterpret_as_int64(), + ) - array396.push(result395) - } - 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 result398 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + match payload67.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - array399.push(result398) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + () + } + Some(payload79) => { + mbt_ffi_store8(iter_base + 64, 1) - let lifted402 : 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 ptr80 = mbt_ffi_str2ptr(payload79) + mbt_ffi_store32(iter_base + 72, payload79.length()) + mbt_ffi_store32(iter_base + 68, ptr80) + cleanup_list.push(ptr80) - Option::Some(result401) - } - _ => panic() - } + () + } + } - let lifted405 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted404 = match - mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result403 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + () + } + } + + () + } + 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) - @types.Role::Other(result403) - } - _ => panic() - } + match payload83.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - Option::Some(lifted404) - } - _ => panic() - } + () + } + Some(payload85) => { + mbt_ffi_store8(iter_base + 16, 1) - 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, - }, - }) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + match payload85 { + Signed(payload86) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload86) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array406, - }) + () } - 32 => { - let lifted409 : String? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => { - let result408 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + Unsigned(payload87) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload87.reinterpret_as_int64(), + ) - Option::Some(result408) - } - _ => panic() - } + () + } + FloatBits(payload88) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload88.reinterpret_as_int64(), + ) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted409, - }) + () } - 33 => { - let lifted411 : 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), - ) + } - Option::Some(result410) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted411, - }) - } - 34 => { - let lifted412 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + match payload83.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - @types.SchemaTypeBody::FutureType(lifted412) - } - 35 => { - let lifted413 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + () + } + Some(payload90) => { + mbt_ffi_store8(iter_base + 40, 1) - @types.SchemaTypeBody::StreamType(lifted413) + match payload90 { + Signed(payload91) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload91) + + () } - _ => panic() - } + Unsigned(payload92) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload92.reinterpret_as_int64(), + ) - let lifted416 : 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), + () + } + FloatBits(payload93) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload93.reinterpret_as_int64(), ) - Option::Some(result415) + () } - _ => 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 result417 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + } - array418.push(result417) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + match payload83.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - 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 + () + } + Some(payload95) => { + mbt_ffi_store8(iter_base + 64, 1) - let result420 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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) - array421.push(result420) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + () + } + } - let lifted424 : 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), - ) + () + } + } - Option::Some(result423) - } - _ => panic() - } + () + } + U32Type(payload97) => { + mbt_ffi_store8(iter_base + 0, 8) - let lifted427 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted426 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result425 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + match payload97 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - @types.Role::Other(result425) - } - _ => panic() - } + () + } + Some(payload99) => { + mbt_ffi_store8(iter_base + 8, 1) - Option::Some(lifted426) - } - _ => panic() - } + match payload99.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - array428.push(@types.SchemaTypeNode::{ - body: lifted414, - metadata: @types.MetadataEnvelope::{ - doc: lifted416, - aliases: array418, - examples: array421, - deprecated: lifted424, - role: lifted427, - }, - }) + () } - mbt_ffi_free(mbt_ffi_load32(return_area + 12)) + Some(payload101) => { + mbt_ffi_store8(iter_base + 16, 1) - 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 + match payload101 { + Signed(payload102) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload102) - let result430 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + () + } + Unsigned(payload103) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload103.reinterpret_as_int64(), + ) - let lifted432 : 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), + () + } + FloatBits(payload104) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload104.reinterpret_as_int64(), ) - Option::Some(result431) + () } - _ => panic() } - array433.push(@types.SchemaTypeDef::{ - id: result430, - name: lifted432, - body: mbt_ffi_load32(iter_base + 20), - }) + () } - mbt_ffi_free(mbt_ffi_load32(return_area + 20)) + } - let array464 : Array[@types.SchemaValueNode] = [] - for index465 = 0 - index465 < mbt_ffi_load32(return_area + 36) - index465 = index465 + 1 { - let iter_base = mbt_ffi_load32(return_area + 32) + index465 * 32 + match payload99.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - let lifted463 = 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)), + () + } + 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(), ) - 12 => { - let result435 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + + () + } + FloatBits(payload109) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload109.reinterpret_as_int64(), ) - @types.SchemaValueNode::StringValue(result435) + () } - 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 + } - array436.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } + + 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) - @types.SchemaValueNode::RecordValue(array436) + () } - 14 => { - let lifted438 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => 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.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted438, - }) + () } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + FloatBits(payload120) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload120.reinterpret_as_int64(), ) - 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 - - array439.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array439) + () } - 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 + } - array441.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + } - @types.SchemaValueNode::TupleValue(array441) - } - 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 + match payload115.max { + None => { + mbt_ffi_store8(iter_base + 40, 0) - array443.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + Some(payload122) => { + mbt_ffi_store8(iter_base + 40, 1) - @types.SchemaValueNode::ListValue(array443) + match payload122 { + Signed(payload123) => { + mbt_ffi_store8(iter_base + 48, 0) + mbt_ffi_store64(iter_base + 56, payload123) + + () } - 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 + Unsigned(payload124) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload124.reinterpret_as_int64(), + ) - array445.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + () + } + FloatBits(payload125) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload125.reinterpret_as_int64(), + ) - @types.SchemaValueNode::FixedListValue(array445) + () } - 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 + } - array447.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) - } - 21 => { - let lifted449 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + match payload115.unit { + None => { + mbt_ffi_store8(iter_base + 64, 0) - @types.SchemaValueNode::OptionValue(lifted449) - } - 22 => { - let lifted452 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted450 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + () + } + Some(payload127) => { + mbt_ffi_store8(iter_base + 64, 1) - @types.ResultValuePayload::OkValue(lifted450) - } - 1 => { - let lifted451 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + 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) - @types.ResultValuePayload::ErrValue(lifted451) - } - _ => panic() - } + () + } + } - @types.SchemaValueNode::ResultValue(lifted452) - } - 23 => { - let result453 = 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) { - 0 => Option::None - 1 => { - let result454 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + () + } + F32Type(payload129) => { + mbt_ffi_store8(iter_base + 0, 10) - Option::Some(result454) - } - _ => panic() - } + match payload129 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result453, - language: lifted455, - }) - } - 24 => { - let result456 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + () + } + Some(payload131) => { + mbt_ffi_store8(iter_base + 8, 1) - let lifted458 : 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), - ) + match payload131.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - Option::Some(result457) - } - _ => panic() - } + () + } + Some(payload133) => { + mbt_ffi_store8(iter_base + 16, 1) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result456, - mime_type: lifted458, - }) + match payload133 { + Signed(payload134) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload134) + + () } - 25 => { - let result459 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + Unsigned(payload135) => { + mbt_ffi_store8(iter_base + 24, 1) + mbt_ffi_store64( + iter_base + 32, + payload135.reinterpret_as_int64(), ) - @types.SchemaValueNode::PathValue(result459) + () } - 26 => { - let result460 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + FloatBits(payload136) => { + mbt_ffi_store8(iter_base + 24, 2) + mbt_ffi_store64( + iter_base + 32, + payload136.reinterpret_as_int64(), ) - @types.SchemaValueNode::UrlValue(result460) + () } - 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 result461 = 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, - }) + () + } + } + + 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) + + () } - 30 => { - let result462 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + Unsigned(payload140) => { + mbt_ffi_store8(iter_base + 48, 1) + mbt_ffi_store64( + iter_base + 56, + payload140.reinterpret_as_int64(), ) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result462, - body: mbt_ffi_load32(iter_base + 16), - }) + () } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), + FloatBits(payload141) => { + mbt_ffi_store8(iter_base + 48, 2) + mbt_ffi_store64( + iter_base + 56, + payload141.reinterpret_as_int64(), ) - _ => panic() + + () + } } - array464.push(lifted463) + () } - 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: array464, - root: mbt_ffi_load32(return_area + 40), - }, - }) + 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) + + () + } } - _ => panic() - } - RpcError::RemoteToolError(lifted466) + () + } } - _ => panic() + + () } + F64Type(payload145) => { + mbt_ffi_store8(iter_base + 0, 11) - Result::Err(lifted467) - } - _ => panic() - } - let ret = lifted468 - mbt_ffi_free(address) - mbt_ffi_free(address210) - mbt_ffi_free(address216) - mbt_ffi_free(address288) - mbt_ffi_free(return_area) + match payload145 { + None => { + mbt_ffi_store8(iter_base + 8, 0) - cleanup_list.each(mbt_ffi_free) - return ret -} + () + } + Some(payload147) => { + mbt_ffi_store8(iter_base + 8, 1) -///| -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] = [] + match payload147.min { + None => { + mbt_ffi_store8(iter_base + 16, 0) - let ToolRpc(handle) = self + () + } + Some(payload149) => { + mbt_ffi_store8(iter_base + 16, 1) - 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 + match payload149 { + Signed(payload150) => { + mbt_ffi_store8(iter_base + 24, 0) + mbt_ffi_store64(iter_base + 32, payload150) - 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) - } + () + } + 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(), + ) + + () + } + } - 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 + () + } + } - 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) + () + } + } () } @@ -20114,17 +27544,19 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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 { @@ -20133,51 +27565,51 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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( + let address169 = 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 + 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( + let address172 = 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 + 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 => { @@ -20185,13 +27617,13 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -20203,10 +27635,10 @@ pub fn ToolRpc::async_invoke_and_await( () } - Some(payload28) => { + Some(payload178) => { mbt_ffi_store8(iter_base + 52, 1) - match payload28 { + match payload178 { Multimodal => { mbt_ffi_store8(iter_base + 56, 0) @@ -20222,13 +27654,13 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -20237,27 +27669,29 @@ pub fn ToolRpc::async_invoke_and_await( () } } - 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 => { @@ -20265,9 +27699,9 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -20279,51 +27713,51 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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( + let address194 = 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 + 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( + let address197 = 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 + 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 => { @@ -20331,13 +27765,13 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -20349,10 +27783,10 @@ pub fn ToolRpc::async_invoke_and_await( () } - Some(payload53) => { + Some(payload203) => { mbt_ffi_store8(iter_base + 56, 1) - match payload53 { + match payload203 { Multimodal => { mbt_ffi_store8(iter_base + 60, 0) @@ -20368,13 +27802,13 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -20383,121 +27817,127 @@ pub fn ToolRpc::async_invoke_and_await( () } } - 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) () } @@ -20505,77 +27945,79 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -20583,59 +28025,61 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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()) () } @@ -20643,64 +28087,64 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -20708,62 +28152,62 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -20781,165 +28225,165 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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, + let address281 = mbt_ffi_malloc( + payload278.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 + 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) () } @@ -20951,51 +28395,51 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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( + let address310 = 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 + 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( + let address313 = 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 + 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 => { @@ -21003,13 +28447,13 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -21021,10 +28465,10 @@ pub fn ToolRpc::async_invoke_and_await( () } - Some(payload169) => { + Some(payload319) => { mbt_ffi_store8(iter_base + 76, 1) - match payload169 { + match payload319 { Multimodal => { mbt_ffi_store8(iter_base + 80, 0) @@ -21040,13 +28484,13 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -21055,33 +28499,33 @@ pub fn ToolRpc::async_invoke_and_await( () } } - 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) - mbt_ffi_store32(iter_base + 8, payload177.inner) + mbt_ffi_store32(iter_base + 8, payload327.inner) - match payload177.category { + match payload327.category { None => { mbt_ffi_store8(iter_base + 12, 0) () } - Some(payload179) => { + Some(payload329) => { mbt_ffi_store8(iter_base + 12, 1) - let ptr180 = mbt_ffi_str2ptr(payload179) - mbt_ffi_store32(iter_base + 20, payload179.length()) - mbt_ffi_store32(iter_base + 16, ptr180) - cleanup_list.push(ptr180) + let ptr330 = mbt_ffi_str2ptr(payload329) + mbt_ffi_store32(iter_base + 20, payload329.length()) + mbt_ffi_store32(iter_base + 16, ptr330) + cleanup_list.push(ptr330) () } @@ -21089,22 +28533,22 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -21112,18 +28556,18 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -21131,18 +28575,18 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) () } @@ -21158,47 +28602,47 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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 => { @@ -21206,622 +28650,1431 @@ pub fn ToolRpc::async_invoke_and_await( () } - 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) + + () + } + } + + 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 iter_elem.metadata.role { - None => { - mbt_ffi_store8(iter_base + 128, 0) + match payload407 { + OkValue(payload408) => { + mbt_ffi_store8(iter_base + 8, 0) - () - } - Some(payload204) => { - mbt_ffi_store8(iter_base + 128, 1) + match payload408 { + None => { + mbt_ffi_store8(iter_base + 12, 0) - match payload204 { - Multimodal => { - mbt_ffi_store8(iter_base + 132, 0) + () + } + Some(payload410) => { + mbt_ffi_store8(iter_base + 12, 1) + mbt_ffi_store32(iter_base + 16, payload410) + + () + } + } () } - UnstructuredText => { - mbt_ffi_store8(iter_base + 132, 1) + 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) + + () + } + } () } - UnstructuredBinary => { - mbt_ffi_store8(iter_base + 132, 2) + } + + () + } + 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) () } - Other(payload208) => { - mbt_ffi_store8(iter_base + 132, 3) + Some(payload417) => { + mbt_ffi_store8(iter_base + 16, 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) + 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) () } - } - cleanup_list.push(address195) - cleanup_list.push(address198) - } + BinaryValue(payload419) => { + mbt_ffi_store8(iter_base + 0, 24) - 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 ptr420 = mbt_ffi_bytes2ptr(payload419.bytes) - 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) + mbt_ffi_store32(iter_base + 12, payload419.bytes.length()) + mbt_ffi_store32(iter_base + 8, ptr420) - match iter_elem.name { - None => { - mbt_ffi_store8(iter_base + 8, 0) + match payload419.mime_type { + None => { + mbt_ffi_store8(iter_base + 16, 0) - () - } - Some(payload214) => { - mbt_ffi_store8(iter_base + 8, 1) + () + } + Some(payload422) => { + mbt_ffi_store8(iter_base + 16, 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 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) () } - } - mbt_ffi_store32(iter_base + 20, iter_elem.body) - cleanup_list.push(ptr212) - } - - 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 + PathValue(payload424) => { + mbt_ffi_store8(iter_base + 0, 25) - match iter_elem { - BoolValue(payload218) => { - mbt_ffi_store8(iter_base + 0, 0) - mbt_ffi_store8(iter_base + 8, if payload218 { 1 } else { 0 }) + 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) () } - S8Value(payload219) => { - mbt_ffi_store8(iter_base + 0, 1) - mbt_ffi_store8(iter_base + 8, mbt_ffi_extend8(payload219)) + UrlValue(payload426) => { + mbt_ffi_store8(iter_base + 0, 26) - () - } - S16Value(payload220) => { - mbt_ffi_store8(iter_base + 0, 2) - mbt_ffi_store16(iter_base + 8, mbt_ffi_extend16(payload220)) + 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) () } - S32Value(payload221) => { - mbt_ffi_store8(iter_base + 0, 3) - mbt_ffi_store32(iter_base + 8, payload221) + 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(), + ) () } - S64Value(payload222) => { - mbt_ffi_store8(iter_base + 0, 4) - mbt_ffi_store64(iter_base + 8, payload222) + DurationValue(payload429) => { + mbt_ffi_store8(iter_base + 0, 28) + mbt_ffi_store64(iter_base + 8, payload429.nanoseconds) () } - U8Value(payload223) => { - mbt_ffi_store8(iter_base + 0, 5) - mbt_ffi_store8(iter_base + 8, payload223.to_int()) + 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) - () - } - U16Value(payload224) => { - mbt_ffi_store8(iter_base + 0, 6) - mbt_ffi_store16(iter_base + 8, payload224.reinterpret_as_int()) + 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) () } - U32Value(payload225) => { - mbt_ffi_store8(iter_base + 0, 7) - mbt_ffi_store32(iter_base + 8, payload225.reinterpret_as_int()) + UnionValue(payload432) => { + mbt_ffi_store8(iter_base + 0, 30) - () - } - U64Value(payload226) => { - mbt_ffi_store8(iter_base + 0, 8) - mbt_ffi_store64(iter_base + 8, payload226.reinterpret_as_int64()) + 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) () } - F32Value(payload227) => { - mbt_ffi_store8(iter_base + 0, 9) - mbt_ffi_storef32(iter_base + 8, payload227) + SecretValue(payload434) => { + mbt_ffi_store8(iter_base + 0, 31) - () - } - F64Value(payload228) => { - mbt_ffi_store8(iter_base + 0, 10) - mbt_ffi_storef64(iter_base + 8, payload228) + let @types.Secret(handle435) = payload434 + mbt_ffi_store32(iter_base + 8, handle435) () } - CharValue(payload229) => { - mbt_ffi_store8(iter_base + 0, 11) - mbt_ffi_store32(iter_base + 8, payload229.to_int()) + QuotaTokenHandle(payload436) => { + mbt_ffi_store8(iter_base + 0, 32) + + let @types.QuotaToken(handle437) = payload436 + mbt_ffi_store32(iter_base + 8, handle437) () } - StringValue(payload230) => { - mbt_ffi_store8(iter_base + 0, 12) + } + } - 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) + let (lowered, lowered443) = match stdin { + None => (0, 0) + Some(payload441) => { + let @streams.InputStream(handle442) = payload441 - () - } - RecordValue(payload232) => { - mbt_ffi_store8(iter_base + 0, 13) + (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) - 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) + cleanup_list.each(mbt_ffi_free) + return ret +} - () - } - VariantValue(payload235) => { - mbt_ffi_store8(iter_base + 0, 14) - mbt_ffi_store32(iter_base + 8, payload235.case.reinterpret_as_int()) +///| +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 +} - match payload235.payload { - None => { - mbt_ffi_store8(iter_base + 12, 0) +///| +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) - () - } - Some(payload237) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload237) + let lifted480 : Result[@common.InvocationResult, RpcError]? = match + mbt_ffi_load8_u(return_area + 0) { + 0 => Option::None + 1 => { + let lifted479 = match mbt_ffi_load8_u(return_area + 4) { + 0 => { + let lifted230 : @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() + } - () - } - EnumValue(payload238) => { - mbt_ffi_store8(iter_base + 0, 15) - mbt_ffi_store32(iter_base + 8, payload238.reinterpret_as_int()) + 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() + } - () - } - FlagsValue(payload239) => { - mbt_ffi_store8(iter_base + 0, 16) + 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), + ) - 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) + Option::Some(result9) + } + _ => panic() + } - () - } - TupleValue(payload242) => { - mbt_ffi_store8(iter_base + 0, 17) + Option::Some(@types.NumericRestrictions::{ + min: lifted6, + max: lifted8, + unit: lifted10, + }) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 12, payload242.length()) - mbt_ffi_store32(iter_base + 8, address243) - cleanup_list.push(address243) + @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() + } - () - } - ListValue(payload245) => { - mbt_ffi_store8(iter_base + 0, 18) + Option::Some(lifted12) + } + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 12, payload245.length()) - mbt_ffi_store32(iter_base + 8, address246) - cleanup_list.push(address246) + 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() + } - () - } - FixedListValue(payload248) => { - mbt_ffi_store8(iter_base + 0, 19) + Option::Some(lifted14) + } + _ => 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) - } - mbt_ffi_store32(iter_base + 12, payload248.length()) - mbt_ffi_store32(iter_base + 8, address249) - cleanup_list.push(address249) + 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), + ) - () - } - MapValue(payload251) => { - mbt_ffi_store8(iter_base + 0, 20) + Option::Some(result16) + } + _ => panic() + } - 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) - } - mbt_ffi_store32(iter_base + 12, payload251.length()) - mbt_ffi_store32(iter_base + 8, address252) - cleanup_list.push(address252) + Option::Some(@types.NumericRestrictions::{ + min: lifted13, + max: lifted15, + unit: lifted17, + }) + } + _ => panic() + } - () - } - OptionValue(payload254) => { - mbt_ffi_store8(iter_base + 0, 21) + @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() + } - match payload254 { - None => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(lifted19) + } + _ => panic() + } - () - } - Some(payload256) => { - mbt_ffi_store8(iter_base + 8, 1) - mbt_ffi_store32(iter_base + 12, payload256) + 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() + } - () - } - ResultValue(payload257) => { - mbt_ffi_store8(iter_base + 0, 22) + 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), + ) - match payload257 { - OkValue(payload258) => { - mbt_ffi_store8(iter_base + 8, 0) + Option::Some(result23) + } + _ => panic() + } - match payload258 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(@types.NumericRestrictions::{ + min: lifted20, + max: lifted22, + unit: lifted24, + }) + } + _ => panic() + } - () - } - Some(payload260) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload260) + @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() + } - () - } - ErrValue(payload261) => { - mbt_ffi_store8(iter_base + 8, 1) + 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() + } - match payload261 { - None => { - mbt_ffi_store8(iter_base + 12, 0) + Option::Some(lifted28) + } + _ => panic() + } - () - } - Some(payload263) => { - mbt_ffi_store8(iter_base + 12, 1) - mbt_ffi_store32(iter_base + 16, payload263) + 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() + } - () - } - TextValue(payload264) => { - mbt_ffi_store8(iter_base + 0, 23) + @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() + } - let ptr265 = mbt_ffi_str2ptr(payload264.text) - mbt_ffi_store32(iter_base + 12, payload264.text.length()) - mbt_ffi_store32(iter_base + 8, ptr265) + Option::Some(lifted33) + } + _ => panic() + } - match payload264.language { - None => { - mbt_ffi_store8(iter_base + 16, 0) + 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() + } - () - } - Some(payload267) => { - mbt_ffi_store8(iter_base + 16, 1) + 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), + ) - 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) + Option::Some(result37) + } + _ => panic() + } - () - } - } - cleanup_list.push(ptr265) + Option::Some(@types.NumericRestrictions::{ + min: lifted34, + max: lifted36, + unit: lifted38, + }) + } + _ => panic() + } - () - } - BinaryValue(payload269) => { - mbt_ffi_store8(iter_base + 0, 24) + @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() + } - let ptr270 = mbt_ffi_bytes2ptr(payload269.bytes) + Option::Some(lifted40) + } + _ => panic() + } - mbt_ffi_store32(iter_base + 12, payload269.bytes.length()) - mbt_ffi_store32(iter_base + 8, ptr270) + 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() + } - match payload269.mime_type { - None => { - mbt_ffi_store8(iter_base + 16, 0) + Option::Some(lifted42) + } + _ => panic() + } - () - } - Some(payload272) => { - mbt_ffi_store8(iter_base + 16, 1) + 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), + ) - 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) + Option::Some(result44) + } + _ => panic() + } - () - } - } - cleanup_list.push(ptr270) + Option::Some(@types.NumericRestrictions::{ + min: lifted41, + max: lifted43, + unit: lifted45, + }) + } + _ => panic() + } - () - } - PathValue(payload274) => { - mbt_ffi_store8(iter_base + 0, 25) + @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() + } - 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(lifted47) + } + _ => panic() + } - () - } - UrlValue(payload276) => { - mbt_ffi_store8(iter_base + 0, 26) + 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() + } - 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(lifted49) + } + _ => 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 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), + ) - () - } - DurationValue(payload279) => { - mbt_ffi_store8(iter_base + 0, 28) - mbt_ffi_store64(iter_base + 8, payload279.nanoseconds) + Option::Some(result51) + } + _ => 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) + Option::Some(@types.NumericRestrictions::{ + min: lifted48, + max: lifted50, + unit: lifted52, + }) + } + _ => 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) + @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() + } - () - } - UnionValue(payload282) => { - mbt_ffi_store8(iter_base + 0, 30) + Option::Some(lifted54) + } + _ => 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) + 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() + } - () - } - SecretValue(payload284) => { - mbt_ffi_store8(iter_base + 0, 31) + Option::Some(lifted56) + } + _ => panic() + } - let @types.Secret(handle285) = payload284 - mbt_ffi_store32(iter_base + 8, handle285) + 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), + ) - () - } - QuotaTokenHandle(payload286) => { - mbt_ffi_store8(iter_base + 0, 32) + Option::Some(result58) + } + _ => panic() + } - let @types.QuotaToken(handle287) = payload286 - mbt_ffi_store32(iter_base + 8, handle287) + 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() + } - let (lowered, lowered293) = match stdin { - None => (0, 0) - Some(payload291) => { - let @streams.InputStream(handle292) = payload291 + Option::Some(lifted61) + } + _ => 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) + 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() + } - cleanup_list.each(mbt_ffi_free) - return ret -} + Option::Some(lifted63) + } + _ => panic() + } -///| -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 -} + 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), + ) -///| -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) + Option::Some(result65) + } + _ => panic() + } - let lifted340 : Result[@common.InvocationResult, RpcError]? = match - mbt_ffi_load8_u(return_area + 0) { - 0 => Option::None - 1 => { - let lifted339 = match mbt_ffi_load8_u(return_area + 4) { - 0 => { - let lifted160 : @types.TypedSchemaValue? = match - mbt_ffi_load8_u(return_area + 8) { - 0 => Option::None - 1 => { - 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 + Option::Some(@types.NumericRestrictions::{ + min: lifted62, + max: lifted64, + unit: lifted66, + }) + } + _ => panic() + } - let lifted108 = 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(lifted67) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array10 : Array[@types.NamedFieldType] = [] - for index11 = 0 - index11 < mbt_ffi_load32(iter_base + 12) - index11 = index11 + 1 { + 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) + - index11 * 68 + index81 * 68 - let result = mbt_ffi_ptr2str( + let result68 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted : String? = match + let lifted70 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result0 = mbt_ffi_ptr2str( + let result69 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result0) + Option::Some(result69) } _ => panic() } @@ -21833,256 +30086,256 @@ pub fn FutureInvokeResult::get( let iter_base = mbt_ffi_load32(iter_base + 24) + index * 8 - let result1 = mbt_ffi_ptr2str( + let result71 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array.push(result1) + array.push(result71) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array3 : Array[String] = [] - for index4 = 0 - index4 < mbt_ffi_load32(iter_base + 36) - index4 = index4 + 1 { + 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) + - index4 * 8 + index74 * 8 - let result2 = mbt_ffi_ptr2str( + let result72 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array3.push(result2) + array73.push(result72) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted6 : String? = match + let lifted76 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result5 = mbt_ffi_ptr2str( + let result75 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result5) + Option::Some(result75) } _ => panic() } - let lifted9 : @types.Role? = match + let lifted79 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted8 = match mbt_ffi_load8_u(iter_base + 56) { + let lifted78 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result7 = mbt_ffi_ptr2str( + let result77 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result7) + @types.Role::Other(result77) } _ => panic() } - Option::Some(lifted8) + Option::Some(lifted78) } _ => panic() } - array10.push(@types.NamedFieldType::{ - name: result, + array80.push(@types.NamedFieldType::{ + name: result68, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted, + doc: lifted70, aliases: array, - examples: array3, - deprecated: lifted6, - role: lifted9, + examples: array73, + deprecated: lifted76, + role: lifted79, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array10) - } - 15 => { - let array27 : Array[@types.VariantCaseType] = [] - for index28 = 0 - index28 < mbt_ffi_load32(iter_base + 12) - index28 = index28 + 1 { + @types.SchemaTypeBody::RecordType(array80) + } + 15 => { + 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) + - index28 * 72 + index98 * 72 - let result12 = mbt_ffi_ptr2str( + let result82 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted13 : Int? = match + let lifted83 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted15 : String? = match + let lifted85 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result14 = mbt_ffi_ptr2str( + let result84 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result14) + Option::Some(result84) } _ => panic() } - let array17 : Array[String] = [] - for index18 = 0 - index18 < mbt_ffi_load32(iter_base + 32) - index18 = index18 + 1 { + 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) + - index18 * 8 + index88 * 8 - let result16 = mbt_ffi_ptr2str( + let result86 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array17.push(result16) + array87.push(result86) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array20 : Array[String] = [] - for index21 = 0 - index21 < mbt_ffi_load32(iter_base + 40) - index21 = index21 + 1 { + 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) + - index21 * 8 + index91 * 8 - let result19 = mbt_ffi_ptr2str( + let result89 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array20.push(result19) + array90.push(result89) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted23 : String? = match + let lifted93 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result22 = mbt_ffi_ptr2str( + let result92 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result22) + Option::Some(result92) } _ => panic() } - let lifted26 : @types.Role? = match + let lifted96 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted25 = match mbt_ffi_load8_u(iter_base + 60) { + let lifted95 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result24 = mbt_ffi_ptr2str( + let result94 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result24) + @types.Role::Other(result94) } _ => panic() } - Option::Some(lifted25) + Option::Some(lifted95) } _ => panic() } - array27.push(@types.VariantCaseType::{ - name: result12, - payload: lifted13, + array97.push(@types.VariantCaseType::{ + name: result82, + payload: lifted83, metadata: @types.MetadataEnvelope::{ - doc: lifted15, - aliases: array17, - examples: array20, - deprecated: lifted23, - role: lifted26, + doc: lifted85, + aliases: array87, + examples: array90, + deprecated: lifted93, + role: lifted96, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array27) + @types.SchemaTypeBody::VariantType(array97) } 16 => { - let array30 : Array[String] = [] - for index31 = 0 - index31 < mbt_ffi_load32(iter_base + 12) - index31 = index31 + 1 { + 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) + - index31 * 8 + index101 * 8 - let result29 = mbt_ffi_ptr2str( + let result99 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array30.push(result29) + array100.push(result99) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array30) + @types.SchemaTypeBody::EnumType(array100) } 17 => { - let array33 : Array[String] = [] - for index34 = 0 - index34 < mbt_ffi_load32(iter_base + 12) - index34 = index34 + 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) + - index34 * 8 + index104 * 8 - let result32 = mbt_ffi_ptr2str( + let result102 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array33.push(result32) + array103.push(result102) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array33) + @types.SchemaTypeBody::FlagsType(array103) } 18 => { - let array35 : Array[Int] = [] - for index36 = 0 - index36 < mbt_ffi_load32(iter_base + 12) - index36 = index36 + 1 { + 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) + - index36 * 4 + index106 * 4 - array35.push(mbt_ffi_load32(iter_base + 0)) + array105.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array35) + @types.SchemaTypeBody::TupleType(array105) } 19 => @types.SchemaTypeBody::ListType( @@ -22103,13 +30356,14 @@ pub fn FutureInvokeResult::get( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted37 : Int? = match mbt_ffi_load8_u(iter_base + 8) { + let lifted107 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted38 : Int? = match + let lifted108 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -22117,37 +30371,37 @@ pub fn FutureInvokeResult::get( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted37, - err: lifted38, + ok: lifted107, + err: lifted108, }) } 24 => { - let lifted42 : Array[String]? = match + let lifted112 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array40 : Array[String] = [] - for index41 = 0 - index41 < mbt_ffi_load32(iter_base + 16) - index41 = index41 + 1 { + 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) + - index41 * 8 + index111 * 8 - let result39 = mbt_ffi_ptr2str( + let result109 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array40.push(result39) + array110.push(result109) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array40) + Option::Some(array110) } _ => panic() } - let lifted43 : UInt? = match + let lifted113 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -22157,7 +30411,7 @@ pub fn FutureInvokeResult::get( _ => panic() } - let lifted44 : UInt? = match + let lifted114 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -22167,54 +30421,54 @@ pub fn FutureInvokeResult::get( _ => panic() } - let lifted46 : String? = match + let lifted116 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result45 = mbt_ffi_ptr2str( + let result115 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result45) + Option::Some(result115) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted42, - min_length: lifted43, - max_length: lifted44, - regex: lifted46, + languages: lifted112, + min_length: lifted113, + max_length: lifted114, + regex: lifted116, }) } 25 => { - let lifted50 : Array[String]? = match + let lifted120 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array48 : Array[String] = [] - for index49 = 0 - index49 < mbt_ffi_load32(iter_base + 16) - index49 = index49 + 1 { + 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) + - index49 * 8 + index119 * 8 - let result47 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array48) + Option::Some(array118) } _ => panic() } - let lifted51 : UInt? = match + let lifted121 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -22224,7 +30478,7 @@ pub fn FutureInvokeResult::get( _ => panic() } - let lifted52 : UInt? = match + let lifted122 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -22235,58 +30489,58 @@ pub fn FutureInvokeResult::get( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted50, - min_bytes: lifted51, - max_bytes: lifted52, + mime_types: lifted120, + min_bytes: lifted121, + max_bytes: lifted122, }) } 26 => { - let lifted56 : Array[String]? = match + let lifted126 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array54 : Array[String] = [] - for index55 = 0 - index55 < mbt_ffi_load32(iter_base + 20) - index55 = index55 + 1 { + 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) + - index55 * 8 + index125 * 8 - let result53 = mbt_ffi_ptr2str( + let result123 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array54.push(result53) + array124.push(result123) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array54) + Option::Some(array124) } _ => panic() } - let lifted60 : Array[String]? = match + let lifted130 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array58 : Array[String] = [] - for index59 = 0 - index59 < mbt_ffi_load32(iter_base + 32) - index59 = index59 + 1 { + 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) + - index59 * 8 + index129 * 8 - let result57 = mbt_ffi_ptr2str( + 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 + 28)) - Option::Some(array58) + Option::Some(array128) } _ => panic() } @@ -22298,1259 +30552,2070 @@ pub fn FutureInvokeResult::get( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted56, - allowed_extensions: lifted60, + allowed_mime_types: lifted126, + allowed_extensions: lifted130, }) } 27 => { - let lifted64 : Array[String]? = match + let lifted134 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array62 : Array[String] = [] - for index63 = 0 - index63 < mbt_ffi_load32(iter_base + 16) - index63 = index63 + 1 { + 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) + - index63 * 8 + index133 * 8 - let result61 = mbt_ffi_ptr2str( + 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 + 12)) - Option::Some(array62) + Option::Some(array132) + } + _ => panic() + } + + let lifted138 : Array[String]? = match + mbt_ffi_load8_u(iter_base + 20) { + 0 => Option::None + 1 => { + 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 + + 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 + 24)) + + Option::Some(array136) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ + allowed_schemes: lifted134, + allowed_hosts: lifted138, + }) + } + 28 => @types.SchemaTypeBody::DatetimeType + 29 => @types.SchemaTypeBody::DurationType + 30 => { + let result139 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + 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 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 lifted144 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + 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 lifted146 : @types.QuantityValue? = match + mbt_ffi_load8_u(iter_base + 56) { + 0 => Option::None + 1 => { + let result145 = 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: result145, + }) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ + base_unit: result139, + allowed_suffixes: array141, + min: lifted144, + max: lifted146, + }) + } + 31 => { + 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 + + let result147 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + let lifted156 = match mbt_ffi_load8_u(iter_base + 12) { + 0 => { + let result148 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Prefix(result148) + } + 1 => { + let result149 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Suffix(result149) + } + 2 => { + let result150 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Contains(result150) + } + 3 => { + let result151 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::Regex(result151) + } + 4 => { + let result152 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + let lifted154 : String? = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => Option::None + 1 => { + let result153 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 28), + mbt_ffi_load32(iter_base + 32), + ) + + Option::Some(result153) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ + field_name: result152, + literal: lifted154, + }) + } + 5 => { + let result155 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + @types.DiscriminatorRule::FieldAbsent(result155) + } + _ => panic() + } + + let lifted158 : String? = match + mbt_ffi_load8_u(iter_base + 36) { + 0 => Option::None + 1 => { + let result157 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 40), + mbt_ffi_load32(iter_base + 44), + ) + + Option::Some(result157) + } + _ => panic() + } + + 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 result159 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array160.push(result159) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + + 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 result162 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) + + array163.push(result162) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + + let lifted166 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result165 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result165) + } + _ => panic() + } + + let lifted169 : @types.Role? = match + mbt_ffi_load8_u(iter_base + 76) { + 0 => Option::None + 1 => { + let lifted168 = match + mbt_ffi_load8_u(iter_base + 80) { + 0 => @types.Role::Multimodal + 1 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result167 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 84), + mbt_ffi_load32(iter_base + 88), + ) + + @types.Role::Other(result167) + } + _ => panic() + } + + Option::Some(lifted168) + } + _ => panic() + } + + 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::UnionType(@types.UnionSpec::{ + branches: array170, + }) + } + 32 => { + let lifted173 : String? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => { + let result172 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 16), + mbt_ffi_load32(iter_base + 20), + ) + + Option::Some(result172) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ + inner: mbt_ffi_load32(iter_base + 8), + category: lifted173, + }) + } + 33 => { + let lifted175 : String? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result174 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) + + Option::Some(result174) } _ => panic() } - let lifted68 : Array[String]? = match - mbt_ffi_load8_u(iter_base + 20) { + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ + resource_name: lifted175, + }) + } + 34 => { + let lifted176 : Int? = 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 + 28) - index67 = index67 + 1 { - let iter_base = mbt_ffi_load32(iter_base + 24) + - index67 * 8 - - let result65 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) - - array66.push(result65) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - Option::Some(array66) - } + @types.SchemaTypeBody::FutureType(lifted176) + } + 35 => { + 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::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted64, - allowed_hosts: lifted68, - }) + @types.SchemaTypeBody::StreamType(lifted177) } - 28 => @types.SchemaTypeBody::DatetimeType - 29 => @types.SchemaTypeBody::DurationType - 30 => { - let result69 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), + _ => panic() + } + + 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), ) - 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 + Option::Some(result179) + } + _ => panic() + } - let result70 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 - array71.push(result70) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) + let result181 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - let lifted74 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result73 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 44), - mbt_ffi_load32(iter_base + 48), - ) + array182.push(result181) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 32), - scale: mbt_ffi_load32(iter_base + 40), - unit: result73, - }) - } - _ => panic() - } + 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 lifted76 : @types.QuantityValue? = match - mbt_ffi_load8_u(iter_base + 56) { - 0 => Option::None - 1 => { - let result75 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 76), - mbt_ffi_load32(iter_base + 80), + 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) + } + _ => panic() + } + + 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 => @types.Role::UnstructuredText + 2 => @types.Role::UnstructuredBinary + 3 => { + let result189 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 136), + mbt_ffi_load32(iter_base + 140), ) - Option::Some(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 64), - scale: mbt_ffi_load32(iter_base + 72), - unit: result75, - }) + @types.Role::Other(result189) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result69, - allowed_suffixes: array71, - min: lifted74, - max: lifted76, - }) + Option::Some(lifted190) } - 31 => { - 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 + _ => panic() + } - let result77 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + 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 lifted86 = match mbt_ffi_load8_u(iter_base + 12) { - 0 => { - let result78 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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 - @types.DiscriminatorRule::Prefix(result78) - } - 1 => { - let result79 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let result194 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), + ) - @types.DiscriminatorRule::Suffix(result79) - } - 2 => { - let result80 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + let lifted196 : String? = match mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let result195 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 12), + mbt_ffi_load32(iter_base + 16), + ) - @types.DiscriminatorRule::Contains(result80) - } - 3 => { - let result81 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + Option::Some(result195) + } + _ => panic() + } - @types.DiscriminatorRule::Regex(result81) - } - 4 => { - let result82 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + 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 lifted84 : String? = match - mbt_ffi_load8_u(iter_base + 24) { - 0 => Option::None - 1 => { - let result83 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 28), - mbt_ffi_load32(iter_base + 32), - ) + let array228 : Array[@types.SchemaValueNode] = [] + for index229 = 0 + index229 < mbt_ffi_load32(return_area + 36) + index229 = index229 + 1 { + let iter_base = mbt_ffi_load32(return_area + 32) + index229 * 32 - Option::Some(result83) - } - _ => panic() - } + let lifted227 = 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.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result82, - literal: lifted84, - }) - } - 5 => { - let result85 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), - mbt_ffi_load32(iter_base + 20), - ) + @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 - @types.DiscriminatorRule::FieldAbsent(result85) - } - _ => panic() - } + array200.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let lifted88 : String? = match - mbt_ffi_load8_u(iter_base + 36) { - 0 => Option::None - 1 => { - let result87 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 40), - mbt_ffi_load32(iter_base + 44), - ) + @types.SchemaValueNode::RecordValue(array200) + } + 14 => { + let lifted202 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - Option::Some(result87) - } - _ => panic() - } + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ + case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), + payload: lifted202, + }) + } + 15 => + @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 - 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 + array203.push(mbt_ffi_load8_u(iter_base + 0) != 0) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - let result89 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + @types.SchemaValueNode::FlagsValue(array203) + } + 17 => { + 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 - array90.push(result89) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) + array205.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - 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 + @types.SchemaValueNode::TupleValue(array205) + } + 18 => { + 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 result92 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + array207.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - array93.push(result92) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) + @types.SchemaValueNode::ListValue(array207) + } + 19 => { + 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 - let lifted96 : String? = match - mbt_ffi_load8_u(iter_base + 64) { - 0 => Option::None - 1 => { - let result95 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 68), - mbt_ffi_load32(iter_base + 72), - ) + array209.push(mbt_ffi_load32(iter_base + 0)) + } + mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - Option::Some(result95) - } - _ => panic() - } + @types.SchemaValueNode::FixedListValue(array209) + } + 20 => { + 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 - let lifted99 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 76) { - 0 => Option::None - 1 => { - let lifted98 = match mbt_ffi_load8_u(iter_base + 80) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result97 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 84), - mbt_ffi_load32(iter_base + 88), - ) + 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.Role::Other(result97) - } - _ => panic() - } + @types.SchemaValueNode::MapValue(array211) + } + 21 => { + let lifted213 : Int? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) + _ => panic() + } - Option::Some(lifted98) + @types.SchemaValueNode::OptionValue(lifted213) + } + 22 => { + 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() } - _ => panic() + + @types.ResultValuePayload::OkValue(lifted214) } + 1 => { + let lifted215 : Int? = match + mbt_ffi_load8_u(iter_base + 12) { + 0 => Option::None + 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + _ => panic() + } - 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, - }, - }) + @types.ResultValuePayload::ErrValue(lifted215) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array100, - }) + @types.SchemaValueNode::ResultValue(lifted216) } - 32 => { - let lifted103 : String? = match - mbt_ffi_load8_u(iter_base + 12) { + 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 result102 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 16), + let result218 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), ) - Option::Some(result102) + Option::Some(result218) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ - inner: mbt_ffi_load32(iter_base + 8), - category: lifted103, + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ + text: result217, + language: lifted219, }) } - 33 => { - let lifted105 : String? = match - mbt_ffi_load8_u(iter_base + 8) { + 24 => { + 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 result104 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), + let result221 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 20), + mbt_ffi_load32(iter_base + 24), ) - Option::Some(result104) + Option::Some(result221) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted105, + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ + bytes: result220, + mime_type: lifted222, }) } - 34 => { - let lifted106 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + 25 => { + let result223 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaTypeBody::FutureType(lifted106) + @types.SchemaValueNode::PathValue(result223) } - 35 => { - let lifted107 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + 26 => { + let result224 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) + + @types.SchemaValueNode::UrlValue(result224) + } + 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 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 result226 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 8), + mbt_ffi_load32(iter_base + 12), + ) - @types.SchemaTypeBody::StreamType(lifted107) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ + tag: result226, + body: mbt_ffi_load32(iter_base + 16), + }) } + 31 => + @types.SchemaValueNode::SecretValue( + @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), + ) + 32 => + @types.SchemaValueNode::QuotaTokenHandle( + @types.QuotaToken::QuotaToken( + mbt_ffi_load32(iter_base + 8), + ), + ) _ => panic() } - let lifted110 : String? = match - mbt_ffi_load8_u(iter_base + 88) { - 0 => Option::None - 1 => { - let result109 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 92), - mbt_ffi_load32(iter_base + 96), + array228.push(lifted227) + } + mbt_ffi_free(mbt_ffi_load32(return_area + 32)) + + Option::Some(@types.TypedSchemaValue::{ + graph: @types.SchemaGraph::{ + type_nodes: array192, + defs: array197, + root: mbt_ffi_load32(return_area + 28), + }, + value: @types.SchemaValueTree::{ + value_nodes: array228, + root: mbt_ffi_load32(return_area + 40), + }, + }) + } + _ => panic() + } + + let lifted231 : @streams.OutputStream? = match + mbt_ffi_load8_u(return_area + 44) { + 0 => Option::None + 1 => + Option::Some( + @streams.OutputStream::OutputStream( + mbt_ffi_load32(return_area + 48), + ), + ) + _ => panic() + } + + Result::Ok(@common.InvocationResult::{ + result: lifted230, + stdout: lifted231, + }) + } + 1 => { + let lifted478 = match mbt_ffi_load8_u(return_area + 8) { + 0 => { + let result232 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + RpcError::ProtocolError(result232) + } + 1 => { + let result233 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + RpcError::Denied(result233) + } + 2 => { + let result234 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + RpcError::NotFound(result234) + } + 3 => { + let result235 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 12), + mbt_ffi_load32(return_area + 16), + ) + + RpcError::RemoteInternalError(result235) + } + 4 => { + let lifted477 = match mbt_ffi_load8_u(return_area + 12) { + 0 => { + let result236 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), + ) + + @common.ToolError::InvalidToolName(result236) + } + 1 => { + let array238 : Array[String] = [] + for index239 = 0 + index239 < mbt_ffi_load32(return_area + 20) + index239 = index239 + 1 { + let iter_base = mbt_ffi_load32(return_area + 16) + + index239 * 8 + + let result237 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 0), + mbt_ffi_load32(iter_base + 4), ) - Option::Some(result109) + array238.push(result237) } - _ => panic() + mbt_ffi_free(mbt_ffi_load32(return_area + 16)) + + @common.ToolError::InvalidCommandPath(array238) } + 2 => { + let result240 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), + ) - 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 + @common.ToolError::InvalidInput(result240) + } + 3 => { + let result241 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), + ) - let result111 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), + @common.ToolError::ConstraintViolation(result241) + } + 4 => { + let result242 = mbt_ffi_ptr2str( + mbt_ffi_load32(return_area + 16), + mbt_ffi_load32(return_area + 20), ) - array112.push(result111) + @common.ToolError::InvalidResult(result242) } - mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) + 5 => { + let array439 : Array[@types.SchemaTypeNode] = [] + for index440 = 0 + index440 < mbt_ffi_load32(return_area + 20) + index440 = index440 + 1 { + let iter_base = mbt_ffi_load32(return_area + 16) + + index440 * 144 - 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 + let lifted425 = match mbt_ffi_load8_u(iter_base + 0) { + 0 => + @types.SchemaTypeBody::RefType( + mbt_ffi_load32(iter_base + 8), + ) + 1 => @types.SchemaTypeBody::BoolType + 2 => { + let lifted249 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted244 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted243 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result114 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted243) + } + _ => panic() + } - array115.push(result114) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) + let lifted246 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted245 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - let lifted118 : String? = match - mbt_ffi_load8_u(iter_base + 116) { - 0 => Option::None - 1 => { - let result117 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 120), - mbt_ffi_load32(iter_base + 124), - ) + Option::Some(lifted245) + } + _ => panic() + } - Option::Some(result117) - } - _ => panic() - } + let lifted248 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result247 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let lifted121 : @types.Role? = match - mbt_ffi_load8_u(iter_base + 128) { - 0 => Option::None - 1 => { - let lifted120 = match mbt_ffi_load8_u(iter_base + 132) { - 0 => @types.Role::Multimodal - 1 => @types.Role::UnstructuredText - 2 => @types.Role::UnstructuredBinary - 3 => { - let result119 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 136), - mbt_ffi_load32(iter_base + 140), - ) + Option::Some(result247) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted244, + max: lifted246, + unit: lifted248, + }) + } + _ => panic() + } - @types.Role::Other(result119) + @types.SchemaTypeBody::S8Type(lifted249) } - _ => panic() - } + 3 => { + let lifted256 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted251 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted250 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(lifted120) - } - _ => panic() - } + Option::Some(lifted250) + } + _ => panic() + } - 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 lifted253 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted252 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - 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 + Option::Some(lifted252) + } + _ => panic() + } - let result124 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + let lifted255 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result254 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let lifted126 : String? = match mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => { - let result125 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 12), - mbt_ffi_load32(iter_base + 16), - ) + Option::Some(result254) + } + _ => panic() + } - Option::Some(result125) - } - _ => panic() - } + Option::Some(@types.NumericRestrictions::{ + min: lifted251, + max: lifted253, + unit: lifted255, + }) + } + _ => 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)) + @types.SchemaTypeBody::S16Type(lifted256) + } + 4 => { + let lifted263 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted258 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted257 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 array158 : Array[@types.SchemaValueNode] = [] - for index159 = 0 - index159 < mbt_ffi_load32(return_area + 36) - index159 = index159 + 1 { - let iter_base = mbt_ffi_load32(return_area + 32) + index159 * 32 + Option::Some(lifted257) + } + _ => panic() + } - let lifted157 = 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 result129 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let lifted260 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted259 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::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.SchemaValueNode::StringValue(result129) - } - 13 => { - 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(lifted259) + } + _ => panic() + } + + let lifted262 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result261 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result261) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted258, + max: lifted260, + unit: lifted262, + }) + } + _ => panic() + } - array130.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaTypeBody::S32Type(lifted263) + } + 5 => { + let lifted270 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted265 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted264 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - @types.SchemaValueNode::RecordValue(array130) - } - 14 => { - let lifted132 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) - _ => panic() - } + Option::Some(lifted264) + } + _ => panic() + } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ - case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted132, - }) - } - 15 => - @types.SchemaValueNode::EnumValue( - mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - ) - 16 => { - 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 lifted267 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted266 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - array133.push(mbt_ffi_load8_u(iter_base + 0) != 0) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + Option::Some(lifted266) + } + _ => panic() + } - @types.SchemaValueNode::FlagsValue(array133) - } - 17 => { - 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 + let lifted269 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result268 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - array135.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + Option::Some(result268) + } + _ => panic() + } - @types.SchemaValueNode::TupleValue(array135) - } - 18 => { - 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 + Option::Some(@types.NumericRestrictions::{ + min: lifted265, + max: lifted267, + unit: lifted269, + }) + } + _ => panic() + } - array137.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + @types.SchemaTypeBody::S64Type(lifted270) + } + 6 => { + let lifted277 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted272 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted271 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - @types.SchemaValueNode::ListValue(array137) - } - 19 => { - 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 + Option::Some(lifted271) + } + _ => panic() + } - array139.push(mbt_ffi_load32(iter_base + 0)) - } - mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) + let lifted274 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted273 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::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.SchemaValueNode::FixedListValue(array139) - } - 20 => { - 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 + Option::Some(lifted273) + } + _ => panic() + } - 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 lifted276 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result275 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.SchemaValueNode::MapValue(array141) - } - 21 => { - let lifted143 : Int? = match - mbt_ffi_load8_u(iter_base + 8) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) - _ => panic() - } + Option::Some(result275) + } + _ => panic() + } - @types.SchemaValueNode::OptionValue(lifted143) - } - 22 => { - let lifted146 = match mbt_ffi_load8_u(iter_base + 8) { - 0 => { - let lifted144 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { - 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + Option::Some(@types.NumericRestrictions::{ + min: lifted272, + max: lifted274, + unit: lifted276, + }) + } _ => panic() } - @types.ResultValuePayload::OkValue(lifted144) + @types.SchemaTypeBody::U8Type(lifted277) } - 1 => { - let lifted145 : Int? = match - mbt_ffi_load8_u(iter_base + 12) { + 7 => { + let lifted284 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None - 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) + 1 => { + let lifted279 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted278 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted278) + } + _ => panic() + } + + let lifted281 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted280 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } + + Option::Some(lifted280) + } + _ => panic() + } + + let lifted283 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result282 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) + + Option::Some(result282) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted279, + max: lifted281, + unit: lifted283, + }) + } _ => panic() } - @types.ResultValuePayload::ErrValue(lifted145) + @types.SchemaTypeBody::U16Type(lifted284) } - _ => panic() - } + 8 => { + let lifted291 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted286 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted285 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - @types.SchemaValueNode::ResultValue(lifted146) - } - 23 => { - let result147 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + Option::Some(lifted285) + } + _ => panic() + } - let lifted149 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result148 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + let lifted288 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted287 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - Option::Some(result148) - } - _ => panic() - } + Option::Some(lifted287) + } + _ => panic() + } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result147, - language: lifted149, - }) - } - 24 => { - let result150 = mbt_ffi_ptr2bytes( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let lifted290 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result289 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - let lifted152 : String? = match - mbt_ffi_load8_u(iter_base + 16) { - 0 => Option::None - 1 => { - let result151 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + Option::Some(result289) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{ + min: lifted286, + max: lifted288, + unit: lifted290, + }) + } + _ => panic() + } - Option::Some(result151) + @types.SchemaTypeBody::U32Type(lifted291) } - _ => panic() - } + 9 => { + let lifted298 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted293 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted292 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 32).reinterpret_as_uint64(), + ) + _ => panic() + } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result150, - mime_type: lifted152, - }) - } - 25 => { - let result153 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + Option::Some(lifted292) + } + _ => panic() + } - @types.SchemaValueNode::PathValue(result153) - } - 26 => { - let result154 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let lifted295 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted294 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::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.SchemaValueNode::UrlValue(result154) - } - 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 result155 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 20), - mbt_ffi_load32(iter_base + 24), - ) + Option::Some(lifted294) + } + _ => panic() + } - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ - mantissa: mbt_ffi_load64(iter_base + 8), - scale: mbt_ffi_load32(iter_base + 16), - unit: result155, - }) - } - 30 => { - let result156 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 8), - mbt_ffi_load32(iter_base + 12), - ) + let lifted297 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result296 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result156, - body: mbt_ffi_load32(iter_base + 16), - }) - } - 31 => - @types.SchemaValueNode::SecretValue( - @types.Secret::Secret(mbt_ffi_load32(iter_base + 8)), - ) - 32 => - @types.SchemaValueNode::QuotaTokenHandle( - @types.QuotaToken::QuotaToken( - mbt_ffi_load32(iter_base + 8), - ), - ) - _ => panic() - } + Option::Some(result296) + } + _ => panic() + } - array158.push(lifted157) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 32)) + Option::Some(@types.NumericRestrictions::{ + min: lifted293, + max: lifted295, + unit: lifted297, + }) + } + _ => panic() + } - Option::Some(@types.TypedSchemaValue::{ - graph: @types.SchemaGraph::{ - type_nodes: array122, - defs: array127, - root: mbt_ffi_load32(return_area + 28), - }, - value: @types.SchemaValueTree::{ - value_nodes: array158, - root: mbt_ffi_load32(return_area + 40), - }, - }) - } - _ => panic() - } + @types.SchemaTypeBody::U64Type(lifted298) + } + 10 => { + let lifted305 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted300 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted299 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 lifted161 : @streams.OutputStream? = match - mbt_ffi_load8_u(return_area + 44) { - 0 => Option::None - 1 => - Option::Some( - @streams.OutputStream::OutputStream( - mbt_ffi_load32(return_area + 48), - ), - ) - _ => panic() - } + Option::Some(lifted299) + } + _ => panic() + } - Result::Ok(@common.InvocationResult::{ - result: lifted160, - stdout: lifted161, - }) - } - 1 => { - let lifted338 = match mbt_ffi_load8_u(return_area + 8) { - 0 => { - let result162 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + let lifted302 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted301 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - RpcError::ProtocolError(result162) - } - 1 => { - let result163 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + Option::Some(lifted301) + } + _ => panic() + } - RpcError::Denied(result163) - } - 2 => { - let result164 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + let lifted304 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result303 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - RpcError::NotFound(result164) - } - 3 => { - let result165 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 12), - mbt_ffi_load32(return_area + 16), - ) + Option::Some(result303) + } + _ => panic() + } - RpcError::RemoteInternalError(result165) - } - 4 => { - let lifted337 = match mbt_ffi_load8_u(return_area + 12) { - 0 => { - let result166 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) + Option::Some(@types.NumericRestrictions::{ + min: lifted300, + max: lifted302, + unit: lifted304, + }) + } + _ => panic() + } - @common.ToolError::InvalidToolName(result166) - } - 1 => { - let array168 : Array[String] = [] - for index169 = 0 - index169 < mbt_ffi_load32(return_area + 20) - index169 = index169 + 1 { - let iter_base = mbt_ffi_load32(return_area + 16) + - index169 * 8 + @types.SchemaTypeBody::F32Type(lifted305) + } + 11 => { + let lifted312 : @types.NumericRestrictions? = match + mbt_ffi_load8_u(iter_base + 8) { + 0 => Option::None + 1 => { + let lifted307 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 16) { + 0 => Option::None + 1 => { + let lifted306 = match + mbt_ffi_load8_u(iter_base + 24) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 32), + ) + 1 => + @types.NumericBound::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 result167 = mbt_ffi_ptr2str( - mbt_ffi_load32(iter_base + 0), - mbt_ffi_load32(iter_base + 4), - ) + Option::Some(lifted306) + } + _ => panic() + } - array168.push(result167) - } - mbt_ffi_free(mbt_ffi_load32(return_area + 16)) + let lifted309 : @types.NumericBound? = match + mbt_ffi_load8_u(iter_base + 40) { + 0 => Option::None + 1 => { + let lifted308 = match + mbt_ffi_load8_u(iter_base + 48) { + 0 => + @types.NumericBound::Signed( + mbt_ffi_load64(iter_base + 56), + ) + 1 => + @types.NumericBound::Unsigned( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + 2 => + @types.NumericBound::FloatBits( + mbt_ffi_load64(iter_base + 56).reinterpret_as_uint64(), + ) + _ => panic() + } - @common.ToolError::InvalidCommandPath(array168) - } - 2 => { - let result170 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) + Option::Some(lifted308) + } + _ => panic() + } - @common.ToolError::InvalidInput(result170) - } - 3 => { - let result171 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) + let lifted311 : String? = match + mbt_ffi_load8_u(iter_base + 64) { + 0 => Option::None + 1 => { + let result310 = mbt_ffi_ptr2str( + mbt_ffi_load32(iter_base + 68), + mbt_ffi_load32(iter_base + 72), + ) - @common.ToolError::ConstraintViolation(result171) - } - 4 => { - let result172 = mbt_ffi_ptr2str( - mbt_ffi_load32(return_area + 16), - mbt_ffi_load32(return_area + 20), - ) + Option::Some(result310) + } + _ => panic() + } - @common.ToolError::InvalidResult(result172) - } - 5 => { - let array299 : Array[@types.SchemaTypeNode] = [] - for index300 = 0 - index300 < mbt_ffi_load32(return_area + 20) - index300 = index300 + 1 { - let iter_base = mbt_ffi_load32(return_area + 16) + - index300 * 144 + Option::Some(@types.NumericRestrictions::{ + min: lifted307, + max: lifted309, + unit: lifted311, + }) + } + _ => panic() + } - let lifted285 = 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(lifted312) + } 12 => @types.SchemaTypeBody::CharType 13 => @types.SchemaTypeBody::StringType 14 => { - let array187 : Array[@types.NamedFieldType] = [] - for index188 = 0 - index188 < mbt_ffi_load32(iter_base + 12) - index188 = index188 + 1 { + let array327 : Array[@types.NamedFieldType] = [] + for index328 = 0 + index328 < mbt_ffi_load32(iter_base + 12) + index328 = index328 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index188 * 68 + index328 * 68 - let result173 = mbt_ffi_ptr2str( + let result313 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted175 : String? = match + let lifted315 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result174 = mbt_ffi_ptr2str( + let result314 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result174) + Option::Some(result314) } _ => panic() } - let array177 : Array[String] = [] - for index178 = 0 - index178 < mbt_ffi_load32(iter_base + 28) - index178 = index178 + 1 { + let array317 : Array[String] = [] + for index318 = 0 + index318 < mbt_ffi_load32(iter_base + 28) + index318 = index318 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index178 * 8 + index318 * 8 - let result176 = mbt_ffi_ptr2str( + let result316 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array177.push(result176) + array317.push(result316) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - let array180 : Array[String] = [] - for index181 = 0 - index181 < mbt_ffi_load32(iter_base + 36) - index181 = index181 + 1 { + let array320 : Array[String] = [] + for index321 = 0 + index321 < mbt_ffi_load32(iter_base + 36) + index321 = index321 + 1 { let iter_base = mbt_ffi_load32(iter_base + 32) + - index181 * 8 + index321 * 8 - let result179 = mbt_ffi_ptr2str( + let result319 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array180.push(result179) + array320.push(result319) } mbt_ffi_free(mbt_ffi_load32(iter_base + 32)) - let lifted183 : String? = match + let lifted323 : String? = match mbt_ffi_load8_u(iter_base + 40) { 0 => Option::None 1 => { - let result182 = mbt_ffi_ptr2str( + let result322 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) - Option::Some(result182) + Option::Some(result322) } _ => panic() } - let lifted186 : @types.Role? = match + let lifted326 : @types.Role? = match mbt_ffi_load8_u(iter_base + 52) { 0 => Option::None 1 => { - let lifted185 = match + let lifted325 = match mbt_ffi_load8_u(iter_base + 56) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result184 = mbt_ffi_ptr2str( + let result324 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 60), mbt_ffi_load32(iter_base + 64), ) - @types.Role::Other(result184) + @types.Role::Other(result324) } _ => panic() } - Option::Some(lifted185) + Option::Some(lifted325) } _ => panic() } - array187.push(@types.NamedFieldType::{ - name: result173, + array327.push(@types.NamedFieldType::{ + name: result313, body: mbt_ffi_load32(iter_base + 8), metadata: @types.MetadataEnvelope::{ - doc: lifted175, - aliases: array177, - examples: array180, - deprecated: lifted183, - role: lifted186, + doc: lifted315, + aliases: array317, + examples: array320, + deprecated: lifted323, + role: lifted326, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::RecordType(array187) + @types.SchemaTypeBody::RecordType(array327) } 15 => { - let array204 : Array[@types.VariantCaseType] = [] - for index205 = 0 - index205 < mbt_ffi_load32(iter_base + 12) - index205 = index205 + 1 { + let array344 : Array[@types.VariantCaseType] = [] + for index345 = 0 + index345 < mbt_ffi_load32(iter_base + 12) + index345 = index345 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index205 * 72 + index345 * 72 - let result189 = mbt_ffi_ptr2str( + let result329 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted190 : Int? = match + let lifted330 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted192 : String? = match + let lifted332 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result191 = mbt_ffi_ptr2str( + let result331 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result191) + Option::Some(result331) } _ => panic() } - let array194 : Array[String] = [] - for index195 = 0 - index195 < mbt_ffi_load32(iter_base + 32) - index195 = index195 + 1 { + let array334 : Array[String] = [] + for index335 = 0 + index335 < mbt_ffi_load32(iter_base + 32) + index335 = index335 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index195 * 8 + index335 * 8 - let result193 = mbt_ffi_ptr2str( + let result333 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array194.push(result193) + array334.push(result333) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - let array197 : Array[String] = [] - for index198 = 0 - index198 < mbt_ffi_load32(iter_base + 40) - index198 = index198 + 1 { + let array337 : Array[String] = [] + for index338 = 0 + index338 < mbt_ffi_load32(iter_base + 40) + index338 = index338 + 1 { let iter_base = mbt_ffi_load32(iter_base + 36) + - index198 * 8 + index338 * 8 - let result196 = mbt_ffi_ptr2str( + let result336 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array197.push(result196) + array337.push(result336) } mbt_ffi_free(mbt_ffi_load32(iter_base + 36)) - let lifted200 : String? = match + let lifted340 : String? = match mbt_ffi_load8_u(iter_base + 44) { 0 => Option::None 1 => { - let result199 = mbt_ffi_ptr2str( + let result339 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 48), mbt_ffi_load32(iter_base + 52), ) - Option::Some(result199) + Option::Some(result339) } _ => panic() } - let lifted203 : @types.Role? = match + let lifted343 : @types.Role? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let lifted202 = match + let lifted342 = match mbt_ffi_load8_u(iter_base + 60) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result201 = mbt_ffi_ptr2str( + let result341 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 64), mbt_ffi_load32(iter_base + 68), ) - @types.Role::Other(result201) + @types.Role::Other(result341) } _ => panic() } - Option::Some(lifted202) + Option::Some(lifted342) } _ => panic() } - array204.push(@types.VariantCaseType::{ - name: result189, - payload: lifted190, + array344.push(@types.VariantCaseType::{ + name: result329, + payload: lifted330, metadata: @types.MetadataEnvelope::{ - doc: lifted192, - aliases: array194, - examples: array197, - deprecated: lifted200, - role: lifted203, + doc: lifted332, + aliases: array334, + examples: array337, + deprecated: lifted340, + role: lifted343, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::VariantType(array204) + @types.SchemaTypeBody::VariantType(array344) } 16 => { - let array207 : Array[String] = [] - for index208 = 0 - index208 < mbt_ffi_load32(iter_base + 12) - index208 = index208 + 1 { + let array347 : Array[String] = [] + for index348 = 0 + index348 < mbt_ffi_load32(iter_base + 12) + index348 = index348 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index208 * 8 + index348 * 8 - let result206 = mbt_ffi_ptr2str( + let result346 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array207.push(result206) + array347.push(result346) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::EnumType(array207) + @types.SchemaTypeBody::EnumType(array347) } 17 => { - let array210 : Array[String] = [] - for index211 = 0 - index211 < mbt_ffi_load32(iter_base + 12) - index211 = index211 + 1 { + let array350 : Array[String] = [] + for index351 = 0 + index351 < mbt_ffi_load32(iter_base + 12) + index351 = index351 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index211 * 8 + index351 * 8 - let result209 = mbt_ffi_ptr2str( + let result349 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array210.push(result209) + array350.push(result349) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::FlagsType(array210) + @types.SchemaTypeBody::FlagsType(array350) } 18 => { - let array212 : Array[Int] = [] - for index213 = 0 - index213 < mbt_ffi_load32(iter_base + 12) - index213 = index213 + 1 { + let array352 : Array[Int] = [] + for index353 = 0 + index353 < mbt_ffi_load32(iter_base + 12) + index353 = index353 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index213 * 4 + index353 * 4 - array212.push(mbt_ffi_load32(iter_base + 0)) + array352.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaTypeBody::TupleType(array212) + @types.SchemaTypeBody::TupleType(array352) } 19 => @types.SchemaTypeBody::ListType( @@ -23571,14 +32636,14 @@ pub fn FutureInvokeResult::get( mbt_ffi_load32(iter_base + 8), ) 23 => { - let lifted214 : Int? = match + let lifted354 : Int? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 12)) _ => panic() } - let lifted215 : Int? = match + let lifted355 : Int? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 20)) @@ -23586,37 +32651,37 @@ pub fn FutureInvokeResult::get( } @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ - ok: lifted214, - err: lifted215, + ok: lifted354, + err: lifted355, }) } 24 => { - let lifted219 : Array[String]? = match + let lifted359 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array217 : Array[String] = [] - for index218 = 0 - index218 < mbt_ffi_load32(iter_base + 16) - index218 = index218 + 1 { + 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) + - index218 * 8 + index358 * 8 - let result216 = mbt_ffi_ptr2str( + let result356 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array217.push(result216) + array357.push(result356) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array217) + Option::Some(array357) } _ => panic() } - let lifted220 : UInt? = match + let lifted360 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -23626,7 +32691,7 @@ pub fn FutureInvokeResult::get( _ => panic() } - let lifted221 : UInt? = match + let lifted361 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -23636,54 +32701,54 @@ pub fn FutureInvokeResult::get( _ => panic() } - let lifted223 : String? = match + let lifted363 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result222 = mbt_ffi_ptr2str( + let result362 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result222) + Option::Some(result362) } _ => panic() } @types.SchemaTypeBody::TextType(@types.TextRestrictions::{ - languages: lifted219, - min_length: lifted220, - max_length: lifted221, - regex: lifted223, + languages: lifted359, + min_length: lifted360, + max_length: lifted361, + regex: lifted363, }) } 25 => { - let lifted227 : Array[String]? = match + let lifted367 : Array[String]? = 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 + 16) - index226 = index226 + 1 { + let array365 : Array[String] = [] + for index366 = 0 + index366 < mbt_ffi_load32(iter_base + 16) + index366 = index366 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index226 * 8 + index366 * 8 - let result224 = mbt_ffi_ptr2str( + let result364 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array225.push(result224) + array365.push(result364) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array225) + Option::Some(array365) } _ => panic() } - let lifted228 : UInt? = match + let lifted368 : UInt? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => @@ -23693,7 +32758,7 @@ pub fn FutureInvokeResult::get( _ => panic() } - let lifted229 : UInt? = match + let lifted369 : UInt? = match mbt_ffi_load8_u(iter_base + 28) { 0 => Option::None 1 => @@ -23704,58 +32769,58 @@ pub fn FutureInvokeResult::get( } @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{ - mime_types: lifted227, - min_bytes: lifted228, - max_bytes: lifted229, + mime_types: lifted367, + min_bytes: lifted368, + max_bytes: lifted369, }) } 26 => { - let lifted233 : Array[String]? = match + let lifted373 : Array[String]? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let array231 : Array[String] = [] - for index232 = 0 - index232 < mbt_ffi_load32(iter_base + 20) - index232 = index232 + 1 { + let array371 : Array[String] = [] + for index372 = 0 + index372 < mbt_ffi_load32(iter_base + 20) + index372 = index372 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index232 * 8 + index372 * 8 - let result230 = mbt_ffi_ptr2str( + let result370 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array231.push(result230) + array371.push(result370) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - Option::Some(array231) + Option::Some(array371) } _ => panic() } - let lifted237 : Array[String]? = match + let lifted377 : Array[String]? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let array235 : Array[String] = [] - for index236 = 0 - index236 < mbt_ffi_load32(iter_base + 32) - index236 = index236 + 1 { + let array375 : Array[String] = [] + for index376 = 0 + index376 < mbt_ffi_load32(iter_base + 32) + index376 = index376 + 1 { let iter_base = mbt_ffi_load32(iter_base + 28) + - index236 * 8 + index376 * 8 - let result234 = mbt_ffi_ptr2str( + let result374 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array235.push(result234) + array375.push(result374) } mbt_ffi_free(mbt_ffi_load32(iter_base + 28)) - Option::Some(array235) + Option::Some(array375) } _ => panic() } @@ -23767,95 +32832,95 @@ pub fn FutureInvokeResult::get( kind: @types.PathKind::from( mbt_ffi_load8_u(iter_base + 9), ), - allowed_mime_types: lifted233, - allowed_extensions: lifted237, + allowed_mime_types: lifted373, + allowed_extensions: lifted377, }) } 27 => { - let lifted241 : Array[String]? = match + let lifted381 : Array[String]? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let array239 : Array[String] = [] - for index240 = 0 - index240 < mbt_ffi_load32(iter_base + 16) - index240 = index240 + 1 { + let array379 : Array[String] = [] + for index380 = 0 + index380 < mbt_ffi_load32(iter_base + 16) + index380 = index380 + 1 { let iter_base = mbt_ffi_load32(iter_base + 12) + - index240 * 8 + index380 * 8 - let result238 = mbt_ffi_ptr2str( + let result378 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array239.push(result238) + array379.push(result378) } mbt_ffi_free(mbt_ffi_load32(iter_base + 12)) - Option::Some(array239) + Option::Some(array379) } _ => panic() } - let lifted245 : Array[String]? = match + let lifted385 : Array[String]? = match mbt_ffi_load8_u(iter_base + 20) { 0 => Option::None 1 => { - let array243 : Array[String] = [] - for index244 = 0 - index244 < mbt_ffi_load32(iter_base + 28) - index244 = index244 + 1 { + let array383 : Array[String] = [] + for index384 = 0 + index384 < mbt_ffi_load32(iter_base + 28) + index384 = index384 + 1 { let iter_base = mbt_ffi_load32(iter_base + 24) + - index244 * 8 + index384 * 8 - let result242 = mbt_ffi_ptr2str( + let result382 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array243.push(result242) + array383.push(result382) } mbt_ffi_free(mbt_ffi_load32(iter_base + 24)) - Option::Some(array243) + Option::Some(array383) } _ => panic() } @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{ - allowed_schemes: lifted241, - allowed_hosts: lifted245, + allowed_schemes: lifted381, + allowed_hosts: lifted385, }) } 28 => @types.SchemaTypeBody::DatetimeType 29 => @types.SchemaTypeBody::DurationType 30 => { - let result246 = mbt_ffi_ptr2str( + let result386 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let array248 : Array[String] = [] - for index249 = 0 - index249 < mbt_ffi_load32(iter_base + 20) - index249 = index249 + 1 { + let array388 : Array[String] = [] + for index389 = 0 + index389 < mbt_ffi_load32(iter_base + 20) + index389 = index389 + 1 { let iter_base = mbt_ffi_load32(iter_base + 16) + - index249 * 8 + index389 * 8 - let result247 = mbt_ffi_ptr2str( + let result387 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array248.push(result247) + array388.push(result387) } mbt_ffi_free(mbt_ffi_load32(iter_base + 16)) - let lifted251 : @types.QuantityValue? = match + let lifted391 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result250 = mbt_ffi_ptr2str( + let result390 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 44), mbt_ffi_load32(iter_base + 48), ) @@ -23863,17 +32928,17 @@ pub fn FutureInvokeResult::get( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 32), scale: mbt_ffi_load32(iter_base + 40), - unit: result250, + unit: result390, }) } _ => panic() } - let lifted253 : @types.QuantityValue? = match + let lifted393 : @types.QuantityValue? = match mbt_ffi_load8_u(iter_base + 56) { 0 => Option::None 1 => { - let result252 = mbt_ffi_ptr2str( + let result392 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 76), mbt_ffi_load32(iter_base + 80), ) @@ -23881,407 +32946,407 @@ pub fn FutureInvokeResult::get( Option::Some(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 64), scale: mbt_ffi_load32(iter_base + 72), - unit: result252, + unit: result392, }) } _ => panic() } @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{ - base_unit: result246, - allowed_suffixes: array248, - min: lifted251, - max: lifted253, + base_unit: result386, + allowed_suffixes: array388, + min: lifted391, + max: lifted393, }) } 31 => { - let array277 : Array[@types.UnionBranch] = [] - for index278 = 0 - index278 < mbt_ffi_load32(iter_base + 12) - index278 = index278 + 1 { + let array417 : Array[@types.UnionBranch] = [] + for index418 = 0 + index418 < mbt_ffi_load32(iter_base + 12) + index418 = index418 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index278 * 92 + index418 * 92 - let result254 = mbt_ffi_ptr2str( + let result394 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted263 = match + let lifted403 = match mbt_ffi_load8_u(iter_base + 12) { 0 => { - let result255 = mbt_ffi_ptr2str( + let result395 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Prefix(result255) + @types.DiscriminatorRule::Prefix(result395) } 1 => { - let result256 = mbt_ffi_ptr2str( + let result396 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Suffix(result256) + @types.DiscriminatorRule::Suffix(result396) } 2 => { - let result257 = mbt_ffi_ptr2str( + let result397 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Contains(result257) + @types.DiscriminatorRule::Contains(result397) } 3 => { - let result258 = mbt_ffi_ptr2str( + let result398 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::Regex(result258) + @types.DiscriminatorRule::Regex(result398) } 4 => { - let result259 = mbt_ffi_ptr2str( + let result399 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - let lifted261 : String? = match + let lifted401 : String? = match mbt_ffi_load8_u(iter_base + 24) { 0 => Option::None 1 => { - let result260 = mbt_ffi_ptr2str( + let result400 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 28), mbt_ffi_load32(iter_base + 32), ) - Option::Some(result260) + Option::Some(result400) } _ => panic() } @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{ - field_name: result259, - literal: lifted261, + field_name: result399, + literal: lifted401, }) } 5 => { - let result262 = mbt_ffi_ptr2str( + let result402 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - @types.DiscriminatorRule::FieldAbsent(result262) + @types.DiscriminatorRule::FieldAbsent(result402) } _ => panic() } - let lifted265 : String? = match + let lifted405 : String? = match mbt_ffi_load8_u(iter_base + 36) { 0 => Option::None 1 => { - let result264 = mbt_ffi_ptr2str( + let result404 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 40), mbt_ffi_load32(iter_base + 44), ) - Option::Some(result264) + Option::Some(result404) } _ => panic() } - let array267 : Array[String] = [] - for index268 = 0 - index268 < mbt_ffi_load32(iter_base + 52) - index268 = index268 + 1 { + let array407 : Array[String] = [] + for index408 = 0 + index408 < mbt_ffi_load32(iter_base + 52) + index408 = index408 + 1 { let iter_base = mbt_ffi_load32(iter_base + 48) + - index268 * 8 + index408 * 8 - let result266 = mbt_ffi_ptr2str( + let result406 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array267.push(result266) + array407.push(result406) } mbt_ffi_free(mbt_ffi_load32(iter_base + 48)) - let array270 : Array[String] = [] - for index271 = 0 - index271 < mbt_ffi_load32(iter_base + 60) - index271 = index271 + 1 { + let array410 : Array[String] = [] + for index411 = 0 + index411 < mbt_ffi_load32(iter_base + 60) + index411 = index411 + 1 { let iter_base = mbt_ffi_load32(iter_base + 56) + - index271 * 8 + index411 * 8 - let result269 = mbt_ffi_ptr2str( + let result409 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array270.push(result269) + array410.push(result409) } mbt_ffi_free(mbt_ffi_load32(iter_base + 56)) - let lifted273 : String? = match + let lifted413 : String? = match mbt_ffi_load8_u(iter_base + 64) { 0 => Option::None 1 => { - let result272 = mbt_ffi_ptr2str( + let result412 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 68), mbt_ffi_load32(iter_base + 72), ) - Option::Some(result272) + Option::Some(result412) } _ => panic() } - let lifted276 : @types.Role? = match + let lifted416 : @types.Role? = match mbt_ffi_load8_u(iter_base + 76) { 0 => Option::None 1 => { - let lifted275 = match + let lifted415 = match mbt_ffi_load8_u(iter_base + 80) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result274 = mbt_ffi_ptr2str( + let result414 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 84), mbt_ffi_load32(iter_base + 88), ) - @types.Role::Other(result274) + @types.Role::Other(result414) } _ => panic() } - Option::Some(lifted275) + Option::Some(lifted415) } _ => panic() } - array277.push(@types.UnionBranch::{ - tag: result254, + array417.push(@types.UnionBranch::{ + tag: result394, body: mbt_ffi_load32(iter_base + 8), - discriminator: lifted263, + discriminator: lifted403, metadata: @types.MetadataEnvelope::{ - doc: lifted265, - aliases: array267, - examples: array270, - deprecated: lifted273, - role: lifted276, + doc: lifted405, + aliases: array407, + examples: array410, + deprecated: lifted413, + role: lifted416, }, }) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) @types.SchemaTypeBody::UnionType(@types.UnionSpec::{ - branches: array277, + branches: array417, }) } 32 => { - let lifted280 : String? = match + let lifted420 : String? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => { - let result279 = mbt_ffi_ptr2str( + let result419 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 16), mbt_ffi_load32(iter_base + 20), ) - Option::Some(result279) + Option::Some(result419) } _ => panic() } @types.SchemaTypeBody::SecretType(@types.SecretSpec::{ inner: mbt_ffi_load32(iter_base + 8), - category: lifted280, + category: lifted420, }) } 33 => { - let lifted282 : String? = match + let lifted422 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result281 = mbt_ffi_ptr2str( + let result421 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result281) + Option::Some(result421) } _ => panic() } @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{ - resource_name: lifted282, + resource_name: lifted422, }) } 34 => { - let lifted283 : Int? = match + let lifted423 : 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(lifted283) + @types.SchemaTypeBody::FutureType(lifted423) } 35 => { - let lifted284 : Int? = match + let lifted424 : 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(lifted284) + @types.SchemaTypeBody::StreamType(lifted424) } _ => panic() } - let lifted287 : String? = match + let lifted427 : String? = match mbt_ffi_load8_u(iter_base + 88) { 0 => Option::None 1 => { - let result286 = mbt_ffi_ptr2str( + let result426 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 92), mbt_ffi_load32(iter_base + 96), ) - Option::Some(result286) + Option::Some(result426) } _ => panic() } - let array289 : Array[String] = [] - for index290 = 0 - index290 < mbt_ffi_load32(iter_base + 104) - index290 = index290 + 1 { + let array429 : Array[String] = [] + for index430 = 0 + index430 < mbt_ffi_load32(iter_base + 104) + index430 = index430 + 1 { let iter_base = mbt_ffi_load32(iter_base + 100) + - index290 * 8 + index430 * 8 - let result288 = mbt_ffi_ptr2str( + let result428 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array289.push(result288) + array429.push(result428) } mbt_ffi_free(mbt_ffi_load32(iter_base + 100)) - let array292 : Array[String] = [] - for index293 = 0 - index293 < mbt_ffi_load32(iter_base + 112) - index293 = index293 + 1 { + let array432 : Array[String] = [] + for index433 = 0 + index433 < mbt_ffi_load32(iter_base + 112) + index433 = index433 + 1 { let iter_base = mbt_ffi_load32(iter_base + 108) + - index293 * 8 + index433 * 8 - let result291 = mbt_ffi_ptr2str( + let result431 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - array292.push(result291) + array432.push(result431) } mbt_ffi_free(mbt_ffi_load32(iter_base + 108)) - let lifted295 : String? = match + let lifted435 : String? = match mbt_ffi_load8_u(iter_base + 116) { 0 => Option::None 1 => { - let result294 = mbt_ffi_ptr2str( + let result434 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 120), mbt_ffi_load32(iter_base + 124), ) - Option::Some(result294) + Option::Some(result434) } _ => panic() } - let lifted298 : @types.Role? = match + let lifted438 : @types.Role? = match mbt_ffi_load8_u(iter_base + 128) { 0 => Option::None 1 => { - let lifted297 = match mbt_ffi_load8_u(iter_base + 132) { + let lifted437 = match mbt_ffi_load8_u(iter_base + 132) { 0 => @types.Role::Multimodal 1 => @types.Role::UnstructuredText 2 => @types.Role::UnstructuredBinary 3 => { - let result296 = mbt_ffi_ptr2str( + let result436 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 136), mbt_ffi_load32(iter_base + 140), ) - @types.Role::Other(result296) + @types.Role::Other(result436) } _ => panic() } - Option::Some(lifted297) + Option::Some(lifted437) } _ => panic() } - array299.push(@types.SchemaTypeNode::{ - body: lifted285, + array439.push(@types.SchemaTypeNode::{ + body: lifted425, metadata: @types.MetadataEnvelope::{ - doc: lifted287, - aliases: array289, - examples: array292, - deprecated: lifted295, - role: lifted298, + doc: lifted427, + aliases: array429, + examples: array432, + deprecated: lifted435, + role: lifted438, }, }) } mbt_ffi_free(mbt_ffi_load32(return_area + 16)) - let array304 : Array[@types.SchemaTypeDef] = [] - for index305 = 0 - index305 < mbt_ffi_load32(return_area + 28) - index305 = index305 + 1 { + let array444 : Array[@types.SchemaTypeDef] = [] + for index445 = 0 + index445 < mbt_ffi_load32(return_area + 28) + index445 = index445 + 1 { let iter_base = mbt_ffi_load32(return_area + 24) + - index305 * 24 + index445 * 24 - let result301 = mbt_ffi_ptr2str( + let result441 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 0), mbt_ffi_load32(iter_base + 4), ) - let lifted303 : String? = match + let lifted443 : String? = match mbt_ffi_load8_u(iter_base + 8) { 0 => Option::None 1 => { - let result302 = mbt_ffi_ptr2str( + let result442 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 12), mbt_ffi_load32(iter_base + 16), ) - Option::Some(result302) + Option::Some(result442) } _ => panic() } - array304.push(@types.SchemaTypeDef::{ - id: result301, - name: lifted303, + array444.push(@types.SchemaTypeDef::{ + id: result441, + name: lifted443, body: mbt_ffi_load32(iter_base + 20), }) } mbt_ffi_free(mbt_ffi_load32(return_area + 24)) - let array335 : Array[@types.SchemaValueNode] = [] - for index336 = 0 - index336 < mbt_ffi_load32(return_area + 40) - index336 = index336 + 1 { + let array475 : Array[@types.SchemaValueNode] = [] + for index476 = 0 + index476 < mbt_ffi_load32(return_area + 40) + index476 = index476 + 1 { let iter_base = mbt_ffi_load32(return_area + 36) + - index336 * 32 + index476 * 32 - let lifted334 = match mbt_ffi_load8_u(iter_base + 0) { + let lifted474 = match mbt_ffi_load8_u(iter_base + 0) { 0 => @types.SchemaValueNode::BoolValue( mbt_ffi_load8_u(iter_base + 8) != 0, @@ -24333,29 +33398,29 @@ pub fn FutureInvokeResult::get( Int::unsafe_to_char(mbt_ffi_load32(iter_base + 8)), ) 12 => { - let result306 = mbt_ffi_ptr2str( + let result446 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::StringValue(result306) + @types.SchemaValueNode::StringValue(result446) } 13 => { - let array307 : Array[Int] = [] - for index308 = 0 - index308 < mbt_ffi_load32(iter_base + 12) - index308 = index308 + 1 { + let array447 : Array[Int] = [] + for index448 = 0 + index448 < mbt_ffi_load32(iter_base + 12) + index448 = index448 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index308 * 4 + index448 * 4 - array307.push(mbt_ffi_load32(iter_base + 0)) + array447.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::RecordValue(array307) + @types.SchemaValueNode::RecordValue(array447) } 14 => { - let lifted309 : Int? = match + let lifted449 : Int? = match mbt_ffi_load8_u(iter_base + 12) { 0 => Option::None 1 => Option::Some(mbt_ffi_load32(iter_base + 16)) @@ -24364,7 +33429,7 @@ pub fn FutureInvokeResult::get( @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{ case: mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), - payload: lifted309, + payload: lifted449, }) } 15 => @@ -24372,180 +33437,180 @@ pub fn FutureInvokeResult::get( mbt_ffi_load32(iter_base + 8).reinterpret_as_uint(), ) 16 => { - let array310 : Array[Bool] = [] - for index311 = 0 - index311 < mbt_ffi_load32(iter_base + 12) - index311 = index311 + 1 { + let array450 : Array[Bool] = [] + for index451 = 0 + index451 < mbt_ffi_load32(iter_base + 12) + index451 = index451 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index311 * 1 + index451 * 1 - array310.push(mbt_ffi_load8_u(iter_base + 0) != 0) + array450.push(mbt_ffi_load8_u(iter_base + 0) != 0) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FlagsValue(array310) + @types.SchemaValueNode::FlagsValue(array450) } 17 => { - let array312 : Array[Int] = [] - for index313 = 0 - index313 < mbt_ffi_load32(iter_base + 12) - index313 = index313 + 1 { + let array452 : Array[Int] = [] + for index453 = 0 + index453 < mbt_ffi_load32(iter_base + 12) + index453 = index453 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index313 * 4 + index453 * 4 - array312.push(mbt_ffi_load32(iter_base + 0)) + array452.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::TupleValue(array312) + @types.SchemaValueNode::TupleValue(array452) } 18 => { - let array314 : Array[Int] = [] - for index315 = 0 - index315 < mbt_ffi_load32(iter_base + 12) - index315 = index315 + 1 { + let array454 : Array[Int] = [] + for index455 = 0 + index455 < mbt_ffi_load32(iter_base + 12) + index455 = index455 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index315 * 4 + index455 * 4 - array314.push(mbt_ffi_load32(iter_base + 0)) + array454.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::ListValue(array314) + @types.SchemaValueNode::ListValue(array454) } 19 => { - let array316 : Array[Int] = [] - for index317 = 0 - index317 < mbt_ffi_load32(iter_base + 12) - index317 = index317 + 1 { + let array456 : Array[Int] = [] + for index457 = 0 + index457 < mbt_ffi_load32(iter_base + 12) + index457 = index457 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index317 * 4 + index457 * 4 - array316.push(mbt_ffi_load32(iter_base + 0)) + array456.push(mbt_ffi_load32(iter_base + 0)) } mbt_ffi_free(mbt_ffi_load32(iter_base + 8)) - @types.SchemaValueNode::FixedListValue(array316) + @types.SchemaValueNode::FixedListValue(array456) } 20 => { - let array318 : Array[@types.MapEntry] = [] - for index319 = 0 - index319 < mbt_ffi_load32(iter_base + 12) - index319 = index319 + 1 { + let array458 : Array[@types.MapEntry] = [] + for index459 = 0 + index459 < mbt_ffi_load32(iter_base + 12) + index459 = index459 + 1 { let iter_base = mbt_ffi_load32(iter_base + 8) + - index319 * 8 + index459 * 8 - array318.push(@types.MapEntry::{ + array458.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(array318) + @types.SchemaValueNode::MapValue(array458) } 21 => { - let lifted320 : Int? = match + let lifted460 : 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(lifted320) + @types.SchemaValueNode::OptionValue(lifted460) } 22 => { - let lifted323 = match mbt_ffi_load8_u(iter_base + 8) { + let lifted463 = match mbt_ffi_load8_u(iter_base + 8) { 0 => { - let lifted321 : Int? = match + let lifted461 : 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(lifted321) + @types.ResultValuePayload::OkValue(lifted461) } 1 => { - let lifted322 : Int? = match + let lifted462 : 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(lifted322) + @types.ResultValuePayload::ErrValue(lifted462) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted323) + @types.SchemaValueNode::ResultValue(lifted463) } 23 => { - let result324 = mbt_ffi_ptr2str( + let result464 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted326 : String? = match + let lifted466 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result325 = mbt_ffi_ptr2str( + let result465 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result325) + Option::Some(result465) } _ => panic() } @types.SchemaValueNode::TextValue(@types.TextValuePayload::{ - text: result324, - language: lifted326, + text: result464, + language: lifted466, }) } 24 => { - let result327 = mbt_ffi_ptr2bytes( + let result467 = mbt_ffi_ptr2bytes( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - let lifted329 : String? = match + let lifted469 : String? = match mbt_ffi_load8_u(iter_base + 16) { 0 => Option::None 1 => { - let result328 = mbt_ffi_ptr2str( + let result468 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) - Option::Some(result328) + Option::Some(result468) } _ => panic() } @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{ - bytes: result327, - mime_type: lifted329, + bytes: result467, + mime_type: lifted469, }) } 25 => { - let result330 = mbt_ffi_ptr2str( + let result470 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::PathValue(result330) + @types.SchemaValueNode::PathValue(result470) } 26 => { - let result331 = mbt_ffi_ptr2str( + let result471 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) - @types.SchemaValueNode::UrlValue(result331) + @types.SchemaValueNode::UrlValue(result471) } 27 => @types.SchemaValueNode::DatetimeValue(@types.Datetime::{ @@ -24557,7 +33622,7 @@ pub fn FutureInvokeResult::get( nanoseconds: mbt_ffi_load64(iter_base + 8), }) 29 => { - let result332 = mbt_ffi_ptr2str( + let result472 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 20), mbt_ffi_load32(iter_base + 24), ) @@ -24565,17 +33630,17 @@ pub fn FutureInvokeResult::get( @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{ mantissa: mbt_ffi_load64(iter_base + 8), scale: mbt_ffi_load32(iter_base + 16), - unit: result332, + unit: result472, }) } 30 => { - let result333 = mbt_ffi_ptr2str( + let result473 = mbt_ffi_ptr2str( mbt_ffi_load32(iter_base + 8), mbt_ffi_load32(iter_base + 12), ) @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{ - tag: result333, + tag: result473, body: mbt_ffi_load32(iter_base + 16), }) } @@ -24592,18 +33657,18 @@ pub fn FutureInvokeResult::get( _ => panic() } - array335.push(lifted334) + array475.push(lifted474) } mbt_ffi_free(mbt_ffi_load32(return_area + 36)) @common.ToolError::CustomError(@types.TypedSchemaValue::{ graph: @types.SchemaGraph::{ - type_nodes: array299, - defs: array304, + type_nodes: array439, + defs: array444, root: mbt_ffi_load32(return_area + 32), }, value: @types.SchemaValueTree::{ - value_nodes: array335, + value_nodes: array475, root: mbt_ffi_load32(return_area + 44), }, }) @@ -24611,21 +33676,21 @@ pub fn FutureInvokeResult::get( _ => panic() } - RpcError::RemoteToolError(lifted337) + RpcError::RemoteToolError(lifted477) } _ => panic() } - Result::Err(lifted338) + Result::Err(lifted478) } _ => panic() } - Option::Some(lifted339) + Option::Some(lifted479) } _ => panic() } - let ret = lifted340 + let ret = lifted480 mbt_ffi_free(return_area) return ret } diff --git a/sdks/moonbit/golem_sdk/interface/golem/websocket/client/ffi.mbt b/sdks/moonbit/golem_sdk/interface/golem/websocket/client/ffi.mbt index 7195030621..09bbdea605 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/websocket/client/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/websocket/client/ffi.mbt @@ -47,12 +47,9 @@ fn wasmImportMethodWebsocketConnectionClose( fn wasmImportMethodWebsocketConnectionSubscribe(p0 : Int) -> Int = "golem:websocket/client@1.5.0" "[method]websocket-connection.subscribe" ///| -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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +#owned(str) +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 = @@ -62,8 +59,15 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| 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_store32(offset : Int, value : Int) = + #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) + +///| +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] = @@ -72,27 +76,23 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| local.get 1 call $moonbit.init_array8 #| local.get 0) -///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = - #|(func (param i32) (result i32) local.get 0) - ///| #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_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) + ///| extern "wasm" fn mbt_ffi_free(position : Int) = #|(func (param i32) local.get 0 call $moonbit.decref) ///| -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_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_load16_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load16_u) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/blobstore/blobstore/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/blobstore/blobstore/ffi.mbt index 3b685c517f..4cecbbed49 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/blobstore/blobstore/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/blobstore/blobstore/ffi.mbt @@ -38,6 +38,21 @@ fn wasmImportMoveObject( p8 : Int, ) = "wasi:blobstore/blobstore" "move-object" +///| +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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) + ///| extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #|(func (param i32) (param i32) (result i32) @@ -53,18 +68,3 @@ extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = ///| 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_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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) - -///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/blobstore/container/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/blobstore/container/ffi.mbt index 5f708d8977..55d83932df 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/blobstore/container/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/blobstore/container/ffi.mbt @@ -80,24 +80,14 @@ 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_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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) ///| extern "wasm" fn mbt_ffi_free(position : Int) = @@ -108,6 +98,16 @@ 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) + +///| +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) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/blobstore/types/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/blobstore/types/ffi.mbt index 8fa8018d47..4792671bd7 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/blobstore/types/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/blobstore/types/ffi.mbt @@ -26,15 +26,8 @@ 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_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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = @@ -44,8 +37,8 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| local.get 0) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) ///| extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = @@ -53,3 +46,10 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| local.get 0 #| local.get 1 call $moonbit.init_array16 #| 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/interface/wasi/cli/environment/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/cli/environment/ffi.mbt index 6156d21b22..0c5fe5c31c 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/cli/environment/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/cli/environment/ffi.mbt @@ -14,11 +14,8 @@ extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.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_load8_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = @@ -32,5 +29,8 @@ extern "wasm" fn mbt_ffi_free(position : Int) = #|(func (param i32) local.get 0 call $moonbit.decref) ///| -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_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) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/clocks/wallClock/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/clocks/wallClock/ffi.mbt index d3ad572914..4076c67cf4 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/clocks/wallClock/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/clocks/wallClock/ffi.mbt @@ -6,21 +6,21 @@ fn wasmImportNow(p0 : Int) = "wasi:clocks/wall-clock@0.2.3" "now" ///| fn wasmImportResolution(p0 : Int) = "wasi:clocks/wall-clock@0.2.3" "resolution" -///| -extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) - ///| extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = #|(func (param i32) (result i64) local.get 0 i64.load) -///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - ///| 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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) + +///| +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/config/store/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/config/store/ffi.mbt index 80f58da9a3..448be68451 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/config/store/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/config/store/ffi.mbt @@ -6,6 +6,14 @@ fn wasmImportGet(p0 : Int, p1 : Int, p2 : Int) = "wasi:config/store@0.2.0-draft" ///| fn wasmImportGetAll(p0 : Int) = "wasi:config/store@0.2.0-draft" "get-all" +///| +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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) + ///| extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #|(func (param i32) (param i32) (result i32) @@ -13,6 +21,10 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| local.get 1 call $moonbit.init_array16 #| local.get 0) +///| +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) + ///| #owned(str) extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = @@ -24,15 +36,3 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| 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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) - -///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - -///| -extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_u) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/filesystem/preopens/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/filesystem/preopens/ffi.mbt index b3ef425e2f..897abd7cdc 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/filesystem/preopens/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/filesystem/preopens/ffi.mbt @@ -4,15 +4,8 @@ fn wasmImportGetDirectories(p0 : Int) = "wasi:filesystem/preopens@0.2.3" "get-directories" ///| -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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = @@ -22,5 +15,12 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| local.get 0) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/filesystem/types/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/filesystem/types/ffi.mbt index 8ef564218a..c7f2862fc5 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/filesystem/types/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/filesystem/types/ffi.mbt @@ -185,11 +185,22 @@ fn wasmImportMethodDirectoryEntryStreamReadDirectoryEntry(p0 : Int, p1 : Int) = ///| fn wasmImportFilesystemErrorCode(p0 : Int, p1 : Int) = "wasi:filesystem/types@0.2.3" "filesystem-error-code" +///| +extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| local.get 0) + ///| #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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) + ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #|(func (param i32) (result i32) (local i32) @@ -198,13 +209,8 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| local.get 1) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - -///| -#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) ///| extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = @@ -222,12 +228,6 @@ extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = #|(func (param i32) (result i64) local.get 0 i64.load) ///| -extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array8 - #| local.get 0) - -///| -extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/http/outgoingHandler/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/http/outgoingHandler/ffi.mbt index b47a859e2c..916cad59e8 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/http/outgoingHandler/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/http/outgoingHandler/ffi.mbt @@ -3,6 +3,17 @@ ///| fn wasmImportHandle(p0 : Int, p1 : Int, p2 : Int, p3 : Int) = "wasi:http/outgoing-handler@0.2.3" "handle" +///| +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) + +///| +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_malloc(size : Int) -> Int = #|(func (param i32) (result i32) (local i32) @@ -10,6 +21,10 @@ 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_load8_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) + ///| extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load) @@ -18,21 +33,6 @@ extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = 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_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - ///| 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_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) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/http/types/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/http/types/ffi.mbt index 79ba6d7239..8973f67a87 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/http/types/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/http/types/ffi.mbt @@ -244,24 +244,13 @@ fn wasmImportMethodFutureIncomingResponseSubscribe(p0 : Int) -> Int = "wasi:http fn wasmImportMethodFutureIncomingResponseGet(p0 : Int, p1 : Int) = "wasi:http/types@0.2.3" "[method]future-incoming-response.get" ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - -///| -extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_u) - -///| -#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_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = - #|(func (param i32) (param i32) (result i32) - #| local.get 0 - #| local.get 1 call $moonbit.init_array8 - #| 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_ptr2str(ptr : Int, len : Int) -> String = @@ -271,29 +260,40 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| 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_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_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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) ///| -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) + +///| +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) 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) ///| -#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_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = + #|(func (param i32) (param i32) (result i32) + #| local.get 0 + #| local.get 1 call $moonbit.init_array8 + #| local.get 0) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/io/error/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/io/error/ffi.mbt index b62308aa48..6135784b53 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/io/error/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/io/error/ffi.mbt @@ -7,11 +7,12 @@ fn wasmImportResourceDropError_(resource : Int) = "wasi:io/error@0.2.3" "[resour fn wasmImportMethodErrorToDebugString(p0 : Int, p1 : Int) = "wasi:io/error@0.2.3" "[method]error.to-debug-string" ///| -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) + +///| +extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) ///| extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = @@ -21,9 +22,8 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| local.get 0) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - -///| -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) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/io/poll/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/io/poll/ffi.mbt index 33669ea724..433b90fbf3 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/io/poll/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/io/poll/ffi.mbt @@ -13,8 +13,8 @@ fn wasmImportMethodPollableBlock(p0 : Int) = "wasi:io/poll@0.2.3" "[method]polla fn wasmImportPoll(p0 : Int, p1 : Int, p2 : Int) = "wasi:io/poll@0.2.3" "poll" ///| -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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = @@ -24,8 +24,12 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| local.get 1) ///| -extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| extern "wasm" fn mbt_ffi_ptr2uint_array( @@ -36,7 +40,3 @@ extern "wasm" fn mbt_ffi_ptr2uint_array( #| local.get 0 #| local.get 1 call $moonbit.init_array32 #| local.get 0) - -///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/io/streams/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/io/streams/ffi.mbt index 84d94512aa..8686365882 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/io/streams/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/io/streams/ffi.mbt @@ -75,8 +75,8 @@ extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = #|(func (param i32) (result i32) local.get 0) ///| -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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = @@ -85,6 +85,10 @@ 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_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) @@ -92,10 +96,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_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - ///| extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = #|(func (param i32) (result i64) local.get 0 i64.load) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/atomic/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/atomic/ffi.mbt index f1b56e2738..a5a8c145a6 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/atomic/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/atomic/ffi.mbt @@ -18,14 +18,6 @@ fn wasmImportCompareAndSwap( extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = #|(func (param i32) (result i32) local.get 0) -///| -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_load32(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load) @@ -37,6 +29,14 @@ 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_load8_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) + ///| extern "wasm" fn mbt_ffi_free(position : Int) = #|(func (param i32) local.get 0 call $moonbit.decref) + +///| +extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = + #|(func (param i32) (result i64) local.get 0 i64.load) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/cache/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/cache/ffi.mbt index 7dcd206ffd..c98ffb6847 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/cache/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/cache/ffi.mbt @@ -65,8 +65,13 @@ fn wasmImportMethodVacancyVacancyFill(p0 : Int, p1 : Int, p2 : Int) -> Int = "wa fn wasmImportDelete(p0 : Int, p1 : Int) -> Int = "wasi:keyvalue/cache@0.1.0" "delete" ///| -extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load) +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) + +///| +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = + #|(func (param i32) (result i32) local.get 0) ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = @@ -75,15 +80,10 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| local.tee 1 i32.const 0 call $moonbit.init_array8 #| local.get 1) -///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = - #|(func (param i32) (result i32) local.get 0) - ///| 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_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/eventual/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/eventual/ffi.mbt index 5eb01d5618..384249c568 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/eventual/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/eventual/ffi.mbt @@ -13,25 +13,25 @@ fn wasmImportDelete(p0 : Int, p1 : Int, p2 : Int, p3 : Int) = "wasi:keyvalue/eve fn wasmImportExists(p0 : Int, p1 : Int, p2 : Int, p3 : Int) = "wasi:keyvalue/eventual@0.1.0" "exists" ///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> 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) +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_load32(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load) ///| -extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.load8_u) +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> 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) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/eventualBatch/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/eventualBatch/ffi.mbt index c31575c15b..5672f7a071 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/eventualBatch/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/eventualBatch/ffi.mbt @@ -13,8 +13,15 @@ fn wasmImportSetMany(p0 : Int, p1 : Int, p2 : Int, p3 : Int) = "wasi:keyvalue/ev fn wasmImportDeleteMany(p0 : Int, p1 : Int, p2 : Int, p3 : Int) = "wasi:keyvalue/eventual-batch@0.1.0" "delete-many" ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +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_load32(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load) ///| extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = @@ -23,26 +30,19 @@ extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = #| 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_load32(offset : Int) -> Int = - #|(func (param i32) (result i32) local.get 0 i32.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_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) - ///| #owned(str) extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = #|(func (param i32) (result i32) 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_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/types/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/types/ffi.mbt index 25ec7c0cb3..eed09746d8 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/types/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/types/ffi.mbt @@ -36,33 +36,30 @@ fn wasmImportMethodIncomingValueIncomingValueConsumeAsync(p0 : Int, p1 : Int) = fn wasmImportMethodIncomingValueIncomingValueSize(p0 : Int, p1 : Int) = "wasi:keyvalue/types@0.1.0" "[method]incoming-value.incoming-value-size" ///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) +#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_load8_u(offset : Int) -> Int = + #|(func (param i32) (result i32) local.get 0 i32.load8_u) ///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = - #|(func (param i32) (result i32) 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) +#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) ///| extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = @@ -72,5 +69,8 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| 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_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/interface/wasi/keyvalue/wasiKeyvalueError/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/wasiKeyvalueError/ffi.mbt index 8ead6c7062..ae57fcd9f0 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/wasiKeyvalueError/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/keyvalue/wasiKeyvalueError/ffi.mbt @@ -6,24 +6,24 @@ fn wasmImportResourceDropError_(resource : Int) = "wasi:keyvalue/wasi-keyvalue-e ///| fn wasmImportMethodErrorTrace(p0 : Int, p1 : Int) = "wasi:keyvalue/wasi-keyvalue-error@0.1.0" "[method]error.trace" -///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - ///| extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.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_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) + +///| +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) diff --git a/sdks/moonbit/golem_sdk/interface/wasi/logging/logging/ffi.mbt b/sdks/moonbit/golem_sdk/interface/wasi/logging/logging/ffi.mbt index 1d95f1f2cf..06dcc8cceb 100644 --- a/sdks/moonbit/golem_sdk/interface/wasi/logging/logging/ffi.mbt +++ b/sdks/moonbit/golem_sdk/interface/wasi/logging/logging/ffi.mbt @@ -3,11 +3,11 @@ ///| fn wasmImportLog(p0 : Int, p1 : Int, p2 : Int, p3 : Int, p4 : Int) = "wasi:logging/logging" "log" -///| -extern "wasm" fn mbt_ffi_free(position : Int) = - #|(func (param i32) local.get 0 call $moonbit.decref) - ///| #owned(str) extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = #|(func (param i32) (result i32) local.get 0) + +///| +extern "wasm" fn mbt_ffi_free(position : Int) = + #|(func (param i32) local.get 0 call $moonbit.decref) diff --git a/sdks/moonbit/golem_sdk/schema/primitives.mbt b/sdks/moonbit/golem_sdk/schema/primitives.mbt index 3bb36ee787..835803952f 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 fn type_id() { ///| pub impl IntoSchema for Int with fn register_in(_b) { - @model.schema_type(S32) + @model.schema_type(S32(None)) } ///| @@ -105,7 +105,7 @@ pub impl IntoSchema for UInt with fn type_id() { ///| pub impl IntoSchema for UInt with fn register_in(_b) { - @model.schema_type(U32) + @model.schema_type(U32(None)) } ///| @@ -133,7 +133,7 @@ pub impl IntoSchema for Int64 with fn type_id() { ///| pub impl IntoSchema for Int64 with fn register_in(_b) { - @model.schema_type(S64) + @model.schema_type(S64(None)) } ///| @@ -161,7 +161,7 @@ pub impl IntoSchema for UInt64 with fn type_id() { ///| pub impl IntoSchema for UInt64 with fn register_in(_b) { - @model.schema_type(U64) + @model.schema_type(U64(None)) } ///| @@ -189,7 +189,7 @@ pub impl IntoSchema for Float with fn type_id() { ///| pub impl IntoSchema for Float with fn register_in(_b) { - @model.schema_type(F32) + @model.schema_type(F32(None)) } ///| @@ -217,7 +217,7 @@ pub impl IntoSchema for Double with fn type_id() { ///| pub impl IntoSchema for Double with fn register_in(_b) { - @model.schema_type(F64) + @model.schema_type(F64(None)) } ///| @@ -245,7 +245,7 @@ pub impl IntoSchema for Byte with fn type_id() { ///| pub impl IntoSchema for Byte with fn 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 9692a79c8e..44b69d62ad 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 94773d36c2..71cfb24b34 100644 --- a/sdks/moonbit/golem_sdk/schema_model/pkg.generated.mbti +++ b/sdks/moonbit/golem_sdk/schema_model/pkg.generated.mbti @@ -153,16 +153,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 3c4bef0022..ecf9c742ef 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"), ]), ), @@ -139,7 +231,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"))]), @@ -176,7 +268,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")), ]), ), @@ -304,7 +396,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 = { @@ -363,7 +455,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(), } @@ -382,7 +474,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))), @@ -397,7 +489,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 943e0e525a..46f8a56ce9 100644 --- a/sdks/moonbit/golem_sdk/schema_model/validation.mbt +++ b/sdks/moonbit/golem_sdk/schema_model/validation.mbt @@ -269,16 +269,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 ec72c41d82..a3027352f9 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) => @@ -375,16 +418,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/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 068c7ed6f8..bb7dda191e 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 @@ -226,16 +226,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, @@ -301,6 +301,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-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..64a3bc8ddc --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/definition.rs @@ -0,0 +1,556 @@ +// 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. + 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; + }; + item_trait.items.push(annotation_item); + + quote! { + #[allow(async_fn_in_trait)] + #item_trait + + #descriptor_fn + } + .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/descriptor.rs b/sdks/rust/golem-rust-macro/src/tool/descriptor.rs new file mode 100644 index 0000000000..78c1d7d1e5 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/descriptor.rs @@ -0,0 +1,2397 @@ +// 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); + 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, + 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. 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, +} + +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 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 { + 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 propagating globals on the grafted + // root. A param that repeats a global already inherited from the parent + // root command is not skipped here: it is emitted as a parent global and + // reconciled (removed when compatible, rejected when conflicting) by + // `graft_subtree` (against the grafted root's own body/globals) and by + // `normalize_inherited_globals` (against strict ancestors above the graft + // point). + 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 (`emit_as_tail = 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 __parent_globals = golem_rust::agentic::ExtendedGlobals { + options: ::std::vec![ #(#opts),* ], + flags: ::std::vec![ #(#flags),* ], + }; + let mut __strict_ancestor_globals = ctx.inherited_globals().to_vec(); + __strict_ancestor_globals.extend( + commands[0] + .globals + .options + .iter() + .cloned() + .map(golem_rust::agentic::EffectiveCommandField::Option), + ); + __strict_ancestor_globals.extend( + commands[0] + .globals + .flags + .iter() + .cloned() + .map(golem_rust::agentic::EffectiveCommandField::Flag), + ); + let __surviving_parent_globals = match golem_rust::agentic::reconcile_subtree_parent_globals( + __parent_globals.clone(), + &__strict_ancestor_globals, + #grafted_name, + ) { + ::std::result::Result::Ok(__globals) => __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, + )?; + 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; + // (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, 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() + .enumerate() + .rev() + .find_map(|(idx, param)| { + let arg = arg_for(cmd, ¶m.ident); + 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 + } + }); + + 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); + // 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( + 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_option_decls.push((idx, to_kebab_case(¶m.ident.to_string()))); + 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_option_decls.push((idx, name.clone())); + 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 positional_plan = build_positional_plan(cmd, &body_option_decls)?; + + 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, + positional_plan: ::std::vec![ #(#positional_plan),* ], + } + }; + + 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), + } + }) +} + +/// 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; + } + 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) { + 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, + emit_as_tail: 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` 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 + // 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/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..07c6d6a066 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/implementation.rs @@ -0,0 +1,79 @@ +// 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_implementation]` entry point. +//! +//! 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::{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/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..ce45fd0947 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/mod.rs @@ -0,0 +1,33 @@ +// 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 descriptor; +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..9eae0e1154 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/synthesis.rs @@ -0,0 +1,55 @@ +// 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; + +/// 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 + }, + } +} 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..7724523de9 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/tool_error.rs @@ -0,0 +1,482 @@ +// 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}; +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! { ::std::option::Option::None }, + ToolErrorPayloadIr::Single { ty } => { + let position = format!("error {name} payload"); + quote! { + ::std::option::Option::Some( + golem_rust::agentic::tool_value_schema::<#ty>(#position)? + ) + } + } + }; + 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::result::Result< + ::std::vec::Vec, + golem_rust::agentic::ToolBuildError, + > { + ::std::result::Result::Ok(::std::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/Cargo.toml b/sdks/rust/golem-rust/Cargo.toml index 88508d841e..ea75e26cdd 100644 --- a/sdks/rust/golem-rust/Cargo.toml +++ b/sdks/rust/golem-rust/Cargo.toml @@ -16,6 +16,14 @@ harness = false name = "agent" harness = false +[[test]] +name = "tool" +harness = false + +[[test]] +name = "tool_canonical" +harness = false + [[test]] name = "ui" harness = false 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..2e034f7f73 --- /dev/null +++ b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs @@ -0,0 +1,4751 @@ +// 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::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; +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, + /// 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)] +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, +} + +/// 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() -> Result, ToolBuildError>; +} + +#[derive(Clone, Debug)] +pub enum ExtendedRef { + Present(String), + ValueIs(ExtendedValueIsRef), +} + +#[derive(Clone, Debug)] +pub struct ExtendedValueIsRef { + pub name: String, + 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)] +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), + SubtreeRootNameMismatch { + expected: String, + actual: String, + }, + SubtreeAnnotationsUnsupported(String), + DuplicateName(String), + DuplicateShort(char), + InheritedGlobalConflict { + name: String, + inherited: String, + command: String, + }, + 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), + AutoInjectedToolParameter(String), + InvalidNumericBound(String), + RefinementTypeMismatch { + refinement: &'static str, + actual: &'static str, + }, + UnresolvedValueIsLiteral(String), + InvalidTailOccurrenceBounds { + name: String, + min: u32, + max: u32, + }, + RequiredPositionalAfterOptional(String), + FixedPositionalAfterTail(String), + VecSurfaceConflict { + name: String, + reason: 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::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 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:?}"), + 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" + ), + 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}") + } + 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}" + ), + 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}" + ), + } + } +} +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 { + 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 { + // 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) => { + 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) = body { + 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) => { + 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() +} + +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. +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), + 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) +} + +/// 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) => { + 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, + } +} + +/// 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 { + match map.resolve_ref(&map.root) { + Ok(SchemaType::Map { value, .. }) => SchemaGraph { + defs: map.defs.clone(), + root: (**value).clone(), + }, + _ => map.clone(), + } +} + +/// 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:?}"))) +} + +/// 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; + }; + while let SchemaType::Option { inner, .. } = peeled { + match graph.resolve_ref(inner) { + Ok(next) => peeled = next, + Err(_) => return false, + } + } + 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, + } +} + +/// `^[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 `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, +} + +/// 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( + 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 { + register_flag_scope(&mut scope, flag); + } + } + + 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)?; + } + 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( + &positional.type_, + &format!("positional {}", positional.name), + )?; + insert_unique(&mut names, &positional.name)?; + register_fixed_positional_scope(&mut scope, positional); + 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 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 { + check_identifier("positional name", &tail.name)?; + check_graph_closed(&tail.item_type, &format!("tail {}", tail.name))?; + insert_unique(&mut names, &tail.name)?; + 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 { + 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 = 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()); + } +} + +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())); + } + 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())); + } + }, + } + } + } + } + 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, + inherited_globals: Vec, + graft_roots: Vec, +} + +#[derive(Clone)] +struct PendingGraftRoot { + expected_name: String, + override_name: Option, +} + +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(); + } + /// 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 + /// 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 + } + 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); + 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; +} + +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 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 +/// 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 +/// the parent's command tree is applied by [`append_grafted_subtree`]. +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>, + override_annotations: Option, +) -> Result, ToolBuildError> { + let mut nodes = child.commands; + let root = nodes.first_mut().ok_or(ToolBuildError::EmptyCommandTree)?; + 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(), + }); + } + // 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; + } + if let Some(doc) = override_doc { + root.doc = doc; + } + if let Some(aliases) = override_aliases { + root.aliases = aliases; + } + + 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) +} + +/// 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); + } + } + + // 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 +/// 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(), + }); + } + 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 { + 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 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( + &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 + && 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 + } + ( + 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 +/// 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_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 { + 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, + positional_plan: vec![], + }), + }, + ], + } + } + + #[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"]); + } + + /// 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, + positional_plan: vec![], + }), + }, + ], + } + } + + #[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(); + 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_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::InheritedGlobalConflict { name, command, .. } + if name == "verbose" && command == "t" + )); + } + + #[test] + fn graft_preserves_local_indices() { + // 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]); + + // 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", + ExtendedGlobals::default(), + &[], + 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", + ExtendedGlobals::default(), + &[], + Some("remote".into()), + None, + None, + None, + ) + .unwrap(); + assert_eq!(ok[0].name, "remote"); + + let ann = graft_subtree( + dispatcher_child(), + "child", + ExtendedGlobals::default(), + &[], + 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)).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] + 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()), + ) + .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))); + 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).unwrap(); + + 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, + positional_plan: vec![], + } + } + + 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: ExtendedValueIsLiteral::Resolved(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: ExtendedValueIsLiteral::Resolved(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(_) + )); + } + + /// 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(), + 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: ExtendedValueIsLiteral::Resolved(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(_)) + )); + } + + #[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(), + 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 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. + 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(_)) + )); + } + + 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 { + inner: Box::new(SchemaType::string()), + category: Some("api-key".into()), + }), + SchemaType::secret(SecretSpec { + inner: Box::new(SchemaType::string()), + category: Some("api-key".into()), + }), + )); + assert!(!shapes_match( + SchemaType::secret(SecretSpec { + inner: Box::new(SchemaType::string()), + category: Some("api-key".into()), + }), + SchemaType::secret(SecretSpec { + inner: Box::new(SchemaType::string()), + 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_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>| { + 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/mod.rs b/sdks/rust/golem-rust/src/agentic/mod.rs index 69d83040f7..ae3e7c8ba9 100644 --- a/sdks/rust/golem-rust/src/agentic/mod.rs +++ b/sdks/rust/golem-rust/src/agentic/mod.rs @@ -20,10 +20,16 @@ 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_literal::*; +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 +42,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 +50,9 @@ mod resolved_agent; mod schema; pub mod snapshot_auto; mod tool_impl; +mod tool_literal; +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_literal.rs b/sdks/rust/golem-rust/src/agentic/tool_literal.rs new file mode 100644 index 0000000000..b52de9e1e0 --- /dev/null +++ b/sdks/rust/golem-rust/src/agentic/tool_literal.rs @@ -0,0 +1,405 @@ +// 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) +} + +/// 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:?}")) +} + +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::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 + .iter() + .map(|(k, v)| Ok((interpret(graph, key, k)?, interpret(graph, value, v)?))) + .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!( + "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()) + )] + } + ); + } + + #[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 new file mode 100644 index 0000000000..37acd25a3f --- /dev/null +++ b/sdks/rust/golem-rust/src/agentic/tool_refinement.rs @@ -0,0 +1,284 @@ +// 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::ToolBuildError; +use crate::schema::schema_type::NumericBound; +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, +) -> Result { + let metadata = base.metadata().clone(); + let mut restrictions = match base { + SchemaType::Text { restrictions, .. } => restrictions, + SchemaType::String { .. } => TextRestrictions::default(), + other => { + return Err(ToolBuildError::RefinementTypeMismatch { + refinement: "text", + actual: schema_kind_name(&other), + }); + } + }; + 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; + } + 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. A non-`Path` +/// schema is rejected (no `String`→`Path` coercion). +pub fn refine_path( + base: SchemaType, + direction: Option, + kind: Option, + mime: Option>, +) -> Result { + let metadata = base.metadata().clone(); + let mut spec = match base { + SchemaType::Path { spec, .. } => spec, + other => { + return Err(ToolBuildError::RefinementTypeMismatch { + refinement: "path", + actual: schema_kind_name(&other), + }); + } + }; + 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; + } + Ok(SchemaType::Path { spec, metadata }) +} + +/// 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, + other => { + return Err(ToolBuildError::RefinementTypeMismatch { + refinement: "url", + actual: schema_kind_name(&other), + }); + } + }; + if schemes.is_some() { + restrictions.allowed_schemes = schemes; + } + 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, +) -> 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`), + // 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(); + let refined = 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 => { + 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/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 9c9612d93f..771aecf580 100644 --- a/sdks/rust/golem-rust/tests/agent.rs +++ b/sdks/rust/golem-rust/tests/agent.rs @@ -1492,7 +1492,7 @@ mod tests { ( AgentConfigSource::Local, vec!["port".to_string()], - "SchemaTypeBody::U32Type".to_string() + "SchemaTypeBody::U32Type(None)".to_string() ), ( AgentConfigSource::Local, @@ -1502,7 +1502,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/tests/tool.rs b/sdks/rust/golem-rust/tests/tool.rs new file mode 100644 index 0000000000..0503ddae31 --- /dev/null +++ b/sdks/rust/golem-rust/tests/tool.rs @@ -0,0 +1,4191 @@ +// 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:?}", + ); + } + + #[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 + // 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"); + } + + #[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!( + 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), + ); + } + + #[test] + 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!( + 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_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_test_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 test 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 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}; + +#[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 test 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 { + 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(), + 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(command) + .arg("--quiet") + .env("CARGO_TARGET_DIR", target_dir) + .current_dir(&root) + .output() + .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!( + "failed to remove temporary workspace {}: {error}", + root.display() + ) + }); + output + } + + fn toml_string(path: &Path) -> String { + format!("{:?}", path.display().to_string()) + } +} 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..bf32a20f04 --- /dev/null +++ b/sdks/rust/golem-rust/tests/tool_canonical.rs @@ -0,0 +1,1281 @@ +// 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, render_help, + }; + 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), + } + + #[derive(ToolError)] + enum StashError { + #[tool_error(kind = "usage-error", exit_code = 128)] + NoSuchStash { name: 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; + + /// 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))] + #[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>; + } + + /// 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] + 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 stash(&self, _verbose: u32, _git_dir: PathBuf) -> StashSubtree { + StashSubtree + } + + 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_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() { + 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/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 068c7ed6f8..bb7dda191e 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 @@ -226,16 +226,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, @@ -301,6 +301,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/core/js/src/main/scala/golem/host/SchemaWireInterop.scala b/sdks/scala/core/js/src/main/scala/golem/host/SchemaWireInterop.scala index 6919c9372a..26d6987c42 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 a4dfd1cfb1..15d8536e3a 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 @@ -383,17 +413,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 f263668a81..79e652709f 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))), @@ -359,6 +365,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 dc123e80fd..6dcb8ee1a1 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 94c70b9de9..ed1d5705bd 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 6f93f1ff36..5897d7bd1e 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 @@ -61,19 +61,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 52142f45a5..0023a121d8 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 2c9b02f77e..e7f715fc54 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/deps/golem-core-v2/golem-core-v2.wit b/sdks/scala/wit/deps/golem-core-v2/golem-core-v2.wit index 068c7ed6f8..bb7dda191e 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 @@ -226,16 +226,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, @@ -301,6 +301,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/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 7d7ef996a2..d2235a1af1 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 @@ -181,6 +181,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 --- */ @@ -360,33 +390,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 a7e33bea82..69511b88f5 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, @@ -47,6 +48,7 @@ import { GuestQuotaTokenHandle } from './quotaTokenHandle'; export type { TypeId, MetadataEnvelope, + NumericRestrictions, TextRestrictions, BinaryRestrictions, PathSpec, @@ -64,7 +66,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) @@ -81,16 +89,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 @@ -242,16 +250,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 086423a5a2..484989e5c2 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 { GuestSecretHandle } from './secretHandle'; @@ -54,6 +56,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 @@ -107,25 +157,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': @@ -284,25 +334,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/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)); 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 2fb03688dd..e0d9aa4591 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 @@ -488,7 +488,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 7d7ef996a2..d2235a1af1 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 @@ -181,6 +181,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 --- */ @@ -360,33 +390,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) 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 068c7ed6f8..bb7dda191e 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 @@ -226,16 +226,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, @@ -301,6 +301,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 068c7ed6f8..bb7dda191e 100644 --- a/wit/deps/golem-core-v2/golem-core-v2.wit +++ b/wit/deps/golem-core-v2/golem-core-v2.wit @@ -226,16 +226,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, @@ -301,6 +301,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 {