@boundaryml/baml-bridge-web 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/shared/define_function.d.ts.map +1 -1
- package/dist/shared/define_function.js +17 -19
- package/dist/shared/define_function.js.map +1 -1
- package/dist/shared/proto/baml_cffi.d.ts +1165 -251
- package/dist/shared/proto/baml_cffi.js +1733 -124
- package/dist/shared/proto.d.ts +2 -1
- package/dist/shared/proto.d.ts.map +1 -1
- package/dist/shared/proto.js +26 -8
- package/dist/shared/proto.js.map +1 -1
- package/dist/shared/typemap.d.ts.map +1 -1
- package/dist/shared/typemap.js +9 -1
- package/dist/shared/typemap.js.map +1 -1
- package/dist/shared/wire_ty.d.ts +57 -37
- package/dist/shared/wire_ty.d.ts.map +1 -1
- package/dist/shared/wire_ty.js +156 -88
- package/dist/shared/wire_ty.js.map +1 -1
- package/dist/wasm/bridge_web_core.d.ts +2 -2
- package/dist/wasm/bridge_web_core.js +7 -7
- package/dist/wasm/bridge_web_core_bg.wasm +0 -0
- package/dist/wasm/bridge_web_core_bg.wasm.d.ts +2 -2
- package/dist/workerd/index.d.ts +2 -1
- package/dist/workerd/index.d.ts.map +1 -1
- package/dist/workerd/index.js +1 -0
- package/dist/workerd/index.js.map +1 -1
- package/dist/workerd/shared/define_function.d.ts.map +1 -1
- package/dist/workerd/shared/define_function.js +17 -19
- package/dist/workerd/shared/define_function.js.map +1 -1
- package/dist/workerd/shared/proto/baml_cffi.d.ts +1165 -251
- package/dist/workerd/shared/proto/baml_cffi.js +1733 -124
- package/dist/workerd/shared/proto.d.ts +2 -1
- package/dist/workerd/shared/proto.d.ts.map +1 -1
- package/dist/workerd/shared/proto.js +26 -8
- package/dist/workerd/shared/proto.js.map +1 -1
- package/dist/workerd/shared/typemap.d.ts.map +1 -1
- package/dist/workerd/shared/typemap.js +9 -1
- package/dist/workerd/shared/typemap.js.map +1 -1
- package/dist/workerd/shared/wire_ty.d.ts +57 -37
- package/dist/workerd/shared/wire_ty.d.ts.map +1 -1
- package/dist/workerd/shared/wire_ty.js +156 -88
- package/dist/workerd/shared/wire_ty.js.map +1 -1
- package/dist/workerd-wasm/bridge_web_core_bg.js +7 -7
- package/dist/workerd-wasm/bridge_web_core_bg.wasm +0 -0
- package/dist/workerd-wasm/bridge_web_core_bg.wasm.d.ts +2 -2
- package/package.json +1 -1
|
@@ -2443,9 +2443,10 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
2443
2443
|
InboundValue.prototype.uint8arrayValue = null;
|
|
2444
2444
|
InboundValue.prototype.bigintValue = null;
|
|
2445
2445
|
InboundValue.prototype.tyValue = null;
|
|
2446
|
+
InboundValue.prototype.tyDefValue = null;
|
|
2446
2447
|
let $oneOfFields;
|
|
2447
2448
|
Object.defineProperty(InboundValue.prototype, "value", {
|
|
2448
|
-
get: $util.oneOfGetter($oneOfFields = ["stringValue", "intValue", "floatValue", "boolValue", "listValue", "mapValue", "classValue", "enumValue", "handle", "uint8arrayValue", "bigintValue", "tyValue"]),
|
|
2449
|
+
get: $util.oneOfGetter($oneOfFields = ["stringValue", "intValue", "floatValue", "boolValue", "listValue", "mapValue", "classValue", "enumValue", "handle", "uint8arrayValue", "bigintValue", "tyValue", "tyDefValue"]),
|
|
2449
2450
|
set: $util.oneOfSetter($oneOfFields)
|
|
2450
2451
|
});
|
|
2451
2452
|
InboundValue.create = function create(properties) {
|
|
@@ -2523,6 +2524,11 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
2523
2524
|
/* id 13, wireType 2 =*/
|
|
2524
2525
|
106
|
|
2525
2526
|
).fork(), q + 1).ldelim();
|
|
2527
|
+
if (message.tyDefValue != null && Object.hasOwnProperty.call(message, "tyDefValue"))
|
|
2528
|
+
$root.baml_bridge.cffi.v1.BamlTyDef.encode(message.tyDefValue, writer.uint32(
|
|
2529
|
+
/* id 14, wireType 2 =*/
|
|
2530
|
+
114
|
|
2531
|
+
).fork(), q + 1).ldelim();
|
|
2526
2532
|
return writer;
|
|
2527
2533
|
};
|
|
2528
2534
|
InboundValue.encodeDelimited = function encodeDelimited(message, writer) {
|
|
@@ -2593,6 +2599,10 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
2593
2599
|
message.tyValue = $root.baml_bridge.cffi.v1.BamlTy.decode(reader, reader.uint32(), void 0, long + 1);
|
|
2594
2600
|
break;
|
|
2595
2601
|
}
|
|
2602
|
+
case 14: {
|
|
2603
|
+
message.tyDefValue = $root.baml_bridge.cffi.v1.BamlTyDef.decode(reader, reader.uint32(), void 0, long + 1);
|
|
2604
|
+
break;
|
|
2605
|
+
}
|
|
2596
2606
|
default:
|
|
2597
2607
|
reader.skipType(tag & 7, long);
|
|
2598
2608
|
break;
|
|
@@ -2718,6 +2728,16 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
2718
2728
|
return "tyValue." + error;
|
|
2719
2729
|
}
|
|
2720
2730
|
}
|
|
2731
|
+
if (message.tyDefValue != null && message.hasOwnProperty("tyDefValue")) {
|
|
2732
|
+
if (properties.value === 1)
|
|
2733
|
+
return "value: multiple values";
|
|
2734
|
+
properties.value = 1;
|
|
2735
|
+
{
|
|
2736
|
+
let error = $root.baml_bridge.cffi.v1.BamlTyDef.verify(message.tyDefValue, long + 1);
|
|
2737
|
+
if (error)
|
|
2738
|
+
return "tyDefValue." + error;
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2721
2741
|
return null;
|
|
2722
2742
|
};
|
|
2723
2743
|
InboundValue.fromObject = function fromObject(object, long) {
|
|
@@ -2789,6 +2809,11 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
2789
2809
|
throw TypeError(".baml_bridge.cffi.v1.InboundValue.tyValue: object expected");
|
|
2790
2810
|
message.tyValue = $root.baml_bridge.cffi.v1.BamlTy.fromObject(object.tyValue, long + 1);
|
|
2791
2811
|
}
|
|
2812
|
+
if (object.tyDefValue != null) {
|
|
2813
|
+
if (!$util.isObject(object.tyDefValue))
|
|
2814
|
+
throw TypeError(".baml_bridge.cffi.v1.InboundValue.tyDefValue: object expected");
|
|
2815
|
+
message.tyDefValue = $root.baml_bridge.cffi.v1.BamlTyDef.fromObject(object.tyDefValue, long + 1);
|
|
2816
|
+
}
|
|
2792
2817
|
return message;
|
|
2793
2818
|
};
|
|
2794
2819
|
InboundValue.toObject = function toObject(message, options, q) {
|
|
@@ -2868,6 +2893,11 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
2868
2893
|
if (options.oneofs)
|
|
2869
2894
|
object.value = "tyValue";
|
|
2870
2895
|
}
|
|
2896
|
+
if (message.tyDefValue != null && message.hasOwnProperty("tyDefValue")) {
|
|
2897
|
+
object.tyDefValue = $root.baml_bridge.cffi.v1.BamlTyDef.toObject(message.tyDefValue, options, q + 1);
|
|
2898
|
+
if (options.oneofs)
|
|
2899
|
+
object.value = "tyDefValue";
|
|
2900
|
+
}
|
|
2871
2901
|
return object;
|
|
2872
2902
|
};
|
|
2873
2903
|
InboundValue.prototype.toJSON = function toJSON() {
|
|
@@ -3644,6 +3674,7 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
3644
3674
|
}
|
|
3645
3675
|
BamlTyArg.prototype.typeVar = "";
|
|
3646
3676
|
BamlTyArg.prototype.typeValue = null;
|
|
3677
|
+
BamlTyArg.prototype.typeDefinition = null;
|
|
3647
3678
|
BamlTyArg.create = function create(properties) {
|
|
3648
3679
|
return new BamlTyArg(properties);
|
|
3649
3680
|
};
|
|
@@ -3664,6 +3695,11 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
3664
3695
|
/* id 2, wireType 2 =*/
|
|
3665
3696
|
18
|
|
3666
3697
|
).fork(), q + 1).ldelim();
|
|
3698
|
+
if (message.typeDefinition != null && Object.hasOwnProperty.call(message, "typeDefinition"))
|
|
3699
|
+
$root.baml_bridge.cffi.v1.BamlTyDef.encode(message.typeDefinition, writer.uint32(
|
|
3700
|
+
/* id 3, wireType 2 =*/
|
|
3701
|
+
26
|
|
3702
|
+
).fork(), q + 1).ldelim();
|
|
3667
3703
|
return writer;
|
|
3668
3704
|
};
|
|
3669
3705
|
BamlTyArg.encodeDelimited = function encodeDelimited(message, writer) {
|
|
@@ -3690,6 +3726,10 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
3690
3726
|
message.typeValue = $root.baml_bridge.cffi.v1.BamlTy.decode(reader, reader.uint32(), void 0, long + 1);
|
|
3691
3727
|
break;
|
|
3692
3728
|
}
|
|
3729
|
+
case 3: {
|
|
3730
|
+
message.typeDefinition = $root.baml_bridge.cffi.v1.BamlTyDef.decode(reader, reader.uint32(), void 0, long + 1);
|
|
3731
|
+
break;
|
|
3732
|
+
}
|
|
3693
3733
|
default:
|
|
3694
3734
|
reader.skipType(tag & 7, long);
|
|
3695
3735
|
break;
|
|
@@ -3718,6 +3758,11 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
3718
3758
|
if (error)
|
|
3719
3759
|
return "typeValue." + error;
|
|
3720
3760
|
}
|
|
3761
|
+
if (message.typeDefinition != null && message.hasOwnProperty("typeDefinition")) {
|
|
3762
|
+
let error = $root.baml_bridge.cffi.v1.BamlTyDef.verify(message.typeDefinition, long + 1);
|
|
3763
|
+
if (error)
|
|
3764
|
+
return "typeDefinition." + error;
|
|
3765
|
+
}
|
|
3721
3766
|
return null;
|
|
3722
3767
|
};
|
|
3723
3768
|
BamlTyArg.fromObject = function fromObject(object, long) {
|
|
@@ -3737,6 +3782,11 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
3737
3782
|
throw TypeError(".baml_bridge.cffi.v1.BamlTyArg.typeValue: object expected");
|
|
3738
3783
|
message.typeValue = $root.baml_bridge.cffi.v1.BamlTy.fromObject(object.typeValue, long + 1);
|
|
3739
3784
|
}
|
|
3785
|
+
if (object.typeDefinition != null) {
|
|
3786
|
+
if (!$util.isObject(object.typeDefinition))
|
|
3787
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyArg.typeDefinition: object expected");
|
|
3788
|
+
message.typeDefinition = $root.baml_bridge.cffi.v1.BamlTyDef.fromObject(object.typeDefinition, long + 1);
|
|
3789
|
+
}
|
|
3740
3790
|
return message;
|
|
3741
3791
|
};
|
|
3742
3792
|
BamlTyArg.toObject = function toObject(message, options, q) {
|
|
@@ -3750,11 +3800,14 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
3750
3800
|
if (options.defaults) {
|
|
3751
3801
|
object.typeVar = "";
|
|
3752
3802
|
object.typeValue = null;
|
|
3803
|
+
object.typeDefinition = null;
|
|
3753
3804
|
}
|
|
3754
3805
|
if (message.typeVar != null && message.hasOwnProperty("typeVar"))
|
|
3755
3806
|
object.typeVar = message.typeVar;
|
|
3756
3807
|
if (message.typeValue != null && message.hasOwnProperty("typeValue"))
|
|
3757
3808
|
object.typeValue = $root.baml_bridge.cffi.v1.BamlTy.toObject(message.typeValue, options, q + 1);
|
|
3809
|
+
if (message.typeDefinition != null && message.hasOwnProperty("typeDefinition"))
|
|
3810
|
+
object.typeDefinition = $root.baml_bridge.cffi.v1.BamlTyDef.toObject(message.typeDefinition, options, q + 1);
|
|
3758
3811
|
return object;
|
|
3759
3812
|
};
|
|
3760
3813
|
BamlTyArg.prototype.toJSON = function toJSON() {
|
|
@@ -5038,24 +5091,1497 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
5038
5091
|
throw TypeError(".baml_bridge.cffi.v1.BamlTy.void: object expected");
|
|
5039
5092
|
message["void"] = $root.baml_bridge.cffi.v1.BamlTyVoid.fromObject(object["void"], long + 1);
|
|
5040
5093
|
}
|
|
5041
|
-
if (object.typeVar != null) {
|
|
5042
|
-
if (!$util.isObject(object.typeVar))
|
|
5043
|
-
throw TypeError(".baml_bridge.cffi.v1.BamlTy.typeVar: object expected");
|
|
5044
|
-
message.typeVar = $root.baml_bridge.cffi.v1.BamlTyTypeVar.fromObject(object.typeVar, long + 1);
|
|
5094
|
+
if (object.typeVar != null) {
|
|
5095
|
+
if (!$util.isObject(object.typeVar))
|
|
5096
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTy.typeVar: object expected");
|
|
5097
|
+
message.typeVar = $root.baml_bridge.cffi.v1.BamlTyTypeVar.fromObject(object.typeVar, long + 1);
|
|
5098
|
+
}
|
|
5099
|
+
if (object.associatedTypeProjection != null) {
|
|
5100
|
+
if (!$util.isObject(object.associatedTypeProjection))
|
|
5101
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTy.associatedTypeProjection: object expected");
|
|
5102
|
+
message.associatedTypeProjection = $root.baml_bridge.cffi.v1.BamlTyAssociatedTypeProjection.fromObject(object.associatedTypeProjection, long + 1);
|
|
5103
|
+
}
|
|
5104
|
+
if (object.never != null) {
|
|
5105
|
+
if (!$util.isObject(object.never))
|
|
5106
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTy.never: object expected");
|
|
5107
|
+
message.never = $root.baml_bridge.cffi.v1.BamlTyNever.fromObject(object.never, long + 1);
|
|
5108
|
+
}
|
|
5109
|
+
return message;
|
|
5110
|
+
};
|
|
5111
|
+
BamlTy.toObject = function toObject(message, options, q) {
|
|
5112
|
+
if (!options)
|
|
5113
|
+
options = {};
|
|
5114
|
+
if (q === void 0)
|
|
5115
|
+
q = 0;
|
|
5116
|
+
if (q > $util.recursionLimit)
|
|
5117
|
+
throw Error("max depth exceeded");
|
|
5118
|
+
let object = {};
|
|
5119
|
+
if (message.primitive != null && message.hasOwnProperty("primitive")) {
|
|
5120
|
+
object.primitive = $root.baml_bridge.cffi.v1.BamlTyPrimitive.toObject(message.primitive, options, q + 1);
|
|
5121
|
+
if (options.oneofs)
|
|
5122
|
+
object.ty = "primitive";
|
|
5123
|
+
}
|
|
5124
|
+
if (message.classTy != null && message.hasOwnProperty("classTy")) {
|
|
5125
|
+
object.classTy = $root.baml_bridge.cffi.v1.BamlTyClass.toObject(message.classTy, options, q + 1);
|
|
5126
|
+
if (options.oneofs)
|
|
5127
|
+
object.ty = "classTy";
|
|
5128
|
+
}
|
|
5129
|
+
if (message["enum"] != null && message.hasOwnProperty("enum")) {
|
|
5130
|
+
object["enum"] = $root.baml_bridge.cffi.v1.BamlTyEnum.toObject(message["enum"], options, q + 1);
|
|
5131
|
+
if (options.oneofs)
|
|
5132
|
+
object.ty = "enum";
|
|
5133
|
+
}
|
|
5134
|
+
if (message.list != null && message.hasOwnProperty("list")) {
|
|
5135
|
+
object.list = $root.baml_bridge.cffi.v1.BamlTyList.toObject(message.list, options, q + 1);
|
|
5136
|
+
if (options.oneofs)
|
|
5137
|
+
object.ty = "list";
|
|
5138
|
+
}
|
|
5139
|
+
if (message.map != null && message.hasOwnProperty("map")) {
|
|
5140
|
+
object.map = $root.baml_bridge.cffi.v1.BamlTyMap.toObject(message.map, options, q + 1);
|
|
5141
|
+
if (options.oneofs)
|
|
5142
|
+
object.ty = "map";
|
|
5143
|
+
}
|
|
5144
|
+
if (message.optional != null && message.hasOwnProperty("optional")) {
|
|
5145
|
+
object.optional = $root.baml_bridge.cffi.v1.BamlTyOptional.toObject(message.optional, options, q + 1);
|
|
5146
|
+
if (options.oneofs)
|
|
5147
|
+
object.ty = "optional";
|
|
5148
|
+
}
|
|
5149
|
+
if (message.union != null && message.hasOwnProperty("union")) {
|
|
5150
|
+
object.union = $root.baml_bridge.cffi.v1.BamlTyUnion.toObject(message.union, options, q + 1);
|
|
5151
|
+
if (options.oneofs)
|
|
5152
|
+
object.ty = "union";
|
|
5153
|
+
}
|
|
5154
|
+
if (message.literal != null && message.hasOwnProperty("literal")) {
|
|
5155
|
+
object.literal = $root.baml_bridge.cffi.v1.BamlTyLiteral.toObject(message.literal, options, q + 1);
|
|
5156
|
+
if (options.oneofs)
|
|
5157
|
+
object.ty = "literal";
|
|
5158
|
+
}
|
|
5159
|
+
if (message.typeAlias != null && message.hasOwnProperty("typeAlias")) {
|
|
5160
|
+
object.typeAlias = $root.baml_bridge.cffi.v1.BamlTyTypeAlias.toObject(message.typeAlias, options, q + 1);
|
|
5161
|
+
if (options.oneofs)
|
|
5162
|
+
object.ty = "typeAlias";
|
|
5163
|
+
}
|
|
5164
|
+
if (message.unknown != null && message.hasOwnProperty("unknown")) {
|
|
5165
|
+
object.unknown = $root.baml_bridge.cffi.v1.BamlTyUnknown.toObject(message.unknown, options, q + 1);
|
|
5166
|
+
if (options.oneofs)
|
|
5167
|
+
object.ty = "unknown";
|
|
5168
|
+
}
|
|
5169
|
+
if (message.media != null && message.hasOwnProperty("media")) {
|
|
5170
|
+
object.media = $root.baml_bridge.cffi.v1.BamlTyMedia.toObject(message.media, options, q + 1);
|
|
5171
|
+
if (options.oneofs)
|
|
5172
|
+
object.ty = "media";
|
|
5173
|
+
}
|
|
5174
|
+
if (message["interface"] != null && message.hasOwnProperty("interface")) {
|
|
5175
|
+
object["interface"] = $root.baml_bridge.cffi.v1.BamlTyInterface.toObject(message["interface"], options, q + 1);
|
|
5176
|
+
if (options.oneofs)
|
|
5177
|
+
object.ty = "interface";
|
|
5178
|
+
}
|
|
5179
|
+
if (message.enumVariant != null && message.hasOwnProperty("enumVariant")) {
|
|
5180
|
+
object.enumVariant = $root.baml_bridge.cffi.v1.BamlTyEnumVariant.toObject(message.enumVariant, options, q + 1);
|
|
5181
|
+
if (options.oneofs)
|
|
5182
|
+
object.ty = "enumVariant";
|
|
5183
|
+
}
|
|
5184
|
+
if (message["function"] != null && message.hasOwnProperty("function")) {
|
|
5185
|
+
object["function"] = $root.baml_bridge.cffi.v1.BamlTyFunction.toObject(message["function"], options, q + 1);
|
|
5186
|
+
if (options.oneofs)
|
|
5187
|
+
object.ty = "function";
|
|
5188
|
+
}
|
|
5189
|
+
if (message.future != null && message.hasOwnProperty("future")) {
|
|
5190
|
+
object.future = $root.baml_bridge.cffi.v1.BamlTyFuture.toObject(message.future, options, q + 1);
|
|
5191
|
+
if (options.oneofs)
|
|
5192
|
+
object.ty = "future";
|
|
5193
|
+
}
|
|
5194
|
+
if (message.rustType != null && message.hasOwnProperty("rustType")) {
|
|
5195
|
+
object.rustType = $root.baml_bridge.cffi.v1.BamlTyRustType.toObject(message.rustType, options, q + 1);
|
|
5196
|
+
if (options.oneofs)
|
|
5197
|
+
object.ty = "rustType";
|
|
5198
|
+
}
|
|
5199
|
+
if (message.metaType != null && message.hasOwnProperty("metaType")) {
|
|
5200
|
+
object.metaType = $root.baml_bridge.cffi.v1.BamlTyMetaType.toObject(message.metaType, options, q + 1);
|
|
5201
|
+
if (options.oneofs)
|
|
5202
|
+
object.ty = "metaType";
|
|
5203
|
+
}
|
|
5204
|
+
if (message.resource != null && message.hasOwnProperty("resource")) {
|
|
5205
|
+
object.resource = $root.baml_bridge.cffi.v1.BamlTyResource.toObject(message.resource, options, q + 1);
|
|
5206
|
+
if (options.oneofs)
|
|
5207
|
+
object.ty = "resource";
|
|
5208
|
+
}
|
|
5209
|
+
if (message.promptAst != null && message.hasOwnProperty("promptAst")) {
|
|
5210
|
+
object.promptAst = $root.baml_bridge.cffi.v1.BamlTyPromptAst.toObject(message.promptAst, options, q + 1);
|
|
5211
|
+
if (options.oneofs)
|
|
5212
|
+
object.ty = "promptAst";
|
|
5213
|
+
}
|
|
5214
|
+
if (message["void"] != null && message.hasOwnProperty("void")) {
|
|
5215
|
+
object["void"] = $root.baml_bridge.cffi.v1.BamlTyVoid.toObject(message["void"], options, q + 1);
|
|
5216
|
+
if (options.oneofs)
|
|
5217
|
+
object.ty = "void";
|
|
5218
|
+
}
|
|
5219
|
+
if (message.typeVar != null && message.hasOwnProperty("typeVar")) {
|
|
5220
|
+
object.typeVar = $root.baml_bridge.cffi.v1.BamlTyTypeVar.toObject(message.typeVar, options, q + 1);
|
|
5221
|
+
if (options.oneofs)
|
|
5222
|
+
object.ty = "typeVar";
|
|
5223
|
+
}
|
|
5224
|
+
if (message.associatedTypeProjection != null && message.hasOwnProperty("associatedTypeProjection")) {
|
|
5225
|
+
object.associatedTypeProjection = $root.baml_bridge.cffi.v1.BamlTyAssociatedTypeProjection.toObject(message.associatedTypeProjection, options, q + 1);
|
|
5226
|
+
if (options.oneofs)
|
|
5227
|
+
object.ty = "associatedTypeProjection";
|
|
5228
|
+
}
|
|
5229
|
+
if (message.never != null && message.hasOwnProperty("never")) {
|
|
5230
|
+
object.never = $root.baml_bridge.cffi.v1.BamlTyNever.toObject(message.never, options, q + 1);
|
|
5231
|
+
if (options.oneofs)
|
|
5232
|
+
object.ty = "never";
|
|
5233
|
+
}
|
|
5234
|
+
return object;
|
|
5235
|
+
};
|
|
5236
|
+
BamlTy.prototype.toJSON = function toJSON() {
|
|
5237
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
5238
|
+
};
|
|
5239
|
+
BamlTy.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
5240
|
+
if (typeUrlPrefix === void 0) {
|
|
5241
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
5242
|
+
}
|
|
5243
|
+
return typeUrlPrefix + "/baml_bridge.cffi.v1.BamlTy";
|
|
5244
|
+
};
|
|
5245
|
+
return BamlTy;
|
|
5246
|
+
})();
|
|
5247
|
+
v1.BamlTyDef = (function() {
|
|
5248
|
+
function BamlTyDef(properties) {
|
|
5249
|
+
this.classes = [];
|
|
5250
|
+
this.enums = [];
|
|
5251
|
+
this.witnesses = [];
|
|
5252
|
+
if (properties) {
|
|
5253
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
5254
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
5255
|
+
this[keys[i]] = properties[keys[i]];
|
|
5256
|
+
}
|
|
5257
|
+
}
|
|
5258
|
+
BamlTyDef.prototype.root = null;
|
|
5259
|
+
BamlTyDef.prototype.classes = $util.emptyArray;
|
|
5260
|
+
BamlTyDef.prototype.enums = $util.emptyArray;
|
|
5261
|
+
BamlTyDef.prototype.witnesses = $util.emptyArray;
|
|
5262
|
+
BamlTyDef.create = function create(properties) {
|
|
5263
|
+
return new BamlTyDef(properties);
|
|
5264
|
+
};
|
|
5265
|
+
BamlTyDef.encode = function encode(message, writer, q) {
|
|
5266
|
+
if (!writer)
|
|
5267
|
+
writer = $Writer.create();
|
|
5268
|
+
if (q === void 0)
|
|
5269
|
+
q = 0;
|
|
5270
|
+
if (q > $util.recursionLimit)
|
|
5271
|
+
throw Error("max depth exceeded");
|
|
5272
|
+
if (message.root != null && Object.hasOwnProperty.call(message, "root"))
|
|
5273
|
+
$root.baml_bridge.cffi.v1.BamlTy.encode(message.root, writer.uint32(
|
|
5274
|
+
/* id 1, wireType 2 =*/
|
|
5275
|
+
10
|
|
5276
|
+
).fork(), q + 1).ldelim();
|
|
5277
|
+
if (message.classes != null && message.classes.length)
|
|
5278
|
+
for (let i = 0; i < message.classes.length; ++i)
|
|
5279
|
+
$root.baml_bridge.cffi.v1.BamlClassDef.encode(message.classes[i], writer.uint32(
|
|
5280
|
+
/* id 2, wireType 2 =*/
|
|
5281
|
+
18
|
|
5282
|
+
).fork(), q + 1).ldelim();
|
|
5283
|
+
if (message.enums != null && message.enums.length)
|
|
5284
|
+
for (let i = 0; i < message.enums.length; ++i)
|
|
5285
|
+
$root.baml_bridge.cffi.v1.BamlEnumDef.encode(message.enums[i], writer.uint32(
|
|
5286
|
+
/* id 3, wireType 2 =*/
|
|
5287
|
+
26
|
|
5288
|
+
).fork(), q + 1).ldelim();
|
|
5289
|
+
if (message.witnesses != null && message.witnesses.length)
|
|
5290
|
+
for (let i = 0; i < message.witnesses.length; ++i)
|
|
5291
|
+
$root.baml_bridge.cffi.v1.BamlWitnessDef.encode(message.witnesses[i], writer.uint32(
|
|
5292
|
+
/* id 4, wireType 2 =*/
|
|
5293
|
+
34
|
|
5294
|
+
).fork(), q + 1).ldelim();
|
|
5295
|
+
return writer;
|
|
5296
|
+
};
|
|
5297
|
+
BamlTyDef.encodeDelimited = function encodeDelimited(message, writer) {
|
|
5298
|
+
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
5299
|
+
};
|
|
5300
|
+
BamlTyDef.decode = function decode(reader, length, error, long) {
|
|
5301
|
+
if (!(reader instanceof $Reader))
|
|
5302
|
+
reader = $Reader.create(reader);
|
|
5303
|
+
if (long === void 0)
|
|
5304
|
+
long = 0;
|
|
5305
|
+
if (long > $Reader.recursionLimit)
|
|
5306
|
+
throw Error("maximum nesting depth exceeded");
|
|
5307
|
+
let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.baml_bridge.cffi.v1.BamlTyDef();
|
|
5308
|
+
while (reader.pos < end) {
|
|
5309
|
+
let tag = reader.uint32();
|
|
5310
|
+
if (tag === error)
|
|
5311
|
+
break;
|
|
5312
|
+
switch (tag >>> 3) {
|
|
5313
|
+
case 1: {
|
|
5314
|
+
message.root = $root.baml_bridge.cffi.v1.BamlTy.decode(reader, reader.uint32(), void 0, long + 1);
|
|
5315
|
+
break;
|
|
5316
|
+
}
|
|
5317
|
+
case 2: {
|
|
5318
|
+
if (!(message.classes && message.classes.length))
|
|
5319
|
+
message.classes = [];
|
|
5320
|
+
message.classes.push($root.baml_bridge.cffi.v1.BamlClassDef.decode(reader, reader.uint32(), void 0, long + 1));
|
|
5321
|
+
break;
|
|
5322
|
+
}
|
|
5323
|
+
case 3: {
|
|
5324
|
+
if (!(message.enums && message.enums.length))
|
|
5325
|
+
message.enums = [];
|
|
5326
|
+
message.enums.push($root.baml_bridge.cffi.v1.BamlEnumDef.decode(reader, reader.uint32(), void 0, long + 1));
|
|
5327
|
+
break;
|
|
5328
|
+
}
|
|
5329
|
+
case 4: {
|
|
5330
|
+
if (!(message.witnesses && message.witnesses.length))
|
|
5331
|
+
message.witnesses = [];
|
|
5332
|
+
message.witnesses.push($root.baml_bridge.cffi.v1.BamlWitnessDef.decode(reader, reader.uint32(), void 0, long + 1));
|
|
5333
|
+
break;
|
|
5334
|
+
}
|
|
5335
|
+
default:
|
|
5336
|
+
reader.skipType(tag & 7, long);
|
|
5337
|
+
break;
|
|
5338
|
+
}
|
|
5339
|
+
}
|
|
5340
|
+
return message;
|
|
5341
|
+
};
|
|
5342
|
+
BamlTyDef.decodeDelimited = function decodeDelimited(reader) {
|
|
5343
|
+
if (!(reader instanceof $Reader))
|
|
5344
|
+
reader = new $Reader(reader);
|
|
5345
|
+
return this.decode(reader, reader.uint32());
|
|
5346
|
+
};
|
|
5347
|
+
BamlTyDef.verify = function verify(message, long) {
|
|
5348
|
+
if (typeof message !== "object" || message === null)
|
|
5349
|
+
return "object expected";
|
|
5350
|
+
if (long === void 0)
|
|
5351
|
+
long = 0;
|
|
5352
|
+
if (long > $util.recursionLimit)
|
|
5353
|
+
return "maximum nesting depth exceeded";
|
|
5354
|
+
if (message.root != null && message.hasOwnProperty("root")) {
|
|
5355
|
+
let error = $root.baml_bridge.cffi.v1.BamlTy.verify(message.root, long + 1);
|
|
5356
|
+
if (error)
|
|
5357
|
+
return "root." + error;
|
|
5358
|
+
}
|
|
5359
|
+
if (message.classes != null && message.hasOwnProperty("classes")) {
|
|
5360
|
+
if (!Array.isArray(message.classes))
|
|
5361
|
+
return "classes: array expected";
|
|
5362
|
+
for (let i = 0; i < message.classes.length; ++i) {
|
|
5363
|
+
let error = $root.baml_bridge.cffi.v1.BamlClassDef.verify(message.classes[i], long + 1);
|
|
5364
|
+
if (error)
|
|
5365
|
+
return "classes." + error;
|
|
5366
|
+
}
|
|
5367
|
+
}
|
|
5368
|
+
if (message.enums != null && message.hasOwnProperty("enums")) {
|
|
5369
|
+
if (!Array.isArray(message.enums))
|
|
5370
|
+
return "enums: array expected";
|
|
5371
|
+
for (let i = 0; i < message.enums.length; ++i) {
|
|
5372
|
+
let error = $root.baml_bridge.cffi.v1.BamlEnumDef.verify(message.enums[i], long + 1);
|
|
5373
|
+
if (error)
|
|
5374
|
+
return "enums." + error;
|
|
5375
|
+
}
|
|
5376
|
+
}
|
|
5377
|
+
if (message.witnesses != null && message.hasOwnProperty("witnesses")) {
|
|
5378
|
+
if (!Array.isArray(message.witnesses))
|
|
5379
|
+
return "witnesses: array expected";
|
|
5380
|
+
for (let i = 0; i < message.witnesses.length; ++i) {
|
|
5381
|
+
let error = $root.baml_bridge.cffi.v1.BamlWitnessDef.verify(message.witnesses[i], long + 1);
|
|
5382
|
+
if (error)
|
|
5383
|
+
return "witnesses." + error;
|
|
5384
|
+
}
|
|
5385
|
+
}
|
|
5386
|
+
return null;
|
|
5387
|
+
};
|
|
5388
|
+
BamlTyDef.fromObject = function fromObject(object, long) {
|
|
5389
|
+
if (object instanceof $root.baml_bridge.cffi.v1.BamlTyDef)
|
|
5390
|
+
return object;
|
|
5391
|
+
if (!$util.isObject(object))
|
|
5392
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyDef: object expected");
|
|
5393
|
+
if (long === void 0)
|
|
5394
|
+
long = 0;
|
|
5395
|
+
if (long > $util.recursionLimit)
|
|
5396
|
+
throw Error("maximum nesting depth exceeded");
|
|
5397
|
+
let message = new $root.baml_bridge.cffi.v1.BamlTyDef();
|
|
5398
|
+
if (object.root != null) {
|
|
5399
|
+
if (!$util.isObject(object.root))
|
|
5400
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyDef.root: object expected");
|
|
5401
|
+
message.root = $root.baml_bridge.cffi.v1.BamlTy.fromObject(object.root, long + 1);
|
|
5402
|
+
}
|
|
5403
|
+
if (object.classes) {
|
|
5404
|
+
if (!Array.isArray(object.classes))
|
|
5405
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyDef.classes: array expected");
|
|
5406
|
+
message.classes = [];
|
|
5407
|
+
for (let i = 0; i < object.classes.length; ++i) {
|
|
5408
|
+
if (!$util.isObject(object.classes[i]))
|
|
5409
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyDef.classes: object expected");
|
|
5410
|
+
message.classes[i] = $root.baml_bridge.cffi.v1.BamlClassDef.fromObject(object.classes[i], long + 1);
|
|
5411
|
+
}
|
|
5412
|
+
}
|
|
5413
|
+
if (object.enums) {
|
|
5414
|
+
if (!Array.isArray(object.enums))
|
|
5415
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyDef.enums: array expected");
|
|
5416
|
+
message.enums = [];
|
|
5417
|
+
for (let i = 0; i < object.enums.length; ++i) {
|
|
5418
|
+
if (!$util.isObject(object.enums[i]))
|
|
5419
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyDef.enums: object expected");
|
|
5420
|
+
message.enums[i] = $root.baml_bridge.cffi.v1.BamlEnumDef.fromObject(object.enums[i], long + 1);
|
|
5421
|
+
}
|
|
5422
|
+
}
|
|
5423
|
+
if (object.witnesses) {
|
|
5424
|
+
if (!Array.isArray(object.witnesses))
|
|
5425
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyDef.witnesses: array expected");
|
|
5426
|
+
message.witnesses = [];
|
|
5427
|
+
for (let i = 0; i < object.witnesses.length; ++i) {
|
|
5428
|
+
if (!$util.isObject(object.witnesses[i]))
|
|
5429
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyDef.witnesses: object expected");
|
|
5430
|
+
message.witnesses[i] = $root.baml_bridge.cffi.v1.BamlWitnessDef.fromObject(object.witnesses[i], long + 1);
|
|
5431
|
+
}
|
|
5432
|
+
}
|
|
5433
|
+
return message;
|
|
5434
|
+
};
|
|
5435
|
+
BamlTyDef.toObject = function toObject(message, options, q) {
|
|
5436
|
+
if (!options)
|
|
5437
|
+
options = {};
|
|
5438
|
+
if (q === void 0)
|
|
5439
|
+
q = 0;
|
|
5440
|
+
if (q > $util.recursionLimit)
|
|
5441
|
+
throw Error("max depth exceeded");
|
|
5442
|
+
let object = {};
|
|
5443
|
+
if (options.arrays || options.defaults) {
|
|
5444
|
+
object.classes = [];
|
|
5445
|
+
object.enums = [];
|
|
5446
|
+
object.witnesses = [];
|
|
5447
|
+
}
|
|
5448
|
+
if (options.defaults)
|
|
5449
|
+
object.root = null;
|
|
5450
|
+
if (message.root != null && message.hasOwnProperty("root"))
|
|
5451
|
+
object.root = $root.baml_bridge.cffi.v1.BamlTy.toObject(message.root, options, q + 1);
|
|
5452
|
+
if (message.classes && message.classes.length) {
|
|
5453
|
+
object.classes = [];
|
|
5454
|
+
for (let j = 0; j < message.classes.length; ++j)
|
|
5455
|
+
object.classes[j] = $root.baml_bridge.cffi.v1.BamlClassDef.toObject(message.classes[j], options, q + 1);
|
|
5456
|
+
}
|
|
5457
|
+
if (message.enums && message.enums.length) {
|
|
5458
|
+
object.enums = [];
|
|
5459
|
+
for (let j = 0; j < message.enums.length; ++j)
|
|
5460
|
+
object.enums[j] = $root.baml_bridge.cffi.v1.BamlEnumDef.toObject(message.enums[j], options, q + 1);
|
|
5461
|
+
}
|
|
5462
|
+
if (message.witnesses && message.witnesses.length) {
|
|
5463
|
+
object.witnesses = [];
|
|
5464
|
+
for (let j = 0; j < message.witnesses.length; ++j)
|
|
5465
|
+
object.witnesses[j] = $root.baml_bridge.cffi.v1.BamlWitnessDef.toObject(message.witnesses[j], options, q + 1);
|
|
5466
|
+
}
|
|
5467
|
+
return object;
|
|
5468
|
+
};
|
|
5469
|
+
BamlTyDef.prototype.toJSON = function toJSON() {
|
|
5470
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
5471
|
+
};
|
|
5472
|
+
BamlTyDef.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
5473
|
+
if (typeUrlPrefix === void 0) {
|
|
5474
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
5475
|
+
}
|
|
5476
|
+
return typeUrlPrefix + "/baml_bridge.cffi.v1.BamlTyDef";
|
|
5477
|
+
};
|
|
5478
|
+
return BamlTyDef;
|
|
5479
|
+
})();
|
|
5480
|
+
v1.BamlWitnessDef = (function() {
|
|
5481
|
+
function BamlWitnessDef(properties) {
|
|
5482
|
+
this.interfaceArgs = [];
|
|
5483
|
+
this.associatedTypes = [];
|
|
5484
|
+
this.fieldLinks = [];
|
|
5485
|
+
if (properties) {
|
|
5486
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
5487
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
5488
|
+
this[keys[i]] = properties[keys[i]];
|
|
5489
|
+
}
|
|
5490
|
+
}
|
|
5491
|
+
BamlWitnessDef.prototype["interface"] = "";
|
|
5492
|
+
BamlWitnessDef.prototype.interfaceArgs = $util.emptyArray;
|
|
5493
|
+
BamlWitnessDef.prototype.associatedTypes = $util.emptyArray;
|
|
5494
|
+
BamlWitnessDef.prototype.fieldLinks = $util.emptyArray;
|
|
5495
|
+
BamlWitnessDef.create = function create(properties) {
|
|
5496
|
+
return new BamlWitnessDef(properties);
|
|
5497
|
+
};
|
|
5498
|
+
BamlWitnessDef.encode = function encode(message, writer, q) {
|
|
5499
|
+
if (!writer)
|
|
5500
|
+
writer = $Writer.create();
|
|
5501
|
+
if (q === void 0)
|
|
5502
|
+
q = 0;
|
|
5503
|
+
if (q > $util.recursionLimit)
|
|
5504
|
+
throw Error("max depth exceeded");
|
|
5505
|
+
if (message["interface"] != null && Object.hasOwnProperty.call(message, "interface"))
|
|
5506
|
+
writer.uint32(
|
|
5507
|
+
/* id 1, wireType 2 =*/
|
|
5508
|
+
10
|
|
5509
|
+
).string(message["interface"]);
|
|
5510
|
+
if (message.interfaceArgs != null && message.interfaceArgs.length)
|
|
5511
|
+
for (let i = 0; i < message.interfaceArgs.length; ++i)
|
|
5512
|
+
$root.baml_bridge.cffi.v1.BamlTy.encode(message.interfaceArgs[i], writer.uint32(
|
|
5513
|
+
/* id 2, wireType 2 =*/
|
|
5514
|
+
18
|
|
5515
|
+
).fork(), q + 1).ldelim();
|
|
5516
|
+
if (message.associatedTypes != null && message.associatedTypes.length)
|
|
5517
|
+
for (let i = 0; i < message.associatedTypes.length; ++i)
|
|
5518
|
+
$root.baml_bridge.cffi.v1.BamlTyAssociatedBinding.encode(message.associatedTypes[i], writer.uint32(
|
|
5519
|
+
/* id 3, wireType 2 =*/
|
|
5520
|
+
26
|
|
5521
|
+
).fork(), q + 1).ldelim();
|
|
5522
|
+
if (message.fieldLinks != null && message.fieldLinks.length)
|
|
5523
|
+
for (let i = 0; i < message.fieldLinks.length; ++i)
|
|
5524
|
+
$root.baml_bridge.cffi.v1.BamlWitnessFieldLink.encode(message.fieldLinks[i], writer.uint32(
|
|
5525
|
+
/* id 4, wireType 2 =*/
|
|
5526
|
+
34
|
|
5527
|
+
).fork(), q + 1).ldelim();
|
|
5528
|
+
return writer;
|
|
5529
|
+
};
|
|
5530
|
+
BamlWitnessDef.encodeDelimited = function encodeDelimited(message, writer) {
|
|
5531
|
+
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
5532
|
+
};
|
|
5533
|
+
BamlWitnessDef.decode = function decode(reader, length, error, long) {
|
|
5534
|
+
if (!(reader instanceof $Reader))
|
|
5535
|
+
reader = $Reader.create(reader);
|
|
5536
|
+
if (long === void 0)
|
|
5537
|
+
long = 0;
|
|
5538
|
+
if (long > $Reader.recursionLimit)
|
|
5539
|
+
throw Error("maximum nesting depth exceeded");
|
|
5540
|
+
let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.baml_bridge.cffi.v1.BamlWitnessDef();
|
|
5541
|
+
while (reader.pos < end) {
|
|
5542
|
+
let tag = reader.uint32();
|
|
5543
|
+
if (tag === error)
|
|
5544
|
+
break;
|
|
5545
|
+
switch (tag >>> 3) {
|
|
5546
|
+
case 1: {
|
|
5547
|
+
message["interface"] = reader.string();
|
|
5548
|
+
break;
|
|
5549
|
+
}
|
|
5550
|
+
case 2: {
|
|
5551
|
+
if (!(message.interfaceArgs && message.interfaceArgs.length))
|
|
5552
|
+
message.interfaceArgs = [];
|
|
5553
|
+
message.interfaceArgs.push($root.baml_bridge.cffi.v1.BamlTy.decode(reader, reader.uint32(), void 0, long + 1));
|
|
5554
|
+
break;
|
|
5555
|
+
}
|
|
5556
|
+
case 3: {
|
|
5557
|
+
if (!(message.associatedTypes && message.associatedTypes.length))
|
|
5558
|
+
message.associatedTypes = [];
|
|
5559
|
+
message.associatedTypes.push($root.baml_bridge.cffi.v1.BamlTyAssociatedBinding.decode(reader, reader.uint32(), void 0, long + 1));
|
|
5560
|
+
break;
|
|
5561
|
+
}
|
|
5562
|
+
case 4: {
|
|
5563
|
+
if (!(message.fieldLinks && message.fieldLinks.length))
|
|
5564
|
+
message.fieldLinks = [];
|
|
5565
|
+
message.fieldLinks.push($root.baml_bridge.cffi.v1.BamlWitnessFieldLink.decode(reader, reader.uint32(), void 0, long + 1));
|
|
5566
|
+
break;
|
|
5567
|
+
}
|
|
5568
|
+
default:
|
|
5569
|
+
reader.skipType(tag & 7, long);
|
|
5570
|
+
break;
|
|
5571
|
+
}
|
|
5572
|
+
}
|
|
5573
|
+
return message;
|
|
5574
|
+
};
|
|
5575
|
+
BamlWitnessDef.decodeDelimited = function decodeDelimited(reader) {
|
|
5576
|
+
if (!(reader instanceof $Reader))
|
|
5577
|
+
reader = new $Reader(reader);
|
|
5578
|
+
return this.decode(reader, reader.uint32());
|
|
5579
|
+
};
|
|
5580
|
+
BamlWitnessDef.verify = function verify(message, long) {
|
|
5581
|
+
if (typeof message !== "object" || message === null)
|
|
5582
|
+
return "object expected";
|
|
5583
|
+
if (long === void 0)
|
|
5584
|
+
long = 0;
|
|
5585
|
+
if (long > $util.recursionLimit)
|
|
5586
|
+
return "maximum nesting depth exceeded";
|
|
5587
|
+
if (message["interface"] != null && message.hasOwnProperty("interface")) {
|
|
5588
|
+
if (!$util.isString(message["interface"]))
|
|
5589
|
+
return "interface: string expected";
|
|
5590
|
+
}
|
|
5591
|
+
if (message.interfaceArgs != null && message.hasOwnProperty("interfaceArgs")) {
|
|
5592
|
+
if (!Array.isArray(message.interfaceArgs))
|
|
5593
|
+
return "interfaceArgs: array expected";
|
|
5594
|
+
for (let i = 0; i < message.interfaceArgs.length; ++i) {
|
|
5595
|
+
let error = $root.baml_bridge.cffi.v1.BamlTy.verify(message.interfaceArgs[i], long + 1);
|
|
5596
|
+
if (error)
|
|
5597
|
+
return "interfaceArgs." + error;
|
|
5598
|
+
}
|
|
5599
|
+
}
|
|
5600
|
+
if (message.associatedTypes != null && message.hasOwnProperty("associatedTypes")) {
|
|
5601
|
+
if (!Array.isArray(message.associatedTypes))
|
|
5602
|
+
return "associatedTypes: array expected";
|
|
5603
|
+
for (let i = 0; i < message.associatedTypes.length; ++i) {
|
|
5604
|
+
let error = $root.baml_bridge.cffi.v1.BamlTyAssociatedBinding.verify(message.associatedTypes[i], long + 1);
|
|
5605
|
+
if (error)
|
|
5606
|
+
return "associatedTypes." + error;
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5609
|
+
if (message.fieldLinks != null && message.hasOwnProperty("fieldLinks")) {
|
|
5610
|
+
if (!Array.isArray(message.fieldLinks))
|
|
5611
|
+
return "fieldLinks: array expected";
|
|
5612
|
+
for (let i = 0; i < message.fieldLinks.length; ++i) {
|
|
5613
|
+
let error = $root.baml_bridge.cffi.v1.BamlWitnessFieldLink.verify(message.fieldLinks[i], long + 1);
|
|
5614
|
+
if (error)
|
|
5615
|
+
return "fieldLinks." + error;
|
|
5616
|
+
}
|
|
5617
|
+
}
|
|
5618
|
+
return null;
|
|
5619
|
+
};
|
|
5620
|
+
BamlWitnessDef.fromObject = function fromObject(object, long) {
|
|
5621
|
+
if (object instanceof $root.baml_bridge.cffi.v1.BamlWitnessDef)
|
|
5622
|
+
return object;
|
|
5623
|
+
if (!$util.isObject(object))
|
|
5624
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlWitnessDef: object expected");
|
|
5625
|
+
if (long === void 0)
|
|
5626
|
+
long = 0;
|
|
5627
|
+
if (long > $util.recursionLimit)
|
|
5628
|
+
throw Error("maximum nesting depth exceeded");
|
|
5629
|
+
let message = new $root.baml_bridge.cffi.v1.BamlWitnessDef();
|
|
5630
|
+
if (object["interface"] != null)
|
|
5631
|
+
message["interface"] = String(object["interface"]);
|
|
5632
|
+
if (object.interfaceArgs) {
|
|
5633
|
+
if (!Array.isArray(object.interfaceArgs))
|
|
5634
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlWitnessDef.interfaceArgs: array expected");
|
|
5635
|
+
message.interfaceArgs = [];
|
|
5636
|
+
for (let i = 0; i < object.interfaceArgs.length; ++i) {
|
|
5637
|
+
if (!$util.isObject(object.interfaceArgs[i]))
|
|
5638
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlWitnessDef.interfaceArgs: object expected");
|
|
5639
|
+
message.interfaceArgs[i] = $root.baml_bridge.cffi.v1.BamlTy.fromObject(object.interfaceArgs[i], long + 1);
|
|
5640
|
+
}
|
|
5641
|
+
}
|
|
5642
|
+
if (object.associatedTypes) {
|
|
5643
|
+
if (!Array.isArray(object.associatedTypes))
|
|
5644
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlWitnessDef.associatedTypes: array expected");
|
|
5645
|
+
message.associatedTypes = [];
|
|
5646
|
+
for (let i = 0; i < object.associatedTypes.length; ++i) {
|
|
5647
|
+
if (!$util.isObject(object.associatedTypes[i]))
|
|
5648
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlWitnessDef.associatedTypes: object expected");
|
|
5649
|
+
message.associatedTypes[i] = $root.baml_bridge.cffi.v1.BamlTyAssociatedBinding.fromObject(object.associatedTypes[i], long + 1);
|
|
5650
|
+
}
|
|
5651
|
+
}
|
|
5652
|
+
if (object.fieldLinks) {
|
|
5653
|
+
if (!Array.isArray(object.fieldLinks))
|
|
5654
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlWitnessDef.fieldLinks: array expected");
|
|
5655
|
+
message.fieldLinks = [];
|
|
5656
|
+
for (let i = 0; i < object.fieldLinks.length; ++i) {
|
|
5657
|
+
if (!$util.isObject(object.fieldLinks[i]))
|
|
5658
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlWitnessDef.fieldLinks: object expected");
|
|
5659
|
+
message.fieldLinks[i] = $root.baml_bridge.cffi.v1.BamlWitnessFieldLink.fromObject(object.fieldLinks[i], long + 1);
|
|
5660
|
+
}
|
|
5661
|
+
}
|
|
5662
|
+
return message;
|
|
5663
|
+
};
|
|
5664
|
+
BamlWitnessDef.toObject = function toObject(message, options, q) {
|
|
5665
|
+
if (!options)
|
|
5666
|
+
options = {};
|
|
5667
|
+
if (q === void 0)
|
|
5668
|
+
q = 0;
|
|
5669
|
+
if (q > $util.recursionLimit)
|
|
5670
|
+
throw Error("max depth exceeded");
|
|
5671
|
+
let object = {};
|
|
5672
|
+
if (options.arrays || options.defaults) {
|
|
5673
|
+
object.interfaceArgs = [];
|
|
5674
|
+
object.associatedTypes = [];
|
|
5675
|
+
object.fieldLinks = [];
|
|
5676
|
+
}
|
|
5677
|
+
if (options.defaults)
|
|
5678
|
+
object["interface"] = "";
|
|
5679
|
+
if (message["interface"] != null && message.hasOwnProperty("interface"))
|
|
5680
|
+
object["interface"] = message["interface"];
|
|
5681
|
+
if (message.interfaceArgs && message.interfaceArgs.length) {
|
|
5682
|
+
object.interfaceArgs = [];
|
|
5683
|
+
for (let j = 0; j < message.interfaceArgs.length; ++j)
|
|
5684
|
+
object.interfaceArgs[j] = $root.baml_bridge.cffi.v1.BamlTy.toObject(message.interfaceArgs[j], options, q + 1);
|
|
5685
|
+
}
|
|
5686
|
+
if (message.associatedTypes && message.associatedTypes.length) {
|
|
5687
|
+
object.associatedTypes = [];
|
|
5688
|
+
for (let j = 0; j < message.associatedTypes.length; ++j)
|
|
5689
|
+
object.associatedTypes[j] = $root.baml_bridge.cffi.v1.BamlTyAssociatedBinding.toObject(message.associatedTypes[j], options, q + 1);
|
|
5690
|
+
}
|
|
5691
|
+
if (message.fieldLinks && message.fieldLinks.length) {
|
|
5692
|
+
object.fieldLinks = [];
|
|
5693
|
+
for (let j = 0; j < message.fieldLinks.length; ++j)
|
|
5694
|
+
object.fieldLinks[j] = $root.baml_bridge.cffi.v1.BamlWitnessFieldLink.toObject(message.fieldLinks[j], options, q + 1);
|
|
5695
|
+
}
|
|
5696
|
+
return object;
|
|
5697
|
+
};
|
|
5698
|
+
BamlWitnessDef.prototype.toJSON = function toJSON() {
|
|
5699
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
5700
|
+
};
|
|
5701
|
+
BamlWitnessDef.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
5702
|
+
if (typeUrlPrefix === void 0) {
|
|
5703
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
5704
|
+
}
|
|
5705
|
+
return typeUrlPrefix + "/baml_bridge.cffi.v1.BamlWitnessDef";
|
|
5706
|
+
};
|
|
5707
|
+
return BamlWitnessDef;
|
|
5708
|
+
})();
|
|
5709
|
+
v1.BamlWitnessFieldLink = (function() {
|
|
5710
|
+
function BamlWitnessFieldLink(properties) {
|
|
5711
|
+
if (properties) {
|
|
5712
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
5713
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
5714
|
+
this[keys[i]] = properties[keys[i]];
|
|
5715
|
+
}
|
|
5716
|
+
}
|
|
5717
|
+
BamlWitnessFieldLink.prototype.interfaceField = "";
|
|
5718
|
+
BamlWitnessFieldLink.prototype.classField = "";
|
|
5719
|
+
BamlWitnessFieldLink.create = function create(properties) {
|
|
5720
|
+
return new BamlWitnessFieldLink(properties);
|
|
5721
|
+
};
|
|
5722
|
+
BamlWitnessFieldLink.encode = function encode(message, writer, q) {
|
|
5723
|
+
if (!writer)
|
|
5724
|
+
writer = $Writer.create();
|
|
5725
|
+
if (q === void 0)
|
|
5726
|
+
q = 0;
|
|
5727
|
+
if (q > $util.recursionLimit)
|
|
5728
|
+
throw Error("max depth exceeded");
|
|
5729
|
+
if (message.interfaceField != null && Object.hasOwnProperty.call(message, "interfaceField"))
|
|
5730
|
+
writer.uint32(
|
|
5731
|
+
/* id 1, wireType 2 =*/
|
|
5732
|
+
10
|
|
5733
|
+
).string(message.interfaceField);
|
|
5734
|
+
if (message.classField != null && Object.hasOwnProperty.call(message, "classField"))
|
|
5735
|
+
writer.uint32(
|
|
5736
|
+
/* id 2, wireType 2 =*/
|
|
5737
|
+
18
|
|
5738
|
+
).string(message.classField);
|
|
5739
|
+
return writer;
|
|
5740
|
+
};
|
|
5741
|
+
BamlWitnessFieldLink.encodeDelimited = function encodeDelimited(message, writer) {
|
|
5742
|
+
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
5743
|
+
};
|
|
5744
|
+
BamlWitnessFieldLink.decode = function decode(reader, length, error, long) {
|
|
5745
|
+
if (!(reader instanceof $Reader))
|
|
5746
|
+
reader = $Reader.create(reader);
|
|
5747
|
+
if (long === void 0)
|
|
5748
|
+
long = 0;
|
|
5749
|
+
if (long > $Reader.recursionLimit)
|
|
5750
|
+
throw Error("maximum nesting depth exceeded");
|
|
5751
|
+
let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.baml_bridge.cffi.v1.BamlWitnessFieldLink();
|
|
5752
|
+
while (reader.pos < end) {
|
|
5753
|
+
let tag = reader.uint32();
|
|
5754
|
+
if (tag === error)
|
|
5755
|
+
break;
|
|
5756
|
+
switch (tag >>> 3) {
|
|
5757
|
+
case 1: {
|
|
5758
|
+
message.interfaceField = reader.string();
|
|
5759
|
+
break;
|
|
5760
|
+
}
|
|
5761
|
+
case 2: {
|
|
5762
|
+
message.classField = reader.string();
|
|
5763
|
+
break;
|
|
5764
|
+
}
|
|
5765
|
+
default:
|
|
5766
|
+
reader.skipType(tag & 7, long);
|
|
5767
|
+
break;
|
|
5768
|
+
}
|
|
5769
|
+
}
|
|
5770
|
+
return message;
|
|
5771
|
+
};
|
|
5772
|
+
BamlWitnessFieldLink.decodeDelimited = function decodeDelimited(reader) {
|
|
5773
|
+
if (!(reader instanceof $Reader))
|
|
5774
|
+
reader = new $Reader(reader);
|
|
5775
|
+
return this.decode(reader, reader.uint32());
|
|
5776
|
+
};
|
|
5777
|
+
BamlWitnessFieldLink.verify = function verify(message, long) {
|
|
5778
|
+
if (typeof message !== "object" || message === null)
|
|
5779
|
+
return "object expected";
|
|
5780
|
+
if (long === void 0)
|
|
5781
|
+
long = 0;
|
|
5782
|
+
if (long > $util.recursionLimit)
|
|
5783
|
+
return "maximum nesting depth exceeded";
|
|
5784
|
+
if (message.interfaceField != null && message.hasOwnProperty("interfaceField")) {
|
|
5785
|
+
if (!$util.isString(message.interfaceField))
|
|
5786
|
+
return "interfaceField: string expected";
|
|
5787
|
+
}
|
|
5788
|
+
if (message.classField != null && message.hasOwnProperty("classField")) {
|
|
5789
|
+
if (!$util.isString(message.classField))
|
|
5790
|
+
return "classField: string expected";
|
|
5791
|
+
}
|
|
5792
|
+
return null;
|
|
5793
|
+
};
|
|
5794
|
+
BamlWitnessFieldLink.fromObject = function fromObject(object, long) {
|
|
5795
|
+
if (object instanceof $root.baml_bridge.cffi.v1.BamlWitnessFieldLink)
|
|
5796
|
+
return object;
|
|
5797
|
+
if (!$util.isObject(object))
|
|
5798
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlWitnessFieldLink: object expected");
|
|
5799
|
+
if (long === void 0)
|
|
5800
|
+
long = 0;
|
|
5801
|
+
if (long > $util.recursionLimit)
|
|
5802
|
+
throw Error("maximum nesting depth exceeded");
|
|
5803
|
+
let message = new $root.baml_bridge.cffi.v1.BamlWitnessFieldLink();
|
|
5804
|
+
if (object.interfaceField != null)
|
|
5805
|
+
message.interfaceField = String(object.interfaceField);
|
|
5806
|
+
if (object.classField != null)
|
|
5807
|
+
message.classField = String(object.classField);
|
|
5808
|
+
return message;
|
|
5809
|
+
};
|
|
5810
|
+
BamlWitnessFieldLink.toObject = function toObject(message, options, q) {
|
|
5811
|
+
if (!options)
|
|
5812
|
+
options = {};
|
|
5813
|
+
if (q === void 0)
|
|
5814
|
+
q = 0;
|
|
5815
|
+
if (q > $util.recursionLimit)
|
|
5816
|
+
throw Error("max depth exceeded");
|
|
5817
|
+
let object = {};
|
|
5818
|
+
if (options.defaults) {
|
|
5819
|
+
object.interfaceField = "";
|
|
5820
|
+
object.classField = "";
|
|
5821
|
+
}
|
|
5822
|
+
if (message.interfaceField != null && message.hasOwnProperty("interfaceField"))
|
|
5823
|
+
object.interfaceField = message.interfaceField;
|
|
5824
|
+
if (message.classField != null && message.hasOwnProperty("classField"))
|
|
5825
|
+
object.classField = message.classField;
|
|
5826
|
+
return object;
|
|
5827
|
+
};
|
|
5828
|
+
BamlWitnessFieldLink.prototype.toJSON = function toJSON() {
|
|
5829
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
5830
|
+
};
|
|
5831
|
+
BamlWitnessFieldLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
5832
|
+
if (typeUrlPrefix === void 0) {
|
|
5833
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
5834
|
+
}
|
|
5835
|
+
return typeUrlPrefix + "/baml_bridge.cffi.v1.BamlWitnessFieldLink";
|
|
5836
|
+
};
|
|
5837
|
+
return BamlWitnessFieldLink;
|
|
5838
|
+
})();
|
|
5839
|
+
v1.BamlTyMetadata = (function() {
|
|
5840
|
+
function BamlTyMetadata(properties) {
|
|
5841
|
+
this.other = {};
|
|
5842
|
+
if (properties) {
|
|
5843
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
5844
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
5845
|
+
this[keys[i]] = properties[keys[i]];
|
|
5846
|
+
}
|
|
5847
|
+
}
|
|
5848
|
+
BamlTyMetadata.prototype.description = null;
|
|
5849
|
+
BamlTyMetadata.prototype.alias = null;
|
|
5850
|
+
BamlTyMetadata.prototype.docstring = null;
|
|
5851
|
+
BamlTyMetadata.prototype.other = $util.emptyObject;
|
|
5852
|
+
let $oneOfFields;
|
|
5853
|
+
Object.defineProperty(BamlTyMetadata.prototype, "_description", {
|
|
5854
|
+
get: $util.oneOfGetter($oneOfFields = ["description"]),
|
|
5855
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
5856
|
+
});
|
|
5857
|
+
Object.defineProperty(BamlTyMetadata.prototype, "_alias", {
|
|
5858
|
+
get: $util.oneOfGetter($oneOfFields = ["alias"]),
|
|
5859
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
5860
|
+
});
|
|
5861
|
+
Object.defineProperty(BamlTyMetadata.prototype, "_docstring", {
|
|
5862
|
+
get: $util.oneOfGetter($oneOfFields = ["docstring"]),
|
|
5863
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
5864
|
+
});
|
|
5865
|
+
BamlTyMetadata.create = function create(properties) {
|
|
5866
|
+
return new BamlTyMetadata(properties);
|
|
5867
|
+
};
|
|
5868
|
+
BamlTyMetadata.encode = function encode(message, writer, q) {
|
|
5869
|
+
if (!writer)
|
|
5870
|
+
writer = $Writer.create();
|
|
5871
|
+
if (q === void 0)
|
|
5872
|
+
q = 0;
|
|
5873
|
+
if (q > $util.recursionLimit)
|
|
5874
|
+
throw Error("max depth exceeded");
|
|
5875
|
+
if (message.description != null && Object.hasOwnProperty.call(message, "description"))
|
|
5876
|
+
writer.uint32(
|
|
5877
|
+
/* id 1, wireType 2 =*/
|
|
5878
|
+
10
|
|
5879
|
+
).string(message.description);
|
|
5880
|
+
if (message.alias != null && Object.hasOwnProperty.call(message, "alias"))
|
|
5881
|
+
writer.uint32(
|
|
5882
|
+
/* id 2, wireType 2 =*/
|
|
5883
|
+
18
|
|
5884
|
+
).string(message.alias);
|
|
5885
|
+
if (message.docstring != null && Object.hasOwnProperty.call(message, "docstring"))
|
|
5886
|
+
writer.uint32(
|
|
5887
|
+
/* id 3, wireType 2 =*/
|
|
5888
|
+
26
|
|
5889
|
+
).string(message.docstring);
|
|
5890
|
+
if (message.other != null && Object.hasOwnProperty.call(message, "other"))
|
|
5891
|
+
for (let keys = Object.keys(message.other), i = 0; i < keys.length; ++i)
|
|
5892
|
+
writer.uint32(
|
|
5893
|
+
/* id 4, wireType 2 =*/
|
|
5894
|
+
34
|
|
5895
|
+
).fork().uint32(
|
|
5896
|
+
/* id 1, wireType 2 =*/
|
|
5897
|
+
10
|
|
5898
|
+
).string(keys[i]).uint32(
|
|
5899
|
+
/* id 2, wireType 2 =*/
|
|
5900
|
+
18
|
|
5901
|
+
).string(message.other[keys[i]]).ldelim();
|
|
5902
|
+
return writer;
|
|
5903
|
+
};
|
|
5904
|
+
BamlTyMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
5905
|
+
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
5906
|
+
};
|
|
5907
|
+
BamlTyMetadata.decode = function decode(reader, length, error, long) {
|
|
5908
|
+
if (!(reader instanceof $Reader))
|
|
5909
|
+
reader = $Reader.create(reader);
|
|
5910
|
+
if (long === void 0)
|
|
5911
|
+
long = 0;
|
|
5912
|
+
if (long > $Reader.recursionLimit)
|
|
5913
|
+
throw Error("maximum nesting depth exceeded");
|
|
5914
|
+
let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.baml_bridge.cffi.v1.BamlTyMetadata(), key, value;
|
|
5915
|
+
while (reader.pos < end) {
|
|
5916
|
+
let tag = reader.uint32();
|
|
5917
|
+
if (tag === error)
|
|
5918
|
+
break;
|
|
5919
|
+
switch (tag >>> 3) {
|
|
5920
|
+
case 1: {
|
|
5921
|
+
message.description = reader.string();
|
|
5922
|
+
break;
|
|
5923
|
+
}
|
|
5924
|
+
case 2: {
|
|
5925
|
+
message.alias = reader.string();
|
|
5926
|
+
break;
|
|
5927
|
+
}
|
|
5928
|
+
case 3: {
|
|
5929
|
+
message.docstring = reader.string();
|
|
5930
|
+
break;
|
|
5931
|
+
}
|
|
5932
|
+
case 4: {
|
|
5933
|
+
if (message.other === $util.emptyObject)
|
|
5934
|
+
message.other = {};
|
|
5935
|
+
let end2 = reader.uint32() + reader.pos;
|
|
5936
|
+
key = "";
|
|
5937
|
+
value = "";
|
|
5938
|
+
while (reader.pos < end2) {
|
|
5939
|
+
let tag2 = reader.uint32();
|
|
5940
|
+
switch (tag2 >>> 3) {
|
|
5941
|
+
case 1:
|
|
5942
|
+
key = reader.string();
|
|
5943
|
+
break;
|
|
5944
|
+
case 2:
|
|
5945
|
+
value = reader.string();
|
|
5946
|
+
break;
|
|
5947
|
+
default:
|
|
5948
|
+
reader.skipType(tag2 & 7, long);
|
|
5949
|
+
break;
|
|
5950
|
+
}
|
|
5951
|
+
}
|
|
5952
|
+
if (key === "__proto__")
|
|
5953
|
+
$util.makeProp(message.other, key);
|
|
5954
|
+
message.other[key] = value;
|
|
5955
|
+
break;
|
|
5956
|
+
}
|
|
5957
|
+
default:
|
|
5958
|
+
reader.skipType(tag & 7, long);
|
|
5959
|
+
break;
|
|
5960
|
+
}
|
|
5961
|
+
}
|
|
5962
|
+
return message;
|
|
5963
|
+
};
|
|
5964
|
+
BamlTyMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
5965
|
+
if (!(reader instanceof $Reader))
|
|
5966
|
+
reader = new $Reader(reader);
|
|
5967
|
+
return this.decode(reader, reader.uint32());
|
|
5968
|
+
};
|
|
5969
|
+
BamlTyMetadata.verify = function verify(message, long) {
|
|
5970
|
+
if (typeof message !== "object" || message === null)
|
|
5971
|
+
return "object expected";
|
|
5972
|
+
if (long === void 0)
|
|
5973
|
+
long = 0;
|
|
5974
|
+
if (long > $util.recursionLimit)
|
|
5975
|
+
return "maximum nesting depth exceeded";
|
|
5976
|
+
let properties = {};
|
|
5977
|
+
if (message.description != null && message.hasOwnProperty("description")) {
|
|
5978
|
+
properties._description = 1;
|
|
5979
|
+
if (!$util.isString(message.description))
|
|
5980
|
+
return "description: string expected";
|
|
5981
|
+
}
|
|
5982
|
+
if (message.alias != null && message.hasOwnProperty("alias")) {
|
|
5983
|
+
properties._alias = 1;
|
|
5984
|
+
if (!$util.isString(message.alias))
|
|
5985
|
+
return "alias: string expected";
|
|
5986
|
+
}
|
|
5987
|
+
if (message.docstring != null && message.hasOwnProperty("docstring")) {
|
|
5988
|
+
properties._docstring = 1;
|
|
5989
|
+
if (!$util.isString(message.docstring))
|
|
5990
|
+
return "docstring: string expected";
|
|
5991
|
+
}
|
|
5992
|
+
if (message.other != null && message.hasOwnProperty("other")) {
|
|
5993
|
+
if (!$util.isObject(message.other))
|
|
5994
|
+
return "other: object expected";
|
|
5995
|
+
let key = Object.keys(message.other);
|
|
5996
|
+
for (let i = 0; i < key.length; ++i)
|
|
5997
|
+
if (!$util.isString(message.other[key[i]]))
|
|
5998
|
+
return "other: string{k:string} expected";
|
|
5999
|
+
}
|
|
6000
|
+
return null;
|
|
6001
|
+
};
|
|
6002
|
+
BamlTyMetadata.fromObject = function fromObject(object, long) {
|
|
6003
|
+
if (object instanceof $root.baml_bridge.cffi.v1.BamlTyMetadata)
|
|
6004
|
+
return object;
|
|
6005
|
+
if (!$util.isObject(object))
|
|
6006
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyMetadata: object expected");
|
|
6007
|
+
if (long === void 0)
|
|
6008
|
+
long = 0;
|
|
6009
|
+
if (long > $util.recursionLimit)
|
|
6010
|
+
throw Error("maximum nesting depth exceeded");
|
|
6011
|
+
let message = new $root.baml_bridge.cffi.v1.BamlTyMetadata();
|
|
6012
|
+
if (object.description != null)
|
|
6013
|
+
message.description = String(object.description);
|
|
6014
|
+
if (object.alias != null)
|
|
6015
|
+
message.alias = String(object.alias);
|
|
6016
|
+
if (object.docstring != null)
|
|
6017
|
+
message.docstring = String(object.docstring);
|
|
6018
|
+
if (object.other) {
|
|
6019
|
+
if (!$util.isObject(object.other))
|
|
6020
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlTyMetadata.other: object expected");
|
|
6021
|
+
message.other = {};
|
|
6022
|
+
for (let keys = Object.keys(object.other), i = 0; i < keys.length; ++i) {
|
|
6023
|
+
if (keys[i] === "__proto__")
|
|
6024
|
+
$util.makeProp(message.other, keys[i]);
|
|
6025
|
+
message.other[keys[i]] = String(object.other[keys[i]]);
|
|
6026
|
+
}
|
|
6027
|
+
}
|
|
6028
|
+
return message;
|
|
6029
|
+
};
|
|
6030
|
+
BamlTyMetadata.toObject = function toObject(message, options, q) {
|
|
6031
|
+
if (!options)
|
|
6032
|
+
options = {};
|
|
6033
|
+
if (q === void 0)
|
|
6034
|
+
q = 0;
|
|
6035
|
+
if (q > $util.recursionLimit)
|
|
6036
|
+
throw Error("max depth exceeded");
|
|
6037
|
+
let object = {};
|
|
6038
|
+
if (options.objects || options.defaults)
|
|
6039
|
+
object.other = {};
|
|
6040
|
+
if (message.description != null && message.hasOwnProperty("description")) {
|
|
6041
|
+
object.description = message.description;
|
|
6042
|
+
if (options.oneofs)
|
|
6043
|
+
object._description = "description";
|
|
6044
|
+
}
|
|
6045
|
+
if (message.alias != null && message.hasOwnProperty("alias")) {
|
|
6046
|
+
object.alias = message.alias;
|
|
6047
|
+
if (options.oneofs)
|
|
6048
|
+
object._alias = "alias";
|
|
6049
|
+
}
|
|
6050
|
+
if (message.docstring != null && message.hasOwnProperty("docstring")) {
|
|
6051
|
+
object.docstring = message.docstring;
|
|
6052
|
+
if (options.oneofs)
|
|
6053
|
+
object._docstring = "docstring";
|
|
6054
|
+
}
|
|
6055
|
+
let keys2;
|
|
6056
|
+
if (message.other && (keys2 = Object.keys(message.other)).length) {
|
|
6057
|
+
object.other = {};
|
|
6058
|
+
for (let j = 0; j < keys2.length; ++j) {
|
|
6059
|
+
if (keys2[j] === "__proto__")
|
|
6060
|
+
$util.makeProp(object.other, keys2[j]);
|
|
6061
|
+
object.other[keys2[j]] = message.other[keys2[j]];
|
|
6062
|
+
}
|
|
6063
|
+
}
|
|
6064
|
+
return object;
|
|
6065
|
+
};
|
|
6066
|
+
BamlTyMetadata.prototype.toJSON = function toJSON() {
|
|
6067
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6068
|
+
};
|
|
6069
|
+
BamlTyMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6070
|
+
if (typeUrlPrefix === void 0) {
|
|
6071
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6072
|
+
}
|
|
6073
|
+
return typeUrlPrefix + "/baml_bridge.cffi.v1.BamlTyMetadata";
|
|
6074
|
+
};
|
|
6075
|
+
return BamlTyMetadata;
|
|
6076
|
+
})();
|
|
6077
|
+
v1.BamlClassDef = (function() {
|
|
6078
|
+
function BamlClassDef(properties) {
|
|
6079
|
+
this.fields = [];
|
|
6080
|
+
if (properties) {
|
|
6081
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6082
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
6083
|
+
this[keys[i]] = properties[keys[i]];
|
|
6084
|
+
}
|
|
6085
|
+
}
|
|
6086
|
+
BamlClassDef.prototype.name = "";
|
|
6087
|
+
BamlClassDef.prototype.fields = $util.emptyArray;
|
|
6088
|
+
BamlClassDef.prototype.metadata = null;
|
|
6089
|
+
BamlClassDef.prototype.genericParamCount = 0;
|
|
6090
|
+
BamlClassDef.create = function create(properties) {
|
|
6091
|
+
return new BamlClassDef(properties);
|
|
6092
|
+
};
|
|
6093
|
+
BamlClassDef.encode = function encode(message, writer, q) {
|
|
6094
|
+
if (!writer)
|
|
6095
|
+
writer = $Writer.create();
|
|
6096
|
+
if (q === void 0)
|
|
6097
|
+
q = 0;
|
|
6098
|
+
if (q > $util.recursionLimit)
|
|
6099
|
+
throw Error("max depth exceeded");
|
|
6100
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
6101
|
+
writer.uint32(
|
|
6102
|
+
/* id 1, wireType 2 =*/
|
|
6103
|
+
10
|
|
6104
|
+
).string(message.name);
|
|
6105
|
+
if (message.fields != null && message.fields.length)
|
|
6106
|
+
for (let i = 0; i < message.fields.length; ++i)
|
|
6107
|
+
$root.baml_bridge.cffi.v1.BamlClassFieldDef.encode(message.fields[i], writer.uint32(
|
|
6108
|
+
/* id 2, wireType 2 =*/
|
|
6109
|
+
18
|
|
6110
|
+
).fork(), q + 1).ldelim();
|
|
6111
|
+
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
6112
|
+
$root.baml_bridge.cffi.v1.BamlTyMetadata.encode(message.metadata, writer.uint32(
|
|
6113
|
+
/* id 3, wireType 2 =*/
|
|
6114
|
+
26
|
|
6115
|
+
).fork(), q + 1).ldelim();
|
|
6116
|
+
if (message.genericParamCount != null && Object.hasOwnProperty.call(message, "genericParamCount"))
|
|
6117
|
+
writer.uint32(
|
|
6118
|
+
/* id 4, wireType 0 =*/
|
|
6119
|
+
32
|
|
6120
|
+
).uint32(message.genericParamCount);
|
|
6121
|
+
return writer;
|
|
6122
|
+
};
|
|
6123
|
+
BamlClassDef.encodeDelimited = function encodeDelimited(message, writer) {
|
|
6124
|
+
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
6125
|
+
};
|
|
6126
|
+
BamlClassDef.decode = function decode(reader, length, error, long) {
|
|
6127
|
+
if (!(reader instanceof $Reader))
|
|
6128
|
+
reader = $Reader.create(reader);
|
|
6129
|
+
if (long === void 0)
|
|
6130
|
+
long = 0;
|
|
6131
|
+
if (long > $Reader.recursionLimit)
|
|
6132
|
+
throw Error("maximum nesting depth exceeded");
|
|
6133
|
+
let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.baml_bridge.cffi.v1.BamlClassDef();
|
|
6134
|
+
while (reader.pos < end) {
|
|
6135
|
+
let tag = reader.uint32();
|
|
6136
|
+
if (tag === error)
|
|
6137
|
+
break;
|
|
6138
|
+
switch (tag >>> 3) {
|
|
6139
|
+
case 1: {
|
|
6140
|
+
message.name = reader.string();
|
|
6141
|
+
break;
|
|
6142
|
+
}
|
|
6143
|
+
case 2: {
|
|
6144
|
+
if (!(message.fields && message.fields.length))
|
|
6145
|
+
message.fields = [];
|
|
6146
|
+
message.fields.push($root.baml_bridge.cffi.v1.BamlClassFieldDef.decode(reader, reader.uint32(), void 0, long + 1));
|
|
6147
|
+
break;
|
|
6148
|
+
}
|
|
6149
|
+
case 3: {
|
|
6150
|
+
message.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.decode(reader, reader.uint32(), void 0, long + 1);
|
|
6151
|
+
break;
|
|
6152
|
+
}
|
|
6153
|
+
case 4: {
|
|
6154
|
+
message.genericParamCount = reader.uint32();
|
|
6155
|
+
break;
|
|
6156
|
+
}
|
|
6157
|
+
default:
|
|
6158
|
+
reader.skipType(tag & 7, long);
|
|
6159
|
+
break;
|
|
6160
|
+
}
|
|
6161
|
+
}
|
|
6162
|
+
return message;
|
|
6163
|
+
};
|
|
6164
|
+
BamlClassDef.decodeDelimited = function decodeDelimited(reader) {
|
|
6165
|
+
if (!(reader instanceof $Reader))
|
|
6166
|
+
reader = new $Reader(reader);
|
|
6167
|
+
return this.decode(reader, reader.uint32());
|
|
6168
|
+
};
|
|
6169
|
+
BamlClassDef.verify = function verify(message, long) {
|
|
6170
|
+
if (typeof message !== "object" || message === null)
|
|
6171
|
+
return "object expected";
|
|
6172
|
+
if (long === void 0)
|
|
6173
|
+
long = 0;
|
|
6174
|
+
if (long > $util.recursionLimit)
|
|
6175
|
+
return "maximum nesting depth exceeded";
|
|
6176
|
+
if (message.name != null && message.hasOwnProperty("name")) {
|
|
6177
|
+
if (!$util.isString(message.name))
|
|
6178
|
+
return "name: string expected";
|
|
6179
|
+
}
|
|
6180
|
+
if (message.fields != null && message.hasOwnProperty("fields")) {
|
|
6181
|
+
if (!Array.isArray(message.fields))
|
|
6182
|
+
return "fields: array expected";
|
|
6183
|
+
for (let i = 0; i < message.fields.length; ++i) {
|
|
6184
|
+
let error = $root.baml_bridge.cffi.v1.BamlClassFieldDef.verify(message.fields[i], long + 1);
|
|
6185
|
+
if (error)
|
|
6186
|
+
return "fields." + error;
|
|
6187
|
+
}
|
|
6188
|
+
}
|
|
6189
|
+
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
6190
|
+
let error = $root.baml_bridge.cffi.v1.BamlTyMetadata.verify(message.metadata, long + 1);
|
|
6191
|
+
if (error)
|
|
6192
|
+
return "metadata." + error;
|
|
6193
|
+
}
|
|
6194
|
+
if (message.genericParamCount != null && message.hasOwnProperty("genericParamCount")) {
|
|
6195
|
+
if (!$util.isInteger(message.genericParamCount))
|
|
6196
|
+
return "genericParamCount: integer expected";
|
|
6197
|
+
}
|
|
6198
|
+
return null;
|
|
6199
|
+
};
|
|
6200
|
+
BamlClassDef.fromObject = function fromObject(object, long) {
|
|
6201
|
+
if (object instanceof $root.baml_bridge.cffi.v1.BamlClassDef)
|
|
6202
|
+
return object;
|
|
6203
|
+
if (!$util.isObject(object))
|
|
6204
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlClassDef: object expected");
|
|
6205
|
+
if (long === void 0)
|
|
6206
|
+
long = 0;
|
|
6207
|
+
if (long > $util.recursionLimit)
|
|
6208
|
+
throw Error("maximum nesting depth exceeded");
|
|
6209
|
+
let message = new $root.baml_bridge.cffi.v1.BamlClassDef();
|
|
6210
|
+
if (object.name != null)
|
|
6211
|
+
message.name = String(object.name);
|
|
6212
|
+
if (object.fields) {
|
|
6213
|
+
if (!Array.isArray(object.fields))
|
|
6214
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlClassDef.fields: array expected");
|
|
6215
|
+
message.fields = [];
|
|
6216
|
+
for (let i = 0; i < object.fields.length; ++i) {
|
|
6217
|
+
if (!$util.isObject(object.fields[i]))
|
|
6218
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlClassDef.fields: object expected");
|
|
6219
|
+
message.fields[i] = $root.baml_bridge.cffi.v1.BamlClassFieldDef.fromObject(object.fields[i], long + 1);
|
|
6220
|
+
}
|
|
6221
|
+
}
|
|
6222
|
+
if (object.metadata != null) {
|
|
6223
|
+
if (!$util.isObject(object.metadata))
|
|
6224
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlClassDef.metadata: object expected");
|
|
6225
|
+
message.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.fromObject(object.metadata, long + 1);
|
|
6226
|
+
}
|
|
6227
|
+
if (object.genericParamCount != null)
|
|
6228
|
+
message.genericParamCount = object.genericParamCount >>> 0;
|
|
6229
|
+
return message;
|
|
6230
|
+
};
|
|
6231
|
+
BamlClassDef.toObject = function toObject(message, options, q) {
|
|
6232
|
+
if (!options)
|
|
6233
|
+
options = {};
|
|
6234
|
+
if (q === void 0)
|
|
6235
|
+
q = 0;
|
|
6236
|
+
if (q > $util.recursionLimit)
|
|
6237
|
+
throw Error("max depth exceeded");
|
|
6238
|
+
let object = {};
|
|
6239
|
+
if (options.arrays || options.defaults)
|
|
6240
|
+
object.fields = [];
|
|
6241
|
+
if (options.defaults) {
|
|
6242
|
+
object.name = "";
|
|
6243
|
+
object.metadata = null;
|
|
6244
|
+
object.genericParamCount = 0;
|
|
6245
|
+
}
|
|
6246
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
6247
|
+
object.name = message.name;
|
|
6248
|
+
if (message.fields && message.fields.length) {
|
|
6249
|
+
object.fields = [];
|
|
6250
|
+
for (let j = 0; j < message.fields.length; ++j)
|
|
6251
|
+
object.fields[j] = $root.baml_bridge.cffi.v1.BamlClassFieldDef.toObject(message.fields[j], options, q + 1);
|
|
6252
|
+
}
|
|
6253
|
+
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
6254
|
+
object.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.toObject(message.metadata, options, q + 1);
|
|
6255
|
+
if (message.genericParamCount != null && message.hasOwnProperty("genericParamCount"))
|
|
6256
|
+
object.genericParamCount = message.genericParamCount;
|
|
6257
|
+
return object;
|
|
6258
|
+
};
|
|
6259
|
+
BamlClassDef.prototype.toJSON = function toJSON() {
|
|
6260
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6261
|
+
};
|
|
6262
|
+
BamlClassDef.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6263
|
+
if (typeUrlPrefix === void 0) {
|
|
6264
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6265
|
+
}
|
|
6266
|
+
return typeUrlPrefix + "/baml_bridge.cffi.v1.BamlClassDef";
|
|
6267
|
+
};
|
|
6268
|
+
return BamlClassDef;
|
|
6269
|
+
})();
|
|
6270
|
+
v1.BamlClassFieldDef = (function() {
|
|
6271
|
+
function BamlClassFieldDef(properties) {
|
|
6272
|
+
if (properties) {
|
|
6273
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6274
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
6275
|
+
this[keys[i]] = properties[keys[i]];
|
|
6276
|
+
}
|
|
6277
|
+
}
|
|
6278
|
+
BamlClassFieldDef.prototype.name = "";
|
|
6279
|
+
BamlClassFieldDef.prototype.ty = null;
|
|
6280
|
+
BamlClassFieldDef.prototype.metadata = null;
|
|
6281
|
+
BamlClassFieldDef.prototype.skip = false;
|
|
6282
|
+
BamlClassFieldDef.create = function create(properties) {
|
|
6283
|
+
return new BamlClassFieldDef(properties);
|
|
6284
|
+
};
|
|
6285
|
+
BamlClassFieldDef.encode = function encode(message, writer, q) {
|
|
6286
|
+
if (!writer)
|
|
6287
|
+
writer = $Writer.create();
|
|
6288
|
+
if (q === void 0)
|
|
6289
|
+
q = 0;
|
|
6290
|
+
if (q > $util.recursionLimit)
|
|
6291
|
+
throw Error("max depth exceeded");
|
|
6292
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
6293
|
+
writer.uint32(
|
|
6294
|
+
/* id 1, wireType 2 =*/
|
|
6295
|
+
10
|
|
6296
|
+
).string(message.name);
|
|
6297
|
+
if (message.ty != null && Object.hasOwnProperty.call(message, "ty"))
|
|
6298
|
+
$root.baml_bridge.cffi.v1.BamlTy.encode(message.ty, writer.uint32(
|
|
6299
|
+
/* id 2, wireType 2 =*/
|
|
6300
|
+
18
|
|
6301
|
+
).fork(), q + 1).ldelim();
|
|
6302
|
+
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
6303
|
+
$root.baml_bridge.cffi.v1.BamlTyMetadata.encode(message.metadata, writer.uint32(
|
|
6304
|
+
/* id 3, wireType 2 =*/
|
|
6305
|
+
26
|
|
6306
|
+
).fork(), q + 1).ldelim();
|
|
6307
|
+
if (message.skip != null && Object.hasOwnProperty.call(message, "skip"))
|
|
6308
|
+
writer.uint32(
|
|
6309
|
+
/* id 4, wireType 0 =*/
|
|
6310
|
+
32
|
|
6311
|
+
).bool(message.skip);
|
|
6312
|
+
return writer;
|
|
6313
|
+
};
|
|
6314
|
+
BamlClassFieldDef.encodeDelimited = function encodeDelimited(message, writer) {
|
|
6315
|
+
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
6316
|
+
};
|
|
6317
|
+
BamlClassFieldDef.decode = function decode(reader, length, error, long) {
|
|
6318
|
+
if (!(reader instanceof $Reader))
|
|
6319
|
+
reader = $Reader.create(reader);
|
|
6320
|
+
if (long === void 0)
|
|
6321
|
+
long = 0;
|
|
6322
|
+
if (long > $Reader.recursionLimit)
|
|
6323
|
+
throw Error("maximum nesting depth exceeded");
|
|
6324
|
+
let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.baml_bridge.cffi.v1.BamlClassFieldDef();
|
|
6325
|
+
while (reader.pos < end) {
|
|
6326
|
+
let tag = reader.uint32();
|
|
6327
|
+
if (tag === error)
|
|
6328
|
+
break;
|
|
6329
|
+
switch (tag >>> 3) {
|
|
6330
|
+
case 1: {
|
|
6331
|
+
message.name = reader.string();
|
|
6332
|
+
break;
|
|
6333
|
+
}
|
|
6334
|
+
case 2: {
|
|
6335
|
+
message.ty = $root.baml_bridge.cffi.v1.BamlTy.decode(reader, reader.uint32(), void 0, long + 1);
|
|
6336
|
+
break;
|
|
6337
|
+
}
|
|
6338
|
+
case 3: {
|
|
6339
|
+
message.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.decode(reader, reader.uint32(), void 0, long + 1);
|
|
6340
|
+
break;
|
|
6341
|
+
}
|
|
6342
|
+
case 4: {
|
|
6343
|
+
message.skip = reader.bool();
|
|
6344
|
+
break;
|
|
6345
|
+
}
|
|
6346
|
+
default:
|
|
6347
|
+
reader.skipType(tag & 7, long);
|
|
6348
|
+
break;
|
|
6349
|
+
}
|
|
6350
|
+
}
|
|
6351
|
+
return message;
|
|
6352
|
+
};
|
|
6353
|
+
BamlClassFieldDef.decodeDelimited = function decodeDelimited(reader) {
|
|
6354
|
+
if (!(reader instanceof $Reader))
|
|
6355
|
+
reader = new $Reader(reader);
|
|
6356
|
+
return this.decode(reader, reader.uint32());
|
|
6357
|
+
};
|
|
6358
|
+
BamlClassFieldDef.verify = function verify(message, long) {
|
|
6359
|
+
if (typeof message !== "object" || message === null)
|
|
6360
|
+
return "object expected";
|
|
6361
|
+
if (long === void 0)
|
|
6362
|
+
long = 0;
|
|
6363
|
+
if (long > $util.recursionLimit)
|
|
6364
|
+
return "maximum nesting depth exceeded";
|
|
6365
|
+
if (message.name != null && message.hasOwnProperty("name")) {
|
|
6366
|
+
if (!$util.isString(message.name))
|
|
6367
|
+
return "name: string expected";
|
|
6368
|
+
}
|
|
6369
|
+
if (message.ty != null && message.hasOwnProperty("ty")) {
|
|
6370
|
+
let error = $root.baml_bridge.cffi.v1.BamlTy.verify(message.ty, long + 1);
|
|
6371
|
+
if (error)
|
|
6372
|
+
return "ty." + error;
|
|
6373
|
+
}
|
|
6374
|
+
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
6375
|
+
let error = $root.baml_bridge.cffi.v1.BamlTyMetadata.verify(message.metadata, long + 1);
|
|
6376
|
+
if (error)
|
|
6377
|
+
return "metadata." + error;
|
|
6378
|
+
}
|
|
6379
|
+
if (message.skip != null && message.hasOwnProperty("skip")) {
|
|
6380
|
+
if (typeof message.skip !== "boolean")
|
|
6381
|
+
return "skip: boolean expected";
|
|
6382
|
+
}
|
|
6383
|
+
return null;
|
|
6384
|
+
};
|
|
6385
|
+
BamlClassFieldDef.fromObject = function fromObject(object, long) {
|
|
6386
|
+
if (object instanceof $root.baml_bridge.cffi.v1.BamlClassFieldDef)
|
|
6387
|
+
return object;
|
|
6388
|
+
if (!$util.isObject(object))
|
|
6389
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlClassFieldDef: object expected");
|
|
6390
|
+
if (long === void 0)
|
|
6391
|
+
long = 0;
|
|
6392
|
+
if (long > $util.recursionLimit)
|
|
6393
|
+
throw Error("maximum nesting depth exceeded");
|
|
6394
|
+
let message = new $root.baml_bridge.cffi.v1.BamlClassFieldDef();
|
|
6395
|
+
if (object.name != null)
|
|
6396
|
+
message.name = String(object.name);
|
|
6397
|
+
if (object.ty != null) {
|
|
6398
|
+
if (!$util.isObject(object.ty))
|
|
6399
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlClassFieldDef.ty: object expected");
|
|
6400
|
+
message.ty = $root.baml_bridge.cffi.v1.BamlTy.fromObject(object.ty, long + 1);
|
|
6401
|
+
}
|
|
6402
|
+
if (object.metadata != null) {
|
|
6403
|
+
if (!$util.isObject(object.metadata))
|
|
6404
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlClassFieldDef.metadata: object expected");
|
|
6405
|
+
message.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.fromObject(object.metadata, long + 1);
|
|
6406
|
+
}
|
|
6407
|
+
if (object.skip != null)
|
|
6408
|
+
message.skip = Boolean(object.skip);
|
|
6409
|
+
return message;
|
|
6410
|
+
};
|
|
6411
|
+
BamlClassFieldDef.toObject = function toObject(message, options, q) {
|
|
6412
|
+
if (!options)
|
|
6413
|
+
options = {};
|
|
6414
|
+
if (q === void 0)
|
|
6415
|
+
q = 0;
|
|
6416
|
+
if (q > $util.recursionLimit)
|
|
6417
|
+
throw Error("max depth exceeded");
|
|
6418
|
+
let object = {};
|
|
6419
|
+
if (options.defaults) {
|
|
6420
|
+
object.name = "";
|
|
6421
|
+
object.ty = null;
|
|
6422
|
+
object.metadata = null;
|
|
6423
|
+
object.skip = false;
|
|
6424
|
+
}
|
|
6425
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
6426
|
+
object.name = message.name;
|
|
6427
|
+
if (message.ty != null && message.hasOwnProperty("ty"))
|
|
6428
|
+
object.ty = $root.baml_bridge.cffi.v1.BamlTy.toObject(message.ty, options, q + 1);
|
|
6429
|
+
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
6430
|
+
object.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.toObject(message.metadata, options, q + 1);
|
|
6431
|
+
if (message.skip != null && message.hasOwnProperty("skip"))
|
|
6432
|
+
object.skip = message.skip;
|
|
6433
|
+
return object;
|
|
6434
|
+
};
|
|
6435
|
+
BamlClassFieldDef.prototype.toJSON = function toJSON() {
|
|
6436
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6437
|
+
};
|
|
6438
|
+
BamlClassFieldDef.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6439
|
+
if (typeUrlPrefix === void 0) {
|
|
6440
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6441
|
+
}
|
|
6442
|
+
return typeUrlPrefix + "/baml_bridge.cffi.v1.BamlClassFieldDef";
|
|
6443
|
+
};
|
|
6444
|
+
return BamlClassFieldDef;
|
|
6445
|
+
})();
|
|
6446
|
+
v1.BamlEnumDef = (function() {
|
|
6447
|
+
function BamlEnumDef(properties) {
|
|
6448
|
+
this.variants = [];
|
|
6449
|
+
if (properties) {
|
|
6450
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6451
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
6452
|
+
this[keys[i]] = properties[keys[i]];
|
|
6453
|
+
}
|
|
6454
|
+
}
|
|
6455
|
+
BamlEnumDef.prototype.name = "";
|
|
6456
|
+
BamlEnumDef.prototype.variants = $util.emptyArray;
|
|
6457
|
+
BamlEnumDef.prototype.metadata = null;
|
|
6458
|
+
BamlEnumDef.create = function create(properties) {
|
|
6459
|
+
return new BamlEnumDef(properties);
|
|
6460
|
+
};
|
|
6461
|
+
BamlEnumDef.encode = function encode(message, writer, q) {
|
|
6462
|
+
if (!writer)
|
|
6463
|
+
writer = $Writer.create();
|
|
6464
|
+
if (q === void 0)
|
|
6465
|
+
q = 0;
|
|
6466
|
+
if (q > $util.recursionLimit)
|
|
6467
|
+
throw Error("max depth exceeded");
|
|
6468
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
6469
|
+
writer.uint32(
|
|
6470
|
+
/* id 1, wireType 2 =*/
|
|
6471
|
+
10
|
|
6472
|
+
).string(message.name);
|
|
6473
|
+
if (message.variants != null && message.variants.length)
|
|
6474
|
+
for (let i = 0; i < message.variants.length; ++i)
|
|
6475
|
+
$root.baml_bridge.cffi.v1.BamlEnumVariantDef.encode(message.variants[i], writer.uint32(
|
|
6476
|
+
/* id 2, wireType 2 =*/
|
|
6477
|
+
18
|
|
6478
|
+
).fork(), q + 1).ldelim();
|
|
6479
|
+
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
6480
|
+
$root.baml_bridge.cffi.v1.BamlTyMetadata.encode(message.metadata, writer.uint32(
|
|
6481
|
+
/* id 3, wireType 2 =*/
|
|
6482
|
+
26
|
|
6483
|
+
).fork(), q + 1).ldelim();
|
|
6484
|
+
return writer;
|
|
6485
|
+
};
|
|
6486
|
+
BamlEnumDef.encodeDelimited = function encodeDelimited(message, writer) {
|
|
6487
|
+
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
6488
|
+
};
|
|
6489
|
+
BamlEnumDef.decode = function decode(reader, length, error, long) {
|
|
6490
|
+
if (!(reader instanceof $Reader))
|
|
6491
|
+
reader = $Reader.create(reader);
|
|
6492
|
+
if (long === void 0)
|
|
6493
|
+
long = 0;
|
|
6494
|
+
if (long > $Reader.recursionLimit)
|
|
6495
|
+
throw Error("maximum nesting depth exceeded");
|
|
6496
|
+
let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.baml_bridge.cffi.v1.BamlEnumDef();
|
|
6497
|
+
while (reader.pos < end) {
|
|
6498
|
+
let tag = reader.uint32();
|
|
6499
|
+
if (tag === error)
|
|
6500
|
+
break;
|
|
6501
|
+
switch (tag >>> 3) {
|
|
6502
|
+
case 1: {
|
|
6503
|
+
message.name = reader.string();
|
|
6504
|
+
break;
|
|
6505
|
+
}
|
|
6506
|
+
case 2: {
|
|
6507
|
+
if (!(message.variants && message.variants.length))
|
|
6508
|
+
message.variants = [];
|
|
6509
|
+
message.variants.push($root.baml_bridge.cffi.v1.BamlEnumVariantDef.decode(reader, reader.uint32(), void 0, long + 1));
|
|
6510
|
+
break;
|
|
6511
|
+
}
|
|
6512
|
+
case 3: {
|
|
6513
|
+
message.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.decode(reader, reader.uint32(), void 0, long + 1);
|
|
6514
|
+
break;
|
|
6515
|
+
}
|
|
6516
|
+
default:
|
|
6517
|
+
reader.skipType(tag & 7, long);
|
|
6518
|
+
break;
|
|
6519
|
+
}
|
|
6520
|
+
}
|
|
6521
|
+
return message;
|
|
6522
|
+
};
|
|
6523
|
+
BamlEnumDef.decodeDelimited = function decodeDelimited(reader) {
|
|
6524
|
+
if (!(reader instanceof $Reader))
|
|
6525
|
+
reader = new $Reader(reader);
|
|
6526
|
+
return this.decode(reader, reader.uint32());
|
|
6527
|
+
};
|
|
6528
|
+
BamlEnumDef.verify = function verify(message, long) {
|
|
6529
|
+
if (typeof message !== "object" || message === null)
|
|
6530
|
+
return "object expected";
|
|
6531
|
+
if (long === void 0)
|
|
6532
|
+
long = 0;
|
|
6533
|
+
if (long > $util.recursionLimit)
|
|
6534
|
+
return "maximum nesting depth exceeded";
|
|
6535
|
+
if (message.name != null && message.hasOwnProperty("name")) {
|
|
6536
|
+
if (!$util.isString(message.name))
|
|
6537
|
+
return "name: string expected";
|
|
6538
|
+
}
|
|
6539
|
+
if (message.variants != null && message.hasOwnProperty("variants")) {
|
|
6540
|
+
if (!Array.isArray(message.variants))
|
|
6541
|
+
return "variants: array expected";
|
|
6542
|
+
for (let i = 0; i < message.variants.length; ++i) {
|
|
6543
|
+
let error = $root.baml_bridge.cffi.v1.BamlEnumVariantDef.verify(message.variants[i], long + 1);
|
|
6544
|
+
if (error)
|
|
6545
|
+
return "variants." + error;
|
|
6546
|
+
}
|
|
6547
|
+
}
|
|
6548
|
+
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
6549
|
+
let error = $root.baml_bridge.cffi.v1.BamlTyMetadata.verify(message.metadata, long + 1);
|
|
6550
|
+
if (error)
|
|
6551
|
+
return "metadata." + error;
|
|
5045
6552
|
}
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
6553
|
+
return null;
|
|
6554
|
+
};
|
|
6555
|
+
BamlEnumDef.fromObject = function fromObject(object, long) {
|
|
6556
|
+
if (object instanceof $root.baml_bridge.cffi.v1.BamlEnumDef)
|
|
6557
|
+
return object;
|
|
6558
|
+
if (!$util.isObject(object))
|
|
6559
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlEnumDef: object expected");
|
|
6560
|
+
if (long === void 0)
|
|
6561
|
+
long = 0;
|
|
6562
|
+
if (long > $util.recursionLimit)
|
|
6563
|
+
throw Error("maximum nesting depth exceeded");
|
|
6564
|
+
let message = new $root.baml_bridge.cffi.v1.BamlEnumDef();
|
|
6565
|
+
if (object.name != null)
|
|
6566
|
+
message.name = String(object.name);
|
|
6567
|
+
if (object.variants) {
|
|
6568
|
+
if (!Array.isArray(object.variants))
|
|
6569
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlEnumDef.variants: array expected");
|
|
6570
|
+
message.variants = [];
|
|
6571
|
+
for (let i = 0; i < object.variants.length; ++i) {
|
|
6572
|
+
if (!$util.isObject(object.variants[i]))
|
|
6573
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlEnumDef.variants: object expected");
|
|
6574
|
+
message.variants[i] = $root.baml_bridge.cffi.v1.BamlEnumVariantDef.fromObject(object.variants[i], long + 1);
|
|
6575
|
+
}
|
|
5050
6576
|
}
|
|
5051
|
-
if (object.
|
|
5052
|
-
if (!$util.isObject(object.
|
|
5053
|
-
throw TypeError(".baml_bridge.cffi.v1.
|
|
5054
|
-
message.
|
|
6577
|
+
if (object.metadata != null) {
|
|
6578
|
+
if (!$util.isObject(object.metadata))
|
|
6579
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlEnumDef.metadata: object expected");
|
|
6580
|
+
message.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.fromObject(object.metadata, long + 1);
|
|
5055
6581
|
}
|
|
5056
6582
|
return message;
|
|
5057
6583
|
};
|
|
5058
|
-
|
|
6584
|
+
BamlEnumDef.toObject = function toObject(message, options, q) {
|
|
5059
6585
|
if (!options)
|
|
5060
6586
|
options = {};
|
|
5061
6587
|
if (q === void 0)
|
|
@@ -5063,133 +6589,186 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
5063
6589
|
if (q > $util.recursionLimit)
|
|
5064
6590
|
throw Error("max depth exceeded");
|
|
5065
6591
|
let object = {};
|
|
5066
|
-
if (
|
|
5067
|
-
object.
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
if (message.classTy != null && message.hasOwnProperty("classTy")) {
|
|
5072
|
-
object.classTy = $root.baml_bridge.cffi.v1.BamlTyClass.toObject(message.classTy, options, q + 1);
|
|
5073
|
-
if (options.oneofs)
|
|
5074
|
-
object.ty = "classTy";
|
|
5075
|
-
}
|
|
5076
|
-
if (message["enum"] != null && message.hasOwnProperty("enum")) {
|
|
5077
|
-
object["enum"] = $root.baml_bridge.cffi.v1.BamlTyEnum.toObject(message["enum"], options, q + 1);
|
|
5078
|
-
if (options.oneofs)
|
|
5079
|
-
object.ty = "enum";
|
|
5080
|
-
}
|
|
5081
|
-
if (message.list != null && message.hasOwnProperty("list")) {
|
|
5082
|
-
object.list = $root.baml_bridge.cffi.v1.BamlTyList.toObject(message.list, options, q + 1);
|
|
5083
|
-
if (options.oneofs)
|
|
5084
|
-
object.ty = "list";
|
|
5085
|
-
}
|
|
5086
|
-
if (message.map != null && message.hasOwnProperty("map")) {
|
|
5087
|
-
object.map = $root.baml_bridge.cffi.v1.BamlTyMap.toObject(message.map, options, q + 1);
|
|
5088
|
-
if (options.oneofs)
|
|
5089
|
-
object.ty = "map";
|
|
5090
|
-
}
|
|
5091
|
-
if (message.optional != null && message.hasOwnProperty("optional")) {
|
|
5092
|
-
object.optional = $root.baml_bridge.cffi.v1.BamlTyOptional.toObject(message.optional, options, q + 1);
|
|
5093
|
-
if (options.oneofs)
|
|
5094
|
-
object.ty = "optional";
|
|
5095
|
-
}
|
|
5096
|
-
if (message.union != null && message.hasOwnProperty("union")) {
|
|
5097
|
-
object.union = $root.baml_bridge.cffi.v1.BamlTyUnion.toObject(message.union, options, q + 1);
|
|
5098
|
-
if (options.oneofs)
|
|
5099
|
-
object.ty = "union";
|
|
5100
|
-
}
|
|
5101
|
-
if (message.literal != null && message.hasOwnProperty("literal")) {
|
|
5102
|
-
object.literal = $root.baml_bridge.cffi.v1.BamlTyLiteral.toObject(message.literal, options, q + 1);
|
|
5103
|
-
if (options.oneofs)
|
|
5104
|
-
object.ty = "literal";
|
|
5105
|
-
}
|
|
5106
|
-
if (message.typeAlias != null && message.hasOwnProperty("typeAlias")) {
|
|
5107
|
-
object.typeAlias = $root.baml_bridge.cffi.v1.BamlTyTypeAlias.toObject(message.typeAlias, options, q + 1);
|
|
5108
|
-
if (options.oneofs)
|
|
5109
|
-
object.ty = "typeAlias";
|
|
5110
|
-
}
|
|
5111
|
-
if (message.unknown != null && message.hasOwnProperty("unknown")) {
|
|
5112
|
-
object.unknown = $root.baml_bridge.cffi.v1.BamlTyUnknown.toObject(message.unknown, options, q + 1);
|
|
5113
|
-
if (options.oneofs)
|
|
5114
|
-
object.ty = "unknown";
|
|
5115
|
-
}
|
|
5116
|
-
if (message.media != null && message.hasOwnProperty("media")) {
|
|
5117
|
-
object.media = $root.baml_bridge.cffi.v1.BamlTyMedia.toObject(message.media, options, q + 1);
|
|
5118
|
-
if (options.oneofs)
|
|
5119
|
-
object.ty = "media";
|
|
5120
|
-
}
|
|
5121
|
-
if (message["interface"] != null && message.hasOwnProperty("interface")) {
|
|
5122
|
-
object["interface"] = $root.baml_bridge.cffi.v1.BamlTyInterface.toObject(message["interface"], options, q + 1);
|
|
5123
|
-
if (options.oneofs)
|
|
5124
|
-
object.ty = "interface";
|
|
5125
|
-
}
|
|
5126
|
-
if (message.enumVariant != null && message.hasOwnProperty("enumVariant")) {
|
|
5127
|
-
object.enumVariant = $root.baml_bridge.cffi.v1.BamlTyEnumVariant.toObject(message.enumVariant, options, q + 1);
|
|
5128
|
-
if (options.oneofs)
|
|
5129
|
-
object.ty = "enumVariant";
|
|
5130
|
-
}
|
|
5131
|
-
if (message["function"] != null && message.hasOwnProperty("function")) {
|
|
5132
|
-
object["function"] = $root.baml_bridge.cffi.v1.BamlTyFunction.toObject(message["function"], options, q + 1);
|
|
5133
|
-
if (options.oneofs)
|
|
5134
|
-
object.ty = "function";
|
|
6592
|
+
if (options.arrays || options.defaults)
|
|
6593
|
+
object.variants = [];
|
|
6594
|
+
if (options.defaults) {
|
|
6595
|
+
object.name = "";
|
|
6596
|
+
object.metadata = null;
|
|
5135
6597
|
}
|
|
5136
|
-
if (message.
|
|
5137
|
-
object.
|
|
5138
|
-
|
|
5139
|
-
|
|
6598
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
6599
|
+
object.name = message.name;
|
|
6600
|
+
if (message.variants && message.variants.length) {
|
|
6601
|
+
object.variants = [];
|
|
6602
|
+
for (let j = 0; j < message.variants.length; ++j)
|
|
6603
|
+
object.variants[j] = $root.baml_bridge.cffi.v1.BamlEnumVariantDef.toObject(message.variants[j], options, q + 1);
|
|
5140
6604
|
}
|
|
5141
|
-
if (message.
|
|
5142
|
-
object.
|
|
5143
|
-
|
|
5144
|
-
|
|
6605
|
+
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
6606
|
+
object.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.toObject(message.metadata, options, q + 1);
|
|
6607
|
+
return object;
|
|
6608
|
+
};
|
|
6609
|
+
BamlEnumDef.prototype.toJSON = function toJSON() {
|
|
6610
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6611
|
+
};
|
|
6612
|
+
BamlEnumDef.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6613
|
+
if (typeUrlPrefix === void 0) {
|
|
6614
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
5145
6615
|
}
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
6616
|
+
return typeUrlPrefix + "/baml_bridge.cffi.v1.BamlEnumDef";
|
|
6617
|
+
};
|
|
6618
|
+
return BamlEnumDef;
|
|
6619
|
+
})();
|
|
6620
|
+
v1.BamlEnumVariantDef = (function() {
|
|
6621
|
+
function BamlEnumVariantDef(properties) {
|
|
6622
|
+
if (properties) {
|
|
6623
|
+
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6624
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
6625
|
+
this[keys[i]] = properties[keys[i]];
|
|
5150
6626
|
}
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
6627
|
+
}
|
|
6628
|
+
BamlEnumVariantDef.prototype.name = "";
|
|
6629
|
+
BamlEnumVariantDef.prototype.metadata = null;
|
|
6630
|
+
BamlEnumVariantDef.prototype.skip = false;
|
|
6631
|
+
BamlEnumVariantDef.create = function create(properties) {
|
|
6632
|
+
return new BamlEnumVariantDef(properties);
|
|
6633
|
+
};
|
|
6634
|
+
BamlEnumVariantDef.encode = function encode(message, writer, q) {
|
|
6635
|
+
if (!writer)
|
|
6636
|
+
writer = $Writer.create();
|
|
6637
|
+
if (q === void 0)
|
|
6638
|
+
q = 0;
|
|
6639
|
+
if (q > $util.recursionLimit)
|
|
6640
|
+
throw Error("max depth exceeded");
|
|
6641
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
6642
|
+
writer.uint32(
|
|
6643
|
+
/* id 1, wireType 2 =*/
|
|
6644
|
+
10
|
|
6645
|
+
).string(message.name);
|
|
6646
|
+
if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
|
6647
|
+
$root.baml_bridge.cffi.v1.BamlTyMetadata.encode(message.metadata, writer.uint32(
|
|
6648
|
+
/* id 2, wireType 2 =*/
|
|
6649
|
+
18
|
|
6650
|
+
).fork(), q + 1).ldelim();
|
|
6651
|
+
if (message.skip != null && Object.hasOwnProperty.call(message, "skip"))
|
|
6652
|
+
writer.uint32(
|
|
6653
|
+
/* id 3, wireType 0 =*/
|
|
6654
|
+
24
|
|
6655
|
+
).bool(message.skip);
|
|
6656
|
+
return writer;
|
|
6657
|
+
};
|
|
6658
|
+
BamlEnumVariantDef.encodeDelimited = function encodeDelimited(message, writer) {
|
|
6659
|
+
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
6660
|
+
};
|
|
6661
|
+
BamlEnumVariantDef.decode = function decode(reader, length, error, long) {
|
|
6662
|
+
if (!(reader instanceof $Reader))
|
|
6663
|
+
reader = $Reader.create(reader);
|
|
6664
|
+
if (long === void 0)
|
|
6665
|
+
long = 0;
|
|
6666
|
+
if (long > $Reader.recursionLimit)
|
|
6667
|
+
throw Error("maximum nesting depth exceeded");
|
|
6668
|
+
let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.baml_bridge.cffi.v1.BamlEnumVariantDef();
|
|
6669
|
+
while (reader.pos < end) {
|
|
6670
|
+
let tag = reader.uint32();
|
|
6671
|
+
if (tag === error)
|
|
6672
|
+
break;
|
|
6673
|
+
switch (tag >>> 3) {
|
|
6674
|
+
case 1: {
|
|
6675
|
+
message.name = reader.string();
|
|
6676
|
+
break;
|
|
6677
|
+
}
|
|
6678
|
+
case 2: {
|
|
6679
|
+
message.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.decode(reader, reader.uint32(), void 0, long + 1);
|
|
6680
|
+
break;
|
|
6681
|
+
}
|
|
6682
|
+
case 3: {
|
|
6683
|
+
message.skip = reader.bool();
|
|
6684
|
+
break;
|
|
6685
|
+
}
|
|
6686
|
+
default:
|
|
6687
|
+
reader.skipType(tag & 7, long);
|
|
6688
|
+
break;
|
|
6689
|
+
}
|
|
5155
6690
|
}
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
6691
|
+
return message;
|
|
6692
|
+
};
|
|
6693
|
+
BamlEnumVariantDef.decodeDelimited = function decodeDelimited(reader) {
|
|
6694
|
+
if (!(reader instanceof $Reader))
|
|
6695
|
+
reader = new $Reader(reader);
|
|
6696
|
+
return this.decode(reader, reader.uint32());
|
|
6697
|
+
};
|
|
6698
|
+
BamlEnumVariantDef.verify = function verify(message, long) {
|
|
6699
|
+
if (typeof message !== "object" || message === null)
|
|
6700
|
+
return "object expected";
|
|
6701
|
+
if (long === void 0)
|
|
6702
|
+
long = 0;
|
|
6703
|
+
if (long > $util.recursionLimit)
|
|
6704
|
+
return "maximum nesting depth exceeded";
|
|
6705
|
+
if (message.name != null && message.hasOwnProperty("name")) {
|
|
6706
|
+
if (!$util.isString(message.name))
|
|
6707
|
+
return "name: string expected";
|
|
5160
6708
|
}
|
|
5161
|
-
if (message
|
|
5162
|
-
|
|
5163
|
-
if (
|
|
5164
|
-
|
|
6709
|
+
if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
|
6710
|
+
let error = $root.baml_bridge.cffi.v1.BamlTyMetadata.verify(message.metadata, long + 1);
|
|
6711
|
+
if (error)
|
|
6712
|
+
return "metadata." + error;
|
|
5165
6713
|
}
|
|
5166
|
-
if (message.
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
object.ty = "typeVar";
|
|
6714
|
+
if (message.skip != null && message.hasOwnProperty("skip")) {
|
|
6715
|
+
if (typeof message.skip !== "boolean")
|
|
6716
|
+
return "skip: boolean expected";
|
|
5170
6717
|
}
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
6718
|
+
return null;
|
|
6719
|
+
};
|
|
6720
|
+
BamlEnumVariantDef.fromObject = function fromObject(object, long) {
|
|
6721
|
+
if (object instanceof $root.baml_bridge.cffi.v1.BamlEnumVariantDef)
|
|
6722
|
+
return object;
|
|
6723
|
+
if (!$util.isObject(object))
|
|
6724
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlEnumVariantDef: object expected");
|
|
6725
|
+
if (long === void 0)
|
|
6726
|
+
long = 0;
|
|
6727
|
+
if (long > $util.recursionLimit)
|
|
6728
|
+
throw Error("maximum nesting depth exceeded");
|
|
6729
|
+
let message = new $root.baml_bridge.cffi.v1.BamlEnumVariantDef();
|
|
6730
|
+
if (object.name != null)
|
|
6731
|
+
message.name = String(object.name);
|
|
6732
|
+
if (object.metadata != null) {
|
|
6733
|
+
if (!$util.isObject(object.metadata))
|
|
6734
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlEnumVariantDef.metadata: object expected");
|
|
6735
|
+
message.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.fromObject(object.metadata, long + 1);
|
|
5175
6736
|
}
|
|
5176
|
-
if (
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
6737
|
+
if (object.skip != null)
|
|
6738
|
+
message.skip = Boolean(object.skip);
|
|
6739
|
+
return message;
|
|
6740
|
+
};
|
|
6741
|
+
BamlEnumVariantDef.toObject = function toObject(message, options, q) {
|
|
6742
|
+
if (!options)
|
|
6743
|
+
options = {};
|
|
6744
|
+
if (q === void 0)
|
|
6745
|
+
q = 0;
|
|
6746
|
+
if (q > $util.recursionLimit)
|
|
6747
|
+
throw Error("max depth exceeded");
|
|
6748
|
+
let object = {};
|
|
6749
|
+
if (options.defaults) {
|
|
6750
|
+
object.name = "";
|
|
6751
|
+
object.metadata = null;
|
|
6752
|
+
object.skip = false;
|
|
5180
6753
|
}
|
|
6754
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
6755
|
+
object.name = message.name;
|
|
6756
|
+
if (message.metadata != null && message.hasOwnProperty("metadata"))
|
|
6757
|
+
object.metadata = $root.baml_bridge.cffi.v1.BamlTyMetadata.toObject(message.metadata, options, q + 1);
|
|
6758
|
+
if (message.skip != null && message.hasOwnProperty("skip"))
|
|
6759
|
+
object.skip = message.skip;
|
|
5181
6760
|
return object;
|
|
5182
6761
|
};
|
|
5183
|
-
|
|
6762
|
+
BamlEnumVariantDef.prototype.toJSON = function toJSON() {
|
|
5184
6763
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
5185
6764
|
};
|
|
5186
|
-
|
|
6765
|
+
BamlEnumVariantDef.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
5187
6766
|
if (typeUrlPrefix === void 0) {
|
|
5188
6767
|
typeUrlPrefix = "type.googleapis.com";
|
|
5189
6768
|
}
|
|
5190
|
-
return typeUrlPrefix + "/baml_bridge.cffi.v1.
|
|
6769
|
+
return typeUrlPrefix + "/baml_bridge.cffi.v1.BamlEnumVariantDef";
|
|
5191
6770
|
};
|
|
5192
|
-
return
|
|
6771
|
+
return BamlEnumVariantDef;
|
|
5193
6772
|
})();
|
|
5194
6773
|
v1.BamlTyPrimitiveKind = (function() {
|
|
5195
6774
|
const valuesById = {}, values = Object.create(valuesById);
|
|
@@ -9073,9 +10652,10 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
9073
10652
|
BamlOutboundValue.prototype.uint8arrayValue = null;
|
|
9074
10653
|
BamlOutboundValue.prototype.bigintValue = null;
|
|
9075
10654
|
BamlOutboundValue.prototype.tyValue = null;
|
|
10655
|
+
BamlOutboundValue.prototype.tyDefValue = null;
|
|
9076
10656
|
let $oneOfFields;
|
|
9077
10657
|
Object.defineProperty(BamlOutboundValue.prototype, "value", {
|
|
9078
|
-
get: $util.oneOfGetter($oneOfFields = ["nullValue", "stringValue", "intValue", "floatValue", "boolValue", "classValue", "enumValue", "literalValue", "listValue", "mapValue", "unionVariantValue", "handleValue", "mediaValue", "promptAstValue", "uint8arrayValue", "bigintValue", "tyValue"]),
|
|
10658
|
+
get: $util.oneOfGetter($oneOfFields = ["nullValue", "stringValue", "intValue", "floatValue", "boolValue", "classValue", "enumValue", "literalValue", "listValue", "mapValue", "unionVariantValue", "handleValue", "mediaValue", "promptAstValue", "uint8arrayValue", "bigintValue", "tyValue", "tyDefValue"]),
|
|
9079
10659
|
set: $util.oneOfSetter($oneOfFields)
|
|
9080
10660
|
});
|
|
9081
10661
|
BamlOutboundValue.create = function create(properties) {
|
|
@@ -9173,6 +10753,11 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
9173
10753
|
/* id 21, wireType 2 =*/
|
|
9174
10754
|
170
|
|
9175
10755
|
).fork(), q + 1).ldelim();
|
|
10756
|
+
if (message.tyDefValue != null && Object.hasOwnProperty.call(message, "tyDefValue"))
|
|
10757
|
+
$root.baml_bridge.cffi.v1.BamlTyDef.encode(message.tyDefValue, writer.uint32(
|
|
10758
|
+
/* id 22, wireType 2 =*/
|
|
10759
|
+
178
|
|
10760
|
+
).fork(), q + 1).ldelim();
|
|
9176
10761
|
return writer;
|
|
9177
10762
|
};
|
|
9178
10763
|
BamlOutboundValue.encodeDelimited = function encodeDelimited(message, writer) {
|
|
@@ -9259,6 +10844,10 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
9259
10844
|
message.tyValue = $root.baml_bridge.cffi.v1.BamlTy.decode(reader, reader.uint32(), void 0, long + 1);
|
|
9260
10845
|
break;
|
|
9261
10846
|
}
|
|
10847
|
+
case 22: {
|
|
10848
|
+
message.tyDefValue = $root.baml_bridge.cffi.v1.BamlTyDef.decode(reader, reader.uint32(), void 0, long + 1);
|
|
10849
|
+
break;
|
|
10850
|
+
}
|
|
9262
10851
|
default:
|
|
9263
10852
|
reader.skipType(tag & 7, long);
|
|
9264
10853
|
break;
|
|
@@ -9429,6 +11018,16 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
9429
11018
|
return "tyValue." + error;
|
|
9430
11019
|
}
|
|
9431
11020
|
}
|
|
11021
|
+
if (message.tyDefValue != null && message.hasOwnProperty("tyDefValue")) {
|
|
11022
|
+
if (properties.value === 1)
|
|
11023
|
+
return "value: multiple values";
|
|
11024
|
+
properties.value = 1;
|
|
11025
|
+
{
|
|
11026
|
+
let error = $root.baml_bridge.cffi.v1.BamlTyDef.verify(message.tyDefValue, long + 1);
|
|
11027
|
+
if (error)
|
|
11028
|
+
return "tyDefValue." + error;
|
|
11029
|
+
}
|
|
11030
|
+
}
|
|
9432
11031
|
return null;
|
|
9433
11032
|
};
|
|
9434
11033
|
BamlOutboundValue.fromObject = function fromObject(object, long) {
|
|
@@ -9520,6 +11119,11 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
9520
11119
|
throw TypeError(".baml_bridge.cffi.v1.BamlOutboundValue.tyValue: object expected");
|
|
9521
11120
|
message.tyValue = $root.baml_bridge.cffi.v1.BamlTy.fromObject(object.tyValue, long + 1);
|
|
9522
11121
|
}
|
|
11122
|
+
if (object.tyDefValue != null) {
|
|
11123
|
+
if (!$util.isObject(object.tyDefValue))
|
|
11124
|
+
throw TypeError(".baml_bridge.cffi.v1.BamlOutboundValue.tyDefValue: object expected");
|
|
11125
|
+
message.tyDefValue = $root.baml_bridge.cffi.v1.BamlTyDef.fromObject(object.tyDefValue, long + 1);
|
|
11126
|
+
}
|
|
9523
11127
|
return message;
|
|
9524
11128
|
};
|
|
9525
11129
|
BamlOutboundValue.toObject = function toObject(message, options, q) {
|
|
@@ -9620,6 +11224,11 @@ var baml_bridge = $root.baml_bridge = (() => {
|
|
|
9620
11224
|
if (options.oneofs)
|
|
9621
11225
|
object.value = "tyValue";
|
|
9622
11226
|
}
|
|
11227
|
+
if (message.tyDefValue != null && message.hasOwnProperty("tyDefValue")) {
|
|
11228
|
+
object.tyDefValue = $root.baml_bridge.cffi.v1.BamlTyDef.toObject(message.tyDefValue, options, q + 1);
|
|
11229
|
+
if (options.oneofs)
|
|
11230
|
+
object.value = "tyDefValue";
|
|
11231
|
+
}
|
|
9623
11232
|
return object;
|
|
9624
11233
|
};
|
|
9625
11234
|
BamlOutboundValue.prototype.toJSON = function toJSON() {
|