UNPKG

@stryke/capnp

Version:

A package to assist in running the Cap'n Proto compiler and creating Cap'n Proto serialization protocol schemas.

1 lines 169 kB
{"version":3,"file":"compile-tQXFOze7.mjs","names":[],"sources":["../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@6.0.3/node_modules/capnp-es/dist/capnp/schema.mjs","../../../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@6.0.3/node_modules/capnp-es/dist/shared/capnp-es.CbTQkT9D.mjs","../../src/compile.ts"],"sourcesContent":["import { S as Struct, O as ObjectSize, q as getText, r as setText, b as getUint16, s as setUint16, a as adopt, g as getPointer, d as disown, m as getList, i as isNull, n as initList, c as copyFrom, t as testWhich, w as getAs, u as getUint64, v as setUint64, h as getBit, j as setBit, e as getUint32, f as setUint32, k as getStruct, l as initStructAt, x as getInt8, y as setInt8, z as getInt16, A as setInt16, B as getInt32, C as setInt32, D as getInt64, E as setInt64, o as getUint8, p as setUint8, F as getFloat32, G as setFloat32, H as getFloat64, I as setFloat64, J as getData, K as initData } from '../shared/capnp-es.0-_cOx6D.mjs';\nimport { b as getUint16Mask, C as CompositeList } from '../shared/capnp-es.BvfUH5E6.mjs';\n\nconst _capnpFileId = BigInt(\"0xa93fc509624c72d9\");\nclass Node_Parameter extends Struct {\n static _capnp = {\n displayName: \"Parameter\",\n id: \"b9521bccf10fa3b1\",\n size: new ObjectSize(0, 1)\n };\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n toString() {\n return \"Node_Parameter_\" + super.toString();\n }\n}\nclass Node_NestedNode extends Struct {\n static _capnp = {\n displayName: \"NestedNode\",\n id: \"debf55bbfa0fc242\",\n size: new ObjectSize(8, 1)\n };\n /**\n * Unqualified symbol name. Unlike Node.displayName, this *can* be used programmatically.\n *\n * (On Zooko's triangle, this is the node's petname according to its parent scope.)\n *\n */\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * ID of the nested node. Typically, the target node's scopeId points back to this node, but\n * robust code should avoid relying on this.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n toString() {\n return \"Node_NestedNode_\" + super.toString();\n }\n}\nclass Node_SourceInfo_Member extends Struct {\n static _capnp = {\n displayName: \"Member\",\n id: \"c2ba9038898e1fa2\",\n size: new ObjectSize(0, 1)\n };\n /**\n * Doc comment on the member.\n *\n */\n get docComment() {\n return getText(0, this);\n }\n set docComment(value) {\n setText(0, value, this);\n }\n toString() {\n return \"Node_SourceInfo_Member_\" + super.toString();\n }\n}\nclass Node_SourceInfo extends Struct {\n static Member = Node_SourceInfo_Member;\n static _capnp = {\n displayName: \"SourceInfo\",\n id: \"f38e1de3041357ae\",\n size: new ObjectSize(8, 2)\n };\n static _Members;\n /**\n * ID of the Node which this info describes.\n *\n */\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * The top-level doc comment for the Node.\n *\n */\n get docComment() {\n return getText(0, this);\n }\n set docComment(value) {\n setText(0, value, this);\n }\n _adoptMembers(value) {\n adopt(value, getPointer(1, this));\n }\n _disownMembers() {\n return disown(this.members);\n }\n /**\n * Information about each member -- i.e. fields (for structs), enumerants (for enums), or\n * methods (for interfaces).\n *\n * This list is the same length and order as the corresponding list in the Node, i.e.\n * Node.struct.fields, Node.enum.enumerants, or Node.interface.methods.\n *\n */\n get members() {\n return getList(1, Node_SourceInfo._Members, this);\n }\n _hasMembers() {\n return !isNull(getPointer(1, this));\n }\n _initMembers(length) {\n return initList(1, Node_SourceInfo._Members, length, this);\n }\n set members(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"Node_SourceInfo_\" + super.toString();\n }\n}\nclass Node_Struct extends Struct {\n static _capnp = {\n displayName: \"struct\",\n id: \"9ea0b19b37fb4435\",\n size: new ObjectSize(40, 6)\n };\n static _Fields;\n /**\n * Size of the data section, in words.\n *\n */\n get dataWordCount() {\n return getUint16(14, this);\n }\n set dataWordCount(value) {\n setUint16(14, value, this);\n }\n /**\n * Size of the pointer section, in pointers (which are one word each).\n *\n */\n get pointerCount() {\n return getUint16(24, this);\n }\n set pointerCount(value) {\n setUint16(24, value, this);\n }\n /**\n * The preferred element size to use when encoding a list of this struct. If this is anything\n * other than `inlineComposite` then the struct is one word or less in size and is a candidate\n * for list packing optimization.\n *\n */\n get preferredListEncoding() {\n return getUint16(26, this);\n }\n set preferredListEncoding(value) {\n setUint16(26, value, this);\n }\n /**\n * If true, then this \"struct\" node is actually not an independent node, but merely represents\n * some named union or group within a particular parent struct. This node's scopeId refers\n * to the parent struct, which may itself be a union/group in yet another struct.\n *\n * All group nodes share the same dataWordCount and pointerCount as the top-level\n * struct, and their fields live in the same ordinal and offset spaces as all other fields in\n * the struct.\n *\n * Note that a named union is considered a special kind of group -- in fact, a named union\n * is exactly equivalent to a group that contains nothing but an unnamed union.\n *\n */\n get isGroup() {\n return getBit(224, this);\n }\n set isGroup(value) {\n setBit(224, value, this);\n }\n /**\n * Number of fields in this struct which are members of an anonymous union, and thus may\n * overlap. If this is non-zero, then a 16-bit discriminant is present indicating which\n * of the overlapping fields is active. This can never be 1 -- if it is non-zero, it must be\n * two or more.\n *\n * Note that the fields of an unnamed union are considered fields of the scope containing the\n * union -- an unnamed union is not its own group. So, a top-level struct may contain a\n * non-zero discriminant count. Named unions, on the other hand, are equivalent to groups\n * containing unnamed unions. So, a named union has its own independent schema node, with\n * `isGroup` = true.\n *\n */\n get discriminantCount() {\n return getUint16(30, this);\n }\n set discriminantCount(value) {\n setUint16(30, value, this);\n }\n /**\n * If `discriminantCount` is non-zero, this is the offset of the union discriminant, in\n * multiples of 16 bits.\n *\n */\n get discriminantOffset() {\n return getUint32(32, this);\n }\n set discriminantOffset(value) {\n setUint32(32, value, this);\n }\n _adoptFields(value) {\n adopt(value, getPointer(3, this));\n }\n _disownFields() {\n return disown(this.fields);\n }\n /**\n * Fields defined within this scope (either the struct's top-level fields, or the fields of\n * a particular group; see `isGroup`).\n *\n * The fields are sorted by ordinal number, but note that because groups share the same\n * ordinal space, the field's index in this list is not necessarily exactly its ordinal.\n * On the other hand, the field's position in this list does remain the same even as the\n * protocol evolves, since it is not possible to insert or remove an earlier ordinal.\n * Therefore, for most use cases, if you want to identify a field by number, it may make the\n * most sense to use the field's index in this list rather than its ordinal.\n *\n */\n get fields() {\n return getList(3, Node_Struct._Fields, this);\n }\n _hasFields() {\n return !isNull(getPointer(3, this));\n }\n _initFields(length) {\n return initList(3, Node_Struct._Fields, length, this);\n }\n set fields(value) {\n copyFrom(value, getPointer(3, this));\n }\n toString() {\n return \"Node_Struct_\" + super.toString();\n }\n}\nclass Node_Enum extends Struct {\n static _capnp = {\n displayName: \"enum\",\n id: \"b54ab3364333f598\",\n size: new ObjectSize(40, 6)\n };\n static _Enumerants;\n _adoptEnumerants(value) {\n adopt(value, getPointer(3, this));\n }\n _disownEnumerants() {\n return disown(this.enumerants);\n }\n /**\n * Enumerants ordered by numeric value (ordinal).\n *\n */\n get enumerants() {\n return getList(3, Node_Enum._Enumerants, this);\n }\n _hasEnumerants() {\n return !isNull(getPointer(3, this));\n }\n _initEnumerants(length) {\n return initList(3, Node_Enum._Enumerants, length, this);\n }\n set enumerants(value) {\n copyFrom(value, getPointer(3, this));\n }\n toString() {\n return \"Node_Enum_\" + super.toString();\n }\n}\nclass Node_Interface extends Struct {\n static _capnp = {\n displayName: \"interface\",\n id: \"e82753cff0c2218f\",\n size: new ObjectSize(40, 6)\n };\n static _Methods;\n static _Superclasses;\n _adoptMethods(value) {\n adopt(value, getPointer(3, this));\n }\n _disownMethods() {\n return disown(this.methods);\n }\n /**\n * Methods ordered by ordinal.\n *\n */\n get methods() {\n return getList(3, Node_Interface._Methods, this);\n }\n _hasMethods() {\n return !isNull(getPointer(3, this));\n }\n _initMethods(length) {\n return initList(3, Node_Interface._Methods, length, this);\n }\n set methods(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptSuperclasses(value) {\n adopt(value, getPointer(4, this));\n }\n _disownSuperclasses() {\n return disown(this.superclasses);\n }\n /**\n * Superclasses of this interface.\n *\n */\n get superclasses() {\n return getList(4, Node_Interface._Superclasses, this);\n }\n _hasSuperclasses() {\n return !isNull(getPointer(4, this));\n }\n _initSuperclasses(length) {\n return initList(4, Node_Interface._Superclasses, length, this);\n }\n set superclasses(value) {\n copyFrom(value, getPointer(4, this));\n }\n toString() {\n return \"Node_Interface_\" + super.toString();\n }\n}\nclass Node_Const extends Struct {\n static _capnp = {\n displayName: \"const\",\n id: \"b18aa5ac7a0d9420\",\n size: new ObjectSize(40, 6)\n };\n _adoptType(value) {\n adopt(value, getPointer(3, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n return getStruct(3, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(3, this));\n }\n _initType() {\n return initStructAt(3, Type, this);\n }\n set type(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptValue(value) {\n adopt(value, getPointer(4, this));\n }\n _disownValue() {\n return disown(this.value);\n }\n get value() {\n return getStruct(4, Value, this);\n }\n _hasValue() {\n return !isNull(getPointer(4, this));\n }\n _initValue() {\n return initStructAt(4, Value, this);\n }\n set value(value) {\n copyFrom(value, getPointer(4, this));\n }\n toString() {\n return \"Node_Const_\" + super.toString();\n }\n}\nclass Node_Annotation extends Struct {\n static _capnp = {\n displayName: \"annotation\",\n id: \"ec1619d4400a0290\",\n size: new ObjectSize(40, 6)\n };\n _adoptType(value) {\n adopt(value, getPointer(3, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n return getStruct(3, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(3, this));\n }\n _initType() {\n return initStructAt(3, Type, this);\n }\n set type(value) {\n copyFrom(value, getPointer(3, this));\n }\n get targetsFile() {\n return getBit(112, this);\n }\n set targetsFile(value) {\n setBit(112, value, this);\n }\n get targetsConst() {\n return getBit(113, this);\n }\n set targetsConst(value) {\n setBit(113, value, this);\n }\n get targetsEnum() {\n return getBit(114, this);\n }\n set targetsEnum(value) {\n setBit(114, value, this);\n }\n get targetsEnumerant() {\n return getBit(115, this);\n }\n set targetsEnumerant(value) {\n setBit(115, value, this);\n }\n get targetsStruct() {\n return getBit(116, this);\n }\n set targetsStruct(value) {\n setBit(116, value, this);\n }\n get targetsField() {\n return getBit(117, this);\n }\n set targetsField(value) {\n setBit(117, value, this);\n }\n get targetsUnion() {\n return getBit(118, this);\n }\n set targetsUnion(value) {\n setBit(118, value, this);\n }\n get targetsGroup() {\n return getBit(119, this);\n }\n set targetsGroup(value) {\n setBit(119, value, this);\n }\n get targetsInterface() {\n return getBit(120, this);\n }\n set targetsInterface(value) {\n setBit(120, value, this);\n }\n get targetsMethod() {\n return getBit(121, this);\n }\n set targetsMethod(value) {\n setBit(121, value, this);\n }\n get targetsParam() {\n return getBit(122, this);\n }\n set targetsParam(value) {\n setBit(122, value, this);\n }\n get targetsAnnotation() {\n return getBit(123, this);\n }\n set targetsAnnotation(value) {\n setBit(123, value, this);\n }\n toString() {\n return \"Node_Annotation_\" + super.toString();\n }\n}\nconst Node_Which = {\n FILE: 0,\n /**\n * Name to present to humans to identify this Node. You should not attempt to parse this. Its\n * format could change. It is not guaranteed to be unique.\n *\n * (On Zooko's triangle, this is the node's nickname.)\n *\n */\n STRUCT: 1,\n /**\n * If you want a shorter version of `displayName` (just naming this node, without its surrounding\n * scope), chop off this many characters from the beginning of `displayName`.\n *\n */\n ENUM: 2,\n /**\n * ID of the lexical parent node. Typically, the scope node will have a NestedNode pointing back\n * at this node, but robust code should avoid relying on this (and, in fact, group nodes are not\n * listed in the outer struct's nestedNodes, since they are listed in the fields). `scopeId` is\n * zero if the node has no parent, which is normally only the case with files, but should be\n * allowed for any kind of node (in order to make runtime type generation easier).\n *\n */\n INTERFACE: 3,\n /**\n * List of nodes nested within this node, along with the names under which they were declared.\n *\n */\n CONST: 4,\n /**\n * Annotations applied to this node.\n *\n */\n ANNOTATION: 5\n};\nclass Node extends Struct {\n static FILE = Node_Which.FILE;\n static STRUCT = Node_Which.STRUCT;\n static ENUM = Node_Which.ENUM;\n static INTERFACE = Node_Which.INTERFACE;\n static CONST = Node_Which.CONST;\n static ANNOTATION = Node_Which.ANNOTATION;\n static Parameter = Node_Parameter;\n static NestedNode = Node_NestedNode;\n static SourceInfo = Node_SourceInfo;\n static _capnp = {\n displayName: \"Node\",\n id: \"e682ab4cf923a417\",\n size: new ObjectSize(40, 6)\n };\n static _Parameters;\n static _NestedNodes;\n static _Annotations;\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n /**\n * Name to present to humans to identify this Node. You should not attempt to parse this. Its\n * format could change. It is not guaranteed to be unique.\n *\n * (On Zooko's triangle, this is the node's nickname.)\n *\n */\n get displayName() {\n return getText(0, this);\n }\n set displayName(value) {\n setText(0, value, this);\n }\n /**\n * If you want a shorter version of `displayName` (just naming this node, without its surrounding\n * scope), chop off this many characters from the beginning of `displayName`.\n *\n */\n get displayNamePrefixLength() {\n return getUint32(8, this);\n }\n set displayNamePrefixLength(value) {\n setUint32(8, value, this);\n }\n /**\n * ID of the lexical parent node. Typically, the scope node will have a NestedNode pointing back\n * at this node, but robust code should avoid relying on this (and, in fact, group nodes are not\n * listed in the outer struct's nestedNodes, since they are listed in the fields). `scopeId` is\n * zero if the node has no parent, which is normally only the case with files, but should be\n * allowed for any kind of node (in order to make runtime type generation easier).\n *\n */\n get scopeId() {\n return getUint64(16, this);\n }\n set scopeId(value) {\n setUint64(16, value, this);\n }\n _adoptParameters(value) {\n adopt(value, getPointer(5, this));\n }\n _disownParameters() {\n return disown(this.parameters);\n }\n /**\n * If this node is parameterized (generic), the list of parameters. Empty for non-generic types.\n *\n */\n get parameters() {\n return getList(5, Node._Parameters, this);\n }\n _hasParameters() {\n return !isNull(getPointer(5, this));\n }\n _initParameters(length) {\n return initList(5, Node._Parameters, length, this);\n }\n set parameters(value) {\n copyFrom(value, getPointer(5, this));\n }\n /**\n * True if this node is generic, meaning that it or one of its parent scopes has a non-empty\n * `parameters`.\n *\n */\n get isGeneric() {\n return getBit(288, this);\n }\n set isGeneric(value) {\n setBit(288, value, this);\n }\n _adoptNestedNodes(value) {\n adopt(value, getPointer(1, this));\n }\n _disownNestedNodes() {\n return disown(this.nestedNodes);\n }\n /**\n * List of nodes nested within this node, along with the names under which they were declared.\n *\n */\n get nestedNodes() {\n return getList(1, Node._NestedNodes, this);\n }\n _hasNestedNodes() {\n return !isNull(getPointer(1, this));\n }\n _initNestedNodes(length) {\n return initList(1, Node._NestedNodes, length, this);\n }\n set nestedNodes(value) {\n copyFrom(value, getPointer(1, this));\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(2, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n /**\n * Annotations applied to this node.\n *\n */\n get annotations() {\n return getList(2, Node._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(2, this));\n }\n _initAnnotations(length) {\n return initList(2, Node._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(2, this));\n }\n get _isFile() {\n return getUint16(12, this) === 0;\n }\n set file(_) {\n setUint16(12, 0, this);\n }\n get struct() {\n testWhich(\"struct\", getUint16(12, this), 1, this);\n return getAs(Node_Struct, this);\n }\n _initStruct() {\n setUint16(12, 1, this);\n return getAs(Node_Struct, this);\n }\n get _isStruct() {\n return getUint16(12, this) === 1;\n }\n set struct(_) {\n setUint16(12, 1, this);\n }\n get enum() {\n testWhich(\"enum\", getUint16(12, this), 2, this);\n return getAs(Node_Enum, this);\n }\n _initEnum() {\n setUint16(12, 2, this);\n return getAs(Node_Enum, this);\n }\n get _isEnum() {\n return getUint16(12, this) === 2;\n }\n set enum(_) {\n setUint16(12, 2, this);\n }\n get interface() {\n testWhich(\"interface\", getUint16(12, this), 3, this);\n return getAs(Node_Interface, this);\n }\n _initInterface() {\n setUint16(12, 3, this);\n return getAs(Node_Interface, this);\n }\n get _isInterface() {\n return getUint16(12, this) === 3;\n }\n set interface(_) {\n setUint16(12, 3, this);\n }\n get const() {\n testWhich(\"const\", getUint16(12, this), 4, this);\n return getAs(Node_Const, this);\n }\n _initConst() {\n setUint16(12, 4, this);\n return getAs(Node_Const, this);\n }\n get _isConst() {\n return getUint16(12, this) === 4;\n }\n set const(_) {\n setUint16(12, 4, this);\n }\n get annotation() {\n testWhich(\"annotation\", getUint16(12, this), 5, this);\n return getAs(Node_Annotation, this);\n }\n _initAnnotation() {\n setUint16(12, 5, this);\n return getAs(Node_Annotation, this);\n }\n get _isAnnotation() {\n return getUint16(12, this) === 5;\n }\n set annotation(_) {\n setUint16(12, 5, this);\n }\n toString() {\n return \"Node_\" + super.toString();\n }\n which() {\n return getUint16(12, this);\n }\n}\nclass Field_Slot extends Struct {\n static _capnp = {\n displayName: \"slot\",\n id: \"c42305476bb4746f\",\n size: new ObjectSize(24, 4)\n };\n /**\n * Offset, in units of the field's size, from the beginning of the section in which the field\n * resides. E.g. for a UInt32 field, multiply this by 4 to get the byte offset from the\n * beginning of the data section.\n *\n */\n get offset() {\n return getUint32(4, this);\n }\n set offset(value) {\n setUint32(4, value, this);\n }\n _adoptType(value) {\n adopt(value, getPointer(2, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n return getStruct(2, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(2, this));\n }\n _initType() {\n return initStructAt(2, Type, this);\n }\n set type(value) {\n copyFrom(value, getPointer(2, this));\n }\n _adoptDefaultValue(value) {\n adopt(value, getPointer(3, this));\n }\n _disownDefaultValue() {\n return disown(this.defaultValue);\n }\n get defaultValue() {\n return getStruct(3, Value, this);\n }\n _hasDefaultValue() {\n return !isNull(getPointer(3, this));\n }\n _initDefaultValue() {\n return initStructAt(3, Value, this);\n }\n set defaultValue(value) {\n copyFrom(value, getPointer(3, this));\n }\n /**\n * Whether the default value was specified explicitly. Non-explicit default values are always\n * zero or empty values. Usually, whether the default value was explicit shouldn't matter.\n * The main use case for this flag is for structs representing method parameters:\n * explicitly-defaulted parameters may be allowed to be omitted when calling the method.\n *\n */\n get hadExplicitDefault() {\n return getBit(128, this);\n }\n set hadExplicitDefault(value) {\n setBit(128, value, this);\n }\n toString() {\n return \"Field_Slot_\" + super.toString();\n }\n}\nclass Field_Group extends Struct {\n static _capnp = {\n displayName: \"group\",\n id: \"cafccddb68db1d11\",\n size: new ObjectSize(24, 4)\n };\n /**\n * The ID of the group's node.\n *\n */\n get typeId() {\n return getUint64(16, this);\n }\n set typeId(value) {\n setUint64(16, value, this);\n }\n toString() {\n return \"Field_Group_\" + super.toString();\n }\n}\nconst Field_Ordinal_Which = {\n IMPLICIT: 0,\n /**\n * The original ordinal number given to the field. You probably should NOT use this; if you need\n * a numeric identifier for a field, use its position within the field array for its scope.\n * The ordinal is given here mainly just so that the original schema text can be reproduced given\n * the compiled version -- i.e. so that `capnp compile -ocapnp` can do its job.\n *\n */\n EXPLICIT: 1\n};\nclass Field_Ordinal extends Struct {\n static IMPLICIT = Field_Ordinal_Which.IMPLICIT;\n static EXPLICIT = Field_Ordinal_Which.EXPLICIT;\n static _capnp = {\n displayName: \"ordinal\",\n id: \"bb90d5c287870be6\",\n size: new ObjectSize(24, 4)\n };\n get _isImplicit() {\n return getUint16(10, this) === 0;\n }\n set implicit(_) {\n setUint16(10, 0, this);\n }\n /**\n * The original ordinal number given to the field. You probably should NOT use this; if you need\n * a numeric identifier for a field, use its position within the field array for its scope.\n * The ordinal is given here mainly just so that the original schema text can be reproduced given\n * the compiled version -- i.e. so that `capnp compile -ocapnp` can do its job.\n *\n */\n get explicit() {\n testWhich(\"explicit\", getUint16(10, this), 1, this);\n return getUint16(12, this);\n }\n get _isExplicit() {\n return getUint16(10, this) === 1;\n }\n set explicit(value) {\n setUint16(10, 1, this);\n setUint16(12, value, this);\n }\n toString() {\n return \"Field_Ordinal_\" + super.toString();\n }\n which() {\n return getUint16(10, this);\n }\n}\nconst Field_Which = {\n SLOT: 0,\n /**\n * Indicates where this member appeared in the code, relative to other members.\n * Code ordering may have semantic relevance -- programmers tend to place related fields\n * together. So, using code ordering makes sense in human-readable formats where ordering is\n * otherwise irrelevant, like JSON. The values of codeOrder are tightly-packed, so the maximum\n * value is count(members) - 1. Fields that are members of a union are only ordered relative to\n * the other members of that union, so the maximum value there is count(union.members).\n *\n */\n GROUP: 1\n};\nclass Field extends Struct {\n static NO_DISCRIMINANT = 65535;\n static SLOT = Field_Which.SLOT;\n static GROUP = Field_Which.GROUP;\n static _capnp = {\n displayName: \"Field\",\n id: \"9aad50a41f4af45f\",\n size: new ObjectSize(24, 4),\n defaultDiscriminantValue: getUint16Mask(65535)\n };\n static _Annotations;\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * Indicates where this member appeared in the code, relative to other members.\n * Code ordering may have semantic relevance -- programmers tend to place related fields\n * together. So, using code ordering makes sense in human-readable formats where ordering is\n * otherwise irrelevant, like JSON. The values of codeOrder are tightly-packed, so the maximum\n * value is count(members) - 1. Fields that are members of a union are only ordered relative to\n * the other members of that union, so the maximum value there is count(union.members).\n *\n */\n get codeOrder() {\n return getUint16(0, this);\n }\n set codeOrder(value) {\n setUint16(0, value, this);\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(1, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n get annotations() {\n return getList(1, Field._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(1, this));\n }\n _initAnnotations(length) {\n return initList(1, Field._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(1, this));\n }\n /**\n * If the field is in a union, this is the value which the union's discriminant should take when\n * the field is active. If the field is not in a union, this is 0xffff.\n *\n */\n get discriminantValue() {\n return getUint16(2, this, Field._capnp.defaultDiscriminantValue);\n }\n set discriminantValue(value) {\n setUint16(2, value, this, Field._capnp.defaultDiscriminantValue);\n }\n /**\n * A regular, non-group, non-fixed-list field.\n *\n */\n get slot() {\n testWhich(\"slot\", getUint16(8, this), 0, this);\n return getAs(Field_Slot, this);\n }\n _initSlot() {\n setUint16(8, 0, this);\n return getAs(Field_Slot, this);\n }\n get _isSlot() {\n return getUint16(8, this) === 0;\n }\n set slot(_) {\n setUint16(8, 0, this);\n }\n /**\n * A group.\n *\n */\n get group() {\n testWhich(\"group\", getUint16(8, this), 1, this);\n return getAs(Field_Group, this);\n }\n _initGroup() {\n setUint16(8, 1, this);\n return getAs(Field_Group, this);\n }\n get _isGroup() {\n return getUint16(8, this) === 1;\n }\n set group(_) {\n setUint16(8, 1, this);\n }\n get ordinal() {\n return getAs(Field_Ordinal, this);\n }\n _initOrdinal() {\n return getAs(Field_Ordinal, this);\n }\n toString() {\n return \"Field_\" + super.toString();\n }\n which() {\n return getUint16(8, this);\n }\n}\nclass Enumerant extends Struct {\n static _capnp = {\n displayName: \"Enumerant\",\n id: \"978a7cebdc549a4d\",\n size: new ObjectSize(8, 2)\n };\n static _Annotations;\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * Specifies order in which the enumerants were declared in the code.\n * Like utils.Field.codeOrder.\n *\n */\n get codeOrder() {\n return getUint16(0, this);\n }\n set codeOrder(value) {\n setUint16(0, value, this);\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(1, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n get annotations() {\n return getList(1, Enumerant._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(1, this));\n }\n _initAnnotations(length) {\n return initList(1, Enumerant._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"Enumerant_\" + super.toString();\n }\n}\nclass Superclass extends Struct {\n static _capnp = {\n displayName: \"Superclass\",\n id: \"a9962a9ed0a4d7f8\",\n size: new ObjectSize(8, 1)\n };\n get id() {\n return getUint64(0, this);\n }\n set id(value) {\n setUint64(0, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Superclass_\" + super.toString();\n }\n}\nclass Method extends Struct {\n static _capnp = {\n displayName: \"Method\",\n id: \"9500cce23b334d80\",\n size: new ObjectSize(24, 5)\n };\n static _ImplicitParameters;\n static _Annotations;\n get name() {\n return getText(0, this);\n }\n set name(value) {\n setText(0, value, this);\n }\n /**\n * Specifies order in which the methods were declared in the code.\n * Like utils.Field.codeOrder.\n *\n */\n get codeOrder() {\n return getUint16(0, this);\n }\n set codeOrder(value) {\n setUint16(0, value, this);\n }\n _adoptImplicitParameters(value) {\n adopt(value, getPointer(4, this));\n }\n _disownImplicitParameters() {\n return disown(this.implicitParameters);\n }\n /**\n * The parameters listed in [] (typically, type / generic parameters), whose bindings are intended\n * to be inferred rather than specified explicitly, although not all languages support this.\n *\n */\n get implicitParameters() {\n return getList(4, Method._ImplicitParameters, this);\n }\n _hasImplicitParameters() {\n return !isNull(getPointer(4, this));\n }\n _initImplicitParameters(length) {\n return initList(4, Method._ImplicitParameters, length, this);\n }\n set implicitParameters(value) {\n copyFrom(value, getPointer(4, this));\n }\n /**\n * ID of the parameter struct type. If a named parameter list was specified in the method\n * declaration (rather than a single struct parameter type) then a corresponding struct type is\n * auto-generated. Such an auto-generated type will not be listed in the interface's\n * `nestedNodes` and its `scopeId` will be zero -- it is completely detached from the namespace.\n * (Awkwardly, it does of course inherit generic parameters from the method's scope, which makes\n * this a situation where you can't just climb the scope chain to find where a particular\n * generic parameter was introduced. Making the `scopeId` zero was a mistake.)\n *\n */\n get paramStructType() {\n return getUint64(8, this);\n }\n set paramStructType(value) {\n setUint64(8, value, this);\n }\n _adoptParamBrand(value) {\n adopt(value, getPointer(2, this));\n }\n _disownParamBrand() {\n return disown(this.paramBrand);\n }\n /**\n * Brand of param struct type.\n *\n */\n get paramBrand() {\n return getStruct(2, Brand, this);\n }\n _hasParamBrand() {\n return !isNull(getPointer(2, this));\n }\n _initParamBrand() {\n return initStructAt(2, Brand, this);\n }\n set paramBrand(value) {\n copyFrom(value, getPointer(2, this));\n }\n /**\n * ID of the return struct type; similar to `paramStructType`.\n *\n */\n get resultStructType() {\n return getUint64(16, this);\n }\n set resultStructType(value) {\n setUint64(16, value, this);\n }\n _adoptResultBrand(value) {\n adopt(value, getPointer(3, this));\n }\n _disownResultBrand() {\n return disown(this.resultBrand);\n }\n /**\n * Brand of result struct type.\n *\n */\n get resultBrand() {\n return getStruct(3, Brand, this);\n }\n _hasResultBrand() {\n return !isNull(getPointer(3, this));\n }\n _initResultBrand() {\n return initStructAt(3, Brand, this);\n }\n set resultBrand(value) {\n copyFrom(value, getPointer(3, this));\n }\n _adoptAnnotations(value) {\n adopt(value, getPointer(1, this));\n }\n _disownAnnotations() {\n return disown(this.annotations);\n }\n get annotations() {\n return getList(1, Method._Annotations, this);\n }\n _hasAnnotations() {\n return !isNull(getPointer(1, this));\n }\n _initAnnotations(length) {\n return initList(1, Method._Annotations, length, this);\n }\n set annotations(value) {\n copyFrom(value, getPointer(1, this));\n }\n toString() {\n return \"Method_\" + super.toString();\n }\n}\nclass Type_List extends Struct {\n static _capnp = {\n displayName: \"list\",\n id: \"87e739250a60ea97\",\n size: new ObjectSize(24, 1)\n };\n _adoptElementType(value) {\n adopt(value, getPointer(0, this));\n }\n _disownElementType() {\n return disown(this.elementType);\n }\n get elementType() {\n return getStruct(0, Type, this);\n }\n _hasElementType() {\n return !isNull(getPointer(0, this));\n }\n _initElementType() {\n return initStructAt(0, Type, this);\n }\n set elementType(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_List_\" + super.toString();\n }\n}\nclass Type_Enum extends Struct {\n static _capnp = {\n displayName: \"enum\",\n id: \"9e0e78711a7f87a9\",\n size: new ObjectSize(24, 1)\n };\n get typeId() {\n return getUint64(8, this);\n }\n set typeId(value) {\n setUint64(8, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_Enum_\" + super.toString();\n }\n}\nclass Type_Struct extends Struct {\n static _capnp = {\n displayName: \"struct\",\n id: \"ac3a6f60ef4cc6d3\",\n size: new ObjectSize(24, 1)\n };\n get typeId() {\n return getUint64(8, this);\n }\n set typeId(value) {\n setUint64(8, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_Struct_\" + super.toString();\n }\n}\nclass Type_Interface extends Struct {\n static _capnp = {\n displayName: \"interface\",\n id: \"ed8bca69f7fb0cbf\",\n size: new ObjectSize(24, 1)\n };\n get typeId() {\n return getUint64(8, this);\n }\n set typeId(value) {\n setUint64(8, value, this);\n }\n _adoptBrand(value) {\n adopt(value, getPointer(0, this));\n }\n _disownBrand() {\n return disown(this.brand);\n }\n get brand() {\n return getStruct(0, Brand, this);\n }\n _hasBrand() {\n return !isNull(getPointer(0, this));\n }\n _initBrand() {\n return initStructAt(0, Brand, this);\n }\n set brand(value) {\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Type_Interface_\" + super.toString();\n }\n}\nconst Type_AnyPointer_Unconstrained_Which = {\n /**\n * truly AnyPointer\n *\n */\n ANY_KIND: 0,\n /**\n * AnyStruct\n *\n */\n STRUCT: 1,\n /**\n * AnyList\n *\n */\n LIST: 2,\n /**\n * Capability\n *\n */\n CAPABILITY: 3\n};\nclass Type_AnyPointer_Unconstrained extends Struct {\n static ANY_KIND = Type_AnyPointer_Unconstrained_Which.ANY_KIND;\n static STRUCT = Type_AnyPointer_Unconstrained_Which.STRUCT;\n static LIST = Type_AnyPointer_Unconstrained_Which.LIST;\n static CAPABILITY = Type_AnyPointer_Unconstrained_Which.CAPABILITY;\n static _capnp = {\n displayName: \"unconstrained\",\n id: \"8e3b5f79fe593656\",\n size: new ObjectSize(24, 1)\n };\n get _isAnyKind() {\n return getUint16(10, this) === 0;\n }\n set anyKind(_) {\n setUint16(10, 0, this);\n }\n get _isStruct() {\n return getUint16(10, this) === 1;\n }\n set struct(_) {\n setUint16(10, 1, this);\n }\n get _isList() {\n return getUint16(10, this) === 2;\n }\n set list(_) {\n setUint16(10, 2, this);\n }\n get _isCapability() {\n return getUint16(10, this) === 3;\n }\n set capability(_) {\n setUint16(10, 3, this);\n }\n toString() {\n return \"Type_AnyPointer_Unconstrained_\" + super.toString();\n }\n which() {\n return getUint16(10, this);\n }\n}\nclass Type_AnyPointer_Parameter extends Struct {\n static _capnp = {\n displayName: \"parameter\",\n id: \"9dd1f724f4614a85\",\n size: new ObjectSize(24, 1)\n };\n /**\n * ID of the generic type whose parameter we're referencing. This should be a parent of the\n * current scope.\n *\n */\n get scopeId() {\n return getUint64(16, this);\n }\n set scopeId(value) {\n setUint64(16, value, this);\n }\n /**\n * Index of the parameter within the generic type's parameter list.\n *\n */\n get parameterIndex() {\n return getUint16(10, this);\n }\n set parameterIndex(value) {\n setUint16(10, value, this);\n }\n toString() {\n return \"Type_AnyPointer_Parameter_\" + super.toString();\n }\n}\nclass Type_AnyPointer_ImplicitMethodParameter extends Struct {\n static _capnp = {\n displayName: \"implicitMethodParameter\",\n id: \"baefc9120c56e274\",\n size: new ObjectSize(24, 1)\n };\n get parameterIndex() {\n return getUint16(10, this);\n }\n set parameterIndex(value) {\n setUint16(10, value, this);\n }\n toString() {\n return \"Type_AnyPointer_ImplicitMethodParameter_\" + super.toString();\n }\n}\nconst Type_AnyPointer_Which = {\n /**\n * A regular AnyPointer.\n *\n * The name \"unconstrained\" means as opposed to constraining it to match a type parameter.\n * In retrospect this name is probably a poor choice given that it may still be constrained\n * to be a struct, list, or capability.\n *\n */\n UNCONSTRAINED: 0,\n /**\n * This is actually a reference to a type parameter defined within this scope.\n *\n */\n PARAMETER: 1,\n /**\n * This is actually a reference to an implicit (generic) parameter of a method. The only\n * legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.\n *\n */\n IMPLICIT_METHOD_PARAMETER: 2\n};\nclass Type_AnyPointer extends Struct {\n static UNCONSTRAINED = Type_AnyPointer_Which.UNCONSTRAINED;\n static PARAMETER = Type_AnyPointer_Which.PARAMETER;\n static IMPLICIT_METHOD_PARAMETER = Type_AnyPointer_Which.IMPLICIT_METHOD_PARAMETER;\n static _capnp = {\n displayName: \"anyPointer\",\n id: \"c2573fe8a23e49f1\",\n size: new ObjectSize(24, 1)\n };\n /**\n * A regular AnyPointer.\n *\n * The name \"unconstrained\" means as opposed to constraining it to match a type parameter.\n * In retrospect this name is probably a poor choice given that it may still be constrained\n * to be a struct, list, or capability.\n *\n */\n get unconstrained() {\n testWhich(\"unconstrained\", getUint16(8, this), 0, this);\n return getAs(Type_AnyPointer_Unconstrained, this);\n }\n _initUnconstrained() {\n setUint16(8, 0, this);\n return getAs(Type_AnyPointer_Unconstrained, this);\n }\n get _isUnconstrained() {\n return getUint16(8, this) === 0;\n }\n set unconstrained(_) {\n setUint16(8, 0, this);\n }\n /**\n * This is actually a reference to a type parameter defined within this scope.\n *\n */\n get parameter() {\n testWhich(\"parameter\", getUint16(8, this), 1, this);\n return getAs(Type_AnyPointer_Parameter, this);\n }\n _initParameter() {\n setUint16(8, 1, this);\n return getAs(Type_AnyPointer_Parameter, this);\n }\n get _isParameter() {\n return getUint16(8, this) === 1;\n }\n set parameter(_) {\n setUint16(8, 1, this);\n }\n /**\n * This is actually a reference to an implicit (generic) parameter of a method. The only\n * legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.\n *\n */\n get implicitMethodParameter() {\n testWhich(\"implicitMethodParameter\", getUint16(8, this), 2, this);\n return getAs(Type_AnyPointer_ImplicitMethodParameter, this);\n }\n _initImplicitMethodParameter() {\n setUint16(8, 2, this);\n return getAs(Type_AnyPointer_ImplicitMethodParameter, this);\n }\n get _isImplicitMethodParameter() {\n return getUint16(8, this) === 2;\n }\n set implicitMethodParameter(_) {\n setUint16(8, 2, this);\n }\n toString() {\n return \"Type_AnyPointer_\" + super.toString();\n }\n which() {\n return getUint16(8, this);\n }\n}\nconst Type_Which = {\n VOID: 0,\n BOOL: 1,\n INT8: 2,\n INT16: 3,\n INT32: 4,\n INT64: 5,\n UINT8: 6,\n UINT16: 7,\n UINT32: 8,\n UINT64: 9,\n FLOAT32: 10,\n FLOAT64: 11,\n TEXT: 12,\n DATA: 13,\n LIST: 14,\n ENUM: 15,\n STRUCT: 16,\n INTERFACE: 17,\n ANY_POINTER: 18\n};\nclass Type extends Struct {\n static VOID = Type_Which.VOID;\n static BOOL = Type_Which.BOOL;\n static INT8 = Type_Which.INT8;\n static INT16 = Type_Which.INT16;\n static INT32 = Type_Which.INT32;\n static INT64 = Type_Which.INT64;\n static UINT8 = Type_Which.UINT8;\n static UINT16 = Type_Which.UINT16;\n static UINT32 = Type_Which.UINT32;\n static UINT64 = Type_Which.UINT64;\n static FLOAT32 = Type_Which.FLOAT32;\n static FLOAT64 = Type_Which.FLOAT64;\n static TEXT = Type_Which.TEXT;\n static DATA = Type_Which.DATA;\n static LIST = Type_Which.LIST;\n static ENUM = Type_Which.ENUM;\n static STRUCT = Type_Which.STRUCT;\n static INTERFACE = Type_Which.INTERFACE;\n static ANY_POINTER = Type_Which.ANY_POINTER;\n static _capnp = {\n displayName: \"Type\",\n id: \"d07378ede1f9cc60\",\n size: new ObjectSize(24, 1)\n };\n get _isVoid() {\n return getUint16(0, this) === 0;\n }\n set void(_) {\n setUint16(0, 0, this);\n }\n get _isBool() {\n return getUint16(0, this) === 1;\n }\n set bool(_) {\n setUint16(0, 1, this);\n }\n get _isInt8() {\n return getUint16(0, this) === 2;\n }\n set int8(_) {\n setUint16(0, 2, this);\n }\n get _isInt16() {\n return getUint16(0, this) === 3;\n }\n set int16(_) {\n setUint16(0, 3, this);\n }\n get _isInt32() {\n return getUint16(0, this) === 4;\n }\n set int32(_) {\n setUint16(0, 4, this);\n }\n get _isInt64() {\n return getUint16(0, this) === 5;\n }\n set int64(_) {\n setUint16(0, 5, this);\n }\n get _isUint8() {\n return getUint16(0, this) === 6;\n }\n set uint8(_) {\n setUint16(0, 6, this);\n }\n get _isUint16() {\n return getUint16(0, this) === 7;\n }\n set uint16(_) {\n setUint16(0, 7, this);\n }\n get _isUint32() {\n return getUint16(0, this) === 8;\n }\n set uint32(_) {\n setUint16(0, 8, this);\n }\n get _isUint64() {\n return getUint16(0, this) === 9;\n }\n set uint64(_) {\n setUint16(0, 9, this);\n }\n get _isFloat32() {\n return getUint16(0, this) === 10;\n }\n set float32(_) {\n setUint16(0, 10, this);\n }\n get _isFloat64() {\n return getUint16(0, this) === 11;\n }\n set float64(_) {\n setUint16(0, 11, this);\n }\n get _isText() {\n return getUint16(0, this) === 12;\n }\n set text(_) {\n setUint16(0, 12, this);\n }\n get _isData() {\n return getUint16(0, this) === 13;\n }\n set data(_) {\n setUint16(0, 13, this);\n }\n get list() {\n testWhich(\"list\", getUint16(0, this), 14, this);\n return getAs(Type_List, this);\n }\n _initList() {\n setUint16(0, 14, this);\n return getAs(Type_List, this);\n }\n get _isList() {\n return getUint16(0, this) === 14;\n }\n set list(_) {\n setUint16(0, 14, this);\n }\n get enum() {\n testWhich(\"enum\", getUint16(0, this), 15, this);\n return getAs(Type_Enum, this);\n }\n _initEnum() {\n setUint16(0, 15, this);\n return getAs(Type_Enum, this);\n }\n get _isEnum() {\n return getUint16(0, this) === 15;\n }\n set enum(_) {\n setUint16(0, 15, this);\n }\n get struct() {\n testWhich(\"struct\", getUint16(0, this), 16, this);\n return getAs(Type_Struct, this);\n }\n _initStruct() {\n setUint16(0, 16, this);\n return getAs(Type_Struct, this);\n }\n get _isStruct() {\n return getUint16(0, this) === 16;\n }\n set struct(_) {\n setUint16(0, 16, this);\n }\n get interface() {\n testWhich(\"interface\", getUint16(0, this), 17, this);\n return getAs(Type_Interface, this);\n }\n _initInterface() {\n setUint16(0, 17, this);\n return getAs(Type_Interface, this);\n }\n get _isInterface() {\n return getUint16(0, this) === 17;\n }\n set interface(_) {\n setUint16(0, 17, this);\n }\n get anyPointer() {\n testWhich(\"anyPointer\", getUint16(0, this), 18, this);\n return getAs(Type_AnyPointer, this);\n }\n _initAnyPointer() {\n setUint16(0, 18, this);\n return getAs(Type_AnyPointer, this);\n }\n get _isAnyPointer() {\n return getUint16(0, this) === 18;\n }\n set anyPointer(_) {\n setUint16(0, 18, this);\n }\n toString() {\n return \"Type_\" + super.toString();\n }\n which() {\n return getUint16(0, this);\n }\n}\nconst Brand_Scope_Which = {\n /**\n * ID of the scope to which these params apply.\n *\n */\n BIND: 0,\n /**\n * List of parameter bindings.\n *\n */\n INHERIT: 1\n};\nclass Brand_Scope extends Struct {\n static BIND = Brand_Scope_Which.BIND;\n static INHERIT = Brand_Scope_Which.INHERIT;\n static _capnp = {\n displayName: \"Scope\",\n id: \"abd73485a9636bc9\",\n size: new ObjectSize(16, 1)\n };\n static _Bind;\n /**\n * ID of the scope to which these params apply.\n *\n */\n get scopeId() {\n return getUint64(0, this);\n }\n set scopeId(value) {\n setUint64(0, value, this);\n }\n _adoptBind(value) {\n setUint16(8, 0, this);\n adopt(value, getPointer(0, this));\n }\n _disownBind() {\n return disown(this.bind);\n }\n /**\n * List of parameter bindings.\n *\n */\n get bind() {\n testWhich(\"bind\", getUint16(8, this), 0, this);\n return getList(0, Brand_Scope._Bind, this);\n }\n _hasBind() {\n return !isNull(getPointer(0, this));\n }\n _initBind(length) {\n setUint16(8, 0, this);\n return initList(0, Brand_Scope._Bind, length, this);\n }\n get _isBind() {\n return getUint16(8, this) === 0;\n }\n set bind(value) {\n setUint16(8, 0, this);\n copyFrom(value, getPointer(0, this));\n }\n get _isInherit() {\n return getUint16(8, this) === 1;\n }\n set inherit(_) {\n setUint16(8, 1, this);\n }\n toString() {\n return \"Brand_Scope_\" + super.toString();\n }\n which() {\n return getUint16(8, this);\n }\n}\nconst Brand_Binding_Which = {\n UNBOUND: 0,\n TYPE: 1\n};\nclass Brand_Binding extends Struct {\n static UNBOUND = Brand_Binding_Which.UNBOUND;\n static TYPE = Brand_Binding_Which.TYPE;\n static _capnp = {\n displayName: \"Binding\",\n id: \"c863cd16969ee7fc\",\n size: new ObjectSize(8, 1)\n };\n get _isUnbound() {\n return getUint16(0, this) === 0;\n }\n set unbound(_) {\n setUint16(0, 0, this);\n }\n _adoptType(value) {\n setUint16(0, 1, this);\n adopt(value, getPointer(0, this));\n }\n _disownType() {\n return disown(this.type);\n }\n get type() {\n testWhich(\"type\", getUint16(0, this), 1, this);\n return getStruct(0, Type, this);\n }\n _hasType() {\n return !isNull(getPointer(0, this));\n }\n _initType() {\n setUint16(0, 1, this);\n return initStructAt(0, Type, this);\n }\n get _isType() {\n return getUint16(0, this) === 1;\n }\n set type(value) {\n setUint16(0, 1, this);\n copyFrom(value, getPointer(0, this));\n }\n toString() {\n return \"Brand_Binding_\" + super.toString();\n }\n which() {\n return getUint16(0, this);\n }\n}\nclass Brand extends Struct {\n static Scope = Brand_Scope;\n static Binding = Brand_Binding;\n static _capnp = {\n displayName: \"Brand\",\n id: \"903455f06065422b\",\n size: new ObjectSize(0, 1)\n };\n static _Scopes;\n _adoptScopes(value) {\n adopt(value, getPointer(0, this));\n }\n _disownScopes() {\n return disown(this.scopes);\n }\n /**\n * For each of the target type and each of its parent scopes, a parameterization may be included\n * in this list. If no parameterization is included for a particular relevant scope, then either\n * that scope has no parameters or all parameters should be considered to be `AnyPointer`.\n *\n */\n get scopes() {\n retu