Files

7980 lines
278 KiB
TypeScript

// This file has been automatically generated by zap-es.
import * as $ from "zap-es";
export const _zapFileId = 0xd508eebdc2dc42b8n;
export const TestEnum = {
/**
* foo
*
*/
FOO: 0,
/**
* garply
*
*/
GARPLY: 7,
/**
* bar
*
*/
BAR: 1,
BAZ: 2,
QUX: 3,
QUUX: 4,
CORGE: 5,
GRAULT: 6
} as const;
export type TestEnum = (typeof TestEnum)[keyof typeof TestEnum];
export class TestAllTypes extends $.Struct {
static readonly _zap = {
displayName: "TestAllTypes",
id: "a0a8f314b80b63fd",
size: new $.ObjectSize(48, 20),
};
static _StructList: $.ListCtor<TestAllTypes>;
get boolField(): boolean {
return $.utils.getBit(0, this);
}
set boolField(value: boolean) {
$.utils.setBit(0, value, this);
}
get int8Field(): number {
return $.utils.getInt8(1, this);
}
set int8Field(value: number) {
$.utils.setInt8(1, value, this);
}
get int16Field(): number {
return $.utils.getInt16(2, this);
}
set int16Field(value: number) {
$.utils.setInt16(2, value, this);
}
get int32Field(): number {
return $.utils.getInt32(4, this);
}
set int32Field(value: number) {
$.utils.setInt32(4, value, this);
}
get int64Field(): bigint {
return $.utils.getInt64(8, this);
}
set int64Field(value: bigint) {
$.utils.setInt64(8, value, this);
}
get uInt8Field(): number {
return $.utils.getUint8(16, this);
}
set uInt8Field(value: number) {
$.utils.setUint8(16, value, this);
}
get uInt16Field(): number {
return $.utils.getUint16(18, this);
}
set uInt16Field(value: number) {
$.utils.setUint16(18, value, this);
}
get uInt32Field(): number {
return $.utils.getUint32(20, this);
}
set uInt32Field(value: number) {
$.utils.setUint32(20, value, this);
}
get uInt64Field(): bigint {
return $.utils.getUint64(24, this);
}
set uInt64Field(value: bigint) {
$.utils.setUint64(24, value, this);
}
get float32Field(): number {
return $.utils.getFloat32(32, this);
}
set float32Field(value: number) {
$.utils.setFloat32(32, value, this);
}
get float64Field(): number {
return $.utils.getFloat64(40, this);
}
set float64Field(value: number) {
$.utils.setFloat64(40, value, this);
}
get textField(): string {
return $.utils.getText(0, this);
}
set textField(value: string) {
$.utils.setText(0, value, this);
}
_adoptDataField(value: $.Orphan<$.Data>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownDataField(): $.Orphan<$.Data> {
return $.utils.disown(this.dataField);
}
get dataField(): $.Data {
return $.utils.getData(1, this);
}
_hasDataField(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initDataField(length: number): $.Data {
return $.utils.initData(1, length, this);
}
set dataField(value: $.Data) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptStructField(value: $.Orphan<TestAllTypes>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownStructField(): $.Orphan<TestAllTypes> {
return $.utils.disown(this.structField);
}
get structField(): TestAllTypes {
return $.utils.getStruct(2, TestAllTypes, this);
}
_hasStructField(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
_initStructField(): TestAllTypes {
return $.utils.initStructAt(2, TestAllTypes, this);
}
set structField(value: TestAllTypes) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
get enumField(): TestEnum {
return $.utils.getUint16(36, this) as TestEnum;
}
set enumField(value: TestEnum) {
$.utils.setUint16(36, value, this);
}
_adoptVoidList(value: $.Orphan<$.List<$.Void>>): void {
$.utils.adopt(value, $.utils.getPointer(3, this));
}
_disownVoidList(): $.Orphan<$.List<$.Void>> {
return $.utils.disown(this.voidList);
}
get voidList(): $.List<$.Void> {
return $.utils.getList(3, $.VoidList, this);
}
_hasVoidList(): boolean {
return !$.utils.isNull($.utils.getPointer(3, this));
}
_initVoidList(length: number): $.List<$.Void> {
return $.utils.initList(3, $.VoidList, length, this);
}
set voidList(value: $.List<$.Void>) {
$.utils.copyFrom(value, $.utils.getPointer(3, this));
}
_adoptBoolList(value: $.Orphan<$.List<boolean>>): void {
$.utils.adopt(value, $.utils.getPointer(4, this));
}
_disownBoolList(): $.Orphan<$.List<boolean>> {
return $.utils.disown(this.boolList);
}
get boolList(): $.List<boolean> {
return $.utils.getList(4, $.BoolList, this);
}
_hasBoolList(): boolean {
return !$.utils.isNull($.utils.getPointer(4, this));
}
_initBoolList(length: number): $.List<boolean> {
return $.utils.initList(4, $.BoolList, length, this);
}
set boolList(value: $.List<boolean>) {
$.utils.copyFrom(value, $.utils.getPointer(4, this));
}
_adoptInt8List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(5, this));
}
_disownInt8List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.int8List);
}
get int8List(): $.List<number> {
return $.utils.getList(5, $.Int8List, this);
}
_hasInt8List(): boolean {
return !$.utils.isNull($.utils.getPointer(5, this));
}
_initInt8List(length: number): $.List<number> {
return $.utils.initList(5, $.Int8List, length, this);
}
set int8List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(5, this));
}
_adoptInt16List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(6, this));
}
_disownInt16List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.int16List);
}
get int16List(): $.List<number> {
return $.utils.getList(6, $.Int16List, this);
}
_hasInt16List(): boolean {
return !$.utils.isNull($.utils.getPointer(6, this));
}
_initInt16List(length: number): $.List<number> {
return $.utils.initList(6, $.Int16List, length, this);
}
set int16List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(6, this));
}
_adoptInt32List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(7, this));
}
_disownInt32List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.int32List);
}
get int32List(): $.List<number> {
return $.utils.getList(7, $.Int32List, this);
}
_hasInt32List(): boolean {
return !$.utils.isNull($.utils.getPointer(7, this));
}
_initInt32List(length: number): $.List<number> {
return $.utils.initList(7, $.Int32List, length, this);
}
set int32List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(7, this));
}
_adoptInt64List(value: $.Orphan<$.List<bigint>>): void {
$.utils.adopt(value, $.utils.getPointer(8, this));
}
_disownInt64List(): $.Orphan<$.List<bigint>> {
return $.utils.disown(this.int64List);
}
get int64List(): $.List<bigint> {
return $.utils.getList(8, $.Int64List, this);
}
_hasInt64List(): boolean {
return !$.utils.isNull($.utils.getPointer(8, this));
}
_initInt64List(length: number): $.List<bigint> {
return $.utils.initList(8, $.Int64List, length, this);
}
set int64List(value: $.List<bigint>) {
$.utils.copyFrom(value, $.utils.getPointer(8, this));
}
_adoptUInt8List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(9, this));
}
_disownUInt8List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.uInt8List);
}
get uInt8List(): $.List<number> {
return $.utils.getList(9, $.Uint8List, this);
}
_hasUInt8List(): boolean {
return !$.utils.isNull($.utils.getPointer(9, this));
}
_initUInt8List(length: number): $.List<number> {
return $.utils.initList(9, $.Uint8List, length, this);
}
set uInt8List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(9, this));
}
_adoptUInt16List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(10, this));
}
_disownUInt16List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.uInt16List);
}
get uInt16List(): $.List<number> {
return $.utils.getList(10, $.Uint16List, this);
}
_hasUInt16List(): boolean {
return !$.utils.isNull($.utils.getPointer(10, this));
}
_initUInt16List(length: number): $.List<number> {
return $.utils.initList(10, $.Uint16List, length, this);
}
set uInt16List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(10, this));
}
_adoptUInt32List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(11, this));
}
_disownUInt32List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.uInt32List);
}
get uInt32List(): $.List<number> {
return $.utils.getList(11, $.Uint32List, this);
}
_hasUInt32List(): boolean {
return !$.utils.isNull($.utils.getPointer(11, this));
}
_initUInt32List(length: number): $.List<number> {
return $.utils.initList(11, $.Uint32List, length, this);
}
set uInt32List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(11, this));
}
_adoptUInt64List(value: $.Orphan<$.List<bigint>>): void {
$.utils.adopt(value, $.utils.getPointer(12, this));
}
_disownUInt64List(): $.Orphan<$.List<bigint>> {
return $.utils.disown(this.uInt64List);
}
get uInt64List(): $.List<bigint> {
return $.utils.getList(12, $.Uint64List, this);
}
_hasUInt64List(): boolean {
return !$.utils.isNull($.utils.getPointer(12, this));
}
_initUInt64List(length: number): $.List<bigint> {
return $.utils.initList(12, $.Uint64List, length, this);
}
set uInt64List(value: $.List<bigint>) {
$.utils.copyFrom(value, $.utils.getPointer(12, this));
}
_adoptFloat32List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(13, this));
}
_disownFloat32List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.float32List);
}
get float32List(): $.List<number> {
return $.utils.getList(13, $.Float32List, this);
}
_hasFloat32List(): boolean {
return !$.utils.isNull($.utils.getPointer(13, this));
}
_initFloat32List(length: number): $.List<number> {
return $.utils.initList(13, $.Float32List, length, this);
}
set float32List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(13, this));
}
_adoptFloat64List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(14, this));
}
_disownFloat64List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.float64List);
}
get float64List(): $.List<number> {
return $.utils.getList(14, $.Float64List, this);
}
_hasFloat64List(): boolean {
return !$.utils.isNull($.utils.getPointer(14, this));
}
_initFloat64List(length: number): $.List<number> {
return $.utils.initList(14, $.Float64List, length, this);
}
set float64List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(14, this));
}
_adoptTextList(value: $.Orphan<$.List<string>>): void {
$.utils.adopt(value, $.utils.getPointer(15, this));
}
_disownTextList(): $.Orphan<$.List<string>> {
return $.utils.disown(this.textList);
}
get textList(): $.List<string> {
return $.utils.getList(15, $.TextList, this);
}
_hasTextList(): boolean {
return !$.utils.isNull($.utils.getPointer(15, this));
}
_initTextList(length: number): $.List<string> {
return $.utils.initList(15, $.TextList, length, this);
}
set textList(value: $.List<string>) {
$.utils.copyFrom(value, $.utils.getPointer(15, this));
}
_adoptDataList(value: $.Orphan<$.List<$.Data>>): void {
$.utils.adopt(value, $.utils.getPointer(16, this));
}
_disownDataList(): $.Orphan<$.List<$.Data>> {
return $.utils.disown(this.dataList);
}
get dataList(): $.List<$.Data> {
return $.utils.getList(16, $.DataList, this);
}
_hasDataList(): boolean {
return !$.utils.isNull($.utils.getPointer(16, this));
}
_initDataList(length: number): $.List<$.Data> {
return $.utils.initList(16, $.DataList, length, this);
}
set dataList(value: $.List<$.Data>) {
$.utils.copyFrom(value, $.utils.getPointer(16, this));
}
_adoptStructList(value: $.Orphan<$.List<TestAllTypes>>): void {
$.utils.adopt(value, $.utils.getPointer(17, this));
}
_disownStructList(): $.Orphan<$.List<TestAllTypes>> {
return $.utils.disown(this.structList);
}
get structList(): $.List<TestAllTypes> {
return $.utils.getList(17, TestAllTypes._StructList, this);
}
_hasStructList(): boolean {
return !$.utils.isNull($.utils.getPointer(17, this));
}
_initStructList(length: number): $.List<TestAllTypes> {
return $.utils.initList(17, TestAllTypes._StructList, length, this);
}
set structList(value: $.List<TestAllTypes>) {
$.utils.copyFrom(value, $.utils.getPointer(17, this));
}
_adoptEnumList(value: $.Orphan<$.List<TestEnum>>): void {
$.utils.adopt(value, $.utils.getPointer(18, this));
}
_disownEnumList(): $.Orphan<$.List<TestEnum>> {
return $.utils.disown(this.enumList);
}
get enumList(): $.List<TestEnum> {
return $.utils.getList(18, $.Uint16List, this) as $.List<TestEnum>;
}
_hasEnumList(): boolean {
return !$.utils.isNull($.utils.getPointer(18, this));
}
_initEnumList(length: number): $.List<TestEnum> {
return $.utils.initList(18, $.Uint16List, length, this) as $.List<TestEnum>;
}
set enumList(value: $.List<TestEnum>) {
$.utils.copyFrom(value, $.utils.getPointer(18, this));
}
_adoptInterfaceList(value: $.Orphan<$.List<$.Void>>): void {
$.utils.adopt(value, $.utils.getPointer(19, this));
}
_disownInterfaceList(): $.Orphan<$.List<$.Void>> {
return $.utils.disown(this.interfaceList);
}
/**
* TODO
*
*/
get interfaceList(): $.List<$.Void> {
return $.utils.getList(19, $.VoidList, this);
}
_hasInterfaceList(): boolean {
return !$.utils.isNull($.utils.getPointer(19, this));
}
_initInterfaceList(length: number): $.List<$.Void> {
return $.utils.initList(19, $.VoidList, length, this);
}
set interfaceList(value: $.List<$.Void>) {
$.utils.copyFrom(value, $.utils.getPointer(19, this));
}
toString(): string { return "TestAllTypes_" + super.toString(); }
}
export class TestDefaults extends $.Struct {
static readonly _zap = {
displayName: "TestDefaults",
id: "eb3f9ebe98c73cb6",
size: new $.ObjectSize(48, 20),
defaultBoolField: $.getBitMask(true, 0),
defaultInt8Field: $.getInt8Mask(-123),
defaultInt16Field: $.getInt16Mask(-12345),
defaultInt32Field: $.getInt32Mask(-12345678),
defaultInt64Field: $.getInt64Mask(-0x7048860ddf79n),
defaultUInt8Field: $.getUint8Mask(234),
defaultUInt16Field: $.getUint16Mask(45678),
defaultUInt32Field: $.getUint32Mask(3456789012),
defaultUInt64Field: $.getUint64Mask(0xab54a98ceb1f0ad2n),
defaultFloat32Field: $.getFloat32Mask(1234.5),
defaultFloat64Field: $.getFloat64Mask(-1.23e+47),
defaultTextField: "foo",
defaultDataField: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 26, 7, 98, 97, 114]).buffer),
defaultStructField: $.readRawPointer(new Uint8Array([16, 208, 80, 6, 20, 255, 1, 244, 128, 13, 14, 16, 76, 251, 0, 63, 78, 115, 232, 56, 166, 51, 253, 90, 210, 4, 20, 136, 98, 3, 255, 210, 10, 111, 18, 33, 25, 204, 4, 0, 31, 95, 112, 9, 175, 2, 224, 144, 117, 64, 17, 77, 34, 17, 77, 26, 81, 76, 6, 20, 19, 37, 1, 24, 19, 33, 1, 41, 19, 33, 1, 34, 19, 33, 1, 35, 19, 33, 1, 36, 19, 37, 1, 37, 19, 49, 1, 34, 19, 49, 1, 35, 19, 49, 1, 36, 19, 53, 1, 37, 19, 65, 1, 52, 19, 73, 1, 53, 19, 93, 1, 30, 19, 113, 1, 30, 51, 133, 1, 119, 2, 19, 213, 2, 27, 0, 0, 7, 98, 97, 122, 7, 113, 117, 120, 0, 5, 17, 77, 58, 0, 0, 81, 72, 6, 20, 0, 16, 63, 110, 101, 115, 116, 101, 100, 0, 5, 17, 77, 114, 0, 18, 255, 114, 101, 97, 108, 108, 121, 32, 110, 0, 31, 101, 115, 116, 101, 100, 1, 26, 15, 12, 222, 128, 127, 239, 210, 4, 210, 233, 128, 255, 127, 247, 78, 97, 188, 64, 211, 160, 250, 248, 128, 255, 255, 255, 127, 63, 121, 223, 13, 134, 72, 112, 255, 46, 117, 19, 253, 138, 150, 253, 255, 0, 128, 128, 255, 255, 255, 255, 255, 255, 255, 255, 127, 0, 11, 12, 34, 255, 207, 210, 4, 46, 22, 255, 255, 247, 78, 97, 188, 192, 44, 95, 5, 240, 255, 255, 255, 255, 63, 121, 223, 13, 134, 72, 112, 127, 210, 138, 236, 2, 117, 105, 2, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 240, 56, 180, 150, 73, 255, 194, 189, 240, 124, 194, 189, 240, 252, 1, 234, 28, 8, 2, 234, 28, 8, 130, 0, 0, 255, 64, 222, 119, 131, 33, 18, 220, 66, 4, 41, 144, 35, 202, 229, 200, 118, 127, 41, 144, 35, 202, 229, 200, 118, 255, 145, 247, 80, 55, 158, 120, 102, 0, 145, 247, 80, 55, 158, 120, 102, 128, 17, 9, 42, 17, 9, 50, 17, 9, 58, 15, 113, 117, 117, 120, 31, 99, 111, 114, 103, 101, 63, 103, 114, 97, 117, 108, 116, 17, 9, 50, 17, 9, 42, 17, 9, 34, 63, 103, 97, 114, 112, 108, 121, 31, 119, 97, 108, 100, 111, 15, 102, 114, 101, 100, 81, 12, 6, 20, 0, 5, 19, 29, 1, 122, 0, 24, 17, 189, 122, 0, 24, 17, 93, 122, 0, 18, 255, 120, 32, 115, 116, 114, 117, 99, 116, 0, 63, 108, 105, 115, 116, 32, 49, 255, 120, 32, 115, 116, 114, 117, 99, 116, 0, 63, 108, 105, 115, 116, 32, 50, 255, 120, 32, 115, 116, 114, 117, 99, 116, 0, 63, 108, 105, 115, 116, 32, 51, 21, 3, 1, 6]).buffer),
defaultEnumField: $.getUint16Mask(5),
defaultVoidList: $.readRawPointer(new Uint8Array([16, 1, 17, 1, 48]).buffer),
defaultBoolList: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 33, 1, 9]).buffer),
defaultInt8List: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 18, 3, 111, 145]).buffer),
defaultInt16List: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 19, 15, 103, 43, 153, 212]).buffer),
defaultInt32List: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 20, 255, 199, 107, 159, 6, 57, 148, 96, 249, 0]).buffer),
defaultInt64List: $.readRawPointer(new Uint8Array([16, 3, 17, 1, 21, 255, 199, 113, 196, 43, 171, 117, 107, 15, 1, 57, 142, 59, 212, 84, 138, 148, 240]).buffer),
defaultUInt8List: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 18, 3, 111, 222]).buffer),
defaultUInt16List: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 19, 15, 53, 130, 156, 173]).buffer),
defaultUInt32List: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 12, 15, 85, 161, 174, 198]).buffer),
defaultUInt64List: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 13, 255, 199, 113, 172, 181, 175, 152, 50, 154, 0]).buffer),
defaultFloat32List: $.readRawPointer(new Uint8Array([16, 3, 17, 1, 36, 206, 156, 173, 69, 128, 127, 204, 128, 255, 192, 127]).buffer),
defaultFloat64List: $.readRawPointer(new Uint8Array([16, 5, 17, 1, 37, 240, 192, 97, 190, 64, 192, 240, 127, 192, 240, 255, 192, 248, 127]).buffer),
defaultTextList: $.readRawPointer(new Uint8Array([16, 7, 17, 1, 30, 17, 9, 50, 17, 9, 50, 17, 9, 42, 31, 112, 108, 117, 103, 104, 31, 120, 121, 122, 122, 121, 15, 116, 104, 117, 100]).buffer),
defaultDataList: $.readRawPointer(new Uint8Array([16, 8, 17, 1, 30, 17, 9, 34, 17, 9, 74, 17, 13, 58, 15, 111, 111, 112, 115, 255, 101, 120, 104, 97, 117, 115, 116, 101, 0, 1, 100, 127, 114, 102, 99, 51, 48, 57, 50]).buffer),
defaultStructList: $.readRawPointer(new Uint8Array([16, 86, 49, 1, 119, 2, 81, 12, 6, 20, 0, 5, 19, 29, 1, 106, 0, 24, 17, 189, 106, 0, 24, 17, 93, 106, 0, 18, 255, 115, 116, 114, 117, 99, 116, 108, 105, 0, 15, 115, 116, 32, 49, 255, 115, 116, 114, 117, 99, 116, 108, 105, 0, 15, 115, 116, 32, 50, 255, 115, 116, 114, 117, 99, 116, 108, 105, 0, 15, 115, 116, 32, 51]).buffer),
defaultEnumList: $.readRawPointer(new Uint8Array([16, 2, 17, 1, 19, 4, 7]).buffer)
};
static _StructList: $.ListCtor<TestAllTypes>;
get boolField(): boolean {
return $.utils.getBit(0, this, TestDefaults._zap.defaultBoolField);
}
set boolField(value: boolean) {
$.utils.setBit(0, value, this, TestDefaults._zap.defaultBoolField);
}
get int8Field(): number {
return $.utils.getInt8(1, this, TestDefaults._zap.defaultInt8Field);
}
set int8Field(value: number) {
$.utils.setInt8(1, value, this, TestDefaults._zap.defaultInt8Field);
}
get int16Field(): number {
return $.utils.getInt16(2, this, TestDefaults._zap.defaultInt16Field);
}
set int16Field(value: number) {
$.utils.setInt16(2, value, this, TestDefaults._zap.defaultInt16Field);
}
get int32Field(): number {
return $.utils.getInt32(4, this, TestDefaults._zap.defaultInt32Field);
}
set int32Field(value: number) {
$.utils.setInt32(4, value, this, TestDefaults._zap.defaultInt32Field);
}
get int64Field(): bigint {
return $.utils.getInt64(8, this, TestDefaults._zap.defaultInt64Field);
}
set int64Field(value: bigint) {
$.utils.setInt64(8, value, this, TestDefaults._zap.defaultInt64Field);
}
get uInt8Field(): number {
return $.utils.getUint8(16, this, TestDefaults._zap.defaultUInt8Field);
}
set uInt8Field(value: number) {
$.utils.setUint8(16, value, this, TestDefaults._zap.defaultUInt8Field);
}
get uInt16Field(): number {
return $.utils.getUint16(18, this, TestDefaults._zap.defaultUInt16Field);
}
set uInt16Field(value: number) {
$.utils.setUint16(18, value, this, TestDefaults._zap.defaultUInt16Field);
}
get uInt32Field(): number {
return $.utils.getUint32(20, this, TestDefaults._zap.defaultUInt32Field);
}
set uInt32Field(value: number) {
$.utils.setUint32(20, value, this, TestDefaults._zap.defaultUInt32Field);
}
get uInt64Field(): bigint {
return $.utils.getUint64(24, this, TestDefaults._zap.defaultUInt64Field);
}
set uInt64Field(value: bigint) {
$.utils.setUint64(24, value, this, TestDefaults._zap.defaultUInt64Field);
}
get float32Field(): number {
return $.utils.getFloat32(32, this, TestDefaults._zap.defaultFloat32Field);
}
set float32Field(value: number) {
$.utils.setFloat32(32, value, this, TestDefaults._zap.defaultFloat32Field);
}
get float64Field(): number {
return $.utils.getFloat64(40, this, TestDefaults._zap.defaultFloat64Field);
}
set float64Field(value: number) {
$.utils.setFloat64(40, value, this, TestDefaults._zap.defaultFloat64Field);
}
get textField(): string {
return $.utils.getText(0, this, TestDefaults._zap.defaultTextField);
}
set textField(value: string) {
$.utils.setText(0, value, this);
}
_adoptDataField(value: $.Orphan<$.Data>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownDataField(): $.Orphan<$.Data> {
return $.utils.disown(this.dataField);
}
/**
* "bar"
*
*/
get dataField(): $.Data {
return $.utils.getData(1, this, TestDefaults._zap.defaultDataField);
}
_hasDataField(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initDataField(length: number): $.Data {
return $.utils.initData(1, length, this);
}
set dataField(value: $.Data) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptStructField(value: $.Orphan<TestAllTypes>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownStructField(): $.Orphan<TestAllTypes> {
return $.utils.disown(this.structField);
}
get structField(): TestAllTypes {
return $.utils.getStruct(2, TestAllTypes, this, TestDefaults._zap.defaultStructField);
}
_hasStructField(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
_initStructField(): TestAllTypes {
return $.utils.initStructAt(2, TestAllTypes, this);
}
set structField(value: TestAllTypes) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
get enumField(): TestEnum {
return $.utils.getUint16(36, this, TestDefaults._zap.defaultEnumField) as TestEnum;
}
set enumField(value: TestEnum) {
$.utils.setUint16(36, value, this, TestDefaults._zap.defaultEnumField);
}
_adoptVoidList(value: $.Orphan<$.List<$.Void>>): void {
$.utils.adopt(value, $.utils.getPointer(3, this));
}
_disownVoidList(): $.Orphan<$.List<$.Void>> {
return $.utils.disown(this.voidList);
}
get voidList(): $.List<$.Void> {
return $.utils.getList(3, $.VoidList, this, TestDefaults._zap.defaultVoidList);
}
_hasVoidList(): boolean {
return !$.utils.isNull($.utils.getPointer(3, this));
}
_initVoidList(length: number): $.List<$.Void> {
return $.utils.initList(3, $.VoidList, length, this);
}
set voidList(value: $.List<$.Void>) {
$.utils.copyFrom(value, $.utils.getPointer(3, this));
}
_adoptBoolList(value: $.Orphan<$.List<boolean>>): void {
$.utils.adopt(value, $.utils.getPointer(4, this));
}
_disownBoolList(): $.Orphan<$.List<boolean>> {
return $.utils.disown(this.boolList);
}
get boolList(): $.List<boolean> {
return $.utils.getList(4, $.BoolList, this, TestDefaults._zap.defaultBoolList);
}
_hasBoolList(): boolean {
return !$.utils.isNull($.utils.getPointer(4, this));
}
_initBoolList(length: number): $.List<boolean> {
return $.utils.initList(4, $.BoolList, length, this);
}
set boolList(value: $.List<boolean>) {
$.utils.copyFrom(value, $.utils.getPointer(4, this));
}
_adoptInt8List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(5, this));
}
_disownInt8List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.int8List);
}
get int8List(): $.List<number> {
return $.utils.getList(5, $.Int8List, this, TestDefaults._zap.defaultInt8List);
}
_hasInt8List(): boolean {
return !$.utils.isNull($.utils.getPointer(5, this));
}
_initInt8List(length: number): $.List<number> {
return $.utils.initList(5, $.Int8List, length, this);
}
set int8List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(5, this));
}
_adoptInt16List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(6, this));
}
_disownInt16List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.int16List);
}
get int16List(): $.List<number> {
return $.utils.getList(6, $.Int16List, this, TestDefaults._zap.defaultInt16List);
}
_hasInt16List(): boolean {
return !$.utils.isNull($.utils.getPointer(6, this));
}
_initInt16List(length: number): $.List<number> {
return $.utils.initList(6, $.Int16List, length, this);
}
set int16List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(6, this));
}
_adoptInt32List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(7, this));
}
_disownInt32List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.int32List);
}
get int32List(): $.List<number> {
return $.utils.getList(7, $.Int32List, this, TestDefaults._zap.defaultInt32List);
}
_hasInt32List(): boolean {
return !$.utils.isNull($.utils.getPointer(7, this));
}
_initInt32List(length: number): $.List<number> {
return $.utils.initList(7, $.Int32List, length, this);
}
set int32List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(7, this));
}
_adoptInt64List(value: $.Orphan<$.List<bigint>>): void {
$.utils.adopt(value, $.utils.getPointer(8, this));
}
_disownInt64List(): $.Orphan<$.List<bigint>> {
return $.utils.disown(this.int64List);
}
get int64List(): $.List<bigint> {
return $.utils.getList(8, $.Int64List, this, TestDefaults._zap.defaultInt64List);
}
_hasInt64List(): boolean {
return !$.utils.isNull($.utils.getPointer(8, this));
}
_initInt64List(length: number): $.List<bigint> {
return $.utils.initList(8, $.Int64List, length, this);
}
set int64List(value: $.List<bigint>) {
$.utils.copyFrom(value, $.utils.getPointer(8, this));
}
_adoptUInt8List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(9, this));
}
_disownUInt8List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.uInt8List);
}
get uInt8List(): $.List<number> {
return $.utils.getList(9, $.Uint8List, this, TestDefaults._zap.defaultUInt8List);
}
_hasUInt8List(): boolean {
return !$.utils.isNull($.utils.getPointer(9, this));
}
_initUInt8List(length: number): $.List<number> {
return $.utils.initList(9, $.Uint8List, length, this);
}
set uInt8List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(9, this));
}
_adoptUInt16List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(10, this));
}
_disownUInt16List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.uInt16List);
}
get uInt16List(): $.List<number> {
return $.utils.getList(10, $.Uint16List, this, TestDefaults._zap.defaultUInt16List);
}
_hasUInt16List(): boolean {
return !$.utils.isNull($.utils.getPointer(10, this));
}
_initUInt16List(length: number): $.List<number> {
return $.utils.initList(10, $.Uint16List, length, this);
}
set uInt16List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(10, this));
}
_adoptUInt32List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(11, this));
}
_disownUInt32List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.uInt32List);
}
get uInt32List(): $.List<number> {
return $.utils.getList(11, $.Uint32List, this, TestDefaults._zap.defaultUInt32List);
}
_hasUInt32List(): boolean {
return !$.utils.isNull($.utils.getPointer(11, this));
}
_initUInt32List(length: number): $.List<number> {
return $.utils.initList(11, $.Uint32List, length, this);
}
set uInt32List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(11, this));
}
_adoptUInt64List(value: $.Orphan<$.List<bigint>>): void {
$.utils.adopt(value, $.utils.getPointer(12, this));
}
_disownUInt64List(): $.Orphan<$.List<bigint>> {
return $.utils.disown(this.uInt64List);
}
get uInt64List(): $.List<bigint> {
return $.utils.getList(12, $.Uint64List, this, TestDefaults._zap.defaultUInt64List);
}
_hasUInt64List(): boolean {
return !$.utils.isNull($.utils.getPointer(12, this));
}
_initUInt64List(length: number): $.List<bigint> {
return $.utils.initList(12, $.Uint64List, length, this);
}
set uInt64List(value: $.List<bigint>) {
$.utils.copyFrom(value, $.utils.getPointer(12, this));
}
_adoptFloat32List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(13, this));
}
_disownFloat32List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.float32List);
}
get float32List(): $.List<number> {
return $.utils.getList(13, $.Float32List, this, TestDefaults._zap.defaultFloat32List);
}
_hasFloat32List(): boolean {
return !$.utils.isNull($.utils.getPointer(13, this));
}
_initFloat32List(length: number): $.List<number> {
return $.utils.initList(13, $.Float32List, length, this);
}
set float32List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(13, this));
}
_adoptFloat64List(value: $.Orphan<$.List<number>>): void {
$.utils.adopt(value, $.utils.getPointer(14, this));
}
_disownFloat64List(): $.Orphan<$.List<number>> {
return $.utils.disown(this.float64List);
}
get float64List(): $.List<number> {
return $.utils.getList(14, $.Float64List, this, TestDefaults._zap.defaultFloat64List);
}
_hasFloat64List(): boolean {
return !$.utils.isNull($.utils.getPointer(14, this));
}
_initFloat64List(length: number): $.List<number> {
return $.utils.initList(14, $.Float64List, length, this);
}
set float64List(value: $.List<number>) {
$.utils.copyFrom(value, $.utils.getPointer(14, this));
}
_adoptTextList(value: $.Orphan<$.List<string>>): void {
$.utils.adopt(value, $.utils.getPointer(15, this));
}
_disownTextList(): $.Orphan<$.List<string>> {
return $.utils.disown(this.textList);
}
get textList(): $.List<string> {
return $.utils.getList(15, $.TextList, this, TestDefaults._zap.defaultTextList);
}
_hasTextList(): boolean {
return !$.utils.isNull($.utils.getPointer(15, this));
}
_initTextList(length: number): $.List<string> {
return $.utils.initList(15, $.TextList, length, this);
}
set textList(value: $.List<string>) {
$.utils.copyFrom(value, $.utils.getPointer(15, this));
}
_adoptDataList(value: $.Orphan<$.List<$.Data>>): void {
$.utils.adopt(value, $.utils.getPointer(16, this));
}
_disownDataList(): $.Orphan<$.List<$.Data>> {
return $.utils.disown(this.dataList);
}
get dataList(): $.List<$.Data> {
return $.utils.getList(16, $.DataList, this, TestDefaults._zap.defaultDataList);
}
_hasDataList(): boolean {
return !$.utils.isNull($.utils.getPointer(16, this));
}
_initDataList(length: number): $.List<$.Data> {
return $.utils.initList(16, $.DataList, length, this);
}
set dataList(value: $.List<$.Data>) {
$.utils.copyFrom(value, $.utils.getPointer(16, this));
}
_adoptStructList(value: $.Orphan<$.List<TestAllTypes>>): void {
$.utils.adopt(value, $.utils.getPointer(17, this));
}
_disownStructList(): $.Orphan<$.List<TestAllTypes>> {
return $.utils.disown(this.structList);
}
get structList(): $.List<TestAllTypes> {
return $.utils.getList(17, TestDefaults._StructList, this, TestDefaults._zap.defaultStructList);
}
_hasStructList(): boolean {
return !$.utils.isNull($.utils.getPointer(17, this));
}
_initStructList(length: number): $.List<TestAllTypes> {
return $.utils.initList(17, TestDefaults._StructList, length, this);
}
set structList(value: $.List<TestAllTypes>) {
$.utils.copyFrom(value, $.utils.getPointer(17, this));
}
_adoptEnumList(value: $.Orphan<$.List<TestEnum>>): void {
$.utils.adopt(value, $.utils.getPointer(18, this));
}
_disownEnumList(): $.Orphan<$.List<TestEnum>> {
return $.utils.disown(this.enumList);
}
get enumList(): $.List<TestEnum> {
return $.utils.getList(18, $.Uint16List, this, TestDefaults._zap.defaultEnumList) as $.List<TestEnum>;
}
_hasEnumList(): boolean {
return !$.utils.isNull($.utils.getPointer(18, this));
}
_initEnumList(length: number): $.List<TestEnum> {
return $.utils.initList(18, $.Uint16List, length, this) as $.List<TestEnum>;
}
set enumList(value: $.List<TestEnum>) {
$.utils.copyFrom(value, $.utils.getPointer(18, this));
}
_adoptInterfaceList(value: $.Orphan<$.List<$.Void>>): void {
$.utils.adopt(value, $.utils.getPointer(19, this));
}
_disownInterfaceList(): $.Orphan<$.List<$.Void>> {
return $.utils.disown(this.interfaceList);
}
/**
* TODO
*
*/
get interfaceList(): $.List<$.Void> {
return $.utils.getList(19, $.VoidList, this);
}
_hasInterfaceList(): boolean {
return !$.utils.isNull($.utils.getPointer(19, this));
}
_initInterfaceList(length: number): $.List<$.Void> {
return $.utils.initList(19, $.VoidList, length, this);
}
set interfaceList(value: $.List<$.Void>) {
$.utils.copyFrom(value, $.utils.getPointer(19, this));
}
toString(): string { return "TestDefaults_" + super.toString(); }
}
export class TestAnyPointer extends $.Struct {
static readonly _zap = {
displayName: "TestAnyPointer",
id: "e3da5a2ccd28c0d8",
size: new $.ObjectSize(0, 1),
};
_adoptAnyPointerField(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownAnyPointerField(): $.Orphan<$.Pointer> {
return $.utils.disown(this.anyPointerField);
}
get anyPointerField(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasAnyPointerField(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set anyPointerField(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestAnyPointer_" + super.toString(); }
}
export class TestAnyOthers extends $.Struct {
static readonly _zap = {
displayName: "TestAnyOthers",
id: "f49850f63c2bfa59",
size: new $.ObjectSize(0, 3),
};
_adoptAnyStructField(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownAnyStructField(): $.Orphan<$.Pointer> {
return $.utils.disown(this.anyStructField);
}
get anyStructField(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasAnyStructField(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set anyStructField(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptAnyListField(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownAnyListField(): $.Orphan<$.Pointer> {
return $.utils.disown(this.anyListField);
}
get anyListField(): $.Pointer {
return $.utils.getPointer(1, this);
}
_hasAnyListField(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
set anyListField(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptCapabilityField(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownCapabilityField(): $.Orphan<$.Pointer> {
return $.utils.disown(this.capabilityField);
}
get capabilityField(): $.Pointer {
return $.utils.getPointer(2, this);
}
_hasCapabilityField(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
set capabilityField(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
toString(): string { return "TestAnyOthers_" + super.toString(); }
}
export class TestOutOfOrder extends $.Struct {
static readonly _zap = {
displayName: "TestOutOfOrder",
id: "a9d5f8efe770022b",
size: new $.ObjectSize(0, 9),
};
get foo(): string {
return $.utils.getText(3, this);
}
set foo(value: string) {
$.utils.setText(3, value, this);
}
get bar(): string {
return $.utils.getText(2, this);
}
set bar(value: string) {
$.utils.setText(2, value, this);
}
get baz(): string {
return $.utils.getText(8, this);
}
set baz(value: string) {
$.utils.setText(8, value, this);
}
get qux(): string {
return $.utils.getText(0, this);
}
set qux(value: string) {
$.utils.setText(0, value, this);
}
get quux(): string {
return $.utils.getText(6, this);
}
set quux(value: string) {
$.utils.setText(6, value, this);
}
get corge(): string {
return $.utils.getText(4, this);
}
set corge(value: string) {
$.utils.setText(4, value, this);
}
get grault(): string {
return $.utils.getText(1, this);
}
set grault(value: string) {
$.utils.setText(1, value, this);
}
get garply(): string {
return $.utils.getText(7, this);
}
set garply(value: string) {
$.utils.setText(7, value, this);
}
get waldo(): string {
return $.utils.getText(5, this);
}
set waldo(value: string) {
$.utils.setText(5, value, this);
}
toString(): string { return "TestOutOfOrder_" + super.toString(); }
}
export const TestUnion_Union0_Which = {
U0F0S0: 0,
U0F0S1: 1,
U0F0S8: 2,
U0F0S16: 3,
U0F0S32: 4,
U0F0S64: 5,
U0F0SP: 6,
U0F1S0: 7,
U0F1S1: 8,
U0F1S8: 9,
U0F1S16: 10,
U0F1S32: 11,
U0F1S64: 12,
U0F1SP: 13
} as const;
export type TestUnion_Union0_Which = (typeof TestUnion_Union0_Which)[keyof typeof TestUnion_Union0_Which];
/**
* Pack union 0 under ideal conditions: there is no unused padding space prior to it.
*
*/
export class TestUnion_Union0 extends $.Struct {
static readonly U0F0S0 = TestUnion_Union0_Which.U0F0S0;
static readonly U0F0S1 = TestUnion_Union0_Which.U0F0S1;
static readonly U0F0S8 = TestUnion_Union0_Which.U0F0S8;
static readonly U0F0S16 = TestUnion_Union0_Which.U0F0S16;
static readonly U0F0S32 = TestUnion_Union0_Which.U0F0S32;
static readonly U0F0S64 = TestUnion_Union0_Which.U0F0S64;
static readonly U0F0SP = TestUnion_Union0_Which.U0F0SP;
static readonly U0F1S0 = TestUnion_Union0_Which.U0F1S0;
static readonly U0F1S1 = TestUnion_Union0_Which.U0F1S1;
static readonly U0F1S8 = TestUnion_Union0_Which.U0F1S8;
static readonly U0F1S16 = TestUnion_Union0_Which.U0F1S16;
static readonly U0F1S32 = TestUnion_Union0_Which.U0F1S32;
static readonly U0F1S64 = TestUnion_Union0_Which.U0F1S64;
static readonly U0F1SP = TestUnion_Union0_Which.U0F1SP;
static readonly _zap = {
displayName: "union0",
id: "fc76a82eecb7a718",
size: new $.ObjectSize(64, 2),
};
get _isU0f0s0(): boolean {
return $.utils.getUint16(0, this) === 0;
}
set u0f0s0(_: true) {
$.utils.setUint16(0, 0, this);
}
get u0f0s1(): boolean {
$.utils.testWhich("u0f0s1", $.utils.getUint16(0, this), 1, this);
return $.utils.getBit(64, this);
}
get _isU0f0s1(): boolean {
return $.utils.getUint16(0, this) === 1;
}
set u0f0s1(value: boolean) {
$.utils.setUint16(0, 1, this);
$.utils.setBit(64, value, this);
}
get u0f0s8(): number {
$.utils.testWhich("u0f0s8", $.utils.getUint16(0, this), 2, this);
return $.utils.getInt8(8, this);
}
get _isU0f0s8(): boolean {
return $.utils.getUint16(0, this) === 2;
}
set u0f0s8(value: number) {
$.utils.setUint16(0, 2, this);
$.utils.setInt8(8, value, this);
}
get u0f0s16(): number {
$.utils.testWhich("u0f0s16", $.utils.getUint16(0, this), 3, this);
return $.utils.getInt16(8, this);
}
get _isU0f0s16(): boolean {
return $.utils.getUint16(0, this) === 3;
}
set u0f0s16(value: number) {
$.utils.setUint16(0, 3, this);
$.utils.setInt16(8, value, this);
}
get u0f0s32(): number {
$.utils.testWhich("u0f0s32", $.utils.getUint16(0, this), 4, this);
return $.utils.getInt32(8, this);
}
get _isU0f0s32(): boolean {
return $.utils.getUint16(0, this) === 4;
}
set u0f0s32(value: number) {
$.utils.setUint16(0, 4, this);
$.utils.setInt32(8, value, this);
}
get u0f0s64(): bigint {
$.utils.testWhich("u0f0s64", $.utils.getUint16(0, this), 5, this);
return $.utils.getInt64(8, this);
}
get _isU0f0s64(): boolean {
return $.utils.getUint16(0, this) === 5;
}
set u0f0s64(value: bigint) {
$.utils.setUint16(0, 5, this);
$.utils.setInt64(8, value, this);
}
get u0f0sp(): string {
$.utils.testWhich("u0f0sp", $.utils.getUint16(0, this), 6, this);
return $.utils.getText(0, this);
}
get _isU0f0sp(): boolean {
return $.utils.getUint16(0, this) === 6;
}
set u0f0sp(value: string) {
$.utils.setUint16(0, 6, this);
$.utils.setText(0, value, this);
}
get _isU0f1s0(): boolean {
return $.utils.getUint16(0, this) === 7;
}
set u0f1s0(_: true) {
$.utils.setUint16(0, 7, this);
}
get u0f1s1(): boolean {
$.utils.testWhich("u0f1s1", $.utils.getUint16(0, this), 8, this);
return $.utils.getBit(64, this);
}
get _isU0f1s1(): boolean {
return $.utils.getUint16(0, this) === 8;
}
set u0f1s1(value: boolean) {
$.utils.setUint16(0, 8, this);
$.utils.setBit(64, value, this);
}
get u0f1s8(): number {
$.utils.testWhich("u0f1s8", $.utils.getUint16(0, this), 9, this);
return $.utils.getInt8(8, this);
}
get _isU0f1s8(): boolean {
return $.utils.getUint16(0, this) === 9;
}
set u0f1s8(value: number) {
$.utils.setUint16(0, 9, this);
$.utils.setInt8(8, value, this);
}
get u0f1s16(): number {
$.utils.testWhich("u0f1s16", $.utils.getUint16(0, this), 10, this);
return $.utils.getInt16(8, this);
}
get _isU0f1s16(): boolean {
return $.utils.getUint16(0, this) === 10;
}
set u0f1s16(value: number) {
$.utils.setUint16(0, 10, this);
$.utils.setInt16(8, value, this);
}
get u0f1s32(): number {
$.utils.testWhich("u0f1s32", $.utils.getUint16(0, this), 11, this);
return $.utils.getInt32(8, this);
}
get _isU0f1s32(): boolean {
return $.utils.getUint16(0, this) === 11;
}
set u0f1s32(value: number) {
$.utils.setUint16(0, 11, this);
$.utils.setInt32(8, value, this);
}
get u0f1s64(): bigint {
$.utils.testWhich("u0f1s64", $.utils.getUint16(0, this), 12, this);
return $.utils.getInt64(8, this);
}
get _isU0f1s64(): boolean {
return $.utils.getUint16(0, this) === 12;
}
set u0f1s64(value: bigint) {
$.utils.setUint16(0, 12, this);
$.utils.setInt64(8, value, this);
}
get u0f1sp(): string {
$.utils.testWhich("u0f1sp", $.utils.getUint16(0, this), 13, this);
return $.utils.getText(0, this);
}
get _isU0f1sp(): boolean {
return $.utils.getUint16(0, this) === 13;
}
set u0f1sp(value: string) {
$.utils.setUint16(0, 13, this);
$.utils.setText(0, value, this);
}
toString(): string { return "TestUnion_Union0_" + super.toString(); }
which(): TestUnion_Union0_Which {
return $.utils.getUint16(0, this) as TestUnion_Union0_Which;
}
}
export const TestUnion_Union1_Which = {
U1F0S0: 0,
U1F0S1: 1,
U1F1S1: 2,
U1F0S8: 3,
U1F1S8: 4,
U1F0S16: 5,
U1F1S16: 6,
U1F0S32: 7,
U1F1S32: 8,
U1F0S64: 9,
U1F1S64: 10,
U1F0SP: 11,
U1F1SP: 12,
U1F2S0: 13,
U1F2S1: 14,
U1F2S8: 15,
U1F2S16: 16,
U1F2S32: 17,
U1F2S64: 18,
U1F2SP: 19
} as const;
export type TestUnion_Union1_Which = (typeof TestUnion_Union1_Which)[keyof typeof TestUnion_Union1_Which];
/**
* Pack pathologically bad case. Each field takes up new space.
*
*/
export class TestUnion_Union1 extends $.Struct {
static readonly U1F0S0 = TestUnion_Union1_Which.U1F0S0;
static readonly U1F0S1 = TestUnion_Union1_Which.U1F0S1;
static readonly U1F1S1 = TestUnion_Union1_Which.U1F1S1;
static readonly U1F0S8 = TestUnion_Union1_Which.U1F0S8;
static readonly U1F1S8 = TestUnion_Union1_Which.U1F1S8;
static readonly U1F0S16 = TestUnion_Union1_Which.U1F0S16;
static readonly U1F1S16 = TestUnion_Union1_Which.U1F1S16;
static readonly U1F0S32 = TestUnion_Union1_Which.U1F0S32;
static readonly U1F1S32 = TestUnion_Union1_Which.U1F1S32;
static readonly U1F0S64 = TestUnion_Union1_Which.U1F0S64;
static readonly U1F1S64 = TestUnion_Union1_Which.U1F1S64;
static readonly U1F0SP = TestUnion_Union1_Which.U1F0SP;
static readonly U1F1SP = TestUnion_Union1_Which.U1F1SP;
static readonly U1F2S0 = TestUnion_Union1_Which.U1F2S0;
static readonly U1F2S1 = TestUnion_Union1_Which.U1F2S1;
static readonly U1F2S8 = TestUnion_Union1_Which.U1F2S8;
static readonly U1F2S16 = TestUnion_Union1_Which.U1F2S16;
static readonly U1F2S32 = TestUnion_Union1_Which.U1F2S32;
static readonly U1F2S64 = TestUnion_Union1_Which.U1F2S64;
static readonly U1F2SP = TestUnion_Union1_Which.U1F2SP;
static readonly _zap = {
displayName: "union1",
id: "ee0a6b99b7dc7ab2",
size: new $.ObjectSize(64, 2),
};
get _isU1f0s0(): boolean {
return $.utils.getUint16(2, this) === 0;
}
set u1f0s0(_: true) {
$.utils.setUint16(2, 0, this);
}
get u1f0s1(): boolean {
$.utils.testWhich("u1f0s1", $.utils.getUint16(2, this), 1, this);
return $.utils.getBit(129, this);
}
get _isU1f0s1(): boolean {
return $.utils.getUint16(2, this) === 1;
}
set u1f0s1(value: boolean) {
$.utils.setUint16(2, 1, this);
$.utils.setBit(129, value, this);
}
get u1f1s1(): boolean {
$.utils.testWhich("u1f1s1", $.utils.getUint16(2, this), 2, this);
return $.utils.getBit(129, this);
}
get _isU1f1s1(): boolean {
return $.utils.getUint16(2, this) === 2;
}
set u1f1s1(value: boolean) {
$.utils.setUint16(2, 2, this);
$.utils.setBit(129, value, this);
}
get u1f0s8(): number {
$.utils.testWhich("u1f0s8", $.utils.getUint16(2, this), 3, this);
return $.utils.getInt8(17, this);
}
get _isU1f0s8(): boolean {
return $.utils.getUint16(2, this) === 3;
}
set u1f0s8(value: number) {
$.utils.setUint16(2, 3, this);
$.utils.setInt8(17, value, this);
}
get u1f1s8(): number {
$.utils.testWhich("u1f1s8", $.utils.getUint16(2, this), 4, this);
return $.utils.getInt8(17, this);
}
get _isU1f1s8(): boolean {
return $.utils.getUint16(2, this) === 4;
}
set u1f1s8(value: number) {
$.utils.setUint16(2, 4, this);
$.utils.setInt8(17, value, this);
}
get u1f0s16(): number {
$.utils.testWhich("u1f0s16", $.utils.getUint16(2, this), 5, this);
return $.utils.getInt16(18, this);
}
get _isU1f0s16(): boolean {
return $.utils.getUint16(2, this) === 5;
}
set u1f0s16(value: number) {
$.utils.setUint16(2, 5, this);
$.utils.setInt16(18, value, this);
}
get u1f1s16(): number {
$.utils.testWhich("u1f1s16", $.utils.getUint16(2, this), 6, this);
return $.utils.getInt16(18, this);
}
get _isU1f1s16(): boolean {
return $.utils.getUint16(2, this) === 6;
}
set u1f1s16(value: number) {
$.utils.setUint16(2, 6, this);
$.utils.setInt16(18, value, this);
}
get u1f0s32(): number {
$.utils.testWhich("u1f0s32", $.utils.getUint16(2, this), 7, this);
return $.utils.getInt32(20, this);
}
get _isU1f0s32(): boolean {
return $.utils.getUint16(2, this) === 7;
}
set u1f0s32(value: number) {
$.utils.setUint16(2, 7, this);
$.utils.setInt32(20, value, this);
}
get u1f1s32(): number {
$.utils.testWhich("u1f1s32", $.utils.getUint16(2, this), 8, this);
return $.utils.getInt32(20, this);
}
get _isU1f1s32(): boolean {
return $.utils.getUint16(2, this) === 8;
}
set u1f1s32(value: number) {
$.utils.setUint16(2, 8, this);
$.utils.setInt32(20, value, this);
}
get u1f0s64(): bigint {
$.utils.testWhich("u1f0s64", $.utils.getUint16(2, this), 9, this);
return $.utils.getInt64(24, this);
}
get _isU1f0s64(): boolean {
return $.utils.getUint16(2, this) === 9;
}
set u1f0s64(value: bigint) {
$.utils.setUint16(2, 9, this);
$.utils.setInt64(24, value, this);
}
get u1f1s64(): bigint {
$.utils.testWhich("u1f1s64", $.utils.getUint16(2, this), 10, this);
return $.utils.getInt64(24, this);
}
get _isU1f1s64(): boolean {
return $.utils.getUint16(2, this) === 10;
}
set u1f1s64(value: bigint) {
$.utils.setUint16(2, 10, this);
$.utils.setInt64(24, value, this);
}
get u1f0sp(): string {
$.utils.testWhich("u1f0sp", $.utils.getUint16(2, this), 11, this);
return $.utils.getText(1, this);
}
get _isU1f0sp(): boolean {
return $.utils.getUint16(2, this) === 11;
}
set u1f0sp(value: string) {
$.utils.setUint16(2, 11, this);
$.utils.setText(1, value, this);
}
get u1f1sp(): string {
$.utils.testWhich("u1f1sp", $.utils.getUint16(2, this), 12, this);
return $.utils.getText(1, this);
}
get _isU1f1sp(): boolean {
return $.utils.getUint16(2, this) === 12;
}
set u1f1sp(value: string) {
$.utils.setUint16(2, 12, this);
$.utils.setText(1, value, this);
}
get _isU1f2s0(): boolean {
return $.utils.getUint16(2, this) === 13;
}
set u1f2s0(_: true) {
$.utils.setUint16(2, 13, this);
}
get u1f2s1(): boolean {
$.utils.testWhich("u1f2s1", $.utils.getUint16(2, this), 14, this);
return $.utils.getBit(129, this);
}
get _isU1f2s1(): boolean {
return $.utils.getUint16(2, this) === 14;
}
set u1f2s1(value: boolean) {
$.utils.setUint16(2, 14, this);
$.utils.setBit(129, value, this);
}
get u1f2s8(): number {
$.utils.testWhich("u1f2s8", $.utils.getUint16(2, this), 15, this);
return $.utils.getInt8(17, this);
}
get _isU1f2s8(): boolean {
return $.utils.getUint16(2, this) === 15;
}
set u1f2s8(value: number) {
$.utils.setUint16(2, 15, this);
$.utils.setInt8(17, value, this);
}
get u1f2s16(): number {
$.utils.testWhich("u1f2s16", $.utils.getUint16(2, this), 16, this);
return $.utils.getInt16(18, this);
}
get _isU1f2s16(): boolean {
return $.utils.getUint16(2, this) === 16;
}
set u1f2s16(value: number) {
$.utils.setUint16(2, 16, this);
$.utils.setInt16(18, value, this);
}
get u1f2s32(): number {
$.utils.testWhich("u1f2s32", $.utils.getUint16(2, this), 17, this);
return $.utils.getInt32(20, this);
}
get _isU1f2s32(): boolean {
return $.utils.getUint16(2, this) === 17;
}
set u1f2s32(value: number) {
$.utils.setUint16(2, 17, this);
$.utils.setInt32(20, value, this);
}
get u1f2s64(): bigint {
$.utils.testWhich("u1f2s64", $.utils.getUint16(2, this), 18, this);
return $.utils.getInt64(24, this);
}
get _isU1f2s64(): boolean {
return $.utils.getUint16(2, this) === 18;
}
set u1f2s64(value: bigint) {
$.utils.setUint16(2, 18, this);
$.utils.setInt64(24, value, this);
}
get u1f2sp(): string {
$.utils.testWhich("u1f2sp", $.utils.getUint16(2, this), 19, this);
return $.utils.getText(1, this);
}
get _isU1f2sp(): boolean {
return $.utils.getUint16(2, this) === 19;
}
set u1f2sp(value: string) {
$.utils.setUint16(2, 19, this);
$.utils.setText(1, value, this);
}
toString(): string { return "TestUnion_Union1_" + super.toString(); }
which(): TestUnion_Union1_Which {
return $.utils.getUint16(2, this) as TestUnion_Union1_Which;
}
}
export const TestUnion_Union2_Which = {
U2F0S64: 4,
U2F0S32: 3,
U2F0S16: 2,
U2F0S8: 1,
U2F0S1: 0
} as const;
export type TestUnion_Union2_Which = (typeof TestUnion_Union2_Which)[keyof typeof TestUnion_Union2_Which];
export class TestUnion_Union2 extends $.Struct {
static readonly U2F0S64 = TestUnion_Union2_Which.U2F0S64;
static readonly U2F0S32 = TestUnion_Union2_Which.U2F0S32;
static readonly U2F0S16 = TestUnion_Union2_Which.U2F0S16;
static readonly U2F0S8 = TestUnion_Union2_Which.U2F0S8;
static readonly U2F0S1 = TestUnion_Union2_Which.U2F0S1;
static readonly _zap = {
displayName: "union2",
id: "afc5fd419f0d66d4",
size: new $.ObjectSize(64, 2),
};
get u2f0s64(): bigint {
$.utils.testWhich("u2f0s64", $.utils.getUint16(4, this), 4, this);
return $.utils.getInt64(48, this);
}
get _isU2f0s64(): boolean {
return $.utils.getUint16(4, this) === 4;
}
set u2f0s64(value: bigint) {
$.utils.setUint16(4, 4, this);
$.utils.setInt64(48, value, this);
}
get u2f0s32(): number {
$.utils.testWhich("u2f0s32", $.utils.getUint16(4, this), 3, this);
return $.utils.getInt32(40, this);
}
get _isU2f0s32(): boolean {
return $.utils.getUint16(4, this) === 3;
}
set u2f0s32(value: number) {
$.utils.setUint16(4, 3, this);
$.utils.setInt32(40, value, this);
}
get u2f0s16(): number {
$.utils.testWhich("u2f0s16", $.utils.getUint16(4, this), 2, this);
return $.utils.getInt16(36, this);
}
get _isU2f0s16(): boolean {
return $.utils.getUint16(4, this) === 2;
}
set u2f0s16(value: number) {
$.utils.setUint16(4, 2, this);
$.utils.setInt16(36, value, this);
}
get u2f0s8(): number {
$.utils.testWhich("u2f0s8", $.utils.getUint16(4, this), 1, this);
return $.utils.getInt8(33, this);
}
get _isU2f0s8(): boolean {
return $.utils.getUint16(4, this) === 1;
}
set u2f0s8(value: number) {
$.utils.setUint16(4, 1, this);
$.utils.setInt8(33, value, this);
}
get u2f0s1(): boolean {
$.utils.testWhich("u2f0s1", $.utils.getUint16(4, this), 0, this);
return $.utils.getBit(256, this);
}
get _isU2f0s1(): boolean {
return $.utils.getUint16(4, this) === 0;
}
set u2f0s1(value: boolean) {
$.utils.setUint16(4, 0, this);
$.utils.setBit(256, value, this);
}
toString(): string { return "TestUnion_Union2_" + super.toString(); }
which(): TestUnion_Union2_Which {
return $.utils.getUint16(4, this) as TestUnion_Union2_Which;
}
}
export const TestUnion_Union3_Which = {
U3F0S64: 4,
U3F0S32: 3,
U3F0S16: 2,
U3F0S8: 1,
U3F0S1: 0
} as const;
export type TestUnion_Union3_Which = (typeof TestUnion_Union3_Which)[keyof typeof TestUnion_Union3_Which];
export class TestUnion_Union3 extends $.Struct {
static readonly U3F0S64 = TestUnion_Union3_Which.U3F0S64;
static readonly U3F0S32 = TestUnion_Union3_Which.U3F0S32;
static readonly U3F0S16 = TestUnion_Union3_Which.U3F0S16;
static readonly U3F0S8 = TestUnion_Union3_Which.U3F0S8;
static readonly U3F0S1 = TestUnion_Union3_Which.U3F0S1;
static readonly _zap = {
displayName: "union3",
id: "a2fb022ec7f30053",
size: new $.ObjectSize(64, 2),
};
get u3f0s64(): bigint {
$.utils.testWhich("u3f0s64", $.utils.getUint16(6, this), 4, this);
return $.utils.getInt64(56, this);
}
get _isU3f0s64(): boolean {
return $.utils.getUint16(6, this) === 4;
}
set u3f0s64(value: bigint) {
$.utils.setUint16(6, 4, this);
$.utils.setInt64(56, value, this);
}
get u3f0s32(): number {
$.utils.testWhich("u3f0s32", $.utils.getUint16(6, this), 3, this);
return $.utils.getInt32(44, this);
}
get _isU3f0s32(): boolean {
return $.utils.getUint16(6, this) === 3;
}
set u3f0s32(value: number) {
$.utils.setUint16(6, 3, this);
$.utils.setInt32(44, value, this);
}
get u3f0s16(): number {
$.utils.testWhich("u3f0s16", $.utils.getUint16(6, this), 2, this);
return $.utils.getInt16(38, this);
}
get _isU3f0s16(): boolean {
return $.utils.getUint16(6, this) === 2;
}
set u3f0s16(value: number) {
$.utils.setUint16(6, 2, this);
$.utils.setInt16(38, value, this);
}
get u3f0s8(): number {
$.utils.testWhich("u3f0s8", $.utils.getUint16(6, this), 1, this);
return $.utils.getInt8(34, this);
}
get _isU3f0s8(): boolean {
return $.utils.getUint16(6, this) === 1;
}
set u3f0s8(value: number) {
$.utils.setUint16(6, 1, this);
$.utils.setInt8(34, value, this);
}
get u3f0s1(): boolean {
$.utils.testWhich("u3f0s1", $.utils.getUint16(6, this), 0, this);
return $.utils.getBit(257, this);
}
get _isU3f0s1(): boolean {
return $.utils.getUint16(6, this) === 0;
}
set u3f0s1(value: boolean) {
$.utils.setUint16(6, 0, this);
$.utils.setBit(257, value, this);
}
toString(): string { return "TestUnion_Union3_" + super.toString(); }
which(): TestUnion_Union3_Which {
return $.utils.getUint16(6, this) as TestUnion_Union3_Which;
}
}
export class TestUnion extends $.Struct {
static readonly _zap = {
displayName: "TestUnion",
id: "f47697362233ce52",
size: new $.ObjectSize(64, 2),
};
/**
* Pack union 0 under ideal conditions: there is no unused padding space prior to it.
*
*/
get union0(): TestUnion_Union0 {
return $.utils.getAs(TestUnion_Union0, this);
}
_initUnion0(): TestUnion_Union0 {
return $.utils.getAs(TestUnion_Union0, this);
}
get bit0(): boolean {
return $.utils.getBit(128, this);
}
set bit0(value: boolean) {
$.utils.setBit(128, value, this);
}
/**
* Pack pathologically bad case. Each field takes up new space.
*
*/
get union1(): TestUnion_Union1 {
return $.utils.getAs(TestUnion_Union1, this);
}
_initUnion1(): TestUnion_Union1 {
return $.utils.getAs(TestUnion_Union1, this);
}
get bit2(): boolean {
return $.utils.getBit(130, this);
}
set bit2(value: boolean) {
$.utils.setBit(130, value, this);
}
get bit3(): boolean {
return $.utils.getBit(131, this);
}
set bit3(value: boolean) {
$.utils.setBit(131, value, this);
}
get bit4(): boolean {
return $.utils.getBit(132, this);
}
set bit4(value: boolean) {
$.utils.setBit(132, value, this);
}
get bit5(): boolean {
return $.utils.getBit(133, this);
}
set bit5(value: boolean) {
$.utils.setBit(133, value, this);
}
get bit6(): boolean {
return $.utils.getBit(134, this);
}
set bit6(value: boolean) {
$.utils.setBit(134, value, this);
}
get bit7(): boolean {
return $.utils.getBit(135, this);
}
set bit7(value: boolean) {
$.utils.setBit(135, value, this);
}
get union2(): TestUnion_Union2 {
return $.utils.getAs(TestUnion_Union2, this);
}
_initUnion2(): TestUnion_Union2 {
return $.utils.getAs(TestUnion_Union2, this);
}
get union3(): TestUnion_Union3 {
return $.utils.getAs(TestUnion_Union3, this);
}
_initUnion3(): TestUnion_Union3 {
return $.utils.getAs(TestUnion_Union3, this);
}
get byte0(): number {
return $.utils.getUint8(35, this);
}
set byte0(value: number) {
$.utils.setUint8(35, value, this);
}
toString(): string { return "TestUnion_" + super.toString(); }
}
export const TestUnnamedUnion_Which = {
FOO: 0,
BAR: 1
} as const;
export type TestUnnamedUnion_Which = (typeof TestUnnamedUnion_Which)[keyof typeof TestUnnamedUnion_Which];
export class TestUnnamedUnion extends $.Struct {
static readonly FOO = TestUnnamedUnion_Which.FOO;
static readonly BAR = TestUnnamedUnion_Which.BAR;
static readonly _zap = {
displayName: "TestUnnamedUnion",
id: "9e2e784c915329b6",
size: new $.ObjectSize(16, 2),
};
get before(): string {
return $.utils.getText(0, this);
}
set before(value: string) {
$.utils.setText(0, value, this);
}
get foo(): number {
$.utils.testWhich("foo", $.utils.getUint16(4, this), 0, this);
return $.utils.getUint16(0, this);
}
get _isFoo(): boolean {
return $.utils.getUint16(4, this) === 0;
}
set foo(value: number) {
$.utils.setUint16(4, 0, this);
$.utils.setUint16(0, value, this);
}
get bar(): number {
$.utils.testWhich("bar", $.utils.getUint16(4, this), 1, this);
return $.utils.getUint32(8, this);
}
get _isBar(): boolean {
return $.utils.getUint16(4, this) === 1;
}
set bar(value: number) {
$.utils.setUint16(4, 1, this);
$.utils.setUint32(8, value, this);
}
get middle(): number {
return $.utils.getUint16(2, this);
}
set middle(value: number) {
$.utils.setUint16(2, value, this);
}
get after(): string {
return $.utils.getText(1, this);
}
set after(value: string) {
$.utils.setText(1, value, this);
}
toString(): string { return "TestUnnamedUnion_" + super.toString(); }
which(): TestUnnamedUnion_Which {
return $.utils.getUint16(4, this) as TestUnnamedUnion_Which;
}
}
export const TestUnionInUnion_Outer_Inner_Which = {
FOO: 0,
BAR: 1
} as const;
export type TestUnionInUnion_Outer_Inner_Which = (typeof TestUnionInUnion_Outer_Inner_Which)[keyof typeof TestUnionInUnion_Outer_Inner_Which];
export class TestUnionInUnion_Outer_Inner extends $.Struct {
static readonly FOO = TestUnionInUnion_Outer_Inner_Which.FOO;
static readonly BAR = TestUnionInUnion_Outer_Inner_Which.BAR;
static readonly _zap = {
displayName: "inner",
id: "ff9ce111c6f8e5db",
size: new $.ObjectSize(16, 0),
};
get foo(): number {
$.utils.testWhich("foo", $.utils.getUint16(4, this), 0, this);
return $.utils.getInt32(0, this);
}
get _isFoo(): boolean {
return $.utils.getUint16(4, this) === 0;
}
set foo(value: number) {
$.utils.setUint16(4, 0, this);
$.utils.setInt32(0, value, this);
}
get bar(): number {
$.utils.testWhich("bar", $.utils.getUint16(4, this), 1, this);
return $.utils.getInt32(0, this);
}
get _isBar(): boolean {
return $.utils.getUint16(4, this) === 1;
}
set bar(value: number) {
$.utils.setUint16(4, 1, this);
$.utils.setInt32(0, value, this);
}
toString(): string { return "TestUnionInUnion_Outer_Inner_" + super.toString(); }
which(): TestUnionInUnion_Outer_Inner_Which {
return $.utils.getUint16(4, this) as TestUnionInUnion_Outer_Inner_Which;
}
}
export const TestUnionInUnion_Outer_Which = {
INNER: 0,
BAZ: 1
} as const;
export type TestUnionInUnion_Outer_Which = (typeof TestUnionInUnion_Outer_Which)[keyof typeof TestUnionInUnion_Outer_Which];
export class TestUnionInUnion_Outer extends $.Struct {
static readonly INNER = TestUnionInUnion_Outer_Which.INNER;
static readonly BAZ = TestUnionInUnion_Outer_Which.BAZ;
static readonly _zap = {
displayName: "outer",
id: "d005f6c63707670c",
size: new $.ObjectSize(16, 0),
};
get inner(): TestUnionInUnion_Outer_Inner {
$.utils.testWhich("inner", $.utils.getUint16(8, this), 0, this);
return $.utils.getAs(TestUnionInUnion_Outer_Inner, this);
}
_initInner(): TestUnionInUnion_Outer_Inner {
$.utils.setUint16(8, 0, this);
return $.utils.getAs(TestUnionInUnion_Outer_Inner, this);
}
get _isInner(): boolean {
return $.utils.getUint16(8, this) === 0;
}
set inner(_: true) {
$.utils.setUint16(8, 0, this);
}
get baz(): number {
$.utils.testWhich("baz", $.utils.getUint16(8, this), 1, this);
return $.utils.getInt32(0, this);
}
get _isBaz(): boolean {
return $.utils.getUint16(8, this) === 1;
}
set baz(value: number) {
$.utils.setUint16(8, 1, this);
$.utils.setInt32(0, value, this);
}
toString(): string { return "TestUnionInUnion_Outer_" + super.toString(); }
which(): TestUnionInUnion_Outer_Which {
return $.utils.getUint16(8, this) as TestUnionInUnion_Outer_Which;
}
}
/**
* There is no reason to ever do this.
*
*/
export class TestUnionInUnion extends $.Struct {
static readonly _zap = {
displayName: "TestUnionInUnion",
id: "89a9494f1b900f22",
size: new $.ObjectSize(16, 0),
};
get outer(): TestUnionInUnion_Outer {
return $.utils.getAs(TestUnionInUnion_Outer, this);
}
_initOuter(): TestUnionInUnion_Outer {
return $.utils.getAs(TestUnionInUnion_Outer, this);
}
toString(): string { return "TestUnionInUnion_" + super.toString(); }
}
export class TestGroups_Groups_Foo extends $.Struct {
static readonly _zap = {
displayName: "foo",
id: "f5fcba89c0c1196f",
size: new $.ObjectSize(16, 2),
};
get corge(): number {
return $.utils.getInt32(0, this);
}
set corge(value: number) {
$.utils.setInt32(0, value, this);
}
get grault(): bigint {
return $.utils.getInt64(8, this);
}
set grault(value: bigint) {
$.utils.setInt64(8, value, this);
}
get garply(): string {
return $.utils.getText(0, this);
}
set garply(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestGroups_Groups_Foo_" + super.toString(); }
}
export class TestGroups_Groups_Baz extends $.Struct {
static readonly _zap = {
displayName: "baz",
id: "f0fa30304066a4b3",
size: new $.ObjectSize(16, 2),
};
get corge(): number {
return $.utils.getInt32(0, this);
}
set corge(value: number) {
$.utils.setInt32(0, value, this);
}
get grault(): string {
return $.utils.getText(0, this);
}
set grault(value: string) {
$.utils.setText(0, value, this);
}
get garply(): string {
return $.utils.getText(1, this);
}
set garply(value: string) {
$.utils.setText(1, value, this);
}
toString(): string { return "TestGroups_Groups_Baz_" + super.toString(); }
}
export class TestGroups_Groups_Bar extends $.Struct {
static readonly _zap = {
displayName: "bar",
id: "b727c0d0091a001d",
size: new $.ObjectSize(16, 2),
};
get corge(): number {
return $.utils.getInt32(0, this);
}
set corge(value: number) {
$.utils.setInt32(0, value, this);
}
get grault(): string {
return $.utils.getText(0, this);
}
set grault(value: string) {
$.utils.setText(0, value, this);
}
get garply(): bigint {
return $.utils.getInt64(8, this);
}
set garply(value: bigint) {
$.utils.setInt64(8, value, this);
}
toString(): string { return "TestGroups_Groups_Bar_" + super.toString(); }
}
export const TestGroups_Groups_Which = {
FOO: 0,
BAR: 2,
BAZ: 1
} as const;
export type TestGroups_Groups_Which = (typeof TestGroups_Groups_Which)[keyof typeof TestGroups_Groups_Which];
export class TestGroups_Groups extends $.Struct {
static readonly FOO = TestGroups_Groups_Which.FOO;
static readonly BAR = TestGroups_Groups_Which.BAR;
static readonly BAZ = TestGroups_Groups_Which.BAZ;
static readonly _zap = {
displayName: "groups",
id: "e22ae74ff9113268",
size: new $.ObjectSize(16, 2),
};
get foo(): TestGroups_Groups_Foo {
$.utils.testWhich("foo", $.utils.getUint16(4, this), 0, this);
return $.utils.getAs(TestGroups_Groups_Foo, this);
}
_initFoo(): TestGroups_Groups_Foo {
$.utils.setUint16(4, 0, this);
return $.utils.getAs(TestGroups_Groups_Foo, this);
}
get _isFoo(): boolean {
return $.utils.getUint16(4, this) === 0;
}
set foo(_: true) {
$.utils.setUint16(4, 0, this);
}
get bar(): TestGroups_Groups_Bar {
$.utils.testWhich("bar", $.utils.getUint16(4, this), 2, this);
return $.utils.getAs(TestGroups_Groups_Bar, this);
}
_initBar(): TestGroups_Groups_Bar {
$.utils.setUint16(4, 2, this);
return $.utils.getAs(TestGroups_Groups_Bar, this);
}
get _isBar(): boolean {
return $.utils.getUint16(4, this) === 2;
}
set bar(_: true) {
$.utils.setUint16(4, 2, this);
}
get baz(): TestGroups_Groups_Baz {
$.utils.testWhich("baz", $.utils.getUint16(4, this), 1, this);
return $.utils.getAs(TestGroups_Groups_Baz, this);
}
_initBaz(): TestGroups_Groups_Baz {
$.utils.setUint16(4, 1, this);
return $.utils.getAs(TestGroups_Groups_Baz, this);
}
get _isBaz(): boolean {
return $.utils.getUint16(4, this) === 1;
}
set baz(_: true) {
$.utils.setUint16(4, 1, this);
}
toString(): string { return "TestGroups_Groups_" + super.toString(); }
which(): TestGroups_Groups_Which {
return $.utils.getUint16(4, this) as TestGroups_Groups_Which;
}
}
export class TestGroups extends $.Struct {
static readonly _zap = {
displayName: "TestGroups",
id: "dc841556134c3103",
size: new $.ObjectSize(16, 2),
};
get groups(): TestGroups_Groups {
return $.utils.getAs(TestGroups_Groups, this);
}
_initGroups(): TestGroups_Groups {
return $.utils.getAs(TestGroups_Groups, this);
}
toString(): string { return "TestGroups_" + super.toString(); }
}
export class TestInterleavedGroups_Group1_Corge extends $.Struct {
static readonly _zap = {
displayName: "corge",
id: "db0afd413f4a313a",
size: new $.ObjectSize(48, 6),
};
get grault(): bigint {
return $.utils.getUint64(32, this);
}
set grault(value: bigint) {
$.utils.setUint64(32, value, this);
}
get garply(): number {
return $.utils.getUint16(24, this);
}
set garply(value: number) {
$.utils.setUint16(24, value, this);
}
get plugh(): string {
return $.utils.getText(2, this);
}
set plugh(value: string) {
$.utils.setText(2, value, this);
}
get xyzzy(): string {
return $.utils.getText(4, this);
}
set xyzzy(value: string) {
$.utils.setText(4, value, this);
}
toString(): string { return "TestInterleavedGroups_Group1_Corge_" + super.toString(); }
}
export const TestInterleavedGroups_Group1_Which = {
QUX: 0,
CORGE: 1,
FRED: 2
} as const;
export type TestInterleavedGroups_Group1_Which = (typeof TestInterleavedGroups_Group1_Which)[keyof typeof TestInterleavedGroups_Group1_Which];
export class TestInterleavedGroups_Group1 extends $.Struct {
static readonly QUX = TestInterleavedGroups_Group1_Which.QUX;
static readonly CORGE = TestInterleavedGroups_Group1_Which.CORGE;
static readonly FRED = TestInterleavedGroups_Group1_Which.FRED;
static readonly _zap = {
displayName: "group1",
id: "c7485a3516c7d3c8",
size: new $.ObjectSize(48, 6),
};
get foo(): number {
return $.utils.getUint32(0, this);
}
set foo(value: number) {
$.utils.setUint32(0, value, this);
}
get bar(): bigint {
return $.utils.getUint64(8, this);
}
set bar(value: bigint) {
$.utils.setUint64(8, value, this);
}
get qux(): number {
$.utils.testWhich("qux", $.utils.getUint16(28, this), 0, this);
return $.utils.getUint16(24, this);
}
get _isQux(): boolean {
return $.utils.getUint16(28, this) === 0;
}
set qux(value: number) {
$.utils.setUint16(28, 0, this);
$.utils.setUint16(24, value, this);
}
get corge(): TestInterleavedGroups_Group1_Corge {
$.utils.testWhich("corge", $.utils.getUint16(28, this), 1, this);
return $.utils.getAs(TestInterleavedGroups_Group1_Corge, this);
}
_initCorge(): TestInterleavedGroups_Group1_Corge {
$.utils.setUint16(28, 1, this);
return $.utils.getAs(TestInterleavedGroups_Group1_Corge, this);
}
get _isCorge(): boolean {
return $.utils.getUint16(28, this) === 1;
}
set corge(_: true) {
$.utils.setUint16(28, 1, this);
}
get fred(): string {
$.utils.testWhich("fred", $.utils.getUint16(28, this), 2, this);
return $.utils.getText(2, this);
}
get _isFred(): boolean {
return $.utils.getUint16(28, this) === 2;
}
set fred(value: string) {
$.utils.setUint16(28, 2, this);
$.utils.setText(2, value, this);
}
get waldo(): string {
return $.utils.getText(0, this);
}
set waldo(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestInterleavedGroups_Group1_" + super.toString(); }
which(): TestInterleavedGroups_Group1_Which {
return $.utils.getUint16(28, this) as TestInterleavedGroups_Group1_Which;
}
}
export class TestInterleavedGroups_Group2_Corge extends $.Struct {
static readonly _zap = {
displayName: "corge",
id: "a017f0366827ee37",
size: new $.ObjectSize(48, 6),
};
get grault(): bigint {
return $.utils.getUint64(40, this);
}
set grault(value: bigint) {
$.utils.setUint64(40, value, this);
}
get garply(): number {
return $.utils.getUint16(26, this);
}
set garply(value: number) {
$.utils.setUint16(26, value, this);
}
get plugh(): string {
return $.utils.getText(3, this);
}
set plugh(value: string) {
$.utils.setText(3, value, this);
}
get xyzzy(): string {
return $.utils.getText(5, this);
}
set xyzzy(value: string) {
$.utils.setText(5, value, this);
}
toString(): string { return "TestInterleavedGroups_Group2_Corge_" + super.toString(); }
}
export const TestInterleavedGroups_Group2_Which = {
QUX: 0,
CORGE: 1,
FRED: 2
} as const;
export type TestInterleavedGroups_Group2_Which = (typeof TestInterleavedGroups_Group2_Which)[keyof typeof TestInterleavedGroups_Group2_Which];
export class TestInterleavedGroups_Group2 extends $.Struct {
static readonly QUX = TestInterleavedGroups_Group2_Which.QUX;
static readonly CORGE = TestInterleavedGroups_Group2_Which.CORGE;
static readonly FRED = TestInterleavedGroups_Group2_Which.FRED;
static readonly _zap = {
displayName: "group2",
id: "cc85a335569990e9",
size: new $.ObjectSize(48, 6),
};
get foo(): number {
return $.utils.getUint32(4, this);
}
set foo(value: number) {
$.utils.setUint32(4, value, this);
}
get bar(): bigint {
return $.utils.getUint64(16, this);
}
set bar(value: bigint) {
$.utils.setUint64(16, value, this);
}
get qux(): number {
$.utils.testWhich("qux", $.utils.getUint16(30, this), 0, this);
return $.utils.getUint16(26, this);
}
get _isQux(): boolean {
return $.utils.getUint16(30, this) === 0;
}
set qux(value: number) {
$.utils.setUint16(30, 0, this);
$.utils.setUint16(26, value, this);
}
get corge(): TestInterleavedGroups_Group2_Corge {
$.utils.testWhich("corge", $.utils.getUint16(30, this), 1, this);
return $.utils.getAs(TestInterleavedGroups_Group2_Corge, this);
}
_initCorge(): TestInterleavedGroups_Group2_Corge {
$.utils.setUint16(30, 1, this);
return $.utils.getAs(TestInterleavedGroups_Group2_Corge, this);
}
get _isCorge(): boolean {
return $.utils.getUint16(30, this) === 1;
}
set corge(_: true) {
$.utils.setUint16(30, 1, this);
}
get fred(): string {
$.utils.testWhich("fred", $.utils.getUint16(30, this), 2, this);
return $.utils.getText(3, this);
}
get _isFred(): boolean {
return $.utils.getUint16(30, this) === 2;
}
set fred(value: string) {
$.utils.setUint16(30, 2, this);
$.utils.setText(3, value, this);
}
get waldo(): string {
return $.utils.getText(1, this);
}
set waldo(value: string) {
$.utils.setText(1, value, this);
}
toString(): string { return "TestInterleavedGroups_Group2_" + super.toString(); }
which(): TestInterleavedGroups_Group2_Which {
return $.utils.getUint16(30, this) as TestInterleavedGroups_Group2_Which;
}
}
export class TestInterleavedGroups extends $.Struct {
static readonly _zap = {
displayName: "TestInterleavedGroups",
id: "f77ed6f7454eec40",
size: new $.ObjectSize(48, 6),
};
get group1(): TestInterleavedGroups_Group1 {
return $.utils.getAs(TestInterleavedGroups_Group1, this);
}
_initGroup1(): TestInterleavedGroups_Group1 {
return $.utils.getAs(TestInterleavedGroups_Group1, this);
}
get group2(): TestInterleavedGroups_Group2 {
return $.utils.getAs(TestInterleavedGroups_Group2, this);
}
_initGroup2(): TestInterleavedGroups_Group2 {
return $.utils.getAs(TestInterleavedGroups_Group2, this);
}
toString(): string { return "TestInterleavedGroups_" + super.toString(); }
}
export class TestUnionDefaults extends $.Struct {
static readonly _zap = {
displayName: "TestUnionDefaults",
id: "94f7e0b103b4b718",
size: new $.ObjectSize(0, 4),
defaultS16s8s64s8Set: $.readRawPointer(new Uint8Array([16, 11, 80, 8, 2, 85, 3, 3, 4, 1, 3, 65, 1, 2, 123, 0, 0, 4, 55, 0, 0, 127, 135, 75, 107, 93, 84, 220, 43, 0, 2]).buffer),
defaultS0sps1s32Set: $.readRawPointer(new Uint8Array([16, 12, 80, 8, 2, 69, 7, 11, 3, 0, 2, 1, 1, 112, 78, 97, 188, 0, 2, 17, 1, 34, 7, 102, 111, 111]).buffer),
defaultUnnamed1: $.readRawPointer(new Uint8Array([16, 5, 80, 2, 2, 1, 123, 0, 2]).buffer),
defaultUnnamed2: $.readRawPointer(new Uint8Array([16, 7, 80, 2, 2, 16, 1, 3, 65, 1, 17, 5, 34, 17, 5, 34, 7, 102, 111, 111, 7, 98, 97, 114]).buffer)
};
_adoptS16s8s64s8Set(value: $.Orphan<TestUnion>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownS16s8s64s8Set(): $.Orphan<TestUnion> {
return $.utils.disown(this.s16s8s64s8Set);
}
get s16s8s64s8Set(): TestUnion {
return $.utils.getStruct(0, TestUnion, this, TestUnionDefaults._zap.defaultS16s8s64s8Set);
}
_hasS16s8s64s8Set(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initS16s8s64s8Set(): TestUnion {
return $.utils.initStructAt(0, TestUnion, this);
}
set s16s8s64s8Set(value: TestUnion) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptS0sps1s32Set(value: $.Orphan<TestUnion>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownS0sps1s32Set(): $.Orphan<TestUnion> {
return $.utils.disown(this.s0sps1s32Set);
}
get s0sps1s32Set(): TestUnion {
return $.utils.getStruct(1, TestUnion, this, TestUnionDefaults._zap.defaultS0sps1s32Set);
}
_hasS0sps1s32Set(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initS0sps1s32Set(): TestUnion {
return $.utils.initStructAt(1, TestUnion, this);
}
set s0sps1s32Set(value: TestUnion) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptUnnamed1(value: $.Orphan<TestUnnamedUnion>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownUnnamed1(): $.Orphan<TestUnnamedUnion> {
return $.utils.disown(this.unnamed1);
}
get unnamed1(): TestUnnamedUnion {
return $.utils.getStruct(2, TestUnnamedUnion, this, TestUnionDefaults._zap.defaultUnnamed1);
}
_hasUnnamed1(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
_initUnnamed1(): TestUnnamedUnion {
return $.utils.initStructAt(2, TestUnnamedUnion, this);
}
set unnamed1(value: TestUnnamedUnion) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
_adoptUnnamed2(value: $.Orphan<TestUnnamedUnion>): void {
$.utils.adopt(value, $.utils.getPointer(3, this));
}
_disownUnnamed2(): $.Orphan<TestUnnamedUnion> {
return $.utils.disown(this.unnamed2);
}
get unnamed2(): TestUnnamedUnion {
return $.utils.getStruct(3, TestUnnamedUnion, this, TestUnionDefaults._zap.defaultUnnamed2);
}
_hasUnnamed2(): boolean {
return !$.utils.isNull($.utils.getPointer(3, this));
}
_initUnnamed2(): TestUnnamedUnion {
return $.utils.initStructAt(3, TestUnnamedUnion, this);
}
set unnamed2(value: TestUnnamedUnion) {
$.utils.copyFrom(value, $.utils.getPointer(3, this));
}
toString(): string { return "TestUnionDefaults_" + super.toString(); }
}
export const TestNestedTypes_NestedEnum = {
FOO: 0,
BAR: 1
} as const;
export type TestNestedTypes_NestedEnum = (typeof TestNestedTypes_NestedEnum)[keyof typeof TestNestedTypes_NestedEnum];
export const TestNestedTypes_NestedStruct_NestedEnum = {
BAZ: 0,
QUX: 1,
QUUX: 2
} as const;
export type TestNestedTypes_NestedStruct_NestedEnum = (typeof TestNestedTypes_NestedStruct_NestedEnum)[keyof typeof TestNestedTypes_NestedStruct_NestedEnum];
export class TestNestedTypes_NestedStruct extends $.Struct {
static readonly NestedEnum = TestNestedTypes_NestedStruct_NestedEnum;
static readonly _zap = {
displayName: "NestedStruct",
id: "82cd03a53b29d76b",
size: new $.ObjectSize(8, 0),
defaultOuterNestedEnum: $.getUint16Mask(1),
defaultInnerNestedEnum: $.getUint16Mask(2)
};
get outerNestedEnum(): TestNestedTypes_NestedEnum {
return $.utils.getUint16(0, this, TestNestedTypes_NestedStruct._zap.defaultOuterNestedEnum) as TestNestedTypes_NestedEnum;
}
set outerNestedEnum(value: TestNestedTypes_NestedEnum) {
$.utils.setUint16(0, value, this, TestNestedTypes_NestedStruct._zap.defaultOuterNestedEnum);
}
get innerNestedEnum(): TestNestedTypes_NestedStruct_NestedEnum {
return $.utils.getUint16(2, this, TestNestedTypes_NestedStruct._zap.defaultInnerNestedEnum) as TestNestedTypes_NestedStruct_NestedEnum;
}
set innerNestedEnum(value: TestNestedTypes_NestedStruct_NestedEnum) {
$.utils.setUint16(2, value, this, TestNestedTypes_NestedStruct._zap.defaultInnerNestedEnum);
}
toString(): string { return "TestNestedTypes_NestedStruct_" + super.toString(); }
}
export class TestNestedTypes extends $.Struct {
static readonly NestedEnum = TestNestedTypes_NestedEnum;
static readonly NestedStruct = TestNestedTypes_NestedStruct;
static readonly _zap = {
displayName: "TestNestedTypes",
id: "d9f2b5941a343bcd",
size: new $.ObjectSize(8, 1),
defaultOuterNestedEnum: $.getUint16Mask(1),
defaultInnerNestedEnum: $.getUint16Mask(2)
};
_adoptNestedStruct(value: $.Orphan<TestNestedTypes_NestedStruct>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownNestedStruct(): $.Orphan<TestNestedTypes_NestedStruct> {
return $.utils.disown(this.nestedStruct);
}
get nestedStruct(): TestNestedTypes_NestedStruct {
return $.utils.getStruct(0, TestNestedTypes_NestedStruct, this);
}
_hasNestedStruct(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initNestedStruct(): TestNestedTypes_NestedStruct {
return $.utils.initStructAt(0, TestNestedTypes_NestedStruct, this);
}
set nestedStruct(value: TestNestedTypes_NestedStruct) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
get outerNestedEnum(): TestNestedTypes_NestedEnum {
return $.utils.getUint16(0, this, TestNestedTypes._zap.defaultOuterNestedEnum) as TestNestedTypes_NestedEnum;
}
set outerNestedEnum(value: TestNestedTypes_NestedEnum) {
$.utils.setUint16(0, value, this, TestNestedTypes._zap.defaultOuterNestedEnum);
}
get innerNestedEnum(): TestNestedTypes_NestedStruct_NestedEnum {
return $.utils.getUint16(2, this, TestNestedTypes._zap.defaultInnerNestedEnum) as TestNestedTypes_NestedStruct_NestedEnum;
}
set innerNestedEnum(value: TestNestedTypes_NestedStruct_NestedEnum) {
$.utils.setUint16(2, value, this, TestNestedTypes._zap.defaultInnerNestedEnum);
}
toString(): string { return "TestNestedTypes_" + super.toString(); }
}
export class TestUsing extends $.Struct {
static readonly _zap = {
displayName: "TestUsing",
id: "e78aac389e77b065",
size: new $.ObjectSize(8, 0),
defaultOuterNestedEnum: $.getUint16Mask(1),
defaultInnerNestedEnum: $.getUint16Mask(2)
};
get outerNestedEnum(): TestNestedTypes_NestedEnum {
return $.utils.getUint16(2, this, TestUsing._zap.defaultOuterNestedEnum) as TestNestedTypes_NestedEnum;
}
set outerNestedEnum(value: TestNestedTypes_NestedEnum) {
$.utils.setUint16(2, value, this, TestUsing._zap.defaultOuterNestedEnum);
}
get innerNestedEnum(): TestNestedTypes_NestedStruct_NestedEnum {
return $.utils.getUint16(0, this, TestUsing._zap.defaultInnerNestedEnum) as TestNestedTypes_NestedStruct_NestedEnum;
}
set innerNestedEnum(value: TestNestedTypes_NestedStruct_NestedEnum) {
$.utils.setUint16(0, value, this, TestUsing._zap.defaultInnerNestedEnum);
}
toString(): string { return "TestUsing_" + super.toString(); }
}
export class TestLists_Struct0 extends $.Struct {
static readonly _zap = {
displayName: "Struct0",
id: "8412c03b75b2cfee",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestLists_Struct0_" + super.toString(); }
}
export class TestLists_Struct1 extends $.Struct {
static readonly _zap = {
displayName: "Struct1",
id: "e0fe5870b141ad69",
size: new $.ObjectSize(8, 0),
};
get f(): boolean {
return $.utils.getBit(0, this);
}
set f(value: boolean) {
$.utils.setBit(0, value, this);
}
toString(): string { return "TestLists_Struct1_" + super.toString(); }
}
export class TestLists_Struct8 extends $.Struct {
static readonly _zap = {
displayName: "Struct8",
id: "a6411a353090145b",
size: new $.ObjectSize(8, 0),
};
get f(): number {
return $.utils.getUint8(0, this);
}
set f(value: number) {
$.utils.setUint8(0, value, this);
}
toString(): string { return "TestLists_Struct8_" + super.toString(); }
}
export class TestLists_Struct16 extends $.Struct {
static readonly _zap = {
displayName: "Struct16",
id: "a8abf7a82928986c",
size: new $.ObjectSize(8, 0),
};
get f(): number {
return $.utils.getUint16(0, this);
}
set f(value: number) {
$.utils.setUint16(0, value, this);
}
toString(): string { return "TestLists_Struct16_" + super.toString(); }
}
export class TestLists_Struct32 extends $.Struct {
static readonly _zap = {
displayName: "Struct32",
id: "ad7beedc4ed30742",
size: new $.ObjectSize(8, 0),
};
get f(): number {
return $.utils.getUint32(0, this);
}
set f(value: number) {
$.utils.setUint32(0, value, this);
}
toString(): string { return "TestLists_Struct32_" + super.toString(); }
}
export class TestLists_Struct64 extends $.Struct {
static readonly _zap = {
displayName: "Struct64",
id: "ef9a34f2ff7cc646",
size: new $.ObjectSize(8, 0),
};
get f(): bigint {
return $.utils.getUint64(0, this);
}
set f(value: bigint) {
$.utils.setUint64(0, value, this);
}
toString(): string { return "TestLists_Struct64_" + super.toString(); }
}
export class TestLists_StructP extends $.Struct {
static readonly _zap = {
displayName: "StructP",
id: "c6abf1b0329e6227",
size: new $.ObjectSize(0, 1),
};
get f(): string {
return $.utils.getText(0, this);
}
set f(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestLists_StructP_" + super.toString(); }
}
export class TestLists_Struct0c extends $.Struct {
static readonly _zap = {
displayName: "Struct0c",
id: "943a234ca336b16a",
size: new $.ObjectSize(0, 1),
};
get pad(): string {
return $.utils.getText(0, this);
}
set pad(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestLists_Struct0c_" + super.toString(); }
}
export class TestLists_Struct1c extends $.Struct {
static readonly _zap = {
displayName: "Struct1c",
id: "8991bc0e74a594cd",
size: new $.ObjectSize(8, 1),
};
get f(): boolean {
return $.utils.getBit(0, this);
}
set f(value: boolean) {
$.utils.setBit(0, value, this);
}
get pad(): string {
return $.utils.getText(0, this);
}
set pad(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestLists_Struct1c_" + super.toString(); }
}
export class TestLists_Struct8c extends $.Struct {
static readonly _zap = {
displayName: "Struct8c",
id: "ed267416528c7a24",
size: new $.ObjectSize(8, 1),
};
get f(): number {
return $.utils.getUint8(0, this);
}
set f(value: number) {
$.utils.setUint8(0, value, this);
}
get pad(): string {
return $.utils.getText(0, this);
}
set pad(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestLists_Struct8c_" + super.toString(); }
}
export class TestLists_Struct16c extends $.Struct {
static readonly _zap = {
displayName: "Struct16c",
id: "9978837b037d58e6",
size: new $.ObjectSize(8, 1),
};
get f(): number {
return $.utils.getUint16(0, this);
}
set f(value: number) {
$.utils.setUint16(0, value, this);
}
get pad(): string {
return $.utils.getText(0, this);
}
set pad(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestLists_Struct16c_" + super.toString(); }
}
export class TestLists_Struct32c extends $.Struct {
static readonly _zap = {
displayName: "Struct32c",
id: "ed5fa940f54a7904",
size: new $.ObjectSize(8, 1),
};
get f(): number {
return $.utils.getUint32(0, this);
}
set f(value: number) {
$.utils.setUint32(0, value, this);
}
get pad(): string {
return $.utils.getText(0, this);
}
set pad(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestLists_Struct32c_" + super.toString(); }
}
export class TestLists_Struct64c extends $.Struct {
static readonly _zap = {
displayName: "Struct64c",
id: "bc743778f2597c7d",
size: new $.ObjectSize(8, 1),
};
get f(): bigint {
return $.utils.getUint64(0, this);
}
set f(value: bigint) {
$.utils.setUint64(0, value, this);
}
get pad(): string {
return $.utils.getText(0, this);
}
set pad(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestLists_Struct64c_" + super.toString(); }
}
export class TestLists_StructPc extends $.Struct {
static readonly _zap = {
displayName: "StructPc",
id: "c2e364a40182013d",
size: new $.ObjectSize(8, 1),
};
get f(): string {
return $.utils.getText(0, this);
}
set f(value: string) {
$.utils.setText(0, value, this);
}
get pad(): bigint {
return $.utils.getUint64(0, this);
}
set pad(value: bigint) {
$.utils.setUint64(0, value, this);
}
toString(): string { return "TestLists_StructPc_" + super.toString(); }
}
/**
* Small structs, when encoded as list, will be encoded as primitive lists rather than struct
* lists, to save space.
*
*/
export class TestLists extends $.Struct {
static readonly Struct0 = TestLists_Struct0;
static readonly Struct1 = TestLists_Struct1;
static readonly Struct8 = TestLists_Struct8;
static readonly Struct16 = TestLists_Struct16;
static readonly Struct32 = TestLists_Struct32;
static readonly Struct64 = TestLists_Struct64;
static readonly StructP = TestLists_StructP;
static readonly Struct0c = TestLists_Struct0c;
static readonly Struct1c = TestLists_Struct1c;
static readonly Struct8c = TestLists_Struct8c;
static readonly Struct16c = TestLists_Struct16c;
static readonly Struct32c = TestLists_Struct32c;
static readonly Struct64c = TestLists_Struct64c;
static readonly StructPc = TestLists_StructPc;
static readonly _zap = {
displayName: "TestLists",
id: "e41885c94393277e",
size: new $.ObjectSize(0, 10),
};
static _List0: $.ListCtor<TestLists_Struct0>;
static _List1: $.ListCtor<TestLists_Struct1>;
static _List8: $.ListCtor<TestLists_Struct8>;
static _List16: $.ListCtor<TestLists_Struct16>;
static _List32: $.ListCtor<TestLists_Struct32>;
static _List64: $.ListCtor<TestLists_Struct64>;
static _ListP: $.ListCtor<TestLists_StructP>;
static _Int32ListList: $.ListCtor<$.List<number>>;
static _TextListList: $.ListCtor<$.List<string>>;
static _StructListList: $.ListCtor<$.List<TestAllTypes>>;
_adoptList0(value: $.Orphan<$.List<TestLists_Struct0>>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownList0(): $.Orphan<$.List<TestLists_Struct0>> {
return $.utils.disown(this.list0);
}
get list0(): $.List<TestLists_Struct0> {
return $.utils.getList(0, TestLists._List0, this);
}
_hasList0(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initList0(length: number): $.List<TestLists_Struct0> {
return $.utils.initList(0, TestLists._List0, length, this);
}
set list0(value: $.List<TestLists_Struct0>) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptList1(value: $.Orphan<$.List<TestLists_Struct1>>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownList1(): $.Orphan<$.List<TestLists_Struct1>> {
return $.utils.disown(this.list1);
}
get list1(): $.List<TestLists_Struct1> {
return $.utils.getList(1, TestLists._List1, this);
}
_hasList1(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initList1(length: number): $.List<TestLists_Struct1> {
return $.utils.initList(1, TestLists._List1, length, this);
}
set list1(value: $.List<TestLists_Struct1>) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptList8(value: $.Orphan<$.List<TestLists_Struct8>>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownList8(): $.Orphan<$.List<TestLists_Struct8>> {
return $.utils.disown(this.list8);
}
get list8(): $.List<TestLists_Struct8> {
return $.utils.getList(2, TestLists._List8, this);
}
_hasList8(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
_initList8(length: number): $.List<TestLists_Struct8> {
return $.utils.initList(2, TestLists._List8, length, this);
}
set list8(value: $.List<TestLists_Struct8>) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
_adoptList16(value: $.Orphan<$.List<TestLists_Struct16>>): void {
$.utils.adopt(value, $.utils.getPointer(3, this));
}
_disownList16(): $.Orphan<$.List<TestLists_Struct16>> {
return $.utils.disown(this.list16);
}
get list16(): $.List<TestLists_Struct16> {
return $.utils.getList(3, TestLists._List16, this);
}
_hasList16(): boolean {
return !$.utils.isNull($.utils.getPointer(3, this));
}
_initList16(length: number): $.List<TestLists_Struct16> {
return $.utils.initList(3, TestLists._List16, length, this);
}
set list16(value: $.List<TestLists_Struct16>) {
$.utils.copyFrom(value, $.utils.getPointer(3, this));
}
_adoptList32(value: $.Orphan<$.List<TestLists_Struct32>>): void {
$.utils.adopt(value, $.utils.getPointer(4, this));
}
_disownList32(): $.Orphan<$.List<TestLists_Struct32>> {
return $.utils.disown(this.list32);
}
get list32(): $.List<TestLists_Struct32> {
return $.utils.getList(4, TestLists._List32, this);
}
_hasList32(): boolean {
return !$.utils.isNull($.utils.getPointer(4, this));
}
_initList32(length: number): $.List<TestLists_Struct32> {
return $.utils.initList(4, TestLists._List32, length, this);
}
set list32(value: $.List<TestLists_Struct32>) {
$.utils.copyFrom(value, $.utils.getPointer(4, this));
}
_adoptList64(value: $.Orphan<$.List<TestLists_Struct64>>): void {
$.utils.adopt(value, $.utils.getPointer(5, this));
}
_disownList64(): $.Orphan<$.List<TestLists_Struct64>> {
return $.utils.disown(this.list64);
}
get list64(): $.List<TestLists_Struct64> {
return $.utils.getList(5, TestLists._List64, this);
}
_hasList64(): boolean {
return !$.utils.isNull($.utils.getPointer(5, this));
}
_initList64(length: number): $.List<TestLists_Struct64> {
return $.utils.initList(5, TestLists._List64, length, this);
}
set list64(value: $.List<TestLists_Struct64>) {
$.utils.copyFrom(value, $.utils.getPointer(5, this));
}
_adoptListP(value: $.Orphan<$.List<TestLists_StructP>>): void {
$.utils.adopt(value, $.utils.getPointer(6, this));
}
_disownListP(): $.Orphan<$.List<TestLists_StructP>> {
return $.utils.disown(this.listP);
}
get listP(): $.List<TestLists_StructP> {
return $.utils.getList(6, TestLists._ListP, this);
}
_hasListP(): boolean {
return !$.utils.isNull($.utils.getPointer(6, this));
}
_initListP(length: number): $.List<TestLists_StructP> {
return $.utils.initList(6, TestLists._ListP, length, this);
}
set listP(value: $.List<TestLists_StructP>) {
$.utils.copyFrom(value, $.utils.getPointer(6, this));
}
_adoptInt32ListList(value: $.Orphan<$.List<$.List<number>>>): void {
$.utils.adopt(value, $.utils.getPointer(7, this));
}
_disownInt32ListList(): $.Orphan<$.List<$.List<number>>> {
return $.utils.disown(this.int32ListList);
}
get int32ListList(): $.List<$.List<number>> {
return $.utils.getList(7, TestLists._Int32ListList, this);
}
_hasInt32ListList(): boolean {
return !$.utils.isNull($.utils.getPointer(7, this));
}
_initInt32ListList(length: number): $.List<$.List<number>> {
return $.utils.initList(7, TestLists._Int32ListList, length, this);
}
set int32ListList(value: $.List<$.List<number>>) {
$.utils.copyFrom(value, $.utils.getPointer(7, this));
}
_adoptTextListList(value: $.Orphan<$.List<$.List<string>>>): void {
$.utils.adopt(value, $.utils.getPointer(8, this));
}
_disownTextListList(): $.Orphan<$.List<$.List<string>>> {
return $.utils.disown(this.textListList);
}
get textListList(): $.List<$.List<string>> {
return $.utils.getList(8, TestLists._TextListList, this);
}
_hasTextListList(): boolean {
return !$.utils.isNull($.utils.getPointer(8, this));
}
_initTextListList(length: number): $.List<$.List<string>> {
return $.utils.initList(8, TestLists._TextListList, length, this);
}
set textListList(value: $.List<$.List<string>>) {
$.utils.copyFrom(value, $.utils.getPointer(8, this));
}
_adoptStructListList(value: $.Orphan<$.List<$.List<TestAllTypes>>>): void {
$.utils.adopt(value, $.utils.getPointer(9, this));
}
_disownStructListList(): $.Orphan<$.List<$.List<TestAllTypes>>> {
return $.utils.disown(this.structListList);
}
get structListList(): $.List<$.List<TestAllTypes>> {
return $.utils.getList(9, TestLists._StructListList, this);
}
_hasStructListList(): boolean {
return !$.utils.isNull($.utils.getPointer(9, this));
}
_initStructListList(length: number): $.List<$.List<TestAllTypes>> {
return $.utils.initList(9, TestLists._StructListList, length, this);
}
set structListList(value: $.List<$.List<TestAllTypes>>) {
$.utils.copyFrom(value, $.utils.getPointer(9, this));
}
toString(): string { return "TestLists_" + super.toString(); }
}
export class TestFieldZeroIsBit extends $.Struct {
static readonly _zap = {
displayName: "TestFieldZeroIsBit",
id: "92fc29a80f3ddd5c",
size: new $.ObjectSize(8, 0),
defaultSecondBit: $.getBitMask(true, 1),
defaultThirdField: $.getUint8Mask(123)
};
get bit(): boolean {
return $.utils.getBit(0, this);
}
set bit(value: boolean) {
$.utils.setBit(0, value, this);
}
get secondBit(): boolean {
return $.utils.getBit(1, this, TestFieldZeroIsBit._zap.defaultSecondBit);
}
set secondBit(value: boolean) {
$.utils.setBit(1, value, this, TestFieldZeroIsBit._zap.defaultSecondBit);
}
get thirdField(): number {
return $.utils.getUint8(1, this, TestFieldZeroIsBit._zap.defaultThirdField);
}
set thirdField(value: number) {
$.utils.setUint8(1, value, this, TestFieldZeroIsBit._zap.defaultThirdField);
}
toString(): string { return "TestFieldZeroIsBit_" + super.toString(); }
}
export class TestListDefaults extends $.Struct {
static readonly _zap = {
displayName: "TestListDefaults",
id: "a851ad32cbc2ffea",
size: new $.ObjectSize(0, 1),
defaultLists: $.readRawPointer(new Uint8Array([16, 136, 64, 10, 17, 37, 7, 17, 37, 39, 17, 53, 23, 17, 61, 23, 17, 69, 23, 17, 77, 23, 17, 85, 23, 17, 101, 30, 17, 125, 30, 17, 173, 22, 1, 8, 17, 16, 1, 1, 1, 0, 0, 1, 1, 1, 1, 17, 8, 1, 1, 123, 1, 45, 17, 8, 1, 3, 57, 48, 3, 133, 26, 17, 8, 1, 15, 21, 205, 91, 7, 15, 210, 56, 251, 13, 17, 8, 1, 127, 192, 186, 138, 60, 213, 98, 4, 127, 135, 75, 170, 237, 97, 85, 8, 65, 8, 1, 17, 5, 34, 17, 5, 34, 7, 102, 111, 111, 7, 98, 97, 114, 17, 9, 28, 17, 13, 20, 17, 13, 12, 17, 1, 2, 1, 3, 17, 4, 5, 7, 242, 79, 188, 17, 9, 22, 17, 21, 14, 17, 25, 22, 17, 5, 34, 17, 5, 34, 7, 102, 111, 111, 7, 98, 97, 114, 17, 1, 34, 7, 98, 97, 122, 17, 5, 34, 17, 5, 50, 7, 113, 117, 120, 31, 99, 111, 114, 103, 101, 49, 5, 167, 1, 17, 213, 215, 81, 8, 6, 20, 16, 123, 0, 24, 48, 200, 1, 0, 24, 81, 4, 6, 20, 48, 21, 3, 0, 24]).buffer)
};
_adoptLists(value: $.Orphan<TestLists>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownLists(): $.Orphan<TestLists> {
return $.utils.disown(this.lists);
}
get lists(): TestLists {
return $.utils.getStruct(0, TestLists, this, TestListDefaults._zap.defaultLists);
}
_hasLists(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initLists(): TestLists {
return $.utils.initStructAt(0, TestLists, this);
}
set lists(value: TestLists) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestListDefaults_" + super.toString(); }
}
export const TestLateUnion_TheUnion_Which = {
QUX: 0,
CORGE: 1,
GRAULT: 2
} as const;
export type TestLateUnion_TheUnion_Which = (typeof TestLateUnion_TheUnion_Which)[keyof typeof TestLateUnion_TheUnion_Which];
export class TestLateUnion_TheUnion extends $.Struct {
static readonly QUX = TestLateUnion_TheUnion_Which.QUX;
static readonly CORGE = TestLateUnion_TheUnion_Which.CORGE;
static readonly GRAULT = TestLateUnion_TheUnion_Which.GRAULT;
static readonly _zap = {
displayName: "theUnion",
id: "807280a2901aa079",
size: new $.ObjectSize(24, 3),
};
get qux(): string {
$.utils.testWhich("qux", $.utils.getUint16(6, this), 0, this);
return $.utils.getText(1, this);
}
get _isQux(): boolean {
return $.utils.getUint16(6, this) === 0;
}
set qux(value: string) {
$.utils.setUint16(6, 0, this);
$.utils.setText(1, value, this);
}
_adoptCorge(value: $.Orphan<$.List<number>>): void {
$.utils.setUint16(6, 1, this);
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownCorge(): $.Orphan<$.List<number>> {
return $.utils.disown(this.corge);
}
get corge(): $.List<number> {
$.utils.testWhich("corge", $.utils.getUint16(6, this), 1, this);
return $.utils.getList(1, $.Int32List, this);
}
_hasCorge(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initCorge(length: number): $.List<number> {
$.utils.setUint16(6, 1, this);
return $.utils.initList(1, $.Int32List, length, this);
}
get _isCorge(): boolean {
return $.utils.getUint16(6, this) === 1;
}
set corge(value: $.List<number>) {
$.utils.setUint16(6, 1, this);
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
get grault(): number {
$.utils.testWhich("grault", $.utils.getUint16(6, this), 2, this);
return $.utils.getFloat32(8, this);
}
get _isGrault(): boolean {
return $.utils.getUint16(6, this) === 2;
}
set grault(value: number) {
$.utils.setUint16(6, 2, this);
$.utils.setFloat32(8, value, this);
}
toString(): string { return "TestLateUnion_TheUnion_" + super.toString(); }
which(): TestLateUnion_TheUnion_Which {
return $.utils.getUint16(6, this) as TestLateUnion_TheUnion_Which;
}
}
export const TestLateUnion_AnotherUnion_Which = {
QUX: 0,
CORGE: 1,
GRAULT: 2
} as const;
export type TestLateUnion_AnotherUnion_Which = (typeof TestLateUnion_AnotherUnion_Which)[keyof typeof TestLateUnion_AnotherUnion_Which];
export class TestLateUnion_AnotherUnion extends $.Struct {
static readonly QUX = TestLateUnion_AnotherUnion_Which.QUX;
static readonly CORGE = TestLateUnion_AnotherUnion_Which.CORGE;
static readonly GRAULT = TestLateUnion_AnotherUnion_Which.GRAULT;
static readonly _zap = {
displayName: "anotherUnion",
id: "c1973984dee98e3a",
size: new $.ObjectSize(24, 3),
};
get qux(): string {
$.utils.testWhich("qux", $.utils.getUint16(12, this), 0, this);
return $.utils.getText(2, this);
}
get _isQux(): boolean {
return $.utils.getUint16(12, this) === 0;
}
set qux(value: string) {
$.utils.setUint16(12, 0, this);
$.utils.setText(2, value, this);
}
_adoptCorge(value: $.Orphan<$.List<number>>): void {
$.utils.setUint16(12, 1, this);
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownCorge(): $.Orphan<$.List<number>> {
return $.utils.disown(this.corge);
}
get corge(): $.List<number> {
$.utils.testWhich("corge", $.utils.getUint16(12, this), 1, this);
return $.utils.getList(2, $.Int32List, this);
}
_hasCorge(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
_initCorge(length: number): $.List<number> {
$.utils.setUint16(12, 1, this);
return $.utils.initList(2, $.Int32List, length, this);
}
get _isCorge(): boolean {
return $.utils.getUint16(12, this) === 1;
}
set corge(value: $.List<number>) {
$.utils.setUint16(12, 1, this);
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
get grault(): number {
$.utils.testWhich("grault", $.utils.getUint16(12, this), 2, this);
return $.utils.getFloat32(16, this);
}
get _isGrault(): boolean {
return $.utils.getUint16(12, this) === 2;
}
set grault(value: number) {
$.utils.setUint16(12, 2, this);
$.utils.setFloat32(16, value, this);
}
toString(): string { return "TestLateUnion_AnotherUnion_" + super.toString(); }
which(): TestLateUnion_AnotherUnion_Which {
return $.utils.getUint16(12, this) as TestLateUnion_AnotherUnion_Which;
}
}
/**
* Test what happens if the unions are not the first ordinals in the struct. At one point this
* was broken for the dynamic API.
*
*/
export class TestLateUnion extends $.Struct {
static readonly _zap = {
displayName: "TestLateUnion",
id: "a76e3c9bb7fd56d3",
size: new $.ObjectSize(24, 3),
};
get foo(): number {
return $.utils.getInt32(0, this);
}
set foo(value: number) {
$.utils.setInt32(0, value, this);
}
get bar(): string {
return $.utils.getText(0, this);
}
set bar(value: string) {
$.utils.setText(0, value, this);
}
get baz(): number {
return $.utils.getInt16(4, this);
}
set baz(value: number) {
$.utils.setInt16(4, value, this);
}
get theUnion(): TestLateUnion_TheUnion {
return $.utils.getAs(TestLateUnion_TheUnion, this);
}
_initTheUnion(): TestLateUnion_TheUnion {
return $.utils.getAs(TestLateUnion_TheUnion, this);
}
get anotherUnion(): TestLateUnion_AnotherUnion {
return $.utils.getAs(TestLateUnion_AnotherUnion, this);
}
_initAnotherUnion(): TestLateUnion_AnotherUnion {
return $.utils.getAs(TestLateUnion_AnotherUnion, this);
}
toString(): string { return "TestLateUnion_" + super.toString(); }
}
/**
* A subset of TestNewVersion.
*
*/
export class TestOldVersion extends $.Struct {
static readonly _zap = {
displayName: "TestOldVersion",
id: "95b30dd14e01dda8",
size: new $.ObjectSize(8, 2),
};
get old1(): bigint {
return $.utils.getInt64(0, this);
}
set old1(value: bigint) {
$.utils.setInt64(0, value, this);
}
get old2(): string {
return $.utils.getText(0, this);
}
set old2(value: string) {
$.utils.setText(0, value, this);
}
_adoptOld3(value: $.Orphan<TestOldVersion>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownOld3(): $.Orphan<TestOldVersion> {
return $.utils.disown(this.old3);
}
get old3(): TestOldVersion {
return $.utils.getStruct(1, TestOldVersion, this);
}
_hasOld3(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initOld3(): TestOldVersion {
return $.utils.initStructAt(1, TestOldVersion, this);
}
set old3(value: TestOldVersion) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestOldVersion_" + super.toString(); }
}
/**
* A superset of TestOldVersion.
*
*/
export class TestNewVersion extends $.Struct {
static readonly _zap = {
displayName: "TestNewVersion",
id: "8ed75a7469f04ce3",
size: new $.ObjectSize(16, 3),
defaultNew1: $.getInt64Mask(0x3dbn),
defaultNew2: "baz"
};
get old1(): bigint {
return $.utils.getInt64(0, this);
}
set old1(value: bigint) {
$.utils.setInt64(0, value, this);
}
get old2(): string {
return $.utils.getText(0, this);
}
set old2(value: string) {
$.utils.setText(0, value, this);
}
_adoptOld3(value: $.Orphan<TestNewVersion>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownOld3(): $.Orphan<TestNewVersion> {
return $.utils.disown(this.old3);
}
get old3(): TestNewVersion {
return $.utils.getStruct(1, TestNewVersion, this);
}
_hasOld3(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initOld3(): TestNewVersion {
return $.utils.initStructAt(1, TestNewVersion, this);
}
set old3(value: TestNewVersion) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
get new1(): bigint {
return $.utils.getInt64(8, this, TestNewVersion._zap.defaultNew1);
}
set new1(value: bigint) {
$.utils.setInt64(8, value, this, TestNewVersion._zap.defaultNew1);
}
get new2(): string {
return $.utils.getText(2, this, TestNewVersion._zap.defaultNew2);
}
set new2(value: string) {
$.utils.setText(2, value, this);
}
toString(): string { return "TestNewVersion_" + super.toString(); }
}
export const TestOldUnionVersion_Which = {
A: 0,
B: 1
} as const;
export type TestOldUnionVersion_Which = (typeof TestOldUnionVersion_Which)[keyof typeof TestOldUnionVersion_Which];
export class TestOldUnionVersion extends $.Struct {
static readonly A = TestOldUnionVersion_Which.A;
static readonly B = TestOldUnionVersion_Which.B;
static readonly _zap = {
displayName: "TestOldUnionVersion",
id: "bd5fe16e5170c492",
size: new $.ObjectSize(16, 0),
};
get _isA(): boolean {
return $.utils.getUint16(0, this) === 0;
}
set a(_: true) {
$.utils.setUint16(0, 0, this);
}
get b(): bigint {
$.utils.testWhich("b", $.utils.getUint16(0, this), 1, this);
return $.utils.getUint64(8, this);
}
get _isB(): boolean {
return $.utils.getUint16(0, this) === 1;
}
set b(value: bigint) {
$.utils.setUint16(0, 1, this);
$.utils.setUint64(8, value, this);
}
toString(): string { return "TestOldUnionVersion_" + super.toString(); }
which(): TestOldUnionVersion_Which {
return $.utils.getUint16(0, this) as TestOldUnionVersion_Which;
}
}
export const TestNewUnionVersion_A_Which = {
A0: 0,
A1: 1
} as const;
export type TestNewUnionVersion_A_Which = (typeof TestNewUnionVersion_A_Which)[keyof typeof TestNewUnionVersion_A_Which];
export class TestNewUnionVersion_A extends $.Struct {
static readonly A0 = TestNewUnionVersion_A_Which.A0;
static readonly A1 = TestNewUnionVersion_A_Which.A1;
static readonly _zap = {
displayName: "a",
id: "86232c1de4513e84",
size: new $.ObjectSize(24, 0),
};
get _isA0(): boolean {
return $.utils.getUint16(8, this) === 0;
}
set a0(_: true) {
$.utils.setUint16(8, 0, this);
}
get a1(): bigint {
$.utils.testWhich("a1", $.utils.getUint16(8, this), 1, this);
return $.utils.getUint64(16, this);
}
get _isA1(): boolean {
return $.utils.getUint16(8, this) === 1;
}
set a1(value: bigint) {
$.utils.setUint16(8, 1, this);
$.utils.setUint64(16, value, this);
}
toString(): string { return "TestNewUnionVersion_A_" + super.toString(); }
which(): TestNewUnionVersion_A_Which {
return $.utils.getUint16(8, this) as TestNewUnionVersion_A_Which;
}
}
export const TestNewUnionVersion_Which = {
A: 0,
B: 1
} as const;
export type TestNewUnionVersion_Which = (typeof TestNewUnionVersion_Which)[keyof typeof TestNewUnionVersion_Which];
export class TestNewUnionVersion extends $.Struct {
static readonly A = TestNewUnionVersion_Which.A;
static readonly B = TestNewUnionVersion_Which.B;
static readonly _zap = {
displayName: "TestNewUnionVersion",
id: "c7e4c513a975492b",
size: new $.ObjectSize(24, 0),
};
get a(): TestNewUnionVersion_A {
$.utils.testWhich("a", $.utils.getUint16(0, this), 0, this);
return $.utils.getAs(TestNewUnionVersion_A, this);
}
_initA(): TestNewUnionVersion_A {
$.utils.setUint16(0, 0, this);
return $.utils.getAs(TestNewUnionVersion_A, this);
}
get _isA(): boolean {
return $.utils.getUint16(0, this) === 0;
}
set a(_: true) {
$.utils.setUint16(0, 0, this);
}
get b(): bigint {
$.utils.testWhich("b", $.utils.getUint16(0, this), 1, this);
return $.utils.getUint64(8, this);
}
get _isB(): boolean {
return $.utils.getUint16(0, this) === 1;
}
set b(value: bigint) {
$.utils.setUint16(0, 1, this);
$.utils.setUint64(8, value, this);
}
toString(): string { return "TestNewUnionVersion_" + super.toString(); }
which(): TestNewUnionVersion_Which {
return $.utils.getUint16(0, this) as TestNewUnionVersion_Which;
}
}
export class TestStructUnion_SomeStruct extends $.Struct {
static readonly _zap = {
displayName: "SomeStruct",
id: "9daec9823f171085",
size: new $.ObjectSize(0, 2),
};
get someText(): string {
return $.utils.getText(0, this);
}
set someText(value: string) {
$.utils.setText(0, value, this);
}
get moreText(): string {
return $.utils.getText(1, this);
}
set moreText(value: string) {
$.utils.setText(1, value, this);
}
toString(): string { return "TestStructUnion_SomeStruct_" + super.toString(); }
}
export const TestStructUnion_Un_Which = {
STRUCT: 0,
OBJECT: 1
} as const;
export type TestStructUnion_Un_Which = (typeof TestStructUnion_Un_Which)[keyof typeof TestStructUnion_Un_Which];
export class TestStructUnion_Un extends $.Struct {
static readonly STRUCT = TestStructUnion_Un_Which.STRUCT;
static readonly OBJECT = TestStructUnion_Un_Which.OBJECT;
static readonly _zap = {
displayName: "un",
id: "992edc677bef5a3c",
size: new $.ObjectSize(8, 1),
};
_adoptStruct(value: $.Orphan<TestStructUnion_SomeStruct>): void {
$.utils.setUint16(0, 0, this);
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownStruct(): $.Orphan<TestStructUnion_SomeStruct> {
return $.utils.disown(this.struct);
}
get struct(): TestStructUnion_SomeStruct {
$.utils.testWhich("struct", $.utils.getUint16(0, this), 0, this);
return $.utils.getStruct(0, TestStructUnion_SomeStruct, this);
}
_hasStruct(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initStruct(): TestStructUnion_SomeStruct {
$.utils.setUint16(0, 0, this);
return $.utils.initStructAt(0, TestStructUnion_SomeStruct, this);
}
get _isStruct(): boolean {
return $.utils.getUint16(0, this) === 0;
}
set struct(value: TestStructUnion_SomeStruct) {
$.utils.setUint16(0, 0, this);
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptObject(value: $.Orphan<TestAnyPointer>): void {
$.utils.setUint16(0, 1, this);
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownObject(): $.Orphan<TestAnyPointer> {
return $.utils.disown(this.object);
}
get object(): TestAnyPointer {
$.utils.testWhich("object", $.utils.getUint16(0, this), 1, this);
return $.utils.getStruct(0, TestAnyPointer, this);
}
_hasObject(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initObject(): TestAnyPointer {
$.utils.setUint16(0, 1, this);
return $.utils.initStructAt(0, TestAnyPointer, this);
}
get _isObject(): boolean {
return $.utils.getUint16(0, this) === 1;
}
set object(value: TestAnyPointer) {
$.utils.setUint16(0, 1, this);
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestStructUnion_Un_" + super.toString(); }
which(): TestStructUnion_Un_Which {
return $.utils.getUint16(0, this) as TestStructUnion_Un_Which;
}
}
export class TestStructUnion extends $.Struct {
static readonly SomeStruct = TestStructUnion_SomeStruct;
static readonly _zap = {
displayName: "TestStructUnion",
id: "faf781ef89a00e39",
size: new $.ObjectSize(8, 1),
};
get un(): TestStructUnion_Un {
return $.utils.getAs(TestStructUnion_Un, this);
}
_initUn(): TestStructUnion_Un {
return $.utils.getAs(TestStructUnion_Un, this);
}
toString(): string { return "TestStructUnion_" + super.toString(); }
}
export class TestPrintInlineStructs_InlineStruct extends $.Struct {
static readonly _zap = {
displayName: "InlineStruct",
id: "8e4936003708dac2",
size: new $.ObjectSize(8, 1),
};
get int32Field(): number {
return $.utils.getInt32(0, this);
}
set int32Field(value: number) {
$.utils.setInt32(0, value, this);
}
get textField(): string {
return $.utils.getText(0, this);
}
set textField(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestPrintInlineStructs_InlineStruct_" + super.toString(); }
}
export class TestPrintInlineStructs extends $.Struct {
static readonly InlineStruct = TestPrintInlineStructs_InlineStruct;
static readonly _zap = {
displayName: "TestPrintInlineStructs",
id: "dec497819d097c3c",
size: new $.ObjectSize(0, 2),
};
static _StructList: $.ListCtor<TestPrintInlineStructs_InlineStruct>;
get someText(): string {
return $.utils.getText(0, this);
}
set someText(value: string) {
$.utils.setText(0, value, this);
}
_adoptStructList(value: $.Orphan<$.List<TestPrintInlineStructs_InlineStruct>>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownStructList(): $.Orphan<$.List<TestPrintInlineStructs_InlineStruct>> {
return $.utils.disown(this.structList);
}
get structList(): $.List<TestPrintInlineStructs_InlineStruct> {
return $.utils.getList(1, TestPrintInlineStructs._StructList, this);
}
_hasStructList(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initStructList(length: number): $.List<TestPrintInlineStructs_InlineStruct> {
return $.utils.initList(1, TestPrintInlineStructs._StructList, length, this);
}
set structList(value: $.List<TestPrintInlineStructs_InlineStruct>) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestPrintInlineStructs_" + super.toString(); }
}
/**
* At one point, these failed to compile in C++ because it would produce literals like "123f",
* which is not valid; it needs to be "123.0f".
*
*/
export class TestWholeFloatDefault extends $.Struct {
static readonly CONSTANT = 456;
static readonly BIG_CONSTANT = 4.000000060189865e+30;
static readonly _zap = {
displayName: "TestWholeFloatDefault",
id: "91afd4a864dbb030",
size: new $.ObjectSize(8, 0),
defaultField: $.getFloat32Mask(123),
defaultBigField: $.getFloat32Mask(2.0000000300949324e+30)
};
get field(): number {
return $.utils.getFloat32(0, this, TestWholeFloatDefault._zap.defaultField);
}
set field(value: number) {
$.utils.setFloat32(0, value, this, TestWholeFloatDefault._zap.defaultField);
}
get bigField(): number {
return $.utils.getFloat32(4, this, TestWholeFloatDefault._zap.defaultBigField);
}
set bigField(value: number) {
$.utils.setFloat32(4, value, this, TestWholeFloatDefault._zap.defaultBigField);
}
toString(): string { return "TestWholeFloatDefault_" + super.toString(); }
}
export class TestGenerics_Inner extends $.Struct {
static readonly _zap = {
displayName: "Inner",
id: "f6a841117e19ac73",
size: new $.ObjectSize(0, 2),
};
_adoptFoo(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownFoo(): $.Orphan<$.Pointer> {
return $.utils.disown(this.foo);
}
get foo(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasFoo(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set foo(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptBar(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownBar(): $.Orphan<$.Pointer> {
return $.utils.disown(this.bar);
}
get bar(): $.Pointer {
return $.utils.getPointer(1, this);
}
_hasBar(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
set bar(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestGenerics_Inner_" + super.toString(); }
}
export class TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Params extends $.Struct {
static readonly _zap = {
displayName: "call$Params",
id: "b84eecc799437049",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Params_" + super.toString(); }
}
export class TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results extends $.Struct {
static readonly _zap = {
displayName: "call$Results",
id: "e080f0fc54614f6f",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results_" + super.toString(); }
}
export class TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results$Promise {
pipeline: $.Pipeline<any, any, TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results>;
constructor(pipeline: $.Pipeline<any, any, TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results> {
return await this.pipeline.struct();
}
}
export class TestGenerics_Inner2_DeepNest_DeepNestInterface$Client {
client: $.Client;
static readonly interfaceId: bigint = 0x8839ed86c9794287n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Params, TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results>
] = [
{
ParamsClass: TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Params,
ResultsClass: TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results,
interfaceId: TestGenerics_Inner2_DeepNest_DeepNestInterface$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestGenerics.Inner2.DeepNest.DeepNestInterface",
methodName: "call"
}
];
call(paramsFunc?: (params: TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Params) => void): TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results$Promise {
const answer = this.client.call({
method: TestGenerics_Inner2_DeepNest_DeepNestInterface$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results, answer);
return new TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results$Promise(pipeline);
}
}
$.Registry.register(TestGenerics_Inner2_DeepNest_DeepNestInterface$Client.interfaceId, TestGenerics_Inner2_DeepNest_DeepNestInterface$Client);
export interface TestGenerics_Inner2_DeepNest_DeepNestInterface$Server$Target {
call(params: TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Params, results: TestGenerics_Inner2_DeepNest_DeepNestInterface_Call$Results): Promise<void>;
}
export class TestGenerics_Inner2_DeepNest_DeepNestInterface$Server extends $.Server {
readonly target: TestGenerics_Inner2_DeepNest_DeepNestInterface$Server$Target;
constructor(target: TestGenerics_Inner2_DeepNest_DeepNestInterface$Server$Target) {
super(target, [
{
...TestGenerics_Inner2_DeepNest_DeepNestInterface$Client.methods[0],
impl: target.call
}
]);
this.target = target;
}
client(): TestGenerics_Inner2_DeepNest_DeepNestInterface$Client {
return new TestGenerics_Inner2_DeepNest_DeepNestInterface$Client(this);
}
}
/**
* At one time this failed to compile.
*
*/
export class TestGenerics_Inner2_DeepNest_DeepNestInterface extends $.Interface {
static readonly Client = TestGenerics_Inner2_DeepNest_DeepNestInterface$Client;
static readonly Server = TestGenerics_Inner2_DeepNest_DeepNestInterface$Server;
static readonly _zap = {
displayName: "DeepNestInterface",
id: "8839ed86c9794287",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestGenerics_Inner2_DeepNest_DeepNestInterface_" + super.toString(); }
}
export class TestGenerics_Inner2_DeepNest extends $.Struct {
static readonly DeepNestInterface = TestGenerics_Inner2_DeepNest_DeepNestInterface;
static readonly _zap = {
displayName: "DeepNest",
id: "b6a0829c762b06f3",
size: new $.ObjectSize(0, 4),
};
_adoptFoo(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownFoo(): $.Orphan<$.Pointer> {
return $.utils.disown(this.foo);
}
get foo(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasFoo(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set foo(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptBar(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownBar(): $.Orphan<$.Pointer> {
return $.utils.disown(this.bar);
}
get bar(): $.Pointer {
return $.utils.getPointer(1, this);
}
_hasBar(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
set bar(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptBaz(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownBaz(): $.Orphan<$.Pointer> {
return $.utils.disown(this.baz);
}
get baz(): $.Pointer {
return $.utils.getPointer(2, this);
}
_hasBaz(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
set baz(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
_adoptQux(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(3, this));
}
_disownQux(): $.Orphan<$.Pointer> {
return $.utils.disown(this.qux);
}
get qux(): $.Pointer {
return $.utils.getPointer(3, this);
}
_hasQux(): boolean {
return !$.utils.isNull($.utils.getPointer(3, this));
}
set qux(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(3, this));
}
toString(): string { return "TestGenerics_Inner2_DeepNest_" + super.toString(); }
}
export class TestGenerics_Inner2 extends $.Struct {
static readonly DeepNest = TestGenerics_Inner2_DeepNest;
static readonly _zap = {
displayName: "Inner2",
id: "a9ab42b118d6d435",
size: new $.ObjectSize(0, 4),
};
_adoptBar(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownBar(): $.Orphan<$.Pointer> {
return $.utils.disown(this.bar);
}
get bar(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasBar(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set bar(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptBaz(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownBaz(): $.Orphan<$.Pointer> {
return $.utils.disown(this.baz);
}
get baz(): $.Pointer {
return $.utils.getPointer(1, this);
}
_hasBaz(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
set baz(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptInnerBound(value: $.Orphan<TestGenerics_Inner>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownInnerBound(): $.Orphan<TestGenerics_Inner> {
return $.utils.disown(this.innerBound);
}
get innerBound(): TestGenerics_Inner {
return $.utils.getStruct(2, TestGenerics_Inner, this);
}
_hasInnerBound(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
_initInnerBound(): TestGenerics_Inner {
return $.utils.initStructAt(2, TestGenerics_Inner, this);
}
set innerBound(value: TestGenerics_Inner) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
_adoptInnerUnbound(value: $.Orphan<TestGenerics_Inner>): void {
$.utils.adopt(value, $.utils.getPointer(3, this));
}
_disownInnerUnbound(): $.Orphan<TestGenerics_Inner> {
return $.utils.disown(this.innerUnbound);
}
get innerUnbound(): TestGenerics_Inner {
return $.utils.getStruct(3, TestGenerics_Inner, this);
}
_hasInnerUnbound(): boolean {
return !$.utils.isNull($.utils.getPointer(3, this));
}
_initInnerUnbound(): TestGenerics_Inner {
return $.utils.initStructAt(3, TestGenerics_Inner, this);
}
set innerUnbound(value: TestGenerics_Inner) {
$.utils.copyFrom(value, $.utils.getPointer(3, this));
}
toString(): string { return "TestGenerics_Inner2_" + super.toString(); }
}
export class TestGenerics_Interface_Call$Results extends $.Struct {
static readonly _zap = {
displayName: "call$Results",
id: "a5b46224e33581ad",
size: new $.ObjectSize(0, 2),
};
_adoptQux(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownQux(): $.Orphan<$.Pointer> {
return $.utils.disown(this.qux);
}
get qux(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasQux(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set qux(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptGen(value: $.Orphan<TestGenerics>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownGen(): $.Orphan<TestGenerics> {
return $.utils.disown(this.gen);
}
get gen(): TestGenerics {
return $.utils.getStruct(1, TestGenerics, this);
}
_hasGen(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initGen(): TestGenerics {
return $.utils.initStructAt(1, TestGenerics, this);
}
set gen(value: TestGenerics) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestGenerics_Interface_Call$Results_" + super.toString(); }
}
export class TestGenerics_Interface_Call$Results$Promise {
pipeline: $.Pipeline<any, any, TestGenerics_Interface_Call$Results>;
constructor(pipeline: $.Pipeline<any, any, TestGenerics_Interface_Call$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestGenerics_Interface_Call$Results> {
return await this.pipeline.struct();
}
}
export class TestGenerics_Interface$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xc9e749e8dd54da5cn;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestGenerics_Inner2, TestGenerics_Interface_Call$Results>
] = [
{
ParamsClass: TestGenerics_Inner2,
ResultsClass: TestGenerics_Interface_Call$Results,
interfaceId: TestGenerics_Interface$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestGenerics.Interface",
methodName: "call"
}
];
call(paramsFunc?: (params: TestGenerics_Inner2) => void): TestGenerics_Interface_Call$Results$Promise {
const answer = this.client.call({
method: TestGenerics_Interface$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestGenerics_Interface_Call$Results, answer);
return new TestGenerics_Interface_Call$Results$Promise(pipeline);
}
}
$.Registry.register(TestGenerics_Interface$Client.interfaceId, TestGenerics_Interface$Client);
export interface TestGenerics_Interface$Server$Target {
call(params: TestGenerics_Inner2, results: TestGenerics_Interface_Call$Results): Promise<void>;
}
export class TestGenerics_Interface$Server extends $.Server {
readonly target: TestGenerics_Interface$Server$Target;
constructor(target: TestGenerics_Interface$Server$Target) {
super(target, [
{
...TestGenerics_Interface$Client.methods[0],
impl: target.call
}
]);
this.target = target;
}
client(): TestGenerics_Interface$Client {
return new TestGenerics_Interface$Client(this);
}
}
export class TestGenerics_Interface extends $.Interface {
static readonly Client = TestGenerics_Interface$Client;
static readonly Server = TestGenerics_Interface$Server;
static readonly _zap = {
displayName: "Interface",
id: "c9e749e8dd54da5c",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestGenerics_Interface_" + super.toString(); }
}
export class TestGenerics_UseAliases extends $.Struct {
static readonly _zap = {
displayName: "UseAliases",
id: "8e656edfb45ba6cf",
size: new $.ObjectSize(0, 6),
};
_adoptFoo(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownFoo(): $.Orphan<$.Pointer> {
return $.utils.disown(this.foo);
}
get foo(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasFoo(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set foo(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptInner(value: $.Orphan<TestGenerics_Inner>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownInner(): $.Orphan<TestGenerics_Inner> {
return $.utils.disown(this.inner);
}
get inner(): TestGenerics_Inner {
return $.utils.getStruct(1, TestGenerics_Inner, this);
}
_hasInner(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initInner(): TestGenerics_Inner {
return $.utils.initStructAt(1, TestGenerics_Inner, this);
}
set inner(value: TestGenerics_Inner) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptInner2(value: $.Orphan<TestGenerics_Inner2>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownInner2(): $.Orphan<TestGenerics_Inner2> {
return $.utils.disown(this.inner2);
}
get inner2(): TestGenerics_Inner2 {
return $.utils.getStruct(2, TestGenerics_Inner2, this);
}
_hasInner2(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
_initInner2(): TestGenerics_Inner2 {
return $.utils.initStructAt(2, TestGenerics_Inner2, this);
}
set inner2(value: TestGenerics_Inner2) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
_adoptInner2Bind(value: $.Orphan<TestGenerics_Inner2>): void {
$.utils.adopt(value, $.utils.getPointer(3, this));
}
_disownInner2Bind(): $.Orphan<TestGenerics_Inner2> {
return $.utils.disown(this.inner2Bind);
}
get inner2Bind(): TestGenerics_Inner2 {
return $.utils.getStruct(3, TestGenerics_Inner2, this);
}
_hasInner2Bind(): boolean {
return !$.utils.isNull($.utils.getPointer(3, this));
}
_initInner2Bind(): TestGenerics_Inner2 {
return $.utils.initStructAt(3, TestGenerics_Inner2, this);
}
set inner2Bind(value: TestGenerics_Inner2) {
$.utils.copyFrom(value, $.utils.getPointer(3, this));
}
_adoptInner2Text(value: $.Orphan<TestGenerics_Inner2>): void {
$.utils.adopt(value, $.utils.getPointer(4, this));
}
_disownInner2Text(): $.Orphan<TestGenerics_Inner2> {
return $.utils.disown(this.inner2Text);
}
get inner2Text(): TestGenerics_Inner2 {
return $.utils.getStruct(4, TestGenerics_Inner2, this);
}
_hasInner2Text(): boolean {
return !$.utils.isNull($.utils.getPointer(4, this));
}
_initInner2Text(): TestGenerics_Inner2 {
return $.utils.initStructAt(4, TestGenerics_Inner2, this);
}
set inner2Text(value: TestGenerics_Inner2) {
$.utils.copyFrom(value, $.utils.getPointer(4, this));
}
_adoptRevFoo(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(5, this));
}
_disownRevFoo(): $.Orphan<$.Pointer> {
return $.utils.disown(this.revFoo);
}
get revFoo(): $.Pointer {
return $.utils.getPointer(5, this);
}
_hasRevFoo(): boolean {
return !$.utils.isNull($.utils.getPointer(5, this));
}
set revFoo(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(5, this));
}
toString(): string { return "TestGenerics_UseAliases_" + super.toString(); }
}
export class TestGenerics_Ug extends $.Struct {
static readonly _zap = {
displayName: "ug",
id: "b46a779beaf3384e",
size: new $.ObjectSize(8, 2),
};
get ugfoo(): number {
return $.utils.getInt32(4, this);
}
set ugfoo(value: number) {
$.utils.setInt32(4, value, this);
}
toString(): string { return "TestGenerics_Ug_" + super.toString(); }
}
export const TestGenerics_Which = {
UV: 0,
UG: 1
} as const;
export type TestGenerics_Which = (typeof TestGenerics_Which)[keyof typeof TestGenerics_Which];
export class TestGenerics extends $.Struct {
static readonly UV = TestGenerics_Which.UV;
static readonly UG = TestGenerics_Which.UG;
static readonly Inner = TestGenerics_Inner;
static readonly Inner2 = TestGenerics_Inner2;
static readonly Interface = TestGenerics_Interface;
static readonly UseAliases = TestGenerics_UseAliases;
static readonly _zap = {
displayName: "TestGenerics",
id: "9d5b8cd8de9922eb",
size: new $.ObjectSize(8, 2),
};
_adoptFoo(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownFoo(): $.Orphan<$.Pointer> {
return $.utils.disown(this.foo);
}
get foo(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasFoo(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set foo(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptRev(value: $.Orphan<TestGenerics>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownRev(): $.Orphan<TestGenerics> {
return $.utils.disown(this.rev);
}
get rev(): TestGenerics {
return $.utils.getStruct(1, TestGenerics, this);
}
_hasRev(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initRev(): TestGenerics {
return $.utils.initStructAt(1, TestGenerics, this);
}
set rev(value: TestGenerics) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
get _isUv(): boolean {
return $.utils.getUint16(0, this) === 0;
}
set uv(_: true) {
$.utils.setUint16(0, 0, this);
}
get ug(): TestGenerics_Ug {
$.utils.testWhich("ug", $.utils.getUint16(0, this), 1, this);
return $.utils.getAs(TestGenerics_Ug, this);
}
_initUg(): TestGenerics_Ug {
$.utils.setUint16(0, 1, this);
return $.utils.getAs(TestGenerics_Ug, this);
}
get _isUg(): boolean {
return $.utils.getUint16(0, this) === 1;
}
set ug(_: true) {
$.utils.setUint16(0, 1, this);
}
toString(): string { return "TestGenerics_" + super.toString(); }
which(): TestGenerics_Which {
return $.utils.getUint16(0, this) as TestGenerics_Which;
}
}
export class TestGenericsWrapper extends $.Struct {
static readonly _zap = {
displayName: "TestGenericsWrapper",
id: "a9b2b1f52dde845d",
size: new $.ObjectSize(0, 1),
};
_adoptValue(value: $.Orphan<TestGenerics>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownValue(): $.Orphan<TestGenerics> {
return $.utils.disown(this.value);
}
get value(): TestGenerics {
return $.utils.getStruct(0, TestGenerics, this);
}
_hasValue(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initValue(): TestGenerics {
return $.utils.initStructAt(0, TestGenerics, this);
}
set value(value: TestGenerics) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestGenericsWrapper_" + super.toString(); }
}
export class TestGenericsWrapper2 extends $.Struct {
static readonly _zap = {
displayName: "TestGenericsWrapper2",
id: "f28f83667a557a04",
size: new $.ObjectSize(0, 1),
};
_adoptValue(value: $.Orphan<TestGenericsWrapper>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownValue(): $.Orphan<TestGenericsWrapper> {
return $.utils.disown(this.value);
}
get value(): TestGenericsWrapper {
return $.utils.getStruct(0, TestGenericsWrapper, this);
}
_hasValue(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initValue(): TestGenericsWrapper {
return $.utils.initStructAt(0, TestGenericsWrapper, this);
}
set value(value: TestGenericsWrapper) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestGenericsWrapper2_" + super.toString(); }
}
export class TestImplicitMethodParams_Call$Params extends $.Struct {
static readonly _zap = {
displayName: "call$Params",
id: "f83f8caf54bdc486",
size: new $.ObjectSize(0, 2),
};
_adoptFoo(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownFoo(): $.Orphan<$.Pointer> {
return $.utils.disown(this.foo);
}
get foo(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasFoo(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set foo(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptBar(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownBar(): $.Orphan<$.Pointer> {
return $.utils.disown(this.bar);
}
get bar(): $.Pointer {
return $.utils.getPointer(1, this);
}
_hasBar(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
set bar(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestImplicitMethodParams_Call$Params_" + super.toString(); }
}
export class TestGenerics$Promise {
pipeline: $.Pipeline<any, any, TestGenerics>;
constructor(pipeline: $.Pipeline<any, any, TestGenerics>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestGenerics> {
return await this.pipeline.struct();
}
}
export class TestImplicitMethodParams$Client {
client: $.Client;
static readonly interfaceId: bigint = 0x8b9717a3f8d85a9an;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestImplicitMethodParams_Call$Params, TestGenerics>
] = [
{
ParamsClass: TestImplicitMethodParams_Call$Params,
ResultsClass: TestGenerics,
interfaceId: TestImplicitMethodParams$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestImplicitMethodParams",
methodName: "call"
}
];
call(paramsFunc?: (params: TestImplicitMethodParams_Call$Params) => void): TestGenerics$Promise {
const answer = this.client.call({
method: TestImplicitMethodParams$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestGenerics, answer);
return new TestGenerics$Promise(pipeline);
}
}
$.Registry.register(TestImplicitMethodParams$Client.interfaceId, TestImplicitMethodParams$Client);
export interface TestImplicitMethodParams$Server$Target {
call(params: TestImplicitMethodParams_Call$Params, results: TestGenerics): Promise<void>;
}
export class TestImplicitMethodParams$Server extends $.Server {
readonly target: TestImplicitMethodParams$Server$Target;
constructor(target: TestImplicitMethodParams$Server$Target) {
super(target, [
{
...TestImplicitMethodParams$Client.methods[0],
impl: target.call
}
]);
this.target = target;
}
client(): TestImplicitMethodParams$Client {
return new TestImplicitMethodParams$Client(this);
}
}
export class TestImplicitMethodParams extends $.Interface {
static readonly Client = TestImplicitMethodParams$Client;
static readonly Server = TestImplicitMethodParams$Server;
static readonly _zap = {
displayName: "TestImplicitMethodParams",
id: "8b9717a3f8d85a9a",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestImplicitMethodParams_" + super.toString(); }
}
export class TestImplicitMethodParamsInGeneric_Call$Params extends $.Struct {
static readonly _zap = {
displayName: "call$Params",
id: "9aab8e25c808d71e",
size: new $.ObjectSize(0, 2),
};
_adoptFoo(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownFoo(): $.Orphan<$.Pointer> {
return $.utils.disown(this.foo);
}
get foo(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasFoo(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set foo(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptBar(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownBar(): $.Orphan<$.Pointer> {
return $.utils.disown(this.bar);
}
get bar(): $.Pointer {
return $.utils.getPointer(1, this);
}
_hasBar(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
set bar(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestImplicitMethodParamsInGeneric_Call$Params_" + super.toString(); }
}
export class TestImplicitMethodParamsInGeneric$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xdf9ccdeb81a704c9n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestImplicitMethodParamsInGeneric_Call$Params, TestGenerics>
] = [
{
ParamsClass: TestImplicitMethodParamsInGeneric_Call$Params,
ResultsClass: TestGenerics,
interfaceId: TestImplicitMethodParamsInGeneric$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestImplicitMethodParamsInGeneric",
methodName: "call"
}
];
call(paramsFunc?: (params: TestImplicitMethodParamsInGeneric_Call$Params) => void): TestGenerics$Promise {
const answer = this.client.call({
method: TestImplicitMethodParamsInGeneric$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestGenerics, answer);
return new TestGenerics$Promise(pipeline);
}
}
$.Registry.register(TestImplicitMethodParamsInGeneric$Client.interfaceId, TestImplicitMethodParamsInGeneric$Client);
export interface TestImplicitMethodParamsInGeneric$Server$Target {
call(params: TestImplicitMethodParamsInGeneric_Call$Params, results: TestGenerics): Promise<void>;
}
export class TestImplicitMethodParamsInGeneric$Server extends $.Server {
readonly target: TestImplicitMethodParamsInGeneric$Server$Target;
constructor(target: TestImplicitMethodParamsInGeneric$Server$Target) {
super(target, [
{
...TestImplicitMethodParamsInGeneric$Client.methods[0],
impl: target.call
}
]);
this.target = target;
}
client(): TestImplicitMethodParamsInGeneric$Client {
return new TestImplicitMethodParamsInGeneric$Client(this);
}
}
export class TestImplicitMethodParamsInGeneric extends $.Interface {
static readonly Client = TestImplicitMethodParamsInGeneric$Client;
static readonly Server = TestImplicitMethodParamsInGeneric$Server;
static readonly _zap = {
displayName: "TestImplicitMethodParamsInGeneric",
id: "df9ccdeb81a704c9",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestImplicitMethodParamsInGeneric_" + super.toString(); }
}
export const TestGenericsUnion_Which = {
FOO: 0,
BAR: 1
} as const;
export type TestGenericsUnion_Which = (typeof TestGenericsUnion_Which)[keyof typeof TestGenericsUnion_Which];
/**
* At one point this failed to compile.
*
*/
export class TestGenericsUnion extends $.Struct {
static readonly FOO = TestGenericsUnion_Which.FOO;
static readonly BAR = TestGenericsUnion_Which.BAR;
static readonly _zap = {
displayName: "TestGenericsUnion",
id: "a54870440e919063",
size: new $.ObjectSize(8, 1),
};
_adoptFoo(value: $.Orphan<$.Pointer>): void {
$.utils.setUint16(0, 0, this);
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownFoo(): $.Orphan<$.Pointer> {
return $.utils.disown(this.foo);
}
get foo(): $.Pointer {
$.utils.testWhich("foo", $.utils.getUint16(0, this), 0, this);
return $.utils.getPointer(0, this);
}
_hasFoo(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
get _isFoo(): boolean {
return $.utils.getUint16(0, this) === 0;
}
set foo(value: $.Pointer) {
$.utils.setUint16(0, 0, this);
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptBar(value: $.Orphan<$.Pointer>): void {
$.utils.setUint16(0, 1, this);
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownBar(): $.Orphan<$.Pointer> {
return $.utils.disown(this.bar);
}
get bar(): $.Pointer {
$.utils.testWhich("bar", $.utils.getUint16(0, this), 1, this);
return $.utils.getPointer(0, this);
}
_hasBar(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
get _isBar(): boolean {
return $.utils.getUint16(0, this) === 1;
}
set bar(value: $.Pointer) {
$.utils.setUint16(0, 1, this);
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestGenericsUnion_" + super.toString(); }
which(): TestGenericsUnion_Which {
return $.utils.getUint16(0, this) as TestGenericsUnion_Which;
}
}
export class TestUseGenerics extends $.Struct {
static readonly _zap = {
displayName: "TestUseGenerics",
id: "9427b2a71030338f",
size: new $.ObjectSize(0, 20),
defaultDefault: $.readRawPointer(new Uint8Array([16, 63, 80, 1, 2, 0, 0, 81, 4, 6, 20, 81, 104, 1, 2, 4, 123, 0, 25, 17, 5, 42, 81, 4, 1, 2, 15, 116, 101, 120, 116, 0, 0, 81, 4, 6, 20, 0, 0, 12, 65, 1, 0, 24]).buffer),
defaultDefaultInner: $.readRawPointer(new Uint8Array([16, 30, 64, 2, 81, 4, 6, 20, 17, 105, 42, 4, 123, 0, 24, 15, 116, 101, 120, 116]).buffer),
defaultDefaultUser: $.readRawPointer(new Uint8Array([16, 50, 64, 20, 81, 76, 1, 2, 0, 19, 81, 4, 6, 20, 0, 0, 4, 123, 0, 24]).buffer),
defaultDefaultWrapper: $.readRawPointer(new Uint8Array([16, 35, 64, 1, 80, 1, 2, 0, 0, 17, 5, 42, 81, 4, 1, 2, 15, 116, 101, 120, 116, 0, 0, 81, 4, 6, 20, 0, 0, 12, 65, 1, 0, 24]).buffer),
defaultDefaultWrapper2: $.readRawPointer(new Uint8Array([16, 36, 64, 1, 64, 1, 80, 1, 2, 0, 0, 17, 5, 42, 81, 4, 1, 2, 15, 116, 101, 120, 116, 0, 0, 81, 4, 6, 20, 0, 0, 12, 65, 1, 0, 24]).buffer),
defaultAliasFoo: $.readRawPointer(new Uint8Array([16, 27, 80, 6, 20, 4, 123, 0, 24]).buffer),
defaultAliasInner: $.readRawPointer(new Uint8Array([16, 29, 64, 2, 81, 4, 6, 20, 0, 0, 4, 123, 0, 24]).buffer),
defaultAliasInner2: $.readRawPointer(new Uint8Array([16, 33, 64, 4, 0, 1, 65, 4, 2, 0, 0, 81, 4, 6, 20, 0, 0, 4, 123, 0, 24]).buffer),
defaultAliasInner2Bind: $.readRawPointer(new Uint8Array([16, 34, 64, 4, 0, 0, 17, 9, 20, 65, 8, 2, 0, 0, 17, 12, 34, 81, 4, 6, 20, 0, 0, 4, 123, 0, 24]).buffer),
defaultAliasInner2Text: $.readRawPointer(new Uint8Array([16, 34, 64, 4, 0, 0, 17, 9, 42, 65, 8, 2, 0, 0, 15, 116, 101, 120, 116, 81, 4, 6, 20, 0, 0, 4, 123, 0, 24]).buffer),
defaultAliasRev: "text",
defaultUseAliases: $.readRawPointer(new Uint8Array([16, 161, 64, 6, 81, 20, 6, 20, 65, 120, 2, 65, 228, 4, 67, 96, 1, 4, 67, 224, 1, 4, 19, 97, 2, 28, 4, 123, 0, 24, 81, 4, 6, 20, 0, 0, 4, 123, 0, 26, 65, 4, 2, 0, 0, 81, 4, 6, 20, 0, 0, 4, 123, 0, 25, 17, 9, 42, 65, 8, 2, 0, 0, 15, 116, 101, 120, 116, 81, 4, 6, 20, 0, 0, 4, 123, 0, 25, 17, 9, 42, 65, 8, 2, 0, 0, 15, 116, 101, 120, 116, 81, 4, 6, 20, 0, 0, 4, 123, 0, 24, 17, 12, 34, 1, 56]).buffer)
};
_adoptBasic(value: $.Orphan<TestGenerics>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownBasic(): $.Orphan<TestGenerics> {
return $.utils.disown(this.basic);
}
get basic(): TestGenerics {
return $.utils.getStruct(0, TestGenerics, this);
}
_hasBasic(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initBasic(): TestGenerics {
return $.utils.initStructAt(0, TestGenerics, this);
}
set basic(value: TestGenerics) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptInner(value: $.Orphan<TestGenerics_Inner>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownInner(): $.Orphan<TestGenerics_Inner> {
return $.utils.disown(this.inner);
}
get inner(): TestGenerics_Inner {
return $.utils.getStruct(1, TestGenerics_Inner, this);
}
_hasInner(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initInner(): TestGenerics_Inner {
return $.utils.initStructAt(1, TestGenerics_Inner, this);
}
set inner(value: TestGenerics_Inner) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptInner2(value: $.Orphan<TestGenerics_Inner2>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownInner2(): $.Orphan<TestGenerics_Inner2> {
return $.utils.disown(this.inner2);
}
get inner2(): TestGenerics_Inner2 {
return $.utils.getStruct(2, TestGenerics_Inner2, this);
}
_hasInner2(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
_initInner2(): TestGenerics_Inner2 {
return $.utils.initStructAt(2, TestGenerics_Inner2, this);
}
set inner2(value: TestGenerics_Inner2) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
_adoptUnspecified(value: $.Orphan<TestGenerics>): void {
$.utils.adopt(value, $.utils.getPointer(3, this));
}
_disownUnspecified(): $.Orphan<TestGenerics> {
return $.utils.disown(this.unspecified);
}
get unspecified(): TestGenerics {
return $.utils.getStruct(3, TestGenerics, this);
}
_hasUnspecified(): boolean {
return !$.utils.isNull($.utils.getPointer(3, this));
}
_initUnspecified(): TestGenerics {
return $.utils.initStructAt(3, TestGenerics, this);
}
set unspecified(value: TestGenerics) {
$.utils.copyFrom(value, $.utils.getPointer(3, this));
}
_adoptUnspecifiedInner(value: $.Orphan<TestGenerics_Inner2>): void {
$.utils.adopt(value, $.utils.getPointer(4, this));
}
_disownUnspecifiedInner(): $.Orphan<TestGenerics_Inner2> {
return $.utils.disown(this.unspecifiedInner);
}
get unspecifiedInner(): TestGenerics_Inner2 {
return $.utils.getStruct(4, TestGenerics_Inner2, this);
}
_hasUnspecifiedInner(): boolean {
return !$.utils.isNull($.utils.getPointer(4, this));
}
_initUnspecifiedInner(): TestGenerics_Inner2 {
return $.utils.initStructAt(4, TestGenerics_Inner2, this);
}
set unspecifiedInner(value: TestGenerics_Inner2) {
$.utils.copyFrom(value, $.utils.getPointer(4, this));
}
_adoptWrapper(value: $.Orphan<TestGenericsWrapper>): void {
$.utils.adopt(value, $.utils.getPointer(8, this));
}
_disownWrapper(): $.Orphan<TestGenericsWrapper> {
return $.utils.disown(this.wrapper);
}
get wrapper(): TestGenericsWrapper {
return $.utils.getStruct(8, TestGenericsWrapper, this);
}
_hasWrapper(): boolean {
return !$.utils.isNull($.utils.getPointer(8, this));
}
_initWrapper(): TestGenericsWrapper {
return $.utils.initStructAt(8, TestGenericsWrapper, this);
}
set wrapper(value: TestGenericsWrapper) {
$.utils.copyFrom(value, $.utils.getPointer(8, this));
}
_adoptCap(value: $.Orphan<TestGenerics>): void {
$.utils.adopt(value, $.utils.getPointer(18, this));
}
_disownCap(): $.Orphan<TestGenerics> {
return $.utils.disown(this.cap);
}
get cap(): TestGenerics {
return $.utils.getStruct(18, TestGenerics, this);
}
_hasCap(): boolean {
return !$.utils.isNull($.utils.getPointer(18, this));
}
_initCap(): TestGenerics {
return $.utils.initStructAt(18, TestGenerics, this);
}
set cap(value: TestGenerics) {
$.utils.copyFrom(value, $.utils.getPointer(18, this));
}
get genericCap(): TestGenerics_Interface$Client {
return new TestGenerics_Interface$Client($.utils.getInterfaceClientOrNullAt(19, this));
}
set genericCap(value: TestGenerics_Interface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(19, this));
}
_adoptDefault(value: $.Orphan<TestGenerics>): void {
$.utils.adopt(value, $.utils.getPointer(5, this));
}
_disownDefault(): $.Orphan<TestGenerics> {
return $.utils.disown(this.default);
}
get default(): TestGenerics {
return $.utils.getStruct(5, TestGenerics, this, TestUseGenerics._zap.defaultDefault);
}
_hasDefault(): boolean {
return !$.utils.isNull($.utils.getPointer(5, this));
}
_initDefault(): TestGenerics {
return $.utils.initStructAt(5, TestGenerics, this);
}
set default(value: TestGenerics) {
$.utils.copyFrom(value, $.utils.getPointer(5, this));
}
_adoptDefaultInner(value: $.Orphan<TestGenerics_Inner>): void {
$.utils.adopt(value, $.utils.getPointer(6, this));
}
_disownDefaultInner(): $.Orphan<TestGenerics_Inner> {
return $.utils.disown(this.defaultInner);
}
get defaultInner(): TestGenerics_Inner {
return $.utils.getStruct(6, TestGenerics_Inner, this, TestUseGenerics._zap.defaultDefaultInner);
}
_hasDefaultInner(): boolean {
return !$.utils.isNull($.utils.getPointer(6, this));
}
_initDefaultInner(): TestGenerics_Inner {
return $.utils.initStructAt(6, TestGenerics_Inner, this);
}
set defaultInner(value: TestGenerics_Inner) {
$.utils.copyFrom(value, $.utils.getPointer(6, this));
}
_adoptDefaultUser(value: $.Orphan<TestUseGenerics>): void {
$.utils.adopt(value, $.utils.getPointer(7, this));
}
_disownDefaultUser(): $.Orphan<TestUseGenerics> {
return $.utils.disown(this.defaultUser);
}
get defaultUser(): TestUseGenerics {
return $.utils.getStruct(7, TestUseGenerics, this, TestUseGenerics._zap.defaultDefaultUser);
}
_hasDefaultUser(): boolean {
return !$.utils.isNull($.utils.getPointer(7, this));
}
_initDefaultUser(): TestUseGenerics {
return $.utils.initStructAt(7, TestUseGenerics, this);
}
set defaultUser(value: TestUseGenerics) {
$.utils.copyFrom(value, $.utils.getPointer(7, this));
}
_adoptDefaultWrapper(value: $.Orphan<TestGenericsWrapper>): void {
$.utils.adopt(value, $.utils.getPointer(9, this));
}
_disownDefaultWrapper(): $.Orphan<TestGenericsWrapper> {
return $.utils.disown(this.defaultWrapper);
}
get defaultWrapper(): TestGenericsWrapper {
return $.utils.getStruct(9, TestGenericsWrapper, this, TestUseGenerics._zap.defaultDefaultWrapper);
}
_hasDefaultWrapper(): boolean {
return !$.utils.isNull($.utils.getPointer(9, this));
}
_initDefaultWrapper(): TestGenericsWrapper {
return $.utils.initStructAt(9, TestGenericsWrapper, this);
}
set defaultWrapper(value: TestGenericsWrapper) {
$.utils.copyFrom(value, $.utils.getPointer(9, this));
}
_adoptDefaultWrapper2(value: $.Orphan<TestGenericsWrapper2>): void {
$.utils.adopt(value, $.utils.getPointer(10, this));
}
_disownDefaultWrapper2(): $.Orphan<TestGenericsWrapper2> {
return $.utils.disown(this.defaultWrapper2);
}
get defaultWrapper2(): TestGenericsWrapper2 {
return $.utils.getStruct(10, TestGenericsWrapper2, this, TestUseGenerics._zap.defaultDefaultWrapper2);
}
_hasDefaultWrapper2(): boolean {
return !$.utils.isNull($.utils.getPointer(10, this));
}
_initDefaultWrapper2(): TestGenericsWrapper2 {
return $.utils.initStructAt(10, TestGenericsWrapper2, this);
}
set defaultWrapper2(value: TestGenericsWrapper2) {
$.utils.copyFrom(value, $.utils.getPointer(10, this));
}
_adoptAliasFoo(value: $.Orphan<TestAllTypes>): void {
$.utils.adopt(value, $.utils.getPointer(11, this));
}
_disownAliasFoo(): $.Orphan<TestAllTypes> {
return $.utils.disown(this.aliasFoo);
}
get aliasFoo(): TestAllTypes {
return $.utils.getStruct(11, TestAllTypes, this, TestUseGenerics._zap.defaultAliasFoo);
}
_hasAliasFoo(): boolean {
return !$.utils.isNull($.utils.getPointer(11, this));
}
_initAliasFoo(): TestAllTypes {
return $.utils.initStructAt(11, TestAllTypes, this);
}
set aliasFoo(value: TestAllTypes) {
$.utils.copyFrom(value, $.utils.getPointer(11, this));
}
_adoptAliasInner(value: $.Orphan<TestGenerics_Inner>): void {
$.utils.adopt(value, $.utils.getPointer(12, this));
}
_disownAliasInner(): $.Orphan<TestGenerics_Inner> {
return $.utils.disown(this.aliasInner);
}
get aliasInner(): TestGenerics_Inner {
return $.utils.getStruct(12, TestGenerics_Inner, this, TestUseGenerics._zap.defaultAliasInner);
}
_hasAliasInner(): boolean {
return !$.utils.isNull($.utils.getPointer(12, this));
}
_initAliasInner(): TestGenerics_Inner {
return $.utils.initStructAt(12, TestGenerics_Inner, this);
}
set aliasInner(value: TestGenerics_Inner) {
$.utils.copyFrom(value, $.utils.getPointer(12, this));
}
_adoptAliasInner2(value: $.Orphan<TestGenerics_Inner2>): void {
$.utils.adopt(value, $.utils.getPointer(13, this));
}
_disownAliasInner2(): $.Orphan<TestGenerics_Inner2> {
return $.utils.disown(this.aliasInner2);
}
get aliasInner2(): TestGenerics_Inner2 {
return $.utils.getStruct(13, TestGenerics_Inner2, this, TestUseGenerics._zap.defaultAliasInner2);
}
_hasAliasInner2(): boolean {
return !$.utils.isNull($.utils.getPointer(13, this));
}
_initAliasInner2(): TestGenerics_Inner2 {
return $.utils.initStructAt(13, TestGenerics_Inner2, this);
}
set aliasInner2(value: TestGenerics_Inner2) {
$.utils.copyFrom(value, $.utils.getPointer(13, this));
}
_adoptAliasInner2Bind(value: $.Orphan<TestGenerics_Inner2>): void {
$.utils.adopt(value, $.utils.getPointer(14, this));
}
_disownAliasInner2Bind(): $.Orphan<TestGenerics_Inner2> {
return $.utils.disown(this.aliasInner2Bind);
}
get aliasInner2Bind(): TestGenerics_Inner2 {
return $.utils.getStruct(14, TestGenerics_Inner2, this, TestUseGenerics._zap.defaultAliasInner2Bind);
}
_hasAliasInner2Bind(): boolean {
return !$.utils.isNull($.utils.getPointer(14, this));
}
_initAliasInner2Bind(): TestGenerics_Inner2 {
return $.utils.initStructAt(14, TestGenerics_Inner2, this);
}
set aliasInner2Bind(value: TestGenerics_Inner2) {
$.utils.copyFrom(value, $.utils.getPointer(14, this));
}
_adoptAliasInner2Text(value: $.Orphan<TestGenerics_Inner2>): void {
$.utils.adopt(value, $.utils.getPointer(15, this));
}
_disownAliasInner2Text(): $.Orphan<TestGenerics_Inner2> {
return $.utils.disown(this.aliasInner2Text);
}
get aliasInner2Text(): TestGenerics_Inner2 {
return $.utils.getStruct(15, TestGenerics_Inner2, this, TestUseGenerics._zap.defaultAliasInner2Text);
}
_hasAliasInner2Text(): boolean {
return !$.utils.isNull($.utils.getPointer(15, this));
}
_initAliasInner2Text(): TestGenerics_Inner2 {
return $.utils.initStructAt(15, TestGenerics_Inner2, this);
}
set aliasInner2Text(value: TestGenerics_Inner2) {
$.utils.copyFrom(value, $.utils.getPointer(15, this));
}
get aliasRev(): string {
return $.utils.getText(16, this, TestUseGenerics._zap.defaultAliasRev);
}
set aliasRev(value: string) {
$.utils.setText(16, value, this);
}
_adoptUseAliases(value: $.Orphan<TestGenerics_UseAliases>): void {
$.utils.adopt(value, $.utils.getPointer(17, this));
}
_disownUseAliases(): $.Orphan<TestGenerics_UseAliases> {
return $.utils.disown(this.useAliases);
}
get useAliases(): TestGenerics_UseAliases {
return $.utils.getStruct(17, TestGenerics_UseAliases, this, TestUseGenerics._zap.defaultUseAliases);
}
_hasUseAliases(): boolean {
return !$.utils.isNull($.utils.getPointer(17, this));
}
_initUseAliases(): TestGenerics_UseAliases {
return $.utils.initStructAt(17, TestGenerics_UseAliases, this);
}
set useAliases(value: TestGenerics_UseAliases) {
$.utils.copyFrom(value, $.utils.getPointer(17, this));
}
toString(): string { return "TestUseGenerics_" + super.toString(); }
}
export class TestEmptyStruct extends $.Struct {
static readonly _zap = {
displayName: "TestEmptyStruct",
id: "c5598844441096dc",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestEmptyStruct_" + super.toString(); }
}
export class TestConstants extends $.Struct {
static readonly VOID_CONST = undefined;
static readonly BOOL_CONST = true;
static readonly INT8CONST = -123;
static readonly INT16CONST = -12345;
static readonly INT32CONST = -12345678;
static readonly INT64CONST = -0x7048860ddf79n;
static readonly UINT8CONST = 234;
static readonly UINT16CONST = 45678;
static readonly UINT32CONST = 3456789012;
static readonly UINT64CONST = 0xab54a98ceb1f0ad2n;
static readonly FLOAT32CONST = 1234.5;
static readonly FLOAT64CONST = -1.23e+47;
static readonly TEXT_CONST = "foo";
static readonly DATA_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 26, 7, 98, 97, 114]).buffer);
static readonly STRUCT_CONST = $.readRawPointer(new Uint8Array([16, 208, 80, 6, 20, 255, 1, 244, 128, 13, 14, 16, 76, 251, 0, 63, 78, 115, 232, 56, 166, 51, 253, 90, 210, 4, 20, 136, 98, 3, 255, 210, 10, 111, 18, 33, 25, 204, 4, 0, 31, 95, 112, 9, 175, 2, 224, 144, 117, 64, 17, 77, 34, 17, 77, 26, 81, 76, 6, 20, 19, 37, 1, 24, 19, 33, 1, 41, 19, 33, 1, 34, 19, 33, 1, 35, 19, 33, 1, 36, 19, 37, 1, 37, 19, 49, 1, 34, 19, 49, 1, 35, 19, 49, 1, 36, 19, 53, 1, 37, 19, 65, 1, 52, 19, 73, 1, 53, 19, 93, 1, 30, 19, 113, 1, 30, 51, 133, 1, 119, 2, 19, 213, 2, 27, 0, 0, 7, 98, 97, 122, 7, 113, 117, 120, 0, 5, 17, 77, 58, 0, 0, 81, 72, 6, 20, 0, 16, 63, 110, 101, 115, 116, 101, 100, 0, 5, 17, 77, 114, 0, 18, 255, 114, 101, 97, 108, 108, 121, 32, 110, 0, 31, 101, 115, 116, 101, 100, 1, 26, 15, 12, 222, 128, 127, 239, 210, 4, 210, 233, 128, 255, 127, 247, 78, 97, 188, 64, 211, 160, 250, 248, 128, 255, 255, 255, 127, 63, 121, 223, 13, 134, 72, 112, 255, 46, 117, 19, 253, 138, 150, 253, 255, 0, 128, 128, 255, 255, 255, 255, 255, 255, 255, 255, 127, 0, 11, 12, 34, 255, 207, 210, 4, 46, 22, 255, 255, 247, 78, 97, 188, 192, 44, 95, 5, 240, 255, 255, 255, 255, 63, 121, 223, 13, 134, 72, 112, 127, 210, 138, 236, 2, 117, 105, 2, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 240, 56, 180, 150, 73, 255, 194, 189, 240, 124, 194, 189, 240, 252, 1, 234, 28, 8, 2, 234, 28, 8, 130, 0, 0, 255, 64, 222, 119, 131, 33, 18, 220, 66, 4, 41, 144, 35, 202, 229, 200, 118, 127, 41, 144, 35, 202, 229, 200, 118, 255, 145, 247, 80, 55, 158, 120, 102, 0, 145, 247, 80, 55, 158, 120, 102, 128, 17, 9, 42, 17, 9, 50, 17, 9, 58, 15, 113, 117, 117, 120, 31, 99, 111, 114, 103, 101, 63, 103, 114, 97, 117, 108, 116, 17, 9, 50, 17, 9, 42, 17, 9, 34, 63, 103, 97, 114, 112, 108, 121, 31, 119, 97, 108, 100, 111, 15, 102, 114, 101, 100, 81, 12, 6, 20, 0, 5, 19, 29, 1, 122, 0, 24, 17, 189, 122, 0, 24, 17, 93, 122, 0, 18, 255, 120, 32, 115, 116, 114, 117, 99, 116, 0, 63, 108, 105, 115, 116, 32, 49, 255, 120, 32, 115, 116, 114, 117, 99, 116, 0, 63, 108, 105, 115, 116, 32, 50, 255, 120, 32, 115, 116, 114, 117, 99, 116, 0, 63, 108, 105, 115, 116, 32, 51, 21, 3, 1, 6]).buffer);
static readonly ENUM_CONST = 5;
static readonly VOID_LIST_CONST = $.readRawPointer(new Uint8Array([16, 1, 17, 1, 48]).buffer);
static readonly BOOL_LIST_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 33, 1, 9]).buffer);
static readonly INT8LIST_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 18, 3, 111, 145]).buffer);
static readonly INT16LIST_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 19, 15, 103, 43, 153, 212]).buffer);
static readonly INT32LIST_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 20, 255, 199, 107, 159, 6, 57, 148, 96, 249, 0]).buffer);
static readonly INT64LIST_CONST = $.readRawPointer(new Uint8Array([16, 3, 17, 1, 21, 255, 199, 113, 196, 43, 171, 117, 107, 15, 1, 57, 142, 59, 212, 84, 138, 148, 240]).buffer);
static readonly UINT8LIST_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 18, 3, 111, 222]).buffer);
static readonly UINT16LIST_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 19, 15, 53, 130, 156, 173]).buffer);
static readonly UINT32LIST_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 12, 15, 85, 161, 174, 198]).buffer);
static readonly UINT64LIST_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 13, 255, 199, 113, 172, 181, 175, 152, 50, 154, 0]).buffer);
static readonly FLOAT32LIST_CONST = $.readRawPointer(new Uint8Array([16, 3, 17, 1, 36, 206, 156, 173, 69, 128, 127, 204, 128, 255, 192, 127]).buffer);
static readonly FLOAT64LIST_CONST = $.readRawPointer(new Uint8Array([16, 5, 17, 1, 37, 240, 192, 97, 190, 64, 192, 240, 127, 192, 240, 255, 192, 248, 127]).buffer);
static readonly TEXT_LIST_CONST = $.readRawPointer(new Uint8Array([16, 7, 17, 1, 30, 17, 9, 50, 17, 9, 50, 17, 9, 42, 31, 112, 108, 117, 103, 104, 31, 120, 121, 122, 122, 121, 15, 116, 104, 117, 100]).buffer);
static readonly DATA_LIST_CONST = $.readRawPointer(new Uint8Array([16, 8, 17, 1, 30, 17, 9, 34, 17, 9, 74, 17, 13, 58, 15, 111, 111, 112, 115, 255, 101, 120, 104, 97, 117, 115, 116, 101, 0, 1, 100, 127, 114, 102, 99, 51, 48, 57, 50]).buffer);
static readonly STRUCT_LIST_CONST = $.readRawPointer(new Uint8Array([16, 86, 49, 1, 119, 2, 81, 12, 6, 20, 0, 5, 19, 29, 1, 106, 0, 24, 17, 189, 106, 0, 24, 17, 93, 106, 0, 18, 255, 115, 116, 114, 117, 99, 116, 108, 105, 0, 15, 115, 116, 32, 49, 255, 115, 116, 114, 117, 99, 116, 108, 105, 0, 15, 115, 116, 32, 50, 255, 115, 116, 114, 117, 99, 116, 108, 105, 0, 15, 115, 116, 32, 51]).buffer);
static readonly ENUM_LIST_CONST = $.readRawPointer(new Uint8Array([16, 2, 17, 1, 19, 4, 7]).buffer);
static readonly _zap = {
displayName: "TestConstants",
id: "abed745cd8c92095",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestConstants_" + super.toString(); }
}
export class TestAnyPointerConstants extends $.Struct {
static readonly _zap = {
displayName: "TestAnyPointerConstants",
id: "ddc280dbee9c99b3",
size: new $.ObjectSize(0, 4),
};
_adoptAnyKindAsStruct(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownAnyKindAsStruct(): $.Orphan<$.Pointer> {
return $.utils.disown(this.anyKindAsStruct);
}
get anyKindAsStruct(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasAnyKindAsStruct(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set anyKindAsStruct(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptAnyStructAsStruct(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownAnyStructAsStruct(): $.Orphan<$.Pointer> {
return $.utils.disown(this.anyStructAsStruct);
}
get anyStructAsStruct(): $.Pointer {
return $.utils.getPointer(1, this);
}
_hasAnyStructAsStruct(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
set anyStructAsStruct(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptAnyKindAsList(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownAnyKindAsList(): $.Orphan<$.Pointer> {
return $.utils.disown(this.anyKindAsList);
}
get anyKindAsList(): $.Pointer {
return $.utils.getPointer(2, this);
}
_hasAnyKindAsList(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
set anyKindAsList(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
_adoptAnyListAsList(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(3, this));
}
_disownAnyListAsList(): $.Orphan<$.Pointer> {
return $.utils.disown(this.anyListAsList);
}
get anyListAsList(): $.Pointer {
return $.utils.getPointer(3, this);
}
_hasAnyListAsList(): boolean {
return !$.utils.isNull($.utils.getPointer(3, this));
}
set anyListAsList(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(3, this));
}
toString(): string { return "TestAnyPointerConstants_" + super.toString(); }
}
export class TestInterface_Foo$Params extends $.Struct {
static readonly _zap = {
displayName: "foo$Params",
id: "b874edc0d559b391",
size: new $.ObjectSize(8, 0),
};
get i(): number {
return $.utils.getUint32(0, this);
}
set i(value: number) {
$.utils.setUint32(0, value, this);
}
get j(): boolean {
return $.utils.getBit(32, this);
}
set j(value: boolean) {
$.utils.setBit(32, value, this);
}
toString(): string { return "TestInterface_Foo$Params_" + super.toString(); }
}
export class TestInterface_Foo$Results extends $.Struct {
static readonly _zap = {
displayName: "foo$Results",
id: "b04fcaddab714ba4",
size: new $.ObjectSize(0, 1),
};
get x(): string {
return $.utils.getText(0, this);
}
set x(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestInterface_Foo$Results_" + super.toString(); }
}
export class TestInterface_Foo$Results$Promise {
pipeline: $.Pipeline<any, any, TestInterface_Foo$Results>;
constructor(pipeline: $.Pipeline<any, any, TestInterface_Foo$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestInterface_Foo$Results> {
return await this.pipeline.struct();
}
}
export class TestInterface_Bar$Params extends $.Struct {
static readonly _zap = {
displayName: "bar$Params",
id: "d044893357b42568",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestInterface_Bar$Params_" + super.toString(); }
}
export class TestInterface_Bar$Results extends $.Struct {
static readonly _zap = {
displayName: "bar$Results",
id: "9bf141df4247d52f",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestInterface_Bar$Results_" + super.toString(); }
}
export class TestInterface_Bar$Results$Promise {
pipeline: $.Pipeline<any, any, TestInterface_Bar$Results>;
constructor(pipeline: $.Pipeline<any, any, TestInterface_Bar$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestInterface_Bar$Results> {
return await this.pipeline.struct();
}
}
export class TestInterface_Baz$Params extends $.Struct {
static readonly _zap = {
displayName: "baz$Params",
id: "d9ac8abb2a91cfbc",
size: new $.ObjectSize(0, 1),
};
_adoptS(value: $.Orphan<TestAllTypes>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownS(): $.Orphan<TestAllTypes> {
return $.utils.disown(this.s);
}
get s(): TestAllTypes {
return $.utils.getStruct(0, TestAllTypes, this);
}
_hasS(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initS(): TestAllTypes {
return $.utils.initStructAt(0, TestAllTypes, this);
}
set s(value: TestAllTypes) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestInterface_Baz$Params_" + super.toString(); }
}
export class TestInterface_Baz$Results extends $.Struct {
static readonly _zap = {
displayName: "baz$Results",
id: "9b99d14f2f375b2d",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestInterface_Baz$Results_" + super.toString(); }
}
export class TestInterface_Baz$Results$Promise {
pipeline: $.Pipeline<any, any, TestInterface_Baz$Results>;
constructor(pipeline: $.Pipeline<any, any, TestInterface_Baz$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestInterface_Baz$Results> {
return await this.pipeline.struct();
}
}
export class TestInterface$Client {
client: $.Client;
static readonly interfaceId: bigint = 0x88eb12a0e0af92b2n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestInterface_Foo$Params, TestInterface_Foo$Results>,
$.Method<TestInterface_Bar$Params, TestInterface_Bar$Results>,
$.Method<TestInterface_Baz$Params, TestInterface_Baz$Results>
] = [
{
ParamsClass: TestInterface_Foo$Params,
ResultsClass: TestInterface_Foo$Results,
interfaceId: TestInterface$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestInterface",
methodName: "foo"
},
{
ParamsClass: TestInterface_Bar$Params,
ResultsClass: TestInterface_Bar$Results,
interfaceId: TestInterface$Client.interfaceId,
methodId: 1,
interfaceName: "test/fixtures/test.zap:TestInterface",
methodName: "bar"
},
{
ParamsClass: TestInterface_Baz$Params,
ResultsClass: TestInterface_Baz$Results,
interfaceId: TestInterface$Client.interfaceId,
methodId: 2,
interfaceName: "test/fixtures/test.zap:TestInterface",
methodName: "baz"
}
];
foo(paramsFunc?: (params: TestInterface_Foo$Params) => void): TestInterface_Foo$Results$Promise {
const answer = this.client.call({
method: TestInterface$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestInterface_Foo$Results, answer);
return new TestInterface_Foo$Results$Promise(pipeline);
}
bar(paramsFunc?: (params: TestInterface_Bar$Params) => void): TestInterface_Bar$Results$Promise {
const answer = this.client.call({
method: TestInterface$Client.methods[1],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestInterface_Bar$Results, answer);
return new TestInterface_Bar$Results$Promise(pipeline);
}
baz(paramsFunc?: (params: TestInterface_Baz$Params) => void): TestInterface_Baz$Results$Promise {
const answer = this.client.call({
method: TestInterface$Client.methods[2],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestInterface_Baz$Results, answer);
return new TestInterface_Baz$Results$Promise(pipeline);
}
}
$.Registry.register(TestInterface$Client.interfaceId, TestInterface$Client);
export interface TestInterface$Server$Target {
foo(params: TestInterface_Foo$Params, results: TestInterface_Foo$Results): Promise<void>;
bar(params: TestInterface_Bar$Params, results: TestInterface_Bar$Results): Promise<void>;
baz(params: TestInterface_Baz$Params, results: TestInterface_Baz$Results): Promise<void>;
}
export class TestInterface$Server extends $.Server {
readonly target: TestInterface$Server$Target;
constructor(target: TestInterface$Server$Target) {
super(target, [
{
...TestInterface$Client.methods[0],
impl: target.foo
},
{
...TestInterface$Client.methods[1],
impl: target.bar
},
{
...TestInterface$Client.methods[2],
impl: target.baz
}
]);
this.target = target;
}
client(): TestInterface$Client {
return new TestInterface$Client(this);
}
}
export class TestInterface extends $.Interface {
static readonly Client = TestInterface$Client;
static readonly Server = TestInterface$Server;
static readonly _zap = {
displayName: "TestInterface",
id: "88eb12a0e0af92b2",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestInterface_" + super.toString(); }
}
export class TestExtends_Qux$Params extends $.Struct {
static readonly _zap = {
displayName: "qux$Params",
id: "83a4bc5471363f17",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestExtends_Qux$Params_" + super.toString(); }
}
export class TestExtends_Qux$Results extends $.Struct {
static readonly _zap = {
displayName: "qux$Results",
id: "8e4b3d1a3e2753dd",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestExtends_Qux$Results_" + super.toString(); }
}
export class TestExtends_Qux$Results$Promise {
pipeline: $.Pipeline<any, any, TestExtends_Qux$Results>;
constructor(pipeline: $.Pipeline<any, any, TestExtends_Qux$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestExtends_Qux$Results> {
return await this.pipeline.struct();
}
}
export class TestExtends_Corge$Results extends $.Struct {
static readonly _zap = {
displayName: "corge$Results",
id: "acf67532a7e7bad9",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestExtends_Corge$Results_" + super.toString(); }
}
export class TestExtends_Corge$Results$Promise {
pipeline: $.Pipeline<any, any, TestExtends_Corge$Results>;
constructor(pipeline: $.Pipeline<any, any, TestExtends_Corge$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestExtends_Corge$Results> {
return await this.pipeline.struct();
}
}
export class TestExtends_Grault$Params extends $.Struct {
static readonly _zap = {
displayName: "grault$Params",
id: "f3b834e851ea8af6",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestExtends_Grault$Params_" + super.toString(); }
}
export class TestAllTypes$Promise {
pipeline: $.Pipeline<any, any, TestAllTypes>;
constructor(pipeline: $.Pipeline<any, any, TestAllTypes>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestAllTypes> {
return await this.pipeline.struct();
}
}
export class TestExtends$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xe4e9bac98670b748n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestExtends_Qux$Params, TestExtends_Qux$Results>,
$.Method<TestAllTypes, TestExtends_Corge$Results>,
$.Method<TestExtends_Grault$Params, TestAllTypes>
] = [
{
ParamsClass: TestExtends_Qux$Params,
ResultsClass: TestExtends_Qux$Results,
interfaceId: TestExtends$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestExtends",
methodName: "qux"
},
{
ParamsClass: TestAllTypes,
ResultsClass: TestExtends_Corge$Results,
interfaceId: TestExtends$Client.interfaceId,
methodId: 1,
interfaceName: "test/fixtures/test.zap:TestExtends",
methodName: "corge"
},
{
ParamsClass: TestExtends_Grault$Params,
ResultsClass: TestAllTypes,
interfaceId: TestExtends$Client.interfaceId,
methodId: 2,
interfaceName: "test/fixtures/test.zap:TestExtends",
methodName: "grault"
}
];
qux(paramsFunc?: (params: TestExtends_Qux$Params) => void): TestExtends_Qux$Results$Promise {
const answer = this.client.call({
method: TestExtends$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestExtends_Qux$Results, answer);
return new TestExtends_Qux$Results$Promise(pipeline);
}
corge(paramsFunc?: (params: TestAllTypes) => void): TestExtends_Corge$Results$Promise {
const answer = this.client.call({
method: TestExtends$Client.methods[1],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestExtends_Corge$Results, answer);
return new TestExtends_Corge$Results$Promise(pipeline);
}
grault(paramsFunc?: (params: TestExtends_Grault$Params) => void): TestAllTypes$Promise {
const answer = this.client.call({
method: TestExtends$Client.methods[2],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestAllTypes, answer);
return new TestAllTypes$Promise(pipeline);
}
}
$.Registry.register(TestExtends$Client.interfaceId, TestExtends$Client);
export interface TestExtends$Server$Target {
qux(params: TestExtends_Qux$Params, results: TestExtends_Qux$Results): Promise<void>;
corge(params: TestAllTypes, results: TestExtends_Corge$Results): Promise<void>;
grault(params: TestExtends_Grault$Params, results: TestAllTypes): Promise<void>;
}
export class TestExtends$Server extends $.Server {
readonly target: TestExtends$Server$Target;
constructor(target: TestExtends$Server$Target) {
super(target, [
{
...TestExtends$Client.methods[0],
impl: target.qux
},
{
...TestExtends$Client.methods[1],
impl: target.corge
},
{
...TestExtends$Client.methods[2],
impl: target.grault
}
]);
this.target = target;
}
client(): TestExtends$Client {
return new TestExtends$Client(this);
}
}
export class TestExtends extends $.Interface {
static readonly Client = TestExtends$Client;
static readonly Server = TestExtends$Server;
static readonly _zap = {
displayName: "TestExtends",
id: "e4e9bac98670b748",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestExtends_" + super.toString(); }
}
export class TestExtends2$Client {
client: $.Client;
static readonly interfaceId: bigint = 0x98d7e0ef61488783n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
] = [];
}
$.Registry.register(TestExtends2$Client.interfaceId, TestExtends2$Client);
export interface TestExtends2$Server$Target {
}
export class TestExtends2$Server extends $.Server {
readonly target: TestExtends2$Server$Target;
constructor(target: TestExtends2$Server$Target) {
super(target, []);
this.target = target;
}
client(): TestExtends2$Client {
return new TestExtends2$Client(this);
}
}
export class TestExtends2 extends $.Interface {
static readonly Client = TestExtends2$Client;
static readonly Server = TestExtends2$Server;
static readonly _zap = {
displayName: "TestExtends2",
id: "98d7e0ef61488783",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestExtends2_" + super.toString(); }
}
export class TestPipeline_Box extends $.Struct {
static readonly _zap = {
displayName: "Box",
id: "b0b29e51db0e26b1",
size: new $.ObjectSize(0, 1),
};
get cap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestPipeline_Box_" + super.toString(); }
}
export class TestPipeline_AnyBox extends $.Struct {
static readonly _zap = {
displayName: "AnyBox",
id: "9442ad5a1d2c8acb",
size: new $.ObjectSize(0, 1),
};
_adoptCap(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownCap(): $.Orphan<$.Pointer> {
return $.utils.disown(this.cap);
}
get cap(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasCap(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set cap(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestPipeline_AnyBox_" + super.toString(); }
}
export class TestPipeline_GetCap$Params extends $.Struct {
static readonly _zap = {
displayName: "getCap$Params",
id: "c7e8df5096257034",
size: new $.ObjectSize(8, 1),
};
get n(): number {
return $.utils.getUint32(0, this);
}
set n(value: number) {
$.utils.setUint32(0, value, this);
}
get inCap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set inCap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestPipeline_GetCap$Params_" + super.toString(); }
}
export class TestPipeline_GetCap$Results extends $.Struct {
static readonly _zap = {
displayName: "getCap$Results",
id: "b2442a9e0ba28fdf",
size: new $.ObjectSize(0, 2),
};
get s(): string {
return $.utils.getText(0, this);
}
set s(value: string) {
$.utils.setText(0, value, this);
}
_adoptOutBox(value: $.Orphan<TestPipeline_Box>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownOutBox(): $.Orphan<TestPipeline_Box> {
return $.utils.disown(this.outBox);
}
get outBox(): TestPipeline_Box {
return $.utils.getStruct(1, TestPipeline_Box, this);
}
_hasOutBox(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initOutBox(): TestPipeline_Box {
return $.utils.initStructAt(1, TestPipeline_Box, this);
}
set outBox(value: TestPipeline_Box) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestPipeline_GetCap$Results_" + super.toString(); }
}
export class TestPipeline_GetCap$Results$Promise {
pipeline: $.Pipeline<any, any, TestPipeline_GetCap$Results>;
constructor(pipeline: $.Pipeline<any, any, TestPipeline_GetCap$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestPipeline_GetCap$Results> {
return await this.pipeline.struct();
}
}
export class TestPipeline_TestPointers$Params extends $.Struct {
static readonly _zap = {
displayName: "testPointers$Params",
id: "a604ee63cf37819f",
size: new $.ObjectSize(0, 3),
};
get cap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
_adoptObj(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownObj(): $.Orphan<$.Pointer> {
return $.utils.disown(this.obj);
}
get obj(): $.Pointer {
return $.utils.getPointer(1, this);
}
_hasObj(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
set obj(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
_adoptList(value: $.Orphan<$.List<TestInterface>>): void {
$.utils.adopt(value, $.utils.getPointer(2, this));
}
_disownList(): $.Orphan<$.List<TestInterface>> {
return $.utils.disown(this.list);
}
get list(): $.List<TestInterface> {
return $.utils.getList(2, $.InterfaceList, this);
}
_hasList(): boolean {
return !$.utils.isNull($.utils.getPointer(2, this));
}
_initList(length: number): $.List<TestInterface> {
return $.utils.initList(2, $.InterfaceList, length, this);
}
set list(value: $.List<TestInterface>) {
$.utils.copyFrom(value, $.utils.getPointer(2, this));
}
toString(): string { return "TestPipeline_TestPointers$Params_" + super.toString(); }
}
export class TestPipeline_TestPointers$Results extends $.Struct {
static readonly _zap = {
displayName: "testPointers$Results",
id: "8eda54756c6070d6",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestPipeline_TestPointers$Results_" + super.toString(); }
}
export class TestPipeline_TestPointers$Results$Promise {
pipeline: $.Pipeline<any, any, TestPipeline_TestPointers$Results>;
constructor(pipeline: $.Pipeline<any, any, TestPipeline_TestPointers$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestPipeline_TestPointers$Results> {
return await this.pipeline.struct();
}
}
export class TestPipeline_GetAnyCap$Params extends $.Struct {
static readonly _zap = {
displayName: "getAnyCap$Params",
id: "f8e36b53ab093d4e",
size: new $.ObjectSize(8, 1),
};
get n(): number {
return $.utils.getUint32(0, this);
}
set n(value: number) {
$.utils.setUint32(0, value, this);
}
_adoptInCap(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownInCap(): $.Orphan<$.Pointer> {
return $.utils.disown(this.inCap);
}
get inCap(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasInCap(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set inCap(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestPipeline_GetAnyCap$Params_" + super.toString(); }
}
export class TestPipeline_GetAnyCap$Results extends $.Struct {
static readonly _zap = {
displayName: "getAnyCap$Results",
id: "bf44b4c94c26ef79",
size: new $.ObjectSize(0, 2),
};
get s(): string {
return $.utils.getText(0, this);
}
set s(value: string) {
$.utils.setText(0, value, this);
}
_adoptOutBox(value: $.Orphan<TestPipeline_AnyBox>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownOutBox(): $.Orphan<TestPipeline_AnyBox> {
return $.utils.disown(this.outBox);
}
get outBox(): TestPipeline_AnyBox {
return $.utils.getStruct(1, TestPipeline_AnyBox, this);
}
_hasOutBox(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initOutBox(): TestPipeline_AnyBox {
return $.utils.initStructAt(1, TestPipeline_AnyBox, this);
}
set outBox(value: TestPipeline_AnyBox) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestPipeline_GetAnyCap$Results_" + super.toString(); }
}
export class TestPipeline_GetAnyCap$Results$Promise {
pipeline: $.Pipeline<any, any, TestPipeline_GetAnyCap$Results>;
constructor(pipeline: $.Pipeline<any, any, TestPipeline_GetAnyCap$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestPipeline_GetAnyCap$Results> {
return await this.pipeline.struct();
}
}
export class TestPipeline$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xa5a404caa61d4cd0n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestPipeline_GetCap$Params, TestPipeline_GetCap$Results>,
$.Method<TestPipeline_TestPointers$Params, TestPipeline_TestPointers$Results>,
$.Method<TestPipeline_GetAnyCap$Params, TestPipeline_GetAnyCap$Results>
] = [
{
ParamsClass: TestPipeline_GetCap$Params,
ResultsClass: TestPipeline_GetCap$Results,
interfaceId: TestPipeline$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestPipeline",
methodName: "getCap"
},
{
ParamsClass: TestPipeline_TestPointers$Params,
ResultsClass: TestPipeline_TestPointers$Results,
interfaceId: TestPipeline$Client.interfaceId,
methodId: 1,
interfaceName: "test/fixtures/test.zap:TestPipeline",
methodName: "testPointers"
},
{
ParamsClass: TestPipeline_GetAnyCap$Params,
ResultsClass: TestPipeline_GetAnyCap$Results,
interfaceId: TestPipeline$Client.interfaceId,
methodId: 2,
interfaceName: "test/fixtures/test.zap:TestPipeline",
methodName: "getAnyCap"
}
];
getCap(paramsFunc?: (params: TestPipeline_GetCap$Params) => void): TestPipeline_GetCap$Results$Promise {
const answer = this.client.call({
method: TestPipeline$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestPipeline_GetCap$Results, answer);
return new TestPipeline_GetCap$Results$Promise(pipeline);
}
testPointers(paramsFunc?: (params: TestPipeline_TestPointers$Params) => void): TestPipeline_TestPointers$Results$Promise {
const answer = this.client.call({
method: TestPipeline$Client.methods[1],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestPipeline_TestPointers$Results, answer);
return new TestPipeline_TestPointers$Results$Promise(pipeline);
}
getAnyCap(paramsFunc?: (params: TestPipeline_GetAnyCap$Params) => void): TestPipeline_GetAnyCap$Results$Promise {
const answer = this.client.call({
method: TestPipeline$Client.methods[2],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestPipeline_GetAnyCap$Results, answer);
return new TestPipeline_GetAnyCap$Results$Promise(pipeline);
}
}
$.Registry.register(TestPipeline$Client.interfaceId, TestPipeline$Client);
export interface TestPipeline$Server$Target {
getCap(params: TestPipeline_GetCap$Params, results: TestPipeline_GetCap$Results): Promise<void>;
testPointers(params: TestPipeline_TestPointers$Params, results: TestPipeline_TestPointers$Results): Promise<void>;
getAnyCap(params: TestPipeline_GetAnyCap$Params, results: TestPipeline_GetAnyCap$Results): Promise<void>;
}
export class TestPipeline$Server extends $.Server {
readonly target: TestPipeline$Server$Target;
constructor(target: TestPipeline$Server$Target) {
super(target, [
{
...TestPipeline$Client.methods[0],
impl: target.getCap
},
{
...TestPipeline$Client.methods[1],
impl: target.testPointers
},
{
...TestPipeline$Client.methods[2],
impl: target.getAnyCap
}
]);
this.target = target;
}
client(): TestPipeline$Client {
return new TestPipeline$Client(this);
}
}
export class TestPipeline extends $.Interface {
static readonly Box = TestPipeline_Box;
static readonly AnyBox = TestPipeline_AnyBox;
static readonly Client = TestPipeline$Client;
static readonly Server = TestPipeline$Server;
static readonly _zap = {
displayName: "TestPipeline",
id: "a5a404caa61d4cd0",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestPipeline_" + super.toString(); }
}
export class TestCallOrder_GetCallSequence$Params extends $.Struct {
static readonly _zap = {
displayName: "getCallSequence$Params",
id: "8f1e8cd56ceb74dc",
size: new $.ObjectSize(8, 0),
};
get expected(): number {
return $.utils.getUint32(0, this);
}
set expected(value: number) {
$.utils.setUint32(0, value, this);
}
toString(): string { return "TestCallOrder_GetCallSequence$Params_" + super.toString(); }
}
export class TestCallOrder_GetCallSequence$Results extends $.Struct {
static readonly _zap = {
displayName: "getCallSequence$Results",
id: "dedbb6bf3810eab7",
size: new $.ObjectSize(8, 0),
};
get n(): number {
return $.utils.getUint32(0, this);
}
set n(value: number) {
$.utils.setUint32(0, value, this);
}
toString(): string { return "TestCallOrder_GetCallSequence$Results_" + super.toString(); }
}
export class TestCallOrder_GetCallSequence$Results$Promise {
pipeline: $.Pipeline<any, any, TestCallOrder_GetCallSequence$Results>;
constructor(pipeline: $.Pipeline<any, any, TestCallOrder_GetCallSequence$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestCallOrder_GetCallSequence$Results> {
return await this.pipeline.struct();
}
}
export class TestCallOrder$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xa0e77035bdff0051n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestCallOrder_GetCallSequence$Params, TestCallOrder_GetCallSequence$Results>
] = [
{
ParamsClass: TestCallOrder_GetCallSequence$Params,
ResultsClass: TestCallOrder_GetCallSequence$Results,
interfaceId: TestCallOrder$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestCallOrder",
methodName: "getCallSequence"
}
];
/**
* First call returns 0, next returns 1, ...
*
* The input `expected` is ignored but useful for disambiguating debug logs.
*
*/
getCallSequence(paramsFunc?: (params: TestCallOrder_GetCallSequence$Params) => void): TestCallOrder_GetCallSequence$Results$Promise {
const answer = this.client.call({
method: TestCallOrder$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestCallOrder_GetCallSequence$Results, answer);
return new TestCallOrder_GetCallSequence$Results$Promise(pipeline);
}
}
$.Registry.register(TestCallOrder$Client.interfaceId, TestCallOrder$Client);
export interface TestCallOrder$Server$Target {
getCallSequence(params: TestCallOrder_GetCallSequence$Params, results: TestCallOrder_GetCallSequence$Results): Promise<void>;
}
export class TestCallOrder$Server extends $.Server {
readonly target: TestCallOrder$Server$Target;
constructor(target: TestCallOrder$Server$Target) {
super(target, [
{
...TestCallOrder$Client.methods[0],
impl: target.getCallSequence
}
]);
this.target = target;
}
client(): TestCallOrder$Client {
return new TestCallOrder$Client(this);
}
}
export class TestCallOrder extends $.Interface {
static readonly Client = TestCallOrder$Client;
static readonly Server = TestCallOrder$Server;
static readonly _zap = {
displayName: "TestCallOrder",
id: "a0e77035bdff0051",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestCallOrder_" + super.toString(); }
}
export class TestTailCallee_TailResult extends $.Struct {
static readonly _zap = {
displayName: "TailResult",
id: "a9ed2e5a9fd53d19",
size: new $.ObjectSize(8, 2),
};
get i(): number {
return $.utils.getUint32(0, this);
}
set i(value: number) {
$.utils.setUint32(0, value, this);
}
get t(): string {
return $.utils.getText(0, this);
}
set t(value: string) {
$.utils.setText(0, value, this);
}
get c(): TestCallOrder$Client {
return new TestCallOrder$Client($.utils.getInterfaceClientOrNullAt(1, this));
}
set c(value: TestCallOrder$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(1, this));
}
toString(): string { return "TestTailCallee_TailResult_" + super.toString(); }
}
export class TestTailCallee_Foo$Params extends $.Struct {
static readonly _zap = {
displayName: "foo$Params",
id: "c5e1efc325614957",
size: new $.ObjectSize(8, 1),
};
get i(): number {
return $.utils.getInt32(0, this);
}
set i(value: number) {
$.utils.setInt32(0, value, this);
}
get t(): string {
return $.utils.getText(0, this);
}
set t(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestTailCallee_Foo$Params_" + super.toString(); }
}
export class TestTailCallee_TailResult$Promise {
pipeline: $.Pipeline<any, any, TestTailCallee_TailResult>;
constructor(pipeline: $.Pipeline<any, any, TestTailCallee_TailResult>) {
this.pipeline = pipeline;
}
getC(): TestCallOrder$Client {
return new TestCallOrder$Client(this.pipeline.getPipeline(TestCallOrder, 1).client());
}
async promise(): Promise<TestTailCallee_TailResult> {
return await this.pipeline.struct();
}
}
export class TestTailCallee$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xddd699207eb8e23bn;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestTailCallee_Foo$Params, TestTailCallee_TailResult>
] = [
{
ParamsClass: TestTailCallee_Foo$Params,
ResultsClass: TestTailCallee_TailResult,
interfaceId: TestTailCallee$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestTailCallee",
methodName: "foo"
}
];
foo(paramsFunc?: (params: TestTailCallee_Foo$Params) => void): TestTailCallee_TailResult$Promise {
const answer = this.client.call({
method: TestTailCallee$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestTailCallee_TailResult, answer);
return new TestTailCallee_TailResult$Promise(pipeline);
}
}
$.Registry.register(TestTailCallee$Client.interfaceId, TestTailCallee$Client);
export interface TestTailCallee$Server$Target {
foo(params: TestTailCallee_Foo$Params, results: TestTailCallee_TailResult): Promise<void>;
}
export class TestTailCallee$Server extends $.Server {
readonly target: TestTailCallee$Server$Target;
constructor(target: TestTailCallee$Server$Target) {
super(target, [
{
...TestTailCallee$Client.methods[0],
impl: target.foo
}
]);
this.target = target;
}
client(): TestTailCallee$Client {
return new TestTailCallee$Client(this);
}
}
export class TestTailCallee extends $.Interface {
static readonly TailResult = TestTailCallee_TailResult;
static readonly Client = TestTailCallee$Client;
static readonly Server = TestTailCallee$Server;
static readonly _zap = {
displayName: "TestTailCallee",
id: "ddd699207eb8e23b",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestTailCallee_" + super.toString(); }
}
export class TestTailCaller_Foo$Params extends $.Struct {
static readonly _zap = {
displayName: "foo$Params",
id: "b07a279515dc8ac5",
size: new $.ObjectSize(8, 1),
};
get i(): number {
return $.utils.getInt32(0, this);
}
set i(value: number) {
$.utils.setInt32(0, value, this);
}
get callee(): TestTailCallee$Client {
return new TestTailCallee$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set callee(value: TestTailCallee$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestTailCaller_Foo$Params_" + super.toString(); }
}
export class TestTailCaller$Client {
client: $.Client;
static readonly interfaceId: bigint = 0x870bf40110ce3035n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestTailCaller_Foo$Params, TestTailCallee_TailResult>
] = [
{
ParamsClass: TestTailCaller_Foo$Params,
ResultsClass: TestTailCallee_TailResult,
interfaceId: TestTailCaller$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestTailCaller",
methodName: "foo"
}
];
foo(paramsFunc?: (params: TestTailCaller_Foo$Params) => void): TestTailCallee_TailResult$Promise {
const answer = this.client.call({
method: TestTailCaller$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestTailCallee_TailResult, answer);
return new TestTailCallee_TailResult$Promise(pipeline);
}
}
$.Registry.register(TestTailCaller$Client.interfaceId, TestTailCaller$Client);
export interface TestTailCaller$Server$Target {
foo(params: TestTailCaller_Foo$Params, results: TestTailCallee_TailResult): Promise<void>;
}
export class TestTailCaller$Server extends $.Server {
readonly target: TestTailCaller$Server$Target;
constructor(target: TestTailCaller$Server$Target) {
super(target, [
{
...TestTailCaller$Client.methods[0],
impl: target.foo
}
]);
this.target = target;
}
client(): TestTailCaller$Client {
return new TestTailCaller$Client(this);
}
}
export class TestTailCaller extends $.Interface {
static readonly Client = TestTailCaller$Client;
static readonly Server = TestTailCaller$Server;
static readonly _zap = {
displayName: "TestTailCaller",
id: "870bf40110ce3035",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestTailCaller_" + super.toString(); }
}
export class TestHandle$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xa38e5efe41e53a15n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
] = [];
}
$.Registry.register(TestHandle$Client.interfaceId, TestHandle$Client);
export interface TestHandle$Server$Target {
}
export class TestHandle$Server extends $.Server {
readonly target: TestHandle$Server$Target;
constructor(target: TestHandle$Server$Target) {
super(target, []);
this.target = target;
}
client(): TestHandle$Client {
return new TestHandle$Client(this);
}
}
export class TestHandle extends $.Interface {
static readonly Client = TestHandle$Client;
static readonly Server = TestHandle$Server;
static readonly _zap = {
displayName: "TestHandle",
id: "a38e5efe41e53a15",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestHandle_" + super.toString(); }
}
export class TestMoreStuff_CallFoo$Params extends $.Struct {
static readonly _zap = {
displayName: "callFoo$Params",
id: "931ba418da60f6e4",
size: new $.ObjectSize(0, 1),
};
get cap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_CallFoo$Params_" + super.toString(); }
}
export class TestMoreStuff_CallFoo$Results extends $.Struct {
static readonly _zap = {
displayName: "callFoo$Results",
id: "9a28970beccecdd0",
size: new $.ObjectSize(0, 1),
};
get s(): string {
return $.utils.getText(0, this);
}
set s(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestMoreStuff_CallFoo$Results_" + super.toString(); }
}
export class TestMoreStuff_CallFoo$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_CallFoo$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_CallFoo$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestMoreStuff_CallFoo$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_CallFooWhenResolved$Params extends $.Struct {
static readonly _zap = {
displayName: "callFooWhenResolved$Params",
id: "fabc700c2ebe6378",
size: new $.ObjectSize(0, 1),
};
get cap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_CallFooWhenResolved$Params_" + super.toString(); }
}
export class TestMoreStuff_CallFooWhenResolved$Results extends $.Struct {
static readonly _zap = {
displayName: "callFooWhenResolved$Results",
id: "a54ce1e9aa822f90",
size: new $.ObjectSize(0, 1),
};
get s(): string {
return $.utils.getText(0, this);
}
set s(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestMoreStuff_CallFooWhenResolved$Results_" + super.toString(); }
}
export class TestMoreStuff_CallFooWhenResolved$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_CallFooWhenResolved$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_CallFooWhenResolved$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestMoreStuff_CallFooWhenResolved$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_NeverReturn$Params extends $.Struct {
static readonly _zap = {
displayName: "neverReturn$Params",
id: "94fe60465c95182b",
size: new $.ObjectSize(0, 1),
};
get cap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_NeverReturn$Params_" + super.toString(); }
}
export class TestMoreStuff_NeverReturn$Results extends $.Struct {
static readonly _zap = {
displayName: "neverReturn$Results",
id: "def4e5fa6999c5dc",
size: new $.ObjectSize(0, 1),
};
get capCopy(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set capCopy(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_NeverReturn$Results_" + super.toString(); }
}
export class TestMoreStuff_NeverReturn$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_NeverReturn$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_NeverReturn$Results>) {
this.pipeline = pipeline;
}
getCapCopy(): TestInterface$Client {
return new TestInterface$Client(this.pipeline.getPipeline(TestInterface, 0).client());
}
async promise(): Promise<TestMoreStuff_NeverReturn$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_Hold$Params extends $.Struct {
static readonly _zap = {
displayName: "hold$Params",
id: "fe7c8fbb769d8e58",
size: new $.ObjectSize(0, 1),
};
get cap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_Hold$Params_" + super.toString(); }
}
export class TestMoreStuff_Hold$Results extends $.Struct {
static readonly _zap = {
displayName: "hold$Results",
id: "f839fb1374d003c9",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMoreStuff_Hold$Results_" + super.toString(); }
}
export class TestMoreStuff_Hold$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_Hold$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_Hold$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestMoreStuff_Hold$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_CallHeld$Params extends $.Struct {
static readonly _zap = {
displayName: "callHeld$Params",
id: "f8c5e5ef1edf83be",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMoreStuff_CallHeld$Params_" + super.toString(); }
}
export class TestMoreStuff_CallHeld$Results extends $.Struct {
static readonly _zap = {
displayName: "callHeld$Results",
id: "e59935f160ac7578",
size: new $.ObjectSize(0, 1),
};
get s(): string {
return $.utils.getText(0, this);
}
set s(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestMoreStuff_CallHeld$Results_" + super.toString(); }
}
export class TestMoreStuff_CallHeld$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_CallHeld$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_CallHeld$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestMoreStuff_CallHeld$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_GetHeld$Params extends $.Struct {
static readonly _zap = {
displayName: "getHeld$Params",
id: "feffc025fce317e3",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMoreStuff_GetHeld$Params_" + super.toString(); }
}
export class TestMoreStuff_GetHeld$Results extends $.Struct {
static readonly _zap = {
displayName: "getHeld$Results",
id: "ef4e146185af67ce",
size: new $.ObjectSize(0, 1),
};
get cap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_GetHeld$Results_" + super.toString(); }
}
export class TestMoreStuff_GetHeld$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_GetHeld$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_GetHeld$Results>) {
this.pipeline = pipeline;
}
getCap(): TestInterface$Client {
return new TestInterface$Client(this.pipeline.getPipeline(TestInterface, 0).client());
}
async promise(): Promise<TestMoreStuff_GetHeld$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_Echo$Params extends $.Struct {
static readonly _zap = {
displayName: "echo$Params",
id: "c07526f7e2e533b9",
size: new $.ObjectSize(0, 1),
};
get cap(): TestCallOrder$Client {
return new TestCallOrder$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestCallOrder$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_Echo$Params_" + super.toString(); }
}
export class TestMoreStuff_Echo$Results extends $.Struct {
static readonly _zap = {
displayName: "echo$Results",
id: "a6224536593d5b92",
size: new $.ObjectSize(0, 1),
};
get cap(): TestCallOrder$Client {
return new TestCallOrder$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestCallOrder$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_Echo$Results_" + super.toString(); }
}
export class TestMoreStuff_Echo$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_Echo$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_Echo$Results>) {
this.pipeline = pipeline;
}
getCap(): TestCallOrder$Client {
return new TestCallOrder$Client(this.pipeline.getPipeline(TestCallOrder, 0).client());
}
async promise(): Promise<TestMoreStuff_Echo$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_ExpectCancel$Params extends $.Struct {
static readonly _zap = {
displayName: "expectCancel$Params",
id: "a1cc32d87f3edeb1",
size: new $.ObjectSize(0, 1),
};
get cap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_ExpectCancel$Params_" + super.toString(); }
}
export class TestMoreStuff_ExpectCancel$Results extends $.Struct {
static readonly _zap = {
displayName: "expectCancel$Results",
id: "8a3eba1758c0916e",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMoreStuff_ExpectCancel$Results_" + super.toString(); }
}
export class TestMoreStuff_ExpectCancel$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_ExpectCancel$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_ExpectCancel$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestMoreStuff_ExpectCancel$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_MethodWithDefaults$Params extends $.Struct {
static readonly _zap = {
displayName: "methodWithDefaults$Params",
id: "99160a25fa50fbf1",
size: new $.ObjectSize(8, 2),
defaultB: $.getUint32Mask(123),
defaultC: "foo"
};
get a(): string {
return $.utils.getText(0, this);
}
set a(value: string) {
$.utils.setText(0, value, this);
}
get b(): number {
return $.utils.getUint32(0, this, TestMoreStuff_MethodWithDefaults$Params._zap.defaultB);
}
set b(value: number) {
$.utils.setUint32(0, value, this, TestMoreStuff_MethodWithDefaults$Params._zap.defaultB);
}
get c(): string {
return $.utils.getText(1, this, TestMoreStuff_MethodWithDefaults$Params._zap.defaultC);
}
set c(value: string) {
$.utils.setText(1, value, this);
}
toString(): string { return "TestMoreStuff_MethodWithDefaults$Params_" + super.toString(); }
}
export class TestMoreStuff_MethodWithDefaults$Results extends $.Struct {
static readonly _zap = {
displayName: "methodWithDefaults$Results",
id: "9c7e066f845a6c56",
size: new $.ObjectSize(0, 2),
defaultE: "bar"
};
get d(): string {
return $.utils.getText(0, this);
}
set d(value: string) {
$.utils.setText(0, value, this);
}
get e(): string {
return $.utils.getText(1, this, TestMoreStuff_MethodWithDefaults$Results._zap.defaultE);
}
set e(value: string) {
$.utils.setText(1, value, this);
}
toString(): string { return "TestMoreStuff_MethodWithDefaults$Results_" + super.toString(); }
}
export class TestMoreStuff_MethodWithDefaults$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_MethodWithDefaults$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_MethodWithDefaults$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestMoreStuff_MethodWithDefaults$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_GetHandle$Params extends $.Struct {
static readonly _zap = {
displayName: "getHandle$Params",
id: "ead024a301a092a1",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMoreStuff_GetHandle$Params_" + super.toString(); }
}
export class TestMoreStuff_GetHandle$Results extends $.Struct {
static readonly _zap = {
displayName: "getHandle$Results",
id: "c3490d75420a1fe8",
size: new $.ObjectSize(0, 1),
};
get handle(): TestHandle$Client {
return new TestHandle$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set handle(value: TestHandle$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_GetHandle$Results_" + super.toString(); }
}
export class TestMoreStuff_GetHandle$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_GetHandle$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_GetHandle$Results>) {
this.pipeline = pipeline;
}
getHandle(): TestHandle$Client {
return new TestHandle$Client(this.pipeline.getPipeline(TestHandle, 0).client());
}
async promise(): Promise<TestMoreStuff_GetHandle$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_GetNull$Params extends $.Struct {
static readonly _zap = {
displayName: "getNull$Params",
id: "d8493f0e175d61f2",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMoreStuff_GetNull$Params_" + super.toString(); }
}
export class TestMoreStuff_GetNull$Results extends $.Struct {
static readonly _zap = {
displayName: "getNull$Results",
id: "e6955d8ef1023671",
size: new $.ObjectSize(0, 1),
};
get nullCap(): TestMoreStuff$Client {
return new TestMoreStuff$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set nullCap(value: TestMoreStuff$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMoreStuff_GetNull$Results_" + super.toString(); }
}
export class TestMoreStuff_GetNull$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_GetNull$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_GetNull$Results>) {
this.pipeline = pipeline;
}
getNullCap(): TestMoreStuff$Client {
return new TestMoreStuff$Client(this.pipeline.getPipeline(TestMoreStuff, 0).client());
}
async promise(): Promise<TestMoreStuff_GetNull$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_GetEnormousString$Params extends $.Struct {
static readonly _zap = {
displayName: "getEnormousString$Params",
id: "805df436f55dd07a",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMoreStuff_GetEnormousString$Params_" + super.toString(); }
}
export class TestMoreStuff_GetEnormousString$Results extends $.Struct {
static readonly _zap = {
displayName: "getEnormousString$Results",
id: "860e7512dc3925b0",
size: new $.ObjectSize(0, 1),
};
get str(): string {
return $.utils.getText(0, this);
}
set str(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestMoreStuff_GetEnormousString$Results_" + super.toString(); }
}
export class TestMoreStuff_GetEnormousString$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_GetEnormousString$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_GetEnormousString$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestMoreStuff_GetEnormousString$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff_MethodWithNullDefault$Params extends $.Struct {
static readonly _zap = {
displayName: "methodWithNullDefault$Params",
id: "fb92899aeb0ee74f",
size: new $.ObjectSize(0, 2),
defaultB: $.readRawPointer(new Uint8Array([16, 1, 0, 0]).buffer)
};
get a(): string {
return $.utils.getText(0, this);
}
set a(value: string) {
$.utils.setText(0, value, this);
}
get b(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(1, this));
}
set b(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(1, this));
}
toString(): string { return "TestMoreStuff_MethodWithNullDefault$Params_" + super.toString(); }
}
export class TestMoreStuff_MethodWithNullDefault$Results extends $.Struct {
static readonly _zap = {
displayName: "methodWithNullDefault$Results",
id: "8467348247305cf7",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMoreStuff_MethodWithNullDefault$Results_" + super.toString(); }
}
export class TestMoreStuff_MethodWithNullDefault$Results$Promise {
pipeline: $.Pipeline<any, any, TestMoreStuff_MethodWithNullDefault$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMoreStuff_MethodWithNullDefault$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestMoreStuff_MethodWithNullDefault$Results> {
return await this.pipeline.struct();
}
}
export class TestMoreStuff$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xddc70bf9784133cfn;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestMoreStuff_CallFoo$Params, TestMoreStuff_CallFoo$Results>,
$.Method<TestMoreStuff_CallFooWhenResolved$Params, TestMoreStuff_CallFooWhenResolved$Results>,
$.Method<TestMoreStuff_NeverReturn$Params, TestMoreStuff_NeverReturn$Results>,
$.Method<TestMoreStuff_Hold$Params, TestMoreStuff_Hold$Results>,
$.Method<TestMoreStuff_CallHeld$Params, TestMoreStuff_CallHeld$Results>,
$.Method<TestMoreStuff_GetHeld$Params, TestMoreStuff_GetHeld$Results>,
$.Method<TestMoreStuff_Echo$Params, TestMoreStuff_Echo$Results>,
$.Method<TestMoreStuff_ExpectCancel$Params, TestMoreStuff_ExpectCancel$Results>,
$.Method<TestMoreStuff_MethodWithDefaults$Params, TestMoreStuff_MethodWithDefaults$Results>,
$.Method<TestMoreStuff_GetHandle$Params, TestMoreStuff_GetHandle$Results>,
$.Method<TestMoreStuff_GetNull$Params, TestMoreStuff_GetNull$Results>,
$.Method<TestMoreStuff_GetEnormousString$Params, TestMoreStuff_GetEnormousString$Results>,
$.Method<TestMoreStuff_MethodWithNullDefault$Params, TestMoreStuff_MethodWithNullDefault$Results>
] = [
{
ParamsClass: TestMoreStuff_CallFoo$Params,
ResultsClass: TestMoreStuff_CallFoo$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "callFoo"
},
{
ParamsClass: TestMoreStuff_CallFooWhenResolved$Params,
ResultsClass: TestMoreStuff_CallFooWhenResolved$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 1,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "callFooWhenResolved"
},
{
ParamsClass: TestMoreStuff_NeverReturn$Params,
ResultsClass: TestMoreStuff_NeverReturn$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 2,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "neverReturn"
},
{
ParamsClass: TestMoreStuff_Hold$Params,
ResultsClass: TestMoreStuff_Hold$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 3,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "hold"
},
{
ParamsClass: TestMoreStuff_CallHeld$Params,
ResultsClass: TestMoreStuff_CallHeld$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 4,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "callHeld"
},
{
ParamsClass: TestMoreStuff_GetHeld$Params,
ResultsClass: TestMoreStuff_GetHeld$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 5,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "getHeld"
},
{
ParamsClass: TestMoreStuff_Echo$Params,
ResultsClass: TestMoreStuff_Echo$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 6,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "echo"
},
{
ParamsClass: TestMoreStuff_ExpectCancel$Params,
ResultsClass: TestMoreStuff_ExpectCancel$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 7,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "expectCancel"
},
{
ParamsClass: TestMoreStuff_MethodWithDefaults$Params,
ResultsClass: TestMoreStuff_MethodWithDefaults$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 8,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "methodWithDefaults"
},
{
ParamsClass: TestMoreStuff_GetHandle$Params,
ResultsClass: TestMoreStuff_GetHandle$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 9,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "getHandle"
},
{
ParamsClass: TestMoreStuff_GetNull$Params,
ResultsClass: TestMoreStuff_GetNull$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 10,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "getNull"
},
{
ParamsClass: TestMoreStuff_GetEnormousString$Params,
ResultsClass: TestMoreStuff_GetEnormousString$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 11,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "getEnormousString"
},
{
ParamsClass: TestMoreStuff_MethodWithNullDefault$Params,
ResultsClass: TestMoreStuff_MethodWithNullDefault$Results,
interfaceId: TestMoreStuff$Client.interfaceId,
methodId: 12,
interfaceName: "test/fixtures/test.zap:TestMoreStuff",
methodName: "methodWithNullDefault"
}
];
/**
* Call `cap.foo()`, check the result, and return "bar".
*
*/
callFoo(paramsFunc?: (params: TestMoreStuff_CallFoo$Params) => void): TestMoreStuff_CallFoo$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_CallFoo$Results, answer);
return new TestMoreStuff_CallFoo$Results$Promise(pipeline);
}
/**
* Like callFoo but waits for `cap` to resolve first.
*
*/
callFooWhenResolved(paramsFunc?: (params: TestMoreStuff_CallFooWhenResolved$Params) => void): TestMoreStuff_CallFooWhenResolved$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[1],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_CallFooWhenResolved$Results, answer);
return new TestMoreStuff_CallFooWhenResolved$Results$Promise(pipeline);
}
/**
* Doesn't return. You should cancel it.
*
*/
neverReturn(paramsFunc?: (params: TestMoreStuff_NeverReturn$Params) => void): TestMoreStuff_NeverReturn$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[2],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_NeverReturn$Results, answer);
return new TestMoreStuff_NeverReturn$Results$Promise(pipeline);
}
/**
* Returns immediately but holds on to the capability.
*
*/
hold(paramsFunc?: (params: TestMoreStuff_Hold$Params) => void): TestMoreStuff_Hold$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[3],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_Hold$Results, answer);
return new TestMoreStuff_Hold$Results$Promise(pipeline);
}
/**
* Calls the capability previously held using `hold` (and keeps holding it).
*
*/
callHeld(paramsFunc?: (params: TestMoreStuff_CallHeld$Params) => void): TestMoreStuff_CallHeld$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[4],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_CallHeld$Results, answer);
return new TestMoreStuff_CallHeld$Results$Promise(pipeline);
}
/**
* Returns the capability previously held using `hold` (and keeps holding it).
*
*/
getHeld(paramsFunc?: (params: TestMoreStuff_GetHeld$Params) => void): TestMoreStuff_GetHeld$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[5],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_GetHeld$Results, answer);
return new TestMoreStuff_GetHeld$Results$Promise(pipeline);
}
/**
* Just returns the input cap.
*
*/
echo(paramsFunc?: (params: TestMoreStuff_Echo$Params) => void): TestMoreStuff_Echo$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[6],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_Echo$Results, answer);
return new TestMoreStuff_Echo$Results$Promise(pipeline);
}
/**
* evalLater()-loops forever, holding `cap`. Must be canceled.
*
*/
expectCancel(paramsFunc?: (params: TestMoreStuff_ExpectCancel$Params) => void): TestMoreStuff_ExpectCancel$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[7],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_ExpectCancel$Results, answer);
return new TestMoreStuff_ExpectCancel$Results$Promise(pipeline);
}
methodWithDefaults(paramsFunc?: (params: TestMoreStuff_MethodWithDefaults$Params) => void): TestMoreStuff_MethodWithDefaults$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[8],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_MethodWithDefaults$Results, answer);
return new TestMoreStuff_MethodWithDefaults$Results$Promise(pipeline);
}
/**
* Get a new handle. Tests have an out-of-band way to check the current number of live handles, so
* this can be used to test garbage collection.
*
*/
getHandle(paramsFunc?: (params: TestMoreStuff_GetHandle$Params) => void): TestMoreStuff_GetHandle$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[9],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_GetHandle$Results, answer);
return new TestMoreStuff_GetHandle$Results$Promise(pipeline);
}
/**
* Always returns a null capability.
*
*/
getNull(paramsFunc?: (params: TestMoreStuff_GetNull$Params) => void): TestMoreStuff_GetNull$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[10],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_GetNull$Results, answer);
return new TestMoreStuff_GetNull$Results$Promise(pipeline);
}
/**
* Attempts to return an 100MB string. Should always fail.
*
*/
getEnormousString(paramsFunc?: (params: TestMoreStuff_GetEnormousString$Params) => void): TestMoreStuff_GetEnormousString$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[11],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_GetEnormousString$Results, answer);
return new TestMoreStuff_GetEnormousString$Results$Promise(pipeline);
}
methodWithNullDefault(paramsFunc?: (params: TestMoreStuff_MethodWithNullDefault$Params) => void): TestMoreStuff_MethodWithNullDefault$Results$Promise {
const answer = this.client.call({
method: TestMoreStuff$Client.methods[12],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMoreStuff_MethodWithNullDefault$Results, answer);
return new TestMoreStuff_MethodWithNullDefault$Results$Promise(pipeline);
}
}
$.Registry.register(TestMoreStuff$Client.interfaceId, TestMoreStuff$Client);
export interface TestMoreStuff$Server$Target {
callFoo(params: TestMoreStuff_CallFoo$Params, results: TestMoreStuff_CallFoo$Results): Promise<void>;
callFooWhenResolved(params: TestMoreStuff_CallFooWhenResolved$Params, results: TestMoreStuff_CallFooWhenResolved$Results): Promise<void>;
neverReturn(params: TestMoreStuff_NeverReturn$Params, results: TestMoreStuff_NeverReturn$Results): Promise<void>;
hold(params: TestMoreStuff_Hold$Params, results: TestMoreStuff_Hold$Results): Promise<void>;
callHeld(params: TestMoreStuff_CallHeld$Params, results: TestMoreStuff_CallHeld$Results): Promise<void>;
getHeld(params: TestMoreStuff_GetHeld$Params, results: TestMoreStuff_GetHeld$Results): Promise<void>;
echo(params: TestMoreStuff_Echo$Params, results: TestMoreStuff_Echo$Results): Promise<void>;
expectCancel(params: TestMoreStuff_ExpectCancel$Params, results: TestMoreStuff_ExpectCancel$Results): Promise<void>;
methodWithDefaults(params: TestMoreStuff_MethodWithDefaults$Params, results: TestMoreStuff_MethodWithDefaults$Results): Promise<void>;
getHandle(params: TestMoreStuff_GetHandle$Params, results: TestMoreStuff_GetHandle$Results): Promise<void>;
getNull(params: TestMoreStuff_GetNull$Params, results: TestMoreStuff_GetNull$Results): Promise<void>;
getEnormousString(params: TestMoreStuff_GetEnormousString$Params, results: TestMoreStuff_GetEnormousString$Results): Promise<void>;
methodWithNullDefault(params: TestMoreStuff_MethodWithNullDefault$Params, results: TestMoreStuff_MethodWithNullDefault$Results): Promise<void>;
}
export class TestMoreStuff$Server extends $.Server {
readonly target: TestMoreStuff$Server$Target;
constructor(target: TestMoreStuff$Server$Target) {
super(target, [
{
...TestMoreStuff$Client.methods[0],
impl: target.callFoo
},
{
...TestMoreStuff$Client.methods[1],
impl: target.callFooWhenResolved
},
{
...TestMoreStuff$Client.methods[2],
impl: target.neverReturn
},
{
...TestMoreStuff$Client.methods[3],
impl: target.hold
},
{
...TestMoreStuff$Client.methods[4],
impl: target.callHeld
},
{
...TestMoreStuff$Client.methods[5],
impl: target.getHeld
},
{
...TestMoreStuff$Client.methods[6],
impl: target.echo
},
{
...TestMoreStuff$Client.methods[7],
impl: target.expectCancel
},
{
...TestMoreStuff$Client.methods[8],
impl: target.methodWithDefaults
},
{
...TestMoreStuff$Client.methods[9],
impl: target.getHandle
},
{
...TestMoreStuff$Client.methods[10],
impl: target.getNull
},
{
...TestMoreStuff$Client.methods[11],
impl: target.getEnormousString
},
{
...TestMoreStuff$Client.methods[12],
impl: target.methodWithNullDefault
}
]);
this.target = target;
}
client(): TestMoreStuff$Client {
return new TestMoreStuff$Client(this);
}
}
/**
* Catch-all type that contains lots of testing methods.
*
*/
export class TestMoreStuff extends $.Interface {
static readonly Client = TestMoreStuff$Client;
static readonly Server = TestMoreStuff$Server;
static readonly _zap = {
displayName: "TestMoreStuff",
id: "ddc70bf9784133cf",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMoreStuff_" + super.toString(); }
}
export class TestMembrane_Thing_PassThrough$Params extends $.Struct {
static readonly _zap = {
displayName: "passThrough$Params",
id: "ff9bdcd05085d786",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMembrane_Thing_PassThrough$Params_" + super.toString(); }
}
export class TestMembrane_Result extends $.Struct {
static readonly _zap = {
displayName: "Result",
id: "b0c6163faf291965",
size: new $.ObjectSize(0, 1),
};
get text(): string {
return $.utils.getText(0, this);
}
set text(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestMembrane_Result_" + super.toString(); }
}
export class TestMembrane_Result$Promise {
pipeline: $.Pipeline<any, any, TestMembrane_Result>;
constructor(pipeline: $.Pipeline<any, any, TestMembrane_Result>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestMembrane_Result> {
return await this.pipeline.struct();
}
}
export class TestMembrane_Thing_Intercept$Params extends $.Struct {
static readonly _zap = {
displayName: "intercept$Params",
id: "ee94bed3615ee745",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMembrane_Thing_Intercept$Params_" + super.toString(); }
}
export class TestMembrane_Thing$Client {
client: $.Client;
static readonly interfaceId: bigint = 0x9352e4e41f173917n;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestMembrane_Thing_PassThrough$Params, TestMembrane_Result>,
$.Method<TestMembrane_Thing_Intercept$Params, TestMembrane_Result>
] = [
{
ParamsClass: TestMembrane_Thing_PassThrough$Params,
ResultsClass: TestMembrane_Result,
interfaceId: TestMembrane_Thing$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestMembrane.Thing",
methodName: "passThrough"
},
{
ParamsClass: TestMembrane_Thing_Intercept$Params,
ResultsClass: TestMembrane_Result,
interfaceId: TestMembrane_Thing$Client.interfaceId,
methodId: 1,
interfaceName: "test/fixtures/test.zap:TestMembrane.Thing",
methodName: "intercept"
}
];
passThrough(paramsFunc?: (params: TestMembrane_Thing_PassThrough$Params) => void): TestMembrane_Result$Promise {
const answer = this.client.call({
method: TestMembrane_Thing$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMembrane_Result, answer);
return new TestMembrane_Result$Promise(pipeline);
}
intercept(paramsFunc?: (params: TestMembrane_Thing_Intercept$Params) => void): TestMembrane_Result$Promise {
const answer = this.client.call({
method: TestMembrane_Thing$Client.methods[1],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMembrane_Result, answer);
return new TestMembrane_Result$Promise(pipeline);
}
}
$.Registry.register(TestMembrane_Thing$Client.interfaceId, TestMembrane_Thing$Client);
export interface TestMembrane_Thing$Server$Target {
passThrough(params: TestMembrane_Thing_PassThrough$Params, results: TestMembrane_Result): Promise<void>;
intercept(params: TestMembrane_Thing_Intercept$Params, results: TestMembrane_Result): Promise<void>;
}
export class TestMembrane_Thing$Server extends $.Server {
readonly target: TestMembrane_Thing$Server$Target;
constructor(target: TestMembrane_Thing$Server$Target) {
super(target, [
{
...TestMembrane_Thing$Client.methods[0],
impl: target.passThrough
},
{
...TestMembrane_Thing$Client.methods[1],
impl: target.intercept
}
]);
this.target = target;
}
client(): TestMembrane_Thing$Client {
return new TestMembrane_Thing$Client(this);
}
}
export class TestMembrane_Thing extends $.Interface {
static readonly Client = TestMembrane_Thing$Client;
static readonly Server = TestMembrane_Thing$Server;
static readonly _zap = {
displayName: "Thing",
id: "9352e4e41f173917",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMembrane_Thing_" + super.toString(); }
}
export class TestMembrane_MakeThing$Params extends $.Struct {
static readonly _zap = {
displayName: "makeThing$Params",
id: "d8ac2acc3ece6556",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMembrane_MakeThing$Params_" + super.toString(); }
}
export class TestMembrane_MakeThing$Results extends $.Struct {
static readonly _zap = {
displayName: "makeThing$Results",
id: "e5d4904814ccbf29",
size: new $.ObjectSize(0, 1),
};
get thing(): TestMembrane_Thing$Client {
return new TestMembrane_Thing$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set thing(value: TestMembrane_Thing$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMembrane_MakeThing$Results_" + super.toString(); }
}
export class TestMembrane_MakeThing$Results$Promise {
pipeline: $.Pipeline<any, any, TestMembrane_MakeThing$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMembrane_MakeThing$Results>) {
this.pipeline = pipeline;
}
getThing(): TestMembrane_Thing$Client {
return new TestMembrane_Thing$Client(this.pipeline.getPipeline(TestMembrane_Thing, 0).client());
}
async promise(): Promise<TestMembrane_MakeThing$Results> {
return await this.pipeline.struct();
}
}
export class TestMembrane_CallPassThrough$Params extends $.Struct {
static readonly _zap = {
displayName: "callPassThrough$Params",
id: "945d9f634a6a29da",
size: new $.ObjectSize(8, 1),
};
get thing(): TestMembrane_Thing$Client {
return new TestMembrane_Thing$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set thing(value: TestMembrane_Thing$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
get tailCall(): boolean {
return $.utils.getBit(0, this);
}
set tailCall(value: boolean) {
$.utils.setBit(0, value, this);
}
toString(): string { return "TestMembrane_CallPassThrough$Params_" + super.toString(); }
}
export class TestMembrane_CallIntercept$Params extends $.Struct {
static readonly _zap = {
displayName: "callIntercept$Params",
id: "8749aac3375c5c71",
size: new $.ObjectSize(8, 1),
};
get thing(): TestMembrane_Thing$Client {
return new TestMembrane_Thing$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set thing(value: TestMembrane_Thing$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
get tailCall(): boolean {
return $.utils.getBit(0, this);
}
set tailCall(value: boolean) {
$.utils.setBit(0, value, this);
}
toString(): string { return "TestMembrane_CallIntercept$Params_" + super.toString(); }
}
export class TestMembrane_Loopback$Params extends $.Struct {
static readonly _zap = {
displayName: "loopback$Params",
id: "869a1b7ab34b42c9",
size: new $.ObjectSize(0, 1),
};
get thing(): TestMembrane_Thing$Client {
return new TestMembrane_Thing$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set thing(value: TestMembrane_Thing$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMembrane_Loopback$Params_" + super.toString(); }
}
export class TestMembrane_Loopback$Results extends $.Struct {
static readonly _zap = {
displayName: "loopback$Results",
id: "ecd19398fd88ab5c",
size: new $.ObjectSize(0, 1),
};
get thing(): TestMembrane_Thing$Client {
return new TestMembrane_Thing$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set thing(value: TestMembrane_Thing$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
toString(): string { return "TestMembrane_Loopback$Results_" + super.toString(); }
}
export class TestMembrane_Loopback$Results$Promise {
pipeline: $.Pipeline<any, any, TestMembrane_Loopback$Results>;
constructor(pipeline: $.Pipeline<any, any, TestMembrane_Loopback$Results>) {
this.pipeline = pipeline;
}
getThing(): TestMembrane_Thing$Client {
return new TestMembrane_Thing$Client(this.pipeline.getPipeline(TestMembrane_Thing, 0).client());
}
async promise(): Promise<TestMembrane_Loopback$Results> {
return await this.pipeline.struct();
}
}
export class TestMembrane$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xc07d8dcd80a69c0cn;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestMembrane_MakeThing$Params, TestMembrane_MakeThing$Results>,
$.Method<TestMembrane_CallPassThrough$Params, TestMembrane_Result>,
$.Method<TestMembrane_CallIntercept$Params, TestMembrane_Result>,
$.Method<TestMembrane_Loopback$Params, TestMembrane_Loopback$Results>
] = [
{
ParamsClass: TestMembrane_MakeThing$Params,
ResultsClass: TestMembrane_MakeThing$Results,
interfaceId: TestMembrane$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestMembrane",
methodName: "makeThing"
},
{
ParamsClass: TestMembrane_CallPassThrough$Params,
ResultsClass: TestMembrane_Result,
interfaceId: TestMembrane$Client.interfaceId,
methodId: 1,
interfaceName: "test/fixtures/test.zap:TestMembrane",
methodName: "callPassThrough"
},
{
ParamsClass: TestMembrane_CallIntercept$Params,
ResultsClass: TestMembrane_Result,
interfaceId: TestMembrane$Client.interfaceId,
methodId: 2,
interfaceName: "test/fixtures/test.zap:TestMembrane",
methodName: "callIntercept"
},
{
ParamsClass: TestMembrane_Loopback$Params,
ResultsClass: TestMembrane_Loopback$Results,
interfaceId: TestMembrane$Client.interfaceId,
methodId: 3,
interfaceName: "test/fixtures/test.zap:TestMembrane",
methodName: "loopback"
}
];
makeThing(paramsFunc?: (params: TestMembrane_MakeThing$Params) => void): TestMembrane_MakeThing$Results$Promise {
const answer = this.client.call({
method: TestMembrane$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMembrane_MakeThing$Results, answer);
return new TestMembrane_MakeThing$Results$Promise(pipeline);
}
callPassThrough(paramsFunc?: (params: TestMembrane_CallPassThrough$Params) => void): TestMembrane_Result$Promise {
const answer = this.client.call({
method: TestMembrane$Client.methods[1],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMembrane_Result, answer);
return new TestMembrane_Result$Promise(pipeline);
}
callIntercept(paramsFunc?: (params: TestMembrane_CallIntercept$Params) => void): TestMembrane_Result$Promise {
const answer = this.client.call({
method: TestMembrane$Client.methods[2],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMembrane_Result, answer);
return new TestMembrane_Result$Promise(pipeline);
}
loopback(paramsFunc?: (params: TestMembrane_Loopback$Params) => void): TestMembrane_Loopback$Results$Promise {
const answer = this.client.call({
method: TestMembrane$Client.methods[3],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestMembrane_Loopback$Results, answer);
return new TestMembrane_Loopback$Results$Promise(pipeline);
}
}
$.Registry.register(TestMembrane$Client.interfaceId, TestMembrane$Client);
export interface TestMembrane$Server$Target {
makeThing(params: TestMembrane_MakeThing$Params, results: TestMembrane_MakeThing$Results): Promise<void>;
callPassThrough(params: TestMembrane_CallPassThrough$Params, results: TestMembrane_Result): Promise<void>;
callIntercept(params: TestMembrane_CallIntercept$Params, results: TestMembrane_Result): Promise<void>;
loopback(params: TestMembrane_Loopback$Params, results: TestMembrane_Loopback$Results): Promise<void>;
}
export class TestMembrane$Server extends $.Server {
readonly target: TestMembrane$Server$Target;
constructor(target: TestMembrane$Server$Target) {
super(target, [
{
...TestMembrane$Client.methods[0],
impl: target.makeThing
},
{
...TestMembrane$Client.methods[1],
impl: target.callPassThrough
},
{
...TestMembrane$Client.methods[2],
impl: target.callIntercept
},
{
...TestMembrane$Client.methods[3],
impl: target.loopback
}
]);
this.target = target;
}
client(): TestMembrane$Client {
return new TestMembrane$Client(this);
}
}
export class TestMembrane extends $.Interface {
static readonly Thing = TestMembrane_Thing;
static readonly Result = TestMembrane_Result;
static readonly Client = TestMembrane$Client;
static readonly Server = TestMembrane$Server;
static readonly _zap = {
displayName: "TestMembrane",
id: "c07d8dcd80a69c0c",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestMembrane_" + super.toString(); }
}
export class TestContainMembrane extends $.Struct {
static readonly _zap = {
displayName: "TestContainMembrane",
id: "949449ad7c11fa5c",
size: new $.ObjectSize(0, 2),
};
get cap(): TestMembrane_Thing$Client {
return new TestMembrane_Thing$Client($.utils.getInterfaceClientOrNullAt(0, this));
}
set cap(value: TestMembrane_Thing$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(0, this));
}
_adoptList(value: $.Orphan<$.List<TestMembrane_Thing>>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownList(): $.Orphan<$.List<TestMembrane_Thing>> {
return $.utils.disown(this.list);
}
get list(): $.List<TestMembrane_Thing> {
return $.utils.getList(1, $.InterfaceList, this);
}
_hasList(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
_initList(length: number): $.List<TestMembrane_Thing> {
return $.utils.initList(1, $.InterfaceList, length, this);
}
set list(value: $.List<TestMembrane_Thing>) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestContainMembrane_" + super.toString(); }
}
export class TestContructorName extends $.Struct {
static readonly _zap = {
displayName: "TestContructorName",
id: "c16f644772532755",
size: new $.ObjectSize(0, 1),
};
get $constructor(): string {
return $.utils.getText(0, this);
}
set $constructor(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestContructorName_" + super.toString(); }
}
export class TestTransferCap_Element extends $.Struct {
static readonly _zap = {
displayName: "Element",
id: "c7263e8f88844abc",
size: new $.ObjectSize(0, 2),
};
get text(): string {
return $.utils.getText(0, this);
}
set text(value: string) {
$.utils.setText(0, value, this);
}
get cap(): TestInterface$Client {
return new TestInterface$Client($.utils.getInterfaceClientOrNullAt(1, this));
}
set cap(value: TestInterface$Client) {
$.utils.setInterfacePointer(this.segment.message.addCap(value.client), $.utils.getPointer(1, this));
}
toString(): string { return "TestTransferCap_Element_" + super.toString(); }
}
export class TestTransferCap extends $.Struct {
static readonly Element = TestTransferCap_Element;
static readonly _zap = {
displayName: "TestTransferCap",
id: "dd2b66a791a279f0",
size: new $.ObjectSize(0, 1),
};
static _List: $.ListCtor<TestTransferCap_Element>;
_adoptList(value: $.Orphan<$.List<TestTransferCap_Element>>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownList(): $.Orphan<$.List<TestTransferCap_Element>> {
return $.utils.disown(this.list);
}
get list(): $.List<TestTransferCap_Element> {
return $.utils.getList(0, TestTransferCap._List, this);
}
_hasList(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initList(length: number): $.List<TestTransferCap_Element> {
return $.utils.initList(0, TestTransferCap._List, length, this);
}
set list(value: $.List<TestTransferCap_Element>) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestTransferCap_" + super.toString(); }
}
export class TestKeywordMethods_Delete$Params extends $.Struct {
static readonly _zap = {
displayName: "delete$Params",
id: "ca3a89cdeb6bd6b7",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestKeywordMethods_Delete$Params_" + super.toString(); }
}
export class TestKeywordMethods_Delete$Results extends $.Struct {
static readonly _zap = {
displayName: "delete$Results",
id: "eeb5843598307592",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestKeywordMethods_Delete$Results_" + super.toString(); }
}
export class TestKeywordMethods_Delete$Results$Promise {
pipeline: $.Pipeline<any, any, TestKeywordMethods_Delete$Results>;
constructor(pipeline: $.Pipeline<any, any, TestKeywordMethods_Delete$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestKeywordMethods_Delete$Results> {
return await this.pipeline.struct();
}
}
export class TestKeywordMethods_Class$Params extends $.Struct {
static readonly _zap = {
displayName: "class$Params",
id: "9cf5a8313c5db036",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestKeywordMethods_Class$Params_" + super.toString(); }
}
export class TestKeywordMethods_Class$Results extends $.Struct {
static readonly _zap = {
displayName: "class$Results",
id: "c0253868ac12e7d8",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestKeywordMethods_Class$Results_" + super.toString(); }
}
export class TestKeywordMethods_Class$Results$Promise {
pipeline: $.Pipeline<any, any, TestKeywordMethods_Class$Results>;
constructor(pipeline: $.Pipeline<any, any, TestKeywordMethods_Class$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestKeywordMethods_Class$Results> {
return await this.pipeline.struct();
}
}
export class TestKeywordMethods_Void$Params extends $.Struct {
static readonly _zap = {
displayName: "void$Params",
id: "a4a08763833c7757",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestKeywordMethods_Void$Params_" + super.toString(); }
}
export class TestKeywordMethods_Void$Results extends $.Struct {
static readonly _zap = {
displayName: "void$Results",
id: "de82773089c0aeab",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestKeywordMethods_Void$Results_" + super.toString(); }
}
export class TestKeywordMethods_Void$Results$Promise {
pipeline: $.Pipeline<any, any, TestKeywordMethods_Void$Results>;
constructor(pipeline: $.Pipeline<any, any, TestKeywordMethods_Void$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestKeywordMethods_Void$Results> {
return await this.pipeline.struct();
}
}
export class TestKeywordMethods_Return$Params extends $.Struct {
static readonly _zap = {
displayName: "return$Params",
id: "99817360625e8ca3",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestKeywordMethods_Return$Params_" + super.toString(); }
}
export class TestKeywordMethods_Return$Results extends $.Struct {
static readonly _zap = {
displayName: "return$Results",
id: "b70872e07eaa992f",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestKeywordMethods_Return$Results_" + super.toString(); }
}
export class TestKeywordMethods_Return$Results$Promise {
pipeline: $.Pipeline<any, any, TestKeywordMethods_Return$Results>;
constructor(pipeline: $.Pipeline<any, any, TestKeywordMethods_Return$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestKeywordMethods_Return$Results> {
return await this.pipeline.struct();
}
}
export class TestKeywordMethods$Client {
client: $.Client;
static readonly interfaceId: bigint = 0x9ae342d394247cfcn;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestKeywordMethods_Delete$Params, TestKeywordMethods_Delete$Results>,
$.Method<TestKeywordMethods_Class$Params, TestKeywordMethods_Class$Results>,
$.Method<TestKeywordMethods_Void$Params, TestKeywordMethods_Void$Results>,
$.Method<TestKeywordMethods_Return$Params, TestKeywordMethods_Return$Results>
] = [
{
ParamsClass: TestKeywordMethods_Delete$Params,
ResultsClass: TestKeywordMethods_Delete$Results,
interfaceId: TestKeywordMethods$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestKeywordMethods",
methodName: "delete"
},
{
ParamsClass: TestKeywordMethods_Class$Params,
ResultsClass: TestKeywordMethods_Class$Results,
interfaceId: TestKeywordMethods$Client.interfaceId,
methodId: 1,
interfaceName: "test/fixtures/test.zap:TestKeywordMethods",
methodName: "class"
},
{
ParamsClass: TestKeywordMethods_Void$Params,
ResultsClass: TestKeywordMethods_Void$Results,
interfaceId: TestKeywordMethods$Client.interfaceId,
methodId: 2,
interfaceName: "test/fixtures/test.zap:TestKeywordMethods",
methodName: "void"
},
{
ParamsClass: TestKeywordMethods_Return$Params,
ResultsClass: TestKeywordMethods_Return$Results,
interfaceId: TestKeywordMethods$Client.interfaceId,
methodId: 3,
interfaceName: "test/fixtures/test.zap:TestKeywordMethods",
methodName: "return"
}
];
delete(paramsFunc?: (params: TestKeywordMethods_Delete$Params) => void): TestKeywordMethods_Delete$Results$Promise {
const answer = this.client.call({
method: TestKeywordMethods$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestKeywordMethods_Delete$Results, answer);
return new TestKeywordMethods_Delete$Results$Promise(pipeline);
}
class(paramsFunc?: (params: TestKeywordMethods_Class$Params) => void): TestKeywordMethods_Class$Results$Promise {
const answer = this.client.call({
method: TestKeywordMethods$Client.methods[1],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestKeywordMethods_Class$Results, answer);
return new TestKeywordMethods_Class$Results$Promise(pipeline);
}
void(paramsFunc?: (params: TestKeywordMethods_Void$Params) => void): TestKeywordMethods_Void$Results$Promise {
const answer = this.client.call({
method: TestKeywordMethods$Client.methods[2],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestKeywordMethods_Void$Results, answer);
return new TestKeywordMethods_Void$Results$Promise(pipeline);
}
return(paramsFunc?: (params: TestKeywordMethods_Return$Params) => void): TestKeywordMethods_Return$Results$Promise {
const answer = this.client.call({
method: TestKeywordMethods$Client.methods[3],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestKeywordMethods_Return$Results, answer);
return new TestKeywordMethods_Return$Results$Promise(pipeline);
}
}
$.Registry.register(TestKeywordMethods$Client.interfaceId, TestKeywordMethods$Client);
export interface TestKeywordMethods$Server$Target {
delete(params: TestKeywordMethods_Delete$Params, results: TestKeywordMethods_Delete$Results): Promise<void>;
class(params: TestKeywordMethods_Class$Params, results: TestKeywordMethods_Class$Results): Promise<void>;
void(params: TestKeywordMethods_Void$Params, results: TestKeywordMethods_Void$Results): Promise<void>;
return(params: TestKeywordMethods_Return$Params, results: TestKeywordMethods_Return$Results): Promise<void>;
}
export class TestKeywordMethods$Server extends $.Server {
readonly target: TestKeywordMethods$Server$Target;
constructor(target: TestKeywordMethods$Server$Target) {
super(target, [
{
...TestKeywordMethods$Client.methods[0],
impl: target.delete
},
{
...TestKeywordMethods$Client.methods[1],
impl: target.class
},
{
...TestKeywordMethods$Client.methods[2],
impl: target.void
},
{
...TestKeywordMethods$Client.methods[3],
impl: target.return
}
]);
this.target = target;
}
client(): TestKeywordMethods$Client {
return new TestKeywordMethods$Client(this);
}
}
export class TestKeywordMethods extends $.Interface {
static readonly Client = TestKeywordMethods$Client;
static readonly Server = TestKeywordMethods$Server;
static readonly _zap = {
displayName: "TestKeywordMethods",
id: "9ae342d394247cfc",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestKeywordMethods_" + super.toString(); }
}
export class TestAuthenticatedBootstrap_GetCallerId$Params extends $.Struct {
static readonly _zap = {
displayName: "getCallerId$Params",
id: "8ec30e2451f1cffe",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestAuthenticatedBootstrap_GetCallerId$Params_" + super.toString(); }
}
export class TestAuthenticatedBootstrap_GetCallerId$Results extends $.Struct {
static readonly _zap = {
displayName: "getCallerId$Results",
id: "c71cf776034a3e67",
size: new $.ObjectSize(0, 1),
};
_adoptCaller(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownCaller(): $.Orphan<$.Pointer> {
return $.utils.disown(this.caller);
}
get caller(): $.Pointer {
return $.utils.getPointer(0, this);
}
_hasCaller(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
set caller(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestAuthenticatedBootstrap_GetCallerId$Results_" + super.toString(); }
}
export class TestAuthenticatedBootstrap_GetCallerId$Results$Promise {
pipeline: $.Pipeline<any, any, TestAuthenticatedBootstrap_GetCallerId$Results>;
constructor(pipeline: $.Pipeline<any, any, TestAuthenticatedBootstrap_GetCallerId$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestAuthenticatedBootstrap_GetCallerId$Results> {
return await this.pipeline.struct();
}
}
export class TestAuthenticatedBootstrap$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xea72cc77253798cdn;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestAuthenticatedBootstrap_GetCallerId$Params, TestAuthenticatedBootstrap_GetCallerId$Results>
] = [
{
ParamsClass: TestAuthenticatedBootstrap_GetCallerId$Params,
ResultsClass: TestAuthenticatedBootstrap_GetCallerId$Results,
interfaceId: TestAuthenticatedBootstrap$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestAuthenticatedBootstrap",
methodName: "getCallerId"
}
];
getCallerId(paramsFunc?: (params: TestAuthenticatedBootstrap_GetCallerId$Params) => void): TestAuthenticatedBootstrap_GetCallerId$Results$Promise {
const answer = this.client.call({
method: TestAuthenticatedBootstrap$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestAuthenticatedBootstrap_GetCallerId$Results, answer);
return new TestAuthenticatedBootstrap_GetCallerId$Results$Promise(pipeline);
}
}
$.Registry.register(TestAuthenticatedBootstrap$Client.interfaceId, TestAuthenticatedBootstrap$Client);
export interface TestAuthenticatedBootstrap$Server$Target {
getCallerId(params: TestAuthenticatedBootstrap_GetCallerId$Params, results: TestAuthenticatedBootstrap_GetCallerId$Results): Promise<void>;
}
export class TestAuthenticatedBootstrap$Server extends $.Server {
readonly target: TestAuthenticatedBootstrap$Server$Target;
constructor(target: TestAuthenticatedBootstrap$Server$Target) {
super(target, [
{
...TestAuthenticatedBootstrap$Client.methods[0],
impl: target.getCallerId
}
]);
this.target = target;
}
client(): TestAuthenticatedBootstrap$Client {
return new TestAuthenticatedBootstrap$Client(this);
}
}
export class TestAuthenticatedBootstrap extends $.Interface {
static readonly Client = TestAuthenticatedBootstrap$Client;
static readonly Server = TestAuthenticatedBootstrap$Server;
static readonly _zap = {
displayName: "TestAuthenticatedBootstrap",
id: "ea72cc77253798cd",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestAuthenticatedBootstrap_" + super.toString(); }
}
export class TestSturdyRef extends $.Struct {
static readonly _zap = {
displayName: "TestSturdyRef",
id: "ceba982cb629f6c2",
size: new $.ObjectSize(0, 2),
};
_adoptHostId(value: $.Orphan<TestSturdyRefHostId>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownHostId(): $.Orphan<TestSturdyRefHostId> {
return $.utils.disown(this.hostId);
}
get hostId(): TestSturdyRefHostId {
return $.utils.getStruct(0, TestSturdyRefHostId, this);
}
_hasHostId(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initHostId(): TestSturdyRefHostId {
return $.utils.initStructAt(0, TestSturdyRefHostId, this);
}
set hostId(value: TestSturdyRefHostId) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
_adoptObjectId(value: $.Orphan<$.Pointer>): void {
$.utils.adopt(value, $.utils.getPointer(1, this));
}
_disownObjectId(): $.Orphan<$.Pointer> {
return $.utils.disown(this.objectId);
}
get objectId(): $.Pointer {
return $.utils.getPointer(1, this);
}
_hasObjectId(): boolean {
return !$.utils.isNull($.utils.getPointer(1, this));
}
set objectId(value: $.Pointer) {
$.utils.copyFrom(value, $.utils.getPointer(1, this));
}
toString(): string { return "TestSturdyRef_" + super.toString(); }
}
export class TestSturdyRefHostId extends $.Struct {
static readonly _zap = {
displayName: "TestSturdyRefHostId",
id: "e02d3bbe1010e342",
size: new $.ObjectSize(0, 1),
};
get host(): string {
return $.utils.getText(0, this);
}
set host(value: string) {
$.utils.setText(0, value, this);
}
toString(): string { return "TestSturdyRefHostId_" + super.toString(); }
}
export const TestSturdyRefObjectId_Tag = {
/**
* testInterface
*
*/
TEST_INTERFACE: 0,
/**
* testTailCallee
*
*/
TEST_TAIL_CALLEE: 3,
TEST_EXTENDS: 1,
TEST_PIPELINE: 2,
TEST_TAIL_CALLER: 4,
TEST_MORE_STUFF: 5
} as const;
export type TestSturdyRefObjectId_Tag = (typeof TestSturdyRefObjectId_Tag)[keyof typeof TestSturdyRefObjectId_Tag];
export class TestSturdyRefObjectId extends $.Struct {
static readonly Tag = TestSturdyRefObjectId_Tag;
static readonly _zap = {
displayName: "TestSturdyRefObjectId",
id: "aeb2ad168e2f5697",
size: new $.ObjectSize(8, 0),
};
get tag(): TestSturdyRefObjectId_Tag {
return $.utils.getUint16(0, this) as TestSturdyRefObjectId_Tag;
}
set tag(value: TestSturdyRefObjectId_Tag) {
$.utils.setUint16(0, value, this);
}
toString(): string { return "TestSturdyRefObjectId_" + super.toString(); }
}
export class TestProvisionId extends $.Struct {
static readonly _zap = {
displayName: "TestProvisionId",
id: "9e5c574772b1d462",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestProvisionId_" + super.toString(); }
}
export class TestRecipientId extends $.Struct {
static readonly _zap = {
displayName: "TestRecipientId",
id: "ea2fb7dca9cdbdea",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestRecipientId_" + super.toString(); }
}
export class TestThirdPartyCapId extends $.Struct {
static readonly _zap = {
displayName: "TestThirdPartyCapId",
id: "a805157b98b65469",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestThirdPartyCapId_" + super.toString(); }
}
export class TestJoinResult extends $.Struct {
static readonly _zap = {
displayName: "TestJoinResult",
id: "f4c58a8ebcd0f600",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestJoinResult_" + super.toString(); }
}
export const TestNameAnnotation_BadlyNamedEnum = {
FOO: 0,
BAR: 1,
BAZ: 2
} as const;
export type TestNameAnnotation_BadlyNamedEnum = (typeof TestNameAnnotation_BadlyNamedEnum)[keyof typeof TestNameAnnotation_BadlyNamedEnum];
export const TestNameAnnotation_NestedStruct_DeeplyNestedEnum = {
QUUX: 0,
CORGE: 1,
GRAULT: 2
} as const;
export type TestNameAnnotation_NestedStruct_DeeplyNestedEnum = (typeof TestNameAnnotation_NestedStruct_DeeplyNestedEnum)[keyof typeof TestNameAnnotation_NestedStruct_DeeplyNestedEnum];
export class TestNameAnnotation_NestedStruct extends $.Struct {
static readonly DeeplyNestedEnum = TestNameAnnotation_NestedStruct_DeeplyNestedEnum;
static readonly _zap = {
displayName: "NestedStruct",
id: "be406b6341d52284",
size: new $.ObjectSize(8, 1),
};
get badNestedFieldName(): boolean {
return $.utils.getBit(0, this);
}
set badNestedFieldName(value: boolean) {
$.utils.setBit(0, value, this);
}
_adoptAnotherBadNestedFieldName(value: $.Orphan<TestNameAnnotation_NestedStruct>): void {
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownAnotherBadNestedFieldName(): $.Orphan<TestNameAnnotation_NestedStruct> {
return $.utils.disown(this.anotherBadNestedFieldName);
}
get anotherBadNestedFieldName(): TestNameAnnotation_NestedStruct {
return $.utils.getStruct(0, TestNameAnnotation_NestedStruct, this);
}
_hasAnotherBadNestedFieldName(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initAnotherBadNestedFieldName(): TestNameAnnotation_NestedStruct {
return $.utils.initStructAt(0, TestNameAnnotation_NestedStruct, this);
}
set anotherBadNestedFieldName(value: TestNameAnnotation_NestedStruct) {
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestNameAnnotation_NestedStruct_" + super.toString(); }
}
export class TestNameAnnotation_BadlyNamedUnion_BadlyNamedGroup extends $.Struct {
static readonly _zap = {
displayName: "badlyNamedGroup",
id: "c3594bce5b24b722",
size: new $.ObjectSize(8, 1),
};
toString(): string { return "TestNameAnnotation_BadlyNamedUnion_BadlyNamedGroup_" + super.toString(); }
}
export const TestNameAnnotation_BadlyNamedUnion_Which = {
BADLY_NAMED_GROUP: 0,
BAZ: 1
} as const;
export type TestNameAnnotation_BadlyNamedUnion_Which = (typeof TestNameAnnotation_BadlyNamedUnion_Which)[keyof typeof TestNameAnnotation_BadlyNamedUnion_Which];
export class TestNameAnnotation_BadlyNamedUnion extends $.Struct {
static readonly BADLY_NAMED_GROUP = TestNameAnnotation_BadlyNamedUnion_Which.BADLY_NAMED_GROUP;
static readonly BAZ = TestNameAnnotation_BadlyNamedUnion_Which.BAZ;
static readonly _zap = {
displayName: "badlyNamedUnion",
id: "89d9d1626b34017c",
size: new $.ObjectSize(8, 1),
};
get badlyNamedGroup(): TestNameAnnotation_BadlyNamedUnion_BadlyNamedGroup {
$.utils.testWhich("badlyNamedGroup", $.utils.getUint16(6, this), 0, this);
return $.utils.getAs(TestNameAnnotation_BadlyNamedUnion_BadlyNamedGroup, this);
}
_initBadlyNamedGroup(): TestNameAnnotation_BadlyNamedUnion_BadlyNamedGroup {
$.utils.setUint16(6, 0, this);
return $.utils.getAs(TestNameAnnotation_BadlyNamedUnion_BadlyNamedGroup, this);
}
get _isBadlyNamedGroup(): boolean {
return $.utils.getUint16(6, this) === 0;
}
set badlyNamedGroup(_: true) {
$.utils.setUint16(6, 0, this);
}
_adoptBaz(value: $.Orphan<TestNameAnnotation_NestedStruct>): void {
$.utils.setUint16(6, 1, this);
$.utils.adopt(value, $.utils.getPointer(0, this));
}
_disownBaz(): $.Orphan<TestNameAnnotation_NestedStruct> {
return $.utils.disown(this.baz);
}
get baz(): TestNameAnnotation_NestedStruct {
$.utils.testWhich("baz", $.utils.getUint16(6, this), 1, this);
return $.utils.getStruct(0, TestNameAnnotation_NestedStruct, this);
}
_hasBaz(): boolean {
return !$.utils.isNull($.utils.getPointer(0, this));
}
_initBaz(): TestNameAnnotation_NestedStruct {
$.utils.setUint16(6, 1, this);
return $.utils.initStructAt(0, TestNameAnnotation_NestedStruct, this);
}
get _isBaz(): boolean {
return $.utils.getUint16(6, this) === 1;
}
set baz(value: TestNameAnnotation_NestedStruct) {
$.utils.setUint16(6, 1, this);
$.utils.copyFrom(value, $.utils.getPointer(0, this));
}
toString(): string { return "TestNameAnnotation_BadlyNamedUnion_" + super.toString(); }
which(): TestNameAnnotation_BadlyNamedUnion_Which {
return $.utils.getUint16(6, this) as TestNameAnnotation_BadlyNamedUnion_Which;
}
}
export const TestNameAnnotation_Which = {
BAD_FIELD_NAME: 0,
BAR: 1
} as const;
export type TestNameAnnotation_Which = (typeof TestNameAnnotation_Which)[keyof typeof TestNameAnnotation_Which];
export class TestNameAnnotation extends $.Struct {
static readonly BAD_FIELD_NAME = TestNameAnnotation_Which.BAD_FIELD_NAME;
static readonly BAR = TestNameAnnotation_Which.BAR;
static readonly BadlyNamedEnum = TestNameAnnotation_BadlyNamedEnum;
static readonly NestedStruct = TestNameAnnotation_NestedStruct;
static readonly _zap = {
displayName: "TestNameAnnotation",
id: "d1fd8e9caf2a5d58",
size: new $.ObjectSize(8, 1),
};
get badFieldName(): boolean {
$.utils.testWhich("badFieldName", $.utils.getUint16(2, this), 0, this);
return $.utils.getBit(0, this);
}
get _isBadFieldName(): boolean {
return $.utils.getUint16(2, this) === 0;
}
set badFieldName(value: boolean) {
$.utils.setUint16(2, 0, this);
$.utils.setBit(0, value, this);
}
get bar(): number {
$.utils.testWhich("bar", $.utils.getUint16(2, this), 1, this);
return $.utils.getInt8(0, this);
}
get _isBar(): boolean {
return $.utils.getUint16(2, this) === 1;
}
set bar(value: number) {
$.utils.setUint16(2, 1, this);
$.utils.setInt8(0, value, this);
}
get anotherBadFieldName(): TestNameAnnotation_BadlyNamedEnum {
return $.utils.getUint16(4, this) as TestNameAnnotation_BadlyNamedEnum;
}
set anotherBadFieldName(value: TestNameAnnotation_BadlyNamedEnum) {
$.utils.setUint16(4, value, this);
}
get badlyNamedUnion(): TestNameAnnotation_BadlyNamedUnion {
return $.utils.getAs(TestNameAnnotation_BadlyNamedUnion, this);
}
_initBadlyNamedUnion(): TestNameAnnotation_BadlyNamedUnion {
return $.utils.getAs(TestNameAnnotation_BadlyNamedUnion, this);
}
toString(): string { return "TestNameAnnotation_" + super.toString(); }
which(): TestNameAnnotation_Which {
return $.utils.getUint16(2, this) as TestNameAnnotation_Which;
}
}
export class TestNameAnnotationInterface_BadlyNamedMethod$Params extends $.Struct {
static readonly _zap = {
displayName: "badlyNamedMethod$Params",
id: "c12efc3b075adfe9",
size: new $.ObjectSize(8, 0),
};
get badlyNamedParam(): number {
return $.utils.getUint8(0, this);
}
set badlyNamedParam(value: number) {
$.utils.setUint8(0, value, this);
}
toString(): string { return "TestNameAnnotationInterface_BadlyNamedMethod$Params_" + super.toString(); }
}
export class TestNameAnnotationInterface_BadlyNamedMethod$Results extends $.Struct {
static readonly _zap = {
displayName: "badlyNamedMethod$Results",
id: "dcc3cdb4b28f6c86",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestNameAnnotationInterface_BadlyNamedMethod$Results_" + super.toString(); }
}
export class TestNameAnnotationInterface_BadlyNamedMethod$Results$Promise {
pipeline: $.Pipeline<any, any, TestNameAnnotationInterface_BadlyNamedMethod$Results>;
constructor(pipeline: $.Pipeline<any, any, TestNameAnnotationInterface_BadlyNamedMethod$Results>) {
this.pipeline = pipeline;
}
async promise(): Promise<TestNameAnnotationInterface_BadlyNamedMethod$Results> {
return await this.pipeline.struct();
}
}
export class TestNameAnnotationInterface$Client {
client: $.Client;
static readonly interfaceId: bigint = 0xd112a69d31ed918bn;
constructor(client: $.Client) {
this.client = client;
}
static readonly methods: [
$.Method<TestNameAnnotationInterface_BadlyNamedMethod$Params, TestNameAnnotationInterface_BadlyNamedMethod$Results>
] = [
{
ParamsClass: TestNameAnnotationInterface_BadlyNamedMethod$Params,
ResultsClass: TestNameAnnotationInterface_BadlyNamedMethod$Results,
interfaceId: TestNameAnnotationInterface$Client.interfaceId,
methodId: 0,
interfaceName: "test/fixtures/test.zap:TestNameAnnotationInterface",
methodName: "badlyNamedMethod"
}
];
badlyNamedMethod(paramsFunc?: (params: TestNameAnnotationInterface_BadlyNamedMethod$Params) => void): TestNameAnnotationInterface_BadlyNamedMethod$Results$Promise {
const answer = this.client.call({
method: TestNameAnnotationInterface$Client.methods[0],
paramsFunc: paramsFunc
});
const pipeline = new $.Pipeline(TestNameAnnotationInterface_BadlyNamedMethod$Results, answer);
return new TestNameAnnotationInterface_BadlyNamedMethod$Results$Promise(pipeline);
}
}
$.Registry.register(TestNameAnnotationInterface$Client.interfaceId, TestNameAnnotationInterface$Client);
export interface TestNameAnnotationInterface$Server$Target {
badlyNamedMethod(params: TestNameAnnotationInterface_BadlyNamedMethod$Params, results: TestNameAnnotationInterface_BadlyNamedMethod$Results): Promise<void>;
}
export class TestNameAnnotationInterface$Server extends $.Server {
readonly target: TestNameAnnotationInterface$Server$Target;
constructor(target: TestNameAnnotationInterface$Server$Target) {
super(target, [
{
...TestNameAnnotationInterface$Client.methods[0],
impl: target.badlyNamedMethod
}
]);
this.target = target;
}
client(): TestNameAnnotationInterface$Client {
return new TestNameAnnotationInterface$Client(this);
}
}
export class TestNameAnnotationInterface extends $.Interface {
static readonly Client = TestNameAnnotationInterface$Client;
static readonly Server = TestNameAnnotationInterface$Server;
static readonly _zap = {
displayName: "TestNameAnnotationInterface",
id: "d112a69d31ed918b",
size: new $.ObjectSize(0, 0),
};
toString(): string { return "TestNameAnnotationInterface_" + super.toString(); }
}
TestAllTypes._StructList = $.CompositeList(TestAllTypes);
TestDefaults._StructList = $.CompositeList(TestAllTypes);
TestLists._List0 = $.CompositeList(TestLists_Struct0);
TestLists._List1 = $.CompositeList(TestLists_Struct1);
TestLists._List8 = $.CompositeList(TestLists_Struct8);
TestLists._List16 = $.CompositeList(TestLists_Struct16);
TestLists._List32 = $.CompositeList(TestLists_Struct32);
TestLists._List64 = $.CompositeList(TestLists_Struct64);
TestLists._ListP = $.CompositeList(TestLists_StructP);
TestLists._Int32ListList = $.PointerList($.Int32List);
TestLists._TextListList = $.PointerList($.TextList);
TestLists._StructListList = $.PointerList($.CompositeList(TestAllTypes));
TestPrintInlineStructs._StructList = $.CompositeList(TestPrintInlineStructs_InlineStruct);
TestTransferCap._List = $.CompositeList(TestTransferCap_Element);