import * as VScript from "http://172.16.0.12/bladerunner_sdk/vscript@2.5.2/deno/release/mod.ts";
import * as VAPI from "./mod.ts";
import * as AE from "./toplevel/audioengine.ts";
import {
  LiteralNetworkConfig,
  NetworkConfig,
  do_upload_config,
} from "./toplevel/network_config.ts";
import { assemble_config_record } from "./toplevel/network_config.ts";
import { split_sdp } from "./toplevel/sdp.ts";
export namespace Audio {
  export const lift = {
    Essence: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Essence(_raw),
    TimedSource: (
      _raw: [null | string, null | number | string],
      _socket: VScript.VSocket,
    ): TimedSource => {
      return {
        source:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        switch_time:
          _raw[1] === null
            ? null
            : VScript.VAPIHelpers.liftTimestamp(_raw[1], _socket),
      };
    },
  } as const;
  export const lower = {
    Essence: (_x: Essence) => _x.raw.kwl,
    TimedSource: (
      _x: {
        source: null | VAPI.AT1130.Audio.Essence;
        switch_time: null | VAPI.Primitives.Timestamp;
      },
      _socket: VScript.VSocket,
    ): [null | string, null | number | string] => [
      _x.source === null ? null : _x.source.raw.kwl,
      _x.switch_time === null
        ? null
        : VScript.VAPIHelpers.lowerTimestamp(_x.switch_time, _socket),
    ],
  } as const;
  export class Essence
    implements VScript.Referenceable<"Audio::Data::Essence">
  {
    readonly type_identifier = "Audio::Data::Essence" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.Audio.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.Audio.Essence
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get sop_dt_node(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1130.Audio.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1130.Audio.Essence
      >(this, "sop_dt_node" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
      });
    }
    get channels(): VScript.rKeywordReferenceable<
      VScript.VSocket,
      "channels",
      | null
      | [
          null | string,
          number,
          boolean,
          [number, number, number, number, number],
        ],
      null | VAPI.Audio.Channel,
      Array<
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ]
      >,
      Array<null | VAPI.Audio.Channel>,
      "Audio::Data::Essence",
      VAPI.AT1130.Audio.Essence
    > {
      return new VScript.rKeywordReferenceable<
        VScript.VSocket,
        "channels",
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel,
        Array<
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ]
        >,
        Array<null | VAPI.Audio.Channel>,
        "Audio::Data::Essence",
        VAPI.AT1130.Audio.Essence
      >(
        this,
        "channels" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.Audio.lift.Channel,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.Audio.lower.Channel,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(VAPI.Audio.lift.Channel),
          ),
          lower: VScript.VAPIHelpers.lowerArray(
            VScript.VAPIHelpers.liftOrLowerNullable(VAPI.Audio.lower.Channel),
          ),
        },
      );
    }
    /**
    some signal sources, such as RTP audio/video streams, include a
    well-defined offset to the PTP epoch (as seen by the sender). During
    processing, these 'media clocks' may shift (e.g., as signals pass through
    delay elements) or broaden into finite intervals (e.g., as audio channels
    at different offsets to the PTP epoch are combined into a single audio
    essence). Using the `media_clock` keyword, such changes are tracked
    explicitly and forwarded to audio/video transmitters.
  */

    get media_clock() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "media_clock"),
      );
    }
  }
  export interface TimedSource {
    source: null | VAPI.AT1130.Audio.Essence;
    switch_time: null | VAPI.Primitives.Timestamp;
  }
}
export namespace AudioEngine {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    Compressor: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Compressor(_raw),
    Delay: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Delay(_raw),
    DownMix: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new DownMix(_raw),
    Filter: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Filter(_raw),
    Loudness: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Loudness(_raw),
    MidSide: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MidSide(_raw),
    MonoMix: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MonoMix(_raw),
    NMinus1: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new NMinus1(_raw),
    StereoMix: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new StereoMix(_raw),
    TruePeak: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new TruePeak(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    Compressor: (_x: Compressor) => _x.raw.kwl,
    Delay: (_x: Delay) => _x.raw.kwl,
    DownMix: (_x: DownMix) => _x.raw.kwl,
    Filter: (_x: Filter) => _x.raw.kwl,
    Loudness: (_x: Loudness) => _x.raw.kwl,
    MidSide: (_x: MidSide) => _x.raw.kwl,
    MonoMix: (_x: MonoMix) => _x.raw.kwl,
    NMinus1: (_x: NMinus1) => _x.raw.kwl,
    StereoMix: (_x: StereoMix) => _x.raw.kwl,
    TruePeak: (_x: TruePeak) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"AudioEngine::Data::All"> {
    readonly type_identifier = "AudioEngine::Data::All" as const;
    get runtime_constants() {
      return {
        num_input_stages: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::num_input_stages",
        ) as number,
        max_nminus1_instances: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::max_nminus1_instances",
        ) as number,
        max_mixer_instances: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::max_mixer_instances",
        ) as number,
        max_delay_instances: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::max_delay_instances",
        ) as number,
        num_output_slices: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::num_output_slices",
        ) as number,
        max_loudness_instances: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::max_loudness_instances",
        ) as number,
        max_truepeak_instances: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::max_truepeak_instances",
        ) as number,
        max_inputs_per_stage: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::max_inputs_per_stage",
        ) as number,
        max_compressor_instances: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::max_compressor_instances",
        ) as number,
        max_filter_instances: this.raw.backing_store.get_runtime_constant(
          "AudioEngine::max_filter_instances",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get genlock(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Genlock.AT1130Genlock,
      | null
      | (VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.All
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Genlock.AT1130Genlock,
        | null
        | (VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.All
      >(
        this,
        "genlock" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Genlock.AT1130Genlock(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Genlock.AT1130Genlock(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        (
          parent: VAPI.AT1130.AudioEngine.All,
          command: null | VAPI.AT1130.Genlock.AT1130Genlock,
        ) => (
          void parent,
          void command,
          {
            criterion: "status",
            validator: (status: null | VAPI.AT1130.Genlock.AT1130Genlock) =>
              command === null || VScript.same(command, status),
          }
        ),
      );
    }
    get groups() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Group",
        VAPI.AudioEngine.GroupAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "groups",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AudioEngine.GroupAsNamedTableRow(raw),
      );
    }
    get nminus1() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::NMinus1",
        VAPI.AT1130.AudioEngine.NMinus1AsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "nminus1",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.NMinus1AsNamedTableRow(raw),
      );
    }
    get mono() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::MonoMix",
        VAPI.AT1130.AudioEngine.MonoMixAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          3,
          "mono",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.MonoMixAsNamedTableRow(raw),
      );
    }
    get stereo() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::StereoMix",
        VAPI.AT1130.AudioEngine.StereoMixAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "stereo",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.StereoMixAsNamedTableRow(raw),
      );
    }
    get filter() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Filter",
        VAPI.AT1130.AudioEngine.FilterAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          5,
          "filter",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.FilterAsNamedTableRow(raw),
      );
    }
    get delay() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Delay",
        VAPI.AT1130.AudioEngine.DelayAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "delay",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.DelayAsNamedTableRow(raw),
      );
    }
    get truepeak() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::TruePeak",
        VAPI.AT1130.AudioEngine.TruePeakAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          7,
          "truepeak",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.TruePeakAsNamedTableRow(raw),
      );
    }
    get loudness() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Loudness",
        VAPI.AT1130.AudioEngine.LoudnessAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          8,
          "loudness",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.LoudnessAsNamedTableRow(raw),
      );
    }
    get compressor() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Compressor",
        VAPI.AT1130.AudioEngine.CompressorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          9,
          "compressor",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.CompressorAsNamedTableRow(raw),
      );
    }
    get downmix() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::DownMix",
        VAPI.AT1130.AudioEngine.DownMixAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          10,
          "downmix",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.DownMixAsNamedTableRow(raw),
      );
    }
    get midside() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::MidSide",
        VAPI.AT1130.AudioEngine.MidSideAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          11,
          "midside",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioEngine.MidSideAsNamedTableRow(raw),
      );
    }
    get info(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          number,
          number,
          [number, number],
          [number, number],
          [number, number],
          [number, number],
          null | [[number, number], [number, number]],
          [
            null | [number, number],
            null | [number, number],
            null | [number, number],
          ],
          null | [[number, number], [number, number], [number, number]],
        ],
      null | VAPI.AudioEngine.Info,
      VAPI.AT1130.AudioEngine.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            number,
            number,
            [number, number],
            [number, number],
            [number, number],
            [number, number],
            null | [[number, number], [number, number]],
            [
              null | [number, number],
              null | [number, number],
              null | [number, number],
            ],
            null | [[number, number], [number, number], [number, number]],
          ],
        null | VAPI.AudioEngine.Info,
        VAPI.AT1130.AudioEngine.All
      >(this, "info" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AudioEngine.lift.Info,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AudioEngine.lower.Info,
        ),
      });
    }
    get audio_source_slices() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          13,
          "audio_source_slices",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
    async create_stereo_mixer(pars: {
      group?:
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>)
        | string;
      name: string;
      channel_strips: {
        capabilities: {
          format?: "Mono" | "Stereo";
          hpf?: boolean;
          gate?: boolean;
          compressor?: boolean;
          eq?: "None" | "3-Band" | "4-Band";
        };
        count: number;
      }[];
    }) {
      const total_channels = pars.channel_strips.reduce(
        (accu, cs) => accu + cs.count,
        0,
      );
      if (total_channels <= 0 || total_channels > 64)
        throw new Error("Invalid channel count - must be between 1 and 64");

      let allocated: { (): Promise<void> }[] = [];
      const group = await (async () => {
        if (!pars.group) return null;
        if (typeof pars.group === "string") {
          const group = await this.groups.create_row({ name: pars.group });
          allocated.push(() => group.delete());
          return group;
        }
        return pars.group;
      })();

      try {
        const sum = await this.stereo.create_row({ name: pars.name });
        allocated.push(() => sum.delete());

        await Promise.all([
          sum.capabilities.command.write({
            channels: total_channels,
            master_fader: true,
          }),
          sum.group.write(group),
        ]);

        let ch_idx = 0;
        for (let cs of pars.channel_strips) {
          const channels = cs.capabilities.format == "Stereo" ? 2 : 1;
          const eq_mode: "None" | "3-Band" | "4-Band" =
            cs.capabilities.eq ?? "3-Band";

          for (let idx = 0; idx < cs.count; ++idx) {
            let src: VAPI.AT1130.Audio.Essence | null = null;

            if (cs.capabilities.hpf ?? true) {
              const hpf = await this.filter.create_row({
                name: `${pars.name} HPF ${ch_idx}`,
              });
              allocated.push(() => hpf.delete());
              await Promise.all([
                hpf.capabilities.command.write({ channels, bands: 1 }),
                hpf.group.write(group),
              ]);
              await hpf.bands
                .row(0)
                .param.write({
                  variant: "HighPass",
                  value: { fc: 50.0, q: 0.707 },
                });
              src = hpf.output;
            }

            if (cs.capabilities.gate) {
              const comp = await this.compressor.create_row({
                name: `${pars.name} GATE ${ch_idx}`,
              });
              allocated.push(() => comp.delete());
              await Promise.all([
                comp.capabilities.command.write({
                  channels,
                  control: { variant: "Input", value: { bandpass: false } },
                  lookahead: false,
                }),
                comp.group.write(group),
                comp.curve.write({
                  variant: "Gate",
                  value: { threshold: -30.0, width: 3.0 },
                }),
                comp.params.write({
                  attack: {
                    variant: "Time",
                    value: { time: new VScript.Duration(10, "ms") },
                  },
                  release: {
                    variant: "Time",
                    value: { time: new VScript.Duration(50, "ms") },
                  },
                  hold: {
                    variant: "Time",
                    value: { time: new VScript.Duration(5, "ms") },
                  },
                  gain: 0.0,
                }),
                comp.set_input(src, { channels }),
              ]);

              src = comp.output;
            }

            if (cs.capabilities.compressor ?? true) {
              const comp = await this.compressor.create_row({
                name: `${pars.name} COMP ${ch_idx}`,
              });
              allocated.push(() => comp.delete());
              await Promise.all([
                comp.capabilities.command.write({
                  channels,
                  control: { variant: "Input", value: { bandpass: false } },
                  lookahead: false,
                }),
                comp.group.write(group),
                comp.curve.write({
                  variant: "SoftKnee",
                  value: { threshold: 0.0, width: 3.0, ratio: 4.0 },
                }),
                comp.params.write({
                  attack: {
                    variant: "Time",
                    value: { time: new VScript.Duration(30, "ms") },
                  },
                  release: {
                    variant: "Time",
                    value: { time: new VScript.Duration(30, "ms") },
                  },
                  hold: {
                    variant: "Time",
                    value: { time: new VScript.Duration(0, "ms") },
                  },
                  gain: 0.0,
                }),
                comp.set_input(src, { channels }),
              ]);

              src = comp.output;
            }

            if (eq_mode != "None") {
              const eq = await this.filter.create_row({
                name: `${pars.name} EQ ${ch_idx}`,
              });
              allocated.push(() => eq.delete());
              const bands = ((): VAPI.AudioEngine.FilterParameter[] => {
                switch (eq_mode) {
                  case "3-Band":
                    return [
                      { variant: "LowShelf", value: { fc: 150.0, gain: 0.0 } },
                      {
                        variant: "Peak",
                        value: { fc: 2000.0, q: 0.3, gain: 0.0 },
                      },
                      {
                        variant: "HighShelf",
                        value: { fc: 4000.0, gain: 0.0 },
                      },
                    ];
                  case "4-Band":
                    return [
                      { variant: "LowShelf", value: { fc: 150.0, gain: 0.0 } },
                      {
                        variant: "Peak",
                        value: { fc: 1000.0, q: 0.707, gain: 0.0 },
                      },
                      {
                        variant: "Peak",
                        value: { fc: 2000.0, q: 0.707, gain: 0.0 },
                      },
                      {
                        variant: "HighShelf",
                        value: { fc: 4000.0, gain: 0.0 },
                      },
                    ];
                }
              })();
              await Promise.all([
                eq.capabilities.command.write({
                  channels,
                  bands: bands.length,
                }),
                eq.group.write(group),
                eq.set_input(src, { channels }),
              ]);
              await Promise.all(
                bands.map((p, idx) => eq.bands.row(idx).param.write(p)),
              );

              src = eq.output;
            }

            if (src) {
              type RefType = ReturnType<typeof src.channels.reference_to_index>;
              let update_inputs: {
                [i: number]: [null | RefType, null | RefType];
              } = {};
              update_inputs[ch_idx] =
                channels == 2
                  ? [
                      src.channels.reference_to_index(0),
                      src.channels.reference_to_index(1),
                    ]
                  : [src.channels.reference_to_index(0), null];
              let update_pan: {
                [i: number]: VAPI.AudioEngine.StereoPanBalance;
              } = {};
              update_pan[ch_idx] =
                channels == 2
                  ? { variant: "BalanceCenterLinear", value: { balance: 0.0 } }
                  : { variant: "PanConstantPower", value: { pan: 0.0 } };
              await Promise.all([
                sum.inputs.write(update_inputs),
                sum.pan.write(update_pan),
              ]);
              ch_idx++;
            }
          }
        }

        return sum;
      } catch (error) {
        await Promise.all(allocated.map((cb) => cb()));
        throw error;
      }
    }
    find_audio_source(dst: AE.AudioRef1130) {
      const kwl = dst.enclosing_subtree.raw.kwl;
      function extract_index(
        kwl: string,
        table_kwl: string,
        capacity: number,
      ): number | null {
        const prefix = `${table_kwl}[`;
        if (kwl.startsWith(prefix)) {
          const end = kwl.indexOf("]", prefix.length);
          if (end > 0) {
            const idx = parseInt(kwl.substring(prefix.length, end));
            if (!isNaN(idx) && idx >= 0 && idx < capacity) return idx;
          }
        }
        return null;
      }
      function check(
        tables: (
          | null
          | VScript.StronglyTypedNamedTable<
              VScript.VSocket,
              "AudioEngine::Data::NMinus1",
              VAPI.AT1130.AudioEngine.NMinus1AsNamedTableRow
            >
          | VScript.StronglyTypedNamedTable<
              VScript.VSocket,
              "AudioEngine::Data::MonoMix",
              VAPI.AT1130.AudioEngine.MonoMixAsNamedTableRow
            >
          | VScript.StronglyTypedNamedTable<
              VScript.VSocket,
              "AudioEngine::Data::StereoMix",
              VAPI.AT1130.AudioEngine.StereoMixAsNamedTableRow
            >
          | VScript.StronglyTypedNamedTable<
              VScript.VSocket,
              "AudioEngine::Data::Filter",
              VAPI.AT1130.AudioEngine.FilterAsNamedTableRow
            >
          | VScript.StronglyTypedNamedTable<
              VScript.VSocket,
              "AudioEngine::Data::Delay",
              VAPI.AT1130.AudioEngine.DelayAsNamedTableRow
            >
          | VScript.StronglyTypedNamedTable<
              VScript.VSocket,
              "AudioEngine::Data::Compressor",
              VAPI.AT1130.AudioEngine.CompressorAsNamedTableRow
            >
        )[],
      ) {
        for (const table of tables) {
          if (table) {
            const idx = extract_index(kwl, table.raw.kwl, table.capacity());
            if (idx !== null) return table.row(idx);
          }
        }
        return null;
      }
      const obj = check([
        this.nminus1,
        this.mono,
        this.stereo,
        this.filter,
        this.delay,
        this.compressor,
      ]);
      if (obj) {
        if (obj instanceof VAPI.AT1130.AudioEngine.NMinus1AsNamedTableRow) {
          const out_idx = extract_index(
            dst.enclosing_subtree.raw.kwl,
            obj.output.raw.kwl,
            obj.output.raw.description.capacity,
          );
          if (out_idx) {
            return { src: obj, ch: out_idx * 64 + dst.index };
          }
        }
        return { src: obj, ch: dst.index };
      }
      return null;
    }
  }
  export class Compressor
    implements VScript.Referenceable<"AudioEngine::Data::Compressor">
  {
    readonly type_identifier = "AudioEngine::Data::Compressor" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.Compressor
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [number, [0, [boolean]] | [1, []], boolean],
      null | [number, [0, [boolean]] | [1, []], boolean],
      null | VAPI.AudioEngine.CompressorCapabilities,
      null | VAPI.AudioEngine.CompressorCapabilities,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, [0, [boolean]] | [1, []], boolean],
        null | [number, [0, [boolean]] | [1, []], boolean],
        null | VAPI.AudioEngine.CompressorCapabilities,
        null | VAPI.AudioEngine.CompressorCapabilities,
        VAPI.AT1130.AudioEngine.Compressor
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.CompressorCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.CompressorCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.CompressorCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.CompressorCapabilities,
          ),
        },
        null,
      );
    }
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioEngine.Compressor
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number]>,
      Array<VAPI.AudioEngine.HWInputAssignment>,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1130.AudioEngine.Compressor
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.HWInputAssignment,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.HWInputAssignment,
        ),
      });
    }
    get control(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.CompressorSource,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::CompressorSource"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.CompressorSource,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::CompressorSource"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.Compressor
      >(
        this,
        "control" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.CompressorSource(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::CompressorSource"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.CompressorSource(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::CompressorSource"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.CompressorIssues,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.CompressorIssues,
        VAPI.AT1130.AudioEngine.Compressor
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.CompressorIssues => ({
          bandpass_unavailable_capabilities: (x & 1) !== 0,
          bandpass_unavailable_sidechain: (x & 2) !== 0,
          control_missing: (x & 4) !== 0,
          curve_update_delayed: (x & 8) !== 0,
          cycle_detected: (x & 16) !== 0,
          invalid_input_channel: (x & 32) !== 0,
          lookahead_not_available: (x & 64) !== 0,
        }),
        lower: (
          x: VAPI.AudioEngine.CompressorIssues,
          _: VScript.VSocket,
        ): number =>
          (x.bandpass_unavailable_capabilities ? 1 : 0) |
          (x.bandpass_unavailable_sidechain ? 2 : 0) |
          (x.control_missing ? 4 : 0) |
          (x.curve_update_delayed ? 8 : 0) |
          (x.cycle_detected ? 16 : 0) |
          (x.invalid_input_channel ? 32 : 0) |
          (x.lookahead_not_available ? 64 : 0),
      });
    }
    get curve(): VScript.rwKeyword<
      VScript.VSocket,
      | [0, [number, number, number]]
      | [1, [number, number]]
      | [2, [number, number, number]]
      | [3, [number, number]]
      | [4, [number, number, number, number]],
      | [0, [number, number, number]]
      | [1, [number, number]]
      | [2, [number, number, number]]
      | [3, [number, number]]
      | [4, [number, number, number, number]],
      VAPI.AudioEngine.CompressorCurve,
      VAPI.AudioEngine.CompressorCurve,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        | [0, [number, number, number]]
        | [1, [number, number]]
        | [2, [number, number, number]]
        | [3, [number, number]]
        | [4, [number, number, number, number]],
        | [0, [number, number, number]]
        | [1, [number, number]]
        | [2, [number, number, number]]
        | [3, [number, number]]
        | [4, [number, number, number, number]],
        VAPI.AudioEngine.CompressorCurve,
        VAPI.AudioEngine.CompressorCurve,
        VAPI.AT1130.AudioEngine.Compressor
      >(
        this,
        "curve" as VScript.SysName,
        {
          lift: VAPI.AudioEngine.lift.CompressorCurve,
          lower: VAPI.AudioEngine.lower.CompressorCurve,
        },
        {
          lift: VAPI.AudioEngine.lift.CompressorCurve,
          lower: VAPI.AudioEngine.lower.CompressorCurve,
        },
        null,
      );
    }
    get curve_points(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number, number, null | number]>,
      Array<VAPI.AudioEngine.CompressorCurvePoint>,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number, number, null | number]>,
        Array<VAPI.AudioEngine.CompressorCurvePoint>,
        VAPI.AT1130.AudioEngine.Compressor
      >(this, "curve_points" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.CompressorCurvePoint,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.CompressorCurvePoint,
        ),
      });
    }
    get params(): VScript.rwKeyword<
      VScript.VSocket,
      [
        [0, [number]] | [1, [number]],
        [0, [number]] | [1, [number]],
        [0, [number]] | [1, [number]],
        number,
      ],
      [
        [0, [number]] | [1, [number]],
        [0, [number]] | [1, [number]],
        [0, [number]] | [1, [number]],
        number,
      ],
      VAPI.AudioEngine.CompressorParameter,
      VAPI.AudioEngine.CompressorParameter,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        [
          [0, [number]] | [1, [number]],
          [0, [number]] | [1, [number]],
          [0, [number]] | [1, [number]],
          number,
        ],
        [
          [0, [number]] | [1, [number]],
          [0, [number]] | [1, [number]],
          [0, [number]] | [1, [number]],
          number,
        ],
        VAPI.AudioEngine.CompressorParameter,
        VAPI.AudioEngine.CompressorParameter,
        VAPI.AT1130.AudioEngine.Compressor
      >(
        this,
        "params" as VScript.SysName,
        {
          lift: VAPI.AudioEngine.lift.CompressorParameter,
          lower: VAPI.AudioEngine.lower.CompressorParameter,
        },
        {
          lift: VAPI.AudioEngine.lift.CompressorParameter,
          lower: VAPI.AudioEngine.lower.CompressorParameter,
        },
        null,
      );
    }
    get bandpass(): VScript.rwKeyword<
      VScript.VSocket,
      [boolean, [number, number], [number, number]],
      [boolean, [number, number], [number, number]],
      VAPI.AudioEngine.CompressorBandpass,
      VAPI.AudioEngine.CompressorBandpass,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        [boolean, [number, number], [number, number]],
        [boolean, [number, number], [number, number]],
        VAPI.AudioEngine.CompressorBandpass,
        VAPI.AudioEngine.CompressorBandpass,
        VAPI.AT1130.AudioEngine.Compressor
      >(
        this,
        "bandpass" as VScript.SysName,
        {
          lift: VAPI.AudioEngine.lift.CompressorBandpass,
          lower: VAPI.AudioEngine.lower.CompressorBandpass,
        },
        {
          lift: VAPI.AudioEngine.lift.CompressorBandpass,
          lower: VAPI.AudioEngine.lower.CompressorBandpass,
        },
        null,
      );
    }
    get lookahead(): VScript.rwKeyword<
      VScript.VSocket,
      [boolean, [0, [number]] | [1, [number]]],
      [boolean, [0, [number]] | [1, [number]]],
      VAPI.AudioEngine.CompressorLookahead,
      VAPI.AudioEngine.CompressorLookahead,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        [boolean, [0, [number]] | [1, [number]]],
        [boolean, [0, [number]] | [1, [number]]],
        VAPI.AudioEngine.CompressorLookahead,
        VAPI.AudioEngine.CompressorLookahead,
        VAPI.AT1130.AudioEngine.Compressor
      >(
        this,
        "lookahead" as VScript.SysName,
        {
          lift: VAPI.AudioEngine.lift.CompressorLookahead,
          lower: VAPI.AudioEngine.lower.CompressorLookahead,
        },
        {
          lift: VAPI.AudioEngine.lift.CompressorLookahead,
          lower: VAPI.AudioEngine.lower.CompressorLookahead,
        },
        null,
      );
    }
    get current_gain(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Audio.PeakMeter,
      VAPI.AT1130.AudioEngine.Compressor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Audio.PeakMeter,
        VAPI.AT1130.AudioEngine.Compressor
      >(this, "current_gain" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 12, "output"),
      );
    }
    async set_input(
      src: null | VAPI.AT1130.Audio.Essence | (null | AE.AudioRef1130)[],
      pars?: {
        start?: number;
        channels?: number;
      },
    ) {
      return AE.set_input(this, src, pars);
    }
  }
  export class CompressorAsNamedTableRow extends Compressor {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Delay
    implements VScript.Referenceable<"AudioEngine::Data::Delay">
  {
    readonly type_identifier = "AudioEngine::Data::Delay" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.Delay
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.Delay
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [number, number],
      null | [number, number],
      null | VAPI.AudioEngine.DelayCapabilities,
      null | VAPI.AudioEngine.DelayCapabilities,
      VAPI.AT1130.AudioEngine.Delay
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, number],
        null | [number, number],
        null | VAPI.AudioEngine.DelayCapabilities,
        null | VAPI.AudioEngine.DelayCapabilities,
        VAPI.AT1130.AudioEngine.Delay
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.DelayCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.DelayCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.DelayCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.DelayCapabilities,
          ),
        },
        null,
      );
    }
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioEngine.Delay
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioEngine.Delay
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number]>,
      Array<VAPI.AudioEngine.HWInputAssignment>,
      VAPI.AT1130.AudioEngine.Delay
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1130.AudioEngine.Delay
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.HWInputAssignment,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.HWInputAssignment,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.DelayIssues,
      VAPI.AT1130.AudioEngine.Delay
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.DelayIssues,
        VAPI.AT1130.AudioEngine.Delay
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.DelayIssues => ({
          cycle_detected: (x & 1) !== 0,
          invalid_input_channel: (x & 2) !== 0,
        }),
        lower: (x: VAPI.AudioEngine.DelayIssues, _: VScript.VSocket): number =>
          (x.cycle_detected ? 1 : 0) | (x.invalid_input_channel ? 2 : 0),
      });
    }
    get delay(): VScript.rwKeyword<
      VScript.VSocket,
      Array<[0, [number]] | [1, [number]]>,
      VScript.MaybeSparseArray<[0, [number]] | [1, [number]]>,
      Array<VAPI.AudioEngine.DelayParameter>,
      VScript.MaybeSparseArray<VAPI.AudioEngine.DelayParameter>,
      VAPI.AT1130.AudioEngine.Delay
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<[0, [number]] | [1, [number]]>,
        VScript.MaybeSparseArray<[0, [number]] | [1, [number]]>,
        Array<VAPI.AudioEngine.DelayParameter>,
        VScript.MaybeSparseArray<VAPI.AudioEngine.DelayParameter>,
        VAPI.AT1130.AudioEngine.Delay
      >(
        this,
        "delay" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VAPI.AudioEngine.lift.DelayParameter,
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VAPI.AudioEngine.lower.DelayParameter(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VAPI.AudioEngine.lift.DelayParameter,
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VAPI.AudioEngine.lower.DelayParameter(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output"),
      );
    }
    async set_input(
      src: null | VAPI.AT1130.Audio.Essence | (null | AE.AudioRef1130)[],
      pars?: {
        start?: number;
        channels?: number;
      },
    ) {
      return AE.set_input(this, src, pars);
    }
  }
  export class DelayAsNamedTableRow extends Delay {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class DownMix
    implements VScript.Referenceable<"AudioEngine::Data::DownMix">
  {
    readonly type_identifier = "AudioEngine::Data::DownMix" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.DownMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.DownMix
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [VAPI.AudioEngine.DownMixCapabilitiesChannels],
      null | [VAPI.AudioEngine.DownMixCapabilitiesChannels],
      null | VAPI.AudioEngine.DownMixCapabilities,
      null | VAPI.AudioEngine.DownMixCapabilities,
      VAPI.AT1130.AudioEngine.DownMix
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [VAPI.AudioEngine.DownMixCapabilitiesChannels],
        null | [VAPI.AudioEngine.DownMixCapabilitiesChannels],
        null | VAPI.AudioEngine.DownMixCapabilities,
        null | VAPI.AudioEngine.DownMixCapabilities,
        VAPI.AT1130.AudioEngine.DownMix
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.DownMixCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.DownMixCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.DownMixCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.DownMixCapabilities,
          ),
        },
        null,
      );
    }

    /**
    Channel order:
    
    0: Left
    
    1: Right
    
    2: Center
    
    3: LFE
    
    4: Surround Left
    
    5: Surround Right
    
    6: Surround Back Left
    
    7: Surround Back Right
    
    8: Top Left
    
    9: Top Right
    
    10: Top Back Left
    
    11: Top Back Right
  */
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioEngine.DownMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioEngine.DownMix
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      VAPI.AT1130.AudioEngine.DownMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1130.AudioEngine.DownMix
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number]>,
      Array<VAPI.AudioEngine.HWInputAssignment>,
      VAPI.AT1130.AudioEngine.DownMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1130.AudioEngine.DownMix
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.HWInputAssignment,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.HWInputAssignment,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.DownMixIssues,
      VAPI.AT1130.AudioEngine.DownMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.DownMixIssues,
        VAPI.AT1130.AudioEngine.DownMix
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.DownMixIssues => ({
          cycle_detected: (x & 1) !== 0,
          invalid_input_channel: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.AudioEngine.DownMixIssues,
          _: VScript.VSocket,
        ): number =>
          (x.cycle_detected ? 1 : 0) | (x.invalid_input_channel ? 2 : 0),
      });
    }
    get levels(): VScript.rwKeyword<
      VScript.VSocket,
      [number, number, number, number, number, number, number, number],
      [number, number, number, number, number, number, number, number],
      VAPI.AudioEngine.DownMixLevels,
      VAPI.AudioEngine.DownMixLevels,
      VAPI.AT1130.AudioEngine.DownMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        [number, number, number, number, number, number, number, number],
        [number, number, number, number, number, number, number, number],
        VAPI.AudioEngine.DownMixLevels,
        VAPI.AudioEngine.DownMixLevels,
        VAPI.AT1130.AudioEngine.DownMix
      >(
        this,
        "levels" as VScript.SysName,
        {
          lift: VAPI.AudioEngine.lift.DownMixLevels,
          lower: VAPI.AudioEngine.lower.DownMixLevels,
        },
        {
          lift: VAPI.AudioEngine.lift.DownMixLevels,
          lower: VAPI.AudioEngine.lower.DownMixLevels,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "output"),
      );
    }
    async set_input(
      src: null | VAPI.AT1130.Audio.Essence | (null | AE.AudioRef1130)[],
      pars?: {
        start?: number;
        channels?: number;
      },
    ) {
      return AE.set_input(this, src, pars);
    }
  }
  export class DownMixAsNamedTableRow extends DownMix {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Filter
    implements VScript.Referenceable<"AudioEngine::Data::Filter">
  {
    readonly type_identifier = "AudioEngine::Data::Filter" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.Filter
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.Filter
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [number, number],
      null | [number, number],
      null | VAPI.AudioEngine.FilterCapabilities,
      null | VAPI.AudioEngine.FilterCapabilities,
      VAPI.AT1130.AudioEngine.Filter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, number],
        null | [number, number],
        null | VAPI.AudioEngine.FilterCapabilities,
        null | VAPI.AudioEngine.FilterCapabilities,
        VAPI.AT1130.AudioEngine.Filter
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.FilterCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.FilterCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.FilterCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.FilterCapabilities,
          ),
        },
        null,
      );
    }
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioEngine.Filter
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioEngine.Filter
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number]>,
      Array<VAPI.AudioEngine.HWInputAssignment>,
      VAPI.AT1130.AudioEngine.Filter
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1130.AudioEngine.Filter
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.HWInputAssignment,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.HWInputAssignment,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.FilterIssues,
      VAPI.AT1130.AudioEngine.Filter
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.FilterIssues,
        VAPI.AT1130.AudioEngine.Filter
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.FilterIssues => ({
          cycle_detected: (x & 1) !== 0,
          invalid_input_channel: (x & 2) !== 0,
        }),
        lower: (x: VAPI.AudioEngine.FilterIssues, _: VScript.VSocket): number =>
          (x.cycle_detected ? 1 : 0) | (x.invalid_input_channel ? 2 : 0),
      });
    }
    get bands() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioEngine::Data::Filter::Bands",
        VAPI.AudioEngine.FilterBands
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 5, "bands"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AudioEngine.lift.FilterBands(raw),
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output"),
      );
    }
    async set_input(
      src: null | VAPI.AT1130.Audio.Essence | (null | AE.AudioRef1130)[],
      pars?: {
        start?: number;
        channels?: number;
      },
    ) {
      return AE.set_input(this, src, pars);
    }
  }
  export class FilterAsNamedTableRow extends Filter {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Loudness
    implements VScript.Referenceable<"AudioEngine::Data::Loudness">
  {
    readonly type_identifier = "AudioEngine::Data::Loudness" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.Loudness
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.Loudness
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [number, number, boolean],
      null | [number, number, boolean],
      null | VAPI.AudioEngine.LoudnessCapabilities,
      null | VAPI.AudioEngine.LoudnessCapabilities,
      VAPI.AT1130.AudioEngine.Loudness
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, number, boolean],
        null | [number, number, boolean],
        null | VAPI.AudioEngine.LoudnessCapabilities,
        null | VAPI.AudioEngine.LoudnessCapabilities,
        VAPI.AT1130.AudioEngine.Loudness
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.LoudnessCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.LoudnessCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.LoudnessCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.LoudnessCapabilities,
          ),
        },
        null,
      );
    }
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioEngine.Loudness
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioEngine.Loudness
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number]>,
      Array<VAPI.AudioEngine.HWInputAssignment>,
      VAPI.AT1130.AudioEngine.Loudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1130.AudioEngine.Loudness
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.HWInputAssignment,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.HWInputAssignment,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.LoudnessIssues,
      VAPI.AT1130.AudioEngine.Loudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.LoudnessIssues,
        VAPI.AT1130.AudioEngine.Loudness
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.LoudnessIssues => ({
          cant_disable_k_weighting: (x & 1) !== 0,
          cycle_detected: (x & 2) !== 0,
          invalid_input_channel: (x & 4) !== 0,
        }),
        lower: (
          x: VAPI.AudioEngine.LoudnessIssues,
          _: VScript.VSocket,
        ): number =>
          (x.cant_disable_k_weighting ? 1 : 0) |
          (x.cycle_detected ? 2 : 0) |
          (x.invalid_input_channel ? 4 : 0),
      });
    }
    get measurement(): VScript.rKeyword<
      VScript.VSocket,
      [null | number, null | number, null | number, number],
      VAPI.AudioEngine.LoudnessMeasurement,
      VAPI.AT1130.AudioEngine.Loudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | number, null | number, null | number, number],
        VAPI.AudioEngine.LoudnessMeasurement,
        VAPI.AT1130.AudioEngine.Loudness
      >(this, "measurement" as VScript.SysName, {
        lift: VAPI.AudioEngine.lift.LoudnessMeasurement,
        lower: VAPI.AudioEngine.lower.LoudnessMeasurement,
      });
    }
    get active(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioEngine.Loudness
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioEngine.Loudness
      >(
        this,
        "active" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Reset
  */
    get reset(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.AudioEngine.Loudness
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.AudioEngine.Loudness
      >(
        this,
        "reset" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get compressor_control() {
      return VAPI.AudioEngine.lift.CompressorSource(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          8,
          "compressor_control",
        ),
      );
    }
    async set_input(
      src: null | VAPI.AT1130.Audio.Essence | (null | AE.AudioRef1130)[],
      pars?: {
        start?: number;
        channels?: number;
      },
    ) {
      return AE.set_input(this, src, pars);
    }
  }
  export class LoudnessAsNamedTableRow extends Loudness {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class MidSide
    implements VScript.Referenceable<"AudioEngine::Data::MidSide">
  {
    readonly type_identifier = "AudioEngine::Data::MidSide" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.MidSide
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.MidSide
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [VAPI.AudioEngine.MidSideCapabilitiesInputMode],
      null | [VAPI.AudioEngine.MidSideCapabilitiesInputMode],
      null | VAPI.AudioEngine.MidSideCapabilities,
      null | VAPI.AudioEngine.MidSideCapabilities,
      VAPI.AT1130.AudioEngine.MidSide
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [VAPI.AudioEngine.MidSideCapabilitiesInputMode],
        null | [VAPI.AudioEngine.MidSideCapabilitiesInputMode],
        null | VAPI.AudioEngine.MidSideCapabilities,
        null | VAPI.AudioEngine.MidSideCapabilities,
        VAPI.AT1130.AudioEngine.MidSide
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.MidSideCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.MidSideCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.MidSideCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.MidSideCapabilities,
          ),
        },
        null,
      );
    }
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioEngine.MidSide
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioEngine.MidSide
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      VAPI.AT1130.AudioEngine.MidSide
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1130.AudioEngine.MidSide
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number]>,
      Array<VAPI.AudioEngine.HWInputAssignment>,
      VAPI.AT1130.AudioEngine.MidSide
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1130.AudioEngine.MidSide
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.HWInputAssignment,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.HWInputAssignment,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.MidSideIssues,
      VAPI.AT1130.AudioEngine.MidSide
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.MidSideIssues,
        VAPI.AT1130.AudioEngine.MidSide
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.MidSideIssues => ({
          cycle_detected: (x & 1) !== 0,
          invalid_input_channel: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.AudioEngine.MidSideIssues,
          _: VScript.VSocket,
        ): number =>
          (x.cycle_detected ? 1 : 0) | (x.invalid_input_channel ? 2 : 0),
      });
    }
    get params(): VScript.rwKeyword<
      VScript.VSocket,
      [number, number, number],
      [number, number, number],
      VAPI.AudioEngine.MidSideParams,
      VAPI.AudioEngine.MidSideParams,
      VAPI.AT1130.AudioEngine.MidSide
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        [number, number, number],
        [number, number, number],
        VAPI.AudioEngine.MidSideParams,
        VAPI.AudioEngine.MidSideParams,
        VAPI.AT1130.AudioEngine.MidSide
      >(
        this,
        "params" as VScript.SysName,
        {
          lift: VAPI.AudioEngine.lift.MidSideParams,
          lower: VAPI.AudioEngine.lower.MidSideParams,
        },
        {
          lift: VAPI.AudioEngine.lift.MidSideParams,
          lower: VAPI.AudioEngine.lower.MidSideParams,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "output"),
      );
    }
    async set_input(
      src: null | VAPI.AT1130.Audio.Essence | (null | AE.AudioRef1130)[],
      pars?: {
        start?: number;
        channels?: number;
      },
    ) {
      return AE.set_input(this, src, pars);
    }
  }
  export class MidSideAsNamedTableRow extends MidSide {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class MonoMix
    implements VScript.Referenceable<"AudioEngine::Data::MonoMix">
  {
    readonly type_identifier = "AudioEngine::Data::MonoMix" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.MonoMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.MonoMix
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [number, boolean],
      null | [number, boolean],
      null | VAPI.AudioEngine.MonoMixCapabilities,
      null | VAPI.AudioEngine.MonoMixCapabilities,
      VAPI.AT1130.AudioEngine.MonoMix
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, boolean],
        null | [number, boolean],
        null | VAPI.AudioEngine.MonoMixCapabilities,
        null | VAPI.AudioEngine.MonoMixCapabilities,
        VAPI.AT1130.AudioEngine.MonoMix
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.MonoMixCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.MonoMixCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.MonoMixCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.MonoMixCapabilities,
          ),
        },
        null,
      );
    }
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioEngine.MonoMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioEngine.MonoMix
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      VAPI.AT1130.AudioEngine.MonoMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1130.AudioEngine.MonoMix
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number]>,
      Array<VAPI.AudioEngine.HWInputAssignment>,
      VAPI.AT1130.AudioEngine.MonoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1130.AudioEngine.MonoMix
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.HWInputAssignment,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.HWInputAssignment,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.MonoMixIssues,
      VAPI.AT1130.AudioEngine.MonoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.MonoMixIssues,
        VAPI.AT1130.AudioEngine.MonoMix
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.MonoMixIssues => ({
          cycle_detected: (x & 1) !== 0,
          invalid_input_channel: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.AudioEngine.MonoMixIssues,
          _: VScript.VSocket,
        ): number =>
          (x.cycle_detected ? 1 : 0) | (x.invalid_input_channel ? 2 : 0),
      });
    }
    get peak_meter(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Audio.PeakMeter>,
      VAPI.AT1130.AudioEngine.MonoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1130.AudioEngine.MonoMix
      >(this, "peak_meter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get faders() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioEngine::Data::Fader",
        VAPI.AudioEngine.Fader
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 7, "faders"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AudioEngine.lift.Fader(raw),
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "output"),
      );
    }
  }
  export class MonoMixAsNamedTableRow extends MonoMix {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class NMinus1
    implements VScript.Referenceable<"AudioEngine::Data::NMinus1">
  {
    readonly type_identifier = "AudioEngine::Data::NMinus1" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.NMinus1
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.NMinus1
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [number],
      null | [number],
      null | VAPI.AudioEngine.NMinus1Capabilities,
      null | VAPI.AudioEngine.NMinus1Capabilities,
      VAPI.AT1130.AudioEngine.NMinus1
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number],
        null | [number],
        null | VAPI.AudioEngine.NMinus1Capabilities,
        null | VAPI.AudioEngine.NMinus1Capabilities,
        VAPI.AT1130.AudioEngine.NMinus1
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.NMinus1Capabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.NMinus1Capabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.NMinus1Capabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.NMinus1Capabilities,
          ),
        },
        null,
      );
    }
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioEngine.NMinus1
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioEngine.NMinus1
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      VAPI.AT1130.AudioEngine.NMinus1
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1130.AudioEngine.NMinus1
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number]>,
      Array<VAPI.AudioEngine.HWInputAssignment>,
      VAPI.AT1130.AudioEngine.NMinus1
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1130.AudioEngine.NMinus1
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.HWInputAssignment,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.HWInputAssignment,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.NMinus1Issues,
      VAPI.AT1130.AudioEngine.NMinus1
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.NMinus1Issues,
        VAPI.AT1130.AudioEngine.NMinus1
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.NMinus1Issues => ({
          cycle_detected: (x & 1) !== 0,
          invalid_input_channel: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.AudioEngine.NMinus1Issues,
          _: VScript.VSocket,
        ): number =>
          (x.cycle_detected ? 1 : 0) | (x.invalid_input_channel ? 2 : 0),
      });
    }
    get faders() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioEngine::Data::Fader",
        VAPI.AudioEngine.Fader
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 6, "faders"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AudioEngine.lift.Fader(raw),
      );
    }
    get output() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "Audio::Data::Essence",
        VAPI.AT1130.Audio.Essence
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 7, "output"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.Audio.lift.Essence(raw),
      );
    }
  }
  export class NMinus1AsNamedTableRow extends NMinus1 {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class StereoMix
    implements VScript.Referenceable<"AudioEngine::Data::StereoMix">
  {
    readonly type_identifier = "AudioEngine::Data::StereoMix" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.StereoMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.StereoMix
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [number, boolean],
      null | [number, boolean],
      null | VAPI.AudioEngine.StereoMixCapabilities,
      null | VAPI.AudioEngine.StereoMixCapabilities,
      VAPI.AT1130.AudioEngine.StereoMix
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, boolean],
        null | [number, boolean],
        null | VAPI.AudioEngine.StereoMixCapabilities,
        null | VAPI.AudioEngine.StereoMixCapabilities,
        VAPI.AT1130.AudioEngine.StereoMix
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.StereoMixCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.StereoMixCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.StereoMixCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.StereoMixCapabilities,
          ),
        },
        null,
      );
    }
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<Array<null | string>>,
      VScript.MaybeSparseArray<Array<null | string>>,
      Array<
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>
      >,
      VScript.MaybeSparseArray<
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>
      >,
      VAPI.AT1130.AudioEngine.StereoMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<Array<null | string>>,
        VScript.MaybeSparseArray<Array<null | string>>,
        Array<
          Array<null | VScript.RefinedIndexedNonmutatingReference<
            VScript.VSocket,
            "channels",
            "Audio::Data::Essence",
            VScript.Referenceable<"Audio::Data::Essence"> &
              VAPI.AT1130.Audio.Essence,
            | null
            | [
                null | string,
                number,
                boolean,
                [number, number, number, number, number],
              ],
            null | VAPI.Audio.Channel
          >>
        >,
        VScript.MaybeSparseArray<
          Array<null | VScript.RefinedIndexedNonmutatingReference<
            VScript.VSocket,
            "channels",
            "Audio::Data::Essence",
            VScript.Referenceable<"Audio::Data::Essence"> &
              VAPI.AT1130.Audio.Essence,
            | null
            | [
                null | string,
                number,
                boolean,
                [number, number, number, number, number],
              ],
            null | VAPI.Audio.Channel
          >>
        >,
        VAPI.AT1130.AudioEngine.StereoMix
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftArray(
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(
                  (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                    new VAPI.AT1130.Audio.Essence(
                      VScript.VAPIHelpers.get_subtree(_socket, kwl),
                    ),
                  "channels" as VScript.SysName,
                  {
                    lift: VScript.VAPIHelpers.liftOrLowerNullable(
                      VAPI.Audio.lift.Channel,
                    ),
                    lower: VScript.VAPIHelpers.liftOrLowerNullable(
                      VAPI.Audio.lower.Channel,
                    ),
                  },
                ),
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.lowerArray(
                VScript.VAPIHelpers.liftOrLowerNullable(
                  VScript.VAPIHelpers.lowerRefinedIndexedReference<
                    VScript.VSocket,
                    "channels",
                    "Audio::Data::Essence",
                    VScript.Referenceable<"Audio::Data::Essence"> &
                      VAPI.AT1130.Audio.Essence,
                    | null
                    | [
                        null | string,
                        number,
                        boolean,
                        [number, number, number, number, number],
                      ],
                    null | VAPI.Audio.Channel
                  >(),
                ),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftArray(
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(
                  (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                    new VAPI.AT1130.Audio.Essence(
                      VScript.VAPIHelpers.get_subtree(_socket, kwl),
                    ),
                  "channels" as VScript.SysName,
                  {
                    lift: VScript.VAPIHelpers.liftOrLowerNullable(
                      VAPI.Audio.lift.Channel,
                    ),
                    lower: VScript.VAPIHelpers.liftOrLowerNullable(
                      VAPI.Audio.lower.Channel,
                    ),
                  },
                ),
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.lowerArray(
                VScript.VAPIHelpers.liftOrLowerNullable(
                  VScript.VAPIHelpers.lowerRefinedIndexedReference<
                    VScript.VSocket,
                    "channels",
                    "Audio::Data::Essence",
                    VScript.Referenceable<"Audio::Data::Essence"> &
                      VAPI.AT1130.Audio.Essence,
                    | null
                    | [
                        null | string,
                        number,
                        boolean,
                        [number, number, number, number, number],
                      ],
                    null | VAPI.Audio.Channel
                  >(),
                ),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      Array<Array<boolean>>,
      VScript.MaybeSparseArray<Array<boolean>>,
      Array<Array<boolean>>,
      VScript.MaybeSparseArray<Array<boolean>>,
      VAPI.AT1130.AudioEngine.StereoMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<Array<boolean>>,
        VScript.MaybeSparseArray<Array<boolean>>,
        Array<Array<boolean>>,
        VScript.MaybeSparseArray<Array<boolean>>,
        VAPI.AT1130.AudioEngine.StereoMix
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<Array<[number]>>,
      Array<Array<VAPI.AudioEngine.HWInputAssignment>>,
      VAPI.AT1130.AudioEngine.StereoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<Array<[number]>>,
        Array<Array<VAPI.AudioEngine.HWInputAssignment>>,
        VAPI.AT1130.AudioEngine.StereoMix
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftArray(
            VAPI.AudioEngine.lift.HWInputAssignment,
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.lowerArray(
            VAPI.AudioEngine.lower.HWInputAssignment,
          ),
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.StereoMixIssues,
      VAPI.AT1130.AudioEngine.StereoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.StereoMixIssues,
        VAPI.AT1130.AudioEngine.StereoMix
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.StereoMixIssues => ({
          cycle_detected: (x & 1) !== 0,
          invalid_input_channel: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.AudioEngine.StereoMixIssues,
          _: VScript.VSocket,
        ): number =>
          (x.cycle_detected ? 1 : 0) | (x.invalid_input_channel ? 2 : 0),
      });
    }
    get peak_meter(): VScript.rKeyword<
      VScript.VSocket,
      Array<Array<number>>,
      Array<Array<VAPI.Audio.PeakMeter>>,
      VAPI.AT1130.AudioEngine.StereoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<Array<number>>,
        Array<Array<VAPI.Audio.PeakMeter>>,
        VAPI.AT1130.AudioEngine.StereoMix
      >(this, "peak_meter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get faders() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioEngine::Data::Fader",
        VAPI.AudioEngine.Fader
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 7, "faders"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AudioEngine.lift.Fader(raw),
      );
    }
    get pan(): VScript.rwKeyword<
      VScript.VSocket,
      Array<[0, [number]] | [1, [number]] | [2, [number]] | [3, [number]]>,
      VScript.MaybeSparseArray<
        [0, [number]] | [1, [number]] | [2, [number]] | [3, [number]]
      >,
      Array<VAPI.AudioEngine.StereoPanBalance>,
      VScript.MaybeSparseArray<VAPI.AudioEngine.StereoPanBalance>,
      VAPI.AT1130.AudioEngine.StereoMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<[0, [number]] | [1, [number]] | [2, [number]] | [3, [number]]>,
        VScript.MaybeSparseArray<
          [0, [number]] | [1, [number]] | [2, [number]] | [3, [number]]
        >,
        Array<VAPI.AudioEngine.StereoPanBalance>,
        VScript.MaybeSparseArray<VAPI.AudioEngine.StereoPanBalance>,
        VAPI.AT1130.AudioEngine.StereoMix
      >(
        this,
        "pan" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VAPI.AudioEngine.lift.StereoPanBalance,
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VAPI.AudioEngine.lower.StereoPanBalance(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VAPI.AudioEngine.lift.StereoPanBalance,
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VAPI.AudioEngine.lower.StereoPanBalance(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 9, "output"),
      );
    }
    async set_input(input: number, sources: (null | AE.AudioRef1130)[]) {
      const channels = sources.length;
      if (channels < 1 || channels > 2)
        throw new Error("Invalid number of sources - must be either 1 or 2");

      type AudioEngineAudioSources =
        | VAPI.AT1130.AudioEngine.NMinus1
        | VAPI.AT1130.AudioEngine.MonoMix
        | VAPI.AT1130.AudioEngine.StereoMix
        | VAPI.AT1130.AudioEngine.Filter
        | VAPI.AT1130.AudioEngine.Delay
        | VAPI.AT1130.AudioEngine.Compressor;

      const vm = VAPI.VM.adopt(this.raw.backing_store);
      const ae = vm.audio_engine as VAPI.AT1130.AudioEngine.All;
      interface Multi {
        src: AudioEngineAudioSources;
        ch: number[];
      }
      function check_multi(dst: (null | AE.AudioRef1130)[]): Multi | null {
        if (!dst[0]) return null;
        if (channels == 1 && dst[1] !== null) return null;
        const tmp = dst.map((e) => (e ? ae.find_audio_source(e) : null));
        if (!tmp[0]) return null;
        if (channels == 1 || (tmp[1] && VScript.same(tmp[0].src, tmp[1].src))) {
          return {
            src: tmp[0]!.src,
            ch: tmp.slice(0, channels).map((e) => e!.ch),
          };
        }
        return null;
      }

      const group = await this.group.read();

      async function check_inp(e: Multi): Promise<boolean> {
        if (
          e.src instanceof VAPI.AT1130.AudioEngine.FilterAsNamedTableRow ||
          e.src instanceof VAPI.AT1130.AudioEngine.CompressorAsNamedTableRow
        ) {
          if (group) {
            if (!VScript.same(await e.src.group.read(), group)) return false;
          }

          const src = check_multi((await e.src.inputs.read()).slice(0, 2));
          if (src && (await check_inp(src))) return true;

          e.src.set_input(sources);
          return true;
        } else return false;
      }

      const src = check_multi((await this.inputs.read())[input]);
      if (!src || !(await check_inp(src))) {
        let sparse_update: {
          [i: number]: [null | AE.AudioRef1130, null | AE.AudioRef1130];
        } = {};
        sparse_update[input] =
          channels >= 2 ? [sources[0], sources[1]] : [sources[0], null];
        await this.inputs.write(sparse_update);
      }
    }
  }
  export class StereoMixAsNamedTableRow extends StereoMix {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class TruePeak
    implements VScript.Referenceable<"AudioEngine::Data::TruePeak">
  {
    readonly type_identifier = "AudioEngine::Data::TruePeak" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AudioEngine.Group,
      | null
      | (VScript.Referenceable<"AudioEngine::Data::Group"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioEngine.TruePeak
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AudioEngine.Group,
        | null
        | (VScript.Referenceable<"AudioEngine::Data::Group"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioEngine.TruePeak
      >(
        this,
        "group" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AudioEngine.Group(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioEngine::Data::Group"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      null | [number],
      null | [number],
      null | VAPI.AudioEngine.TruePeakCapabilities,
      null | VAPI.AudioEngine.TruePeakCapabilities,
      VAPI.AT1130.AudioEngine.TruePeak
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number],
        null | [number],
        null | VAPI.AudioEngine.TruePeakCapabilities,
        null | VAPI.AudioEngine.TruePeakCapabilities,
        VAPI.AT1130.AudioEngine.TruePeak
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.TruePeakCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.TruePeakCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lift.TruePeakCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioEngine.lower.TruePeakCapabilities,
          ),
        },
        null,
      );
    }
    get inputs(): VScript.rwKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioEngine.TruePeak
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioEngine.TruePeak
      >(
        this,
        "inputs" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get hw_inputs(): VScript.rKeyword<
      VScript.VSocket,
      Array<[number]>,
      Array<VAPI.AudioEngine.HWInputAssignment>,
      VAPI.AT1130.AudioEngine.TruePeak
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1130.AudioEngine.TruePeak
      >(this, "hw_inputs" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AudioEngine.lift.HWInputAssignment,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AudioEngine.lower.HWInputAssignment,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioEngine.TruePeakIssues,
      VAPI.AT1130.AudioEngine.TruePeak
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.TruePeakIssues,
        VAPI.AT1130.AudioEngine.TruePeak
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioEngine.TruePeakIssues => ({
          cycle_detected: (x & 1) !== 0,
          invalid_input_channel: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.AudioEngine.TruePeakIssues,
          _: VScript.VSocket,
        ): number =>
          (x.cycle_detected ? 1 : 0) | (x.invalid_input_channel ? 2 : 0),
      });
    }
    get peak_meter(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Audio.PeakMeter>,
      VAPI.AT1130.AudioEngine.TruePeak
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1130.AudioEngine.TruePeak
      >(this, "peak_meter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get peak_hold(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Audio.PeakMeter>,
      VAPI.AT1130.AudioEngine.TruePeak
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1130.AudioEngine.TruePeak
      >(this, "peak_hold" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get peak_hold_time(): VScript.rwKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | VScript.Duration,
      null | VScript.Duration,
      VAPI.AT1130.AudioEngine.TruePeak
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | VScript.Duration,
        null | VScript.Duration,
        VAPI.AT1130.AudioEngine.TruePeak
      >(
        this,
        "peak_hold_time" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.liftNanoseconds,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.lowerNanoseconds,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.liftNanoseconds,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.lowerNanoseconds,
          ),
        },
        null,
      );
    }

    /**
    Reset
  */
    get reset(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.AudioEngine.TruePeak
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.AudioEngine.TruePeak
      >(
        this,
        "reset" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get compressor_control() {
      return VAPI.AudioEngine.lift.CompressorSource(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          9,
          "compressor_control",
        ),
      );
    }
    async set_input(
      src: null | VAPI.AT1130.Audio.Essence | (null | AE.AudioRef1130)[],
      pars?: {
        start?: number;
        channels?: number;
      },
    ) {
      return AE.set_input(this, src, pars);
    }
  }
  export class TruePeakAsNamedTableRow extends TruePeak {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
}
export namespace AudioGain {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    Levels: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Levels(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    Levels: (_x: Levels) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"AudioGain::Data::All"> {
    readonly type_identifier = "AudioGain::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get instances() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioGain::Data::Levels",
        VAPI.AT1130.AudioGain.LevelsAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioGain.LevelsAsNamedTableRow(raw),
      );
    }
  }
  export class Levels
    implements VScript.Referenceable<"AudioGain::Data::Levels">
  {
    readonly type_identifier = "AudioGain::Data::Levels" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioGain.Levels
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioGain.Levels
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get levels(): VScript.rwKeyword<
      VScript.VSocket,
      Array<number>,
      VScript.MaybeSparseArray<number>,
      Array<number>,
      VScript.MaybeSparseArray<number>,
      VAPI.AT1130.AudioGain.Levels
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<number>,
        VScript.MaybeSparseArray<number>,
        Array<number>,
        VScript.MaybeSparseArray<number>,
        VAPI.AT1130.AudioGain.Levels
      >(
        this,
        "levels" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      VAPI.AT1130.AudioGain.Levels
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1130.AudioGain.Levels
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "output"),
      );
    }
  }
  export class LevelsAsNamedTableRow extends Levels {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
}
export namespace AudioMixer {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    ChannelMono: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new ChannelMono(_raw),
    ChannelSelection: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new ChannelSelection(_raw),
    ChannelStereo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new ChannelStereo(_raw),
    Downmixes: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Downmixes(_raw),
    Mode51: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Mode51(_raw),
    Mode71: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Mode71(_raw),
    Monos: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Monos(_raw),
    Source: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Source(_raw),
    SourceStereo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SourceStereo(_raw),
    Stereos: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Stereos(_raw),
    StereosOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new StereosOutput(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    ChannelMono: (_x: ChannelMono) => _x.raw.kwl,
    ChannelSelection: (_x: ChannelSelection) => _x.raw.kwl,
    ChannelStereo: (_x: ChannelStereo) => _x.raw.kwl,
    Downmixes: (_x: Downmixes) => _x.raw.kwl,
    Mode51: (_x: Mode51) => _x.raw.kwl,
    Mode71: (_x: Mode71) => _x.raw.kwl,
    Monos: (_x: Monos) => _x.raw.kwl,
    Source: (_x: Source) => _x.raw.kwl,
    SourceStereo: (_x: SourceStereo) => _x.raw.kwl,
    Stereos: (_x: Stereos) => _x.raw.kwl,
    StereosOutput: (_x: StereosOutput) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"AudioMixer::Data::All"> {
    readonly type_identifier = "AudioMixer::Data::All" as const;
    get runtime_constants() {
      return {
        num_audio_mixer_fader: this.raw.backing_store.get_runtime_constant(
          "AudioMixer::num_audio_mixer_fader",
        ) as number,
        num_audio_mixer_outputs: this.raw.backing_store.get_runtime_constant(
          "AudioMixer::num_audio_mixer_outputs",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    @brief Defragment
    @desc Repeated allocation and deallocation of differently sized mixers
    can cause fader fragmentation. Press this button to defragment, but
    please note that _this will temporarily interrupt all outputs currently
    in use_.
  */
    get reorder_output(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.AudioMixer.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.AudioMixer.All
      >(
        this,
        "reorder_output" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get mono_mixes() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::Monos",
        VAPI.AT1130.AudioMixer.MonosAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "mono_mixes",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioMixer.MonosAsNamedTableRow(raw),
      );
    }
    get stereo_mixes() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::Stereos",
        VAPI.AT1130.AudioMixer.StereosAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "stereo_mixes",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioMixer.StereosAsNamedTableRow(raw),
      );
    }
    get down_mixes() {
      return VAPI.AT1130.AudioMixer.lift.Downmixes(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "down_mixes"),
      );
    }
    get resource_status() {
      return VAPI.AudioMixer.lift.ResourceStatus(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "resource_status",
        ),
      );
    }
    get audio_source_slices() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          5,
          "audio_source_slices",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
  }
  export class ChannelMono
    implements VScript.Referenceable<"AudioMixer::Data::ChannelMono">
  {
    readonly type_identifier = "AudioMixer::Data::ChannelMono" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get gain(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioMixer.ChannelMono
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioMixer.ChannelMono
      >(
        this,
        "gain" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioMixer.ChannelMono
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioMixer.ChannelMono
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get mute(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioMixer.ChannelMono
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioMixer.ChannelMono
      >(
        this,
        "mute" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get pan(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioMixer.ChannelMono
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioMixer.ChannelMono
      >(
        this,
        "pan" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get source() {
      return VAPI.AT1130.AudioMixer.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "source"),
      );
    }
  }
  export class ChannelMonoAsNamedTableRow extends ChannelMono {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class ChannelSelection
    implements VScript.Referenceable<"AudioMixer::Data::ChannelSelection">
  {
    readonly type_identifier = "AudioMixer::Data::ChannelSelection" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get gain(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioMixer.ChannelSelection
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioMixer.ChannelSelection
      >(
        this,
        "gain" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioMixer.ChannelSelection
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioMixer.ChannelSelection
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get mute(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioMixer.ChannelSelection
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioMixer.ChannelSelection
      >(
        this,
        "mute" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get source() {
      return VAPI.AT1130.AudioMixer.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "source"),
      );
    }
  }
  export class ChannelSelectionAsNamedTableRow extends ChannelSelection {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class ChannelStereo
    implements VScript.Referenceable<"AudioMixer::Data::ChannelStereo">
  {
    readonly type_identifier = "AudioMixer::Data::ChannelStereo" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get gain(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioMixer.ChannelStereo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioMixer.ChannelStereo
      >(
        this,
        "gain" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioMixer.ChannelStereo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioMixer.ChannelStereo
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get mute(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioMixer.ChannelStereo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioMixer.ChannelStereo
      >(
        this,
        "mute" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get balance(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioMixer.ChannelStereo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioMixer.ChannelStereo
      >(
        this,
        "balance" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get source() {
      return VAPI.AT1130.AudioMixer.lift.SourceStereo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "source"),
      );
    }
  }
  export class ChannelStereoAsNamedTableRow extends ChannelStereo {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Downmixes
    implements VScript.Referenceable<"AudioMixer::Data::Downmixes">
  {
    readonly type_identifier = "AudioMixer::Data::Downmixes" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get mode_5_1() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::Mode51",
        VAPI.AT1130.AudioMixer.Mode51AsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "mode_5_1",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioMixer.Mode51AsNamedTableRow(raw),
      );
    }
    get mode_7_1() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::Mode71",
        VAPI.AT1130.AudioMixer.Mode71AsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "mode_7_1",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioMixer.Mode71AsNamedTableRow(raw),
      );
    }
  }
  export class Mode51
    implements VScript.Referenceable<"AudioMixer::Data::Mode51">
  {
    readonly type_identifier = "AudioMixer::Data::Mode51" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get front_left() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "front_left"),
      );
    }
    get front_right() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "front_right"),
      );
    }
    get center() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "center"),
      );
    }
    get lfe() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "lfe"),
      );
    }
    get rear_surround_left() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "rear_surround_left",
        ),
      );
    }
    get rear_surround_right() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          5,
          "rear_surround_right",
        ),
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output"),
      );
    }
  }
  export class Mode51AsNamedTableRow extends Mode51 {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Mode71
    implements VScript.Referenceable<"AudioMixer::Data::Mode71">
  {
    readonly type_identifier = "AudioMixer::Data::Mode71" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get front_left() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "front_left"),
      );
    }
    get front_right() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "front_right"),
      );
    }
    get center() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "center"),
      );
    }
    get surround_left() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "surround_left"),
      );
    }
    get surround_right() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "surround_right",
        ),
      );
    }
    get lfe() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "lfe"),
      );
    }
    get rear_surround_left() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          6,
          "rear_surround_left",
        ),
      );
    }
    get rear_surround_right() {
      return VAPI.AT1130.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          7,
          "rear_surround_right",
        ),
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "output"),
      );
    }
  }
  export class Mode71AsNamedTableRow extends Mode71 {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Monos
    implements VScript.Referenceable<"AudioMixer::Data::Monos">
  {
    readonly type_identifier = "AudioMixer::Data::Monos" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get channels() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::ChannelSelection",
        VAPI.AT1130.AudioMixer.ChannelSelectionAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "channels",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioMixer.ChannelSelectionAsNamedTableRow(raw),
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "output"),
      );
    }
  }
  export class MonosAsNamedTableRow extends Monos {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Source
    implements VScript.Referenceable<"AudioMixer::Data::Source">
  {
    readonly type_identifier = "AudioMixer::Data::Source" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get channel(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioMixer.Source
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioMixer.Source
      >(
        this,
        "channel" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioMixer.Source
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioMixer.Source
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
  }
  export class SourceStereo
    implements VScript.Referenceable<"AudioMixer::Data::SourceStereo">
  {
    readonly type_identifier = "AudioMixer::Data::SourceStereo" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get channel_left(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioMixer.SourceStereo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioMixer.SourceStereo
      >(
        this,
        "channel_left" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get channel_right(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioMixer.SourceStereo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioMixer.SourceStereo
      >(
        this,
        "channel_right" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioMixer.SourceStereo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioMixer.SourceStereo
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
  }
  export class Stereos
    implements VScript.Referenceable<"AudioMixer::Data::Stereos">
  {
    readonly type_identifier = "AudioMixer::Data::Stereos" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get mono_channels() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::ChannelMono",
        VAPI.AT1130.AudioMixer.ChannelMonoAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "mono_channels",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioMixer.ChannelMonoAsNamedTableRow(raw),
      );
    }
    get stereo_pairs() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::ChannelStereo",
        VAPI.AT1130.AudioMixer.ChannelStereoAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "stereo_pairs",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioMixer.ChannelStereoAsNamedTableRow(raw),
      );
    }
    get output() {
      return VAPI.AT1130.AudioMixer.lift.StereosOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "output"),
      );
    }
  }
  export class StereosAsNamedTableRow extends Stereos {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class StereosOutput
    implements VScript.Referenceable<"AudioMixer::Data::Stereos::Output">
  {
    readonly type_identifier = "AudioMixer::Data::Stereos::Output" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    Reset to default
  */
    get reset_to_default(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.AudioMixer.StereosOutput
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.AudioMixer.StereosOutput
      >(
        this,
        "reset_to_default" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get gain(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioMixer.StereosOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioMixer.StereosOutput
      >(
        this,
        "gain" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get phase_inversion(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioMixer.StereosOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioMixer.StereosOutput
      >(
        this,
        "phase_inversion" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "output"),
      );
    }
  }
}
export namespace AudioRePlay {
  export const lift = {
    Audio: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Audio(_raw),
    Buffer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Buffer(_raw),
    Delay: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Delay(_raw),
    DelayOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new DelayOutput(_raw),
    Player: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Player(_raw),
    PlayerOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PlayerOutput(_raw),
    RelationAudio: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new RelationAudio(_raw),
    RelationVideo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new RelationVideo(_raw),
    Relations: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Relations(_raw),
    Time: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new Time(_raw),
    RelationAudioFollowers: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new RelationAudioFollowers(_raw),
    RelationVideoFollowers: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new RelationVideoFollowers(_raw),
    DelayInputs: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new DelayInputs(_raw),
  } as const;
  export const lower = {
    Audio: (_x: Audio) => _x.raw.kwl,
    Buffer: (_x: Buffer) => _x.raw.kwl,
    Delay: (_x: Delay) => _x.raw.kwl,
    DelayOutput: (_x: DelayOutput) => _x.raw.kwl,
    Player: (_x: Player) => _x.raw.kwl,
    PlayerOutput: (_x: PlayerOutput) => _x.raw.kwl,
    RelationAudio: (_x: RelationAudio) => _x.raw.kwl,
    RelationVideo: (_x: RelationVideo) => _x.raw.kwl,
    Relations: (_x: Relations) => _x.raw.kwl,
    Time: (_x: Time) => _x.raw.kwl,
    RelationAudioFollowers: (_x: RelationAudioFollowers) => _x.raw.kwl,
    RelationVideoFollowers: (_x: RelationVideoFollowers) => _x.raw.kwl,
    DelayInputs: (_x: DelayInputs) => _x.raw.kwl,
  } as const;
  export class Audio
    implements VScript.Referenceable<"AudioRePlay::Data::Audio">
  {
    readonly type_identifier = "AudioRePlay::Data::Audio" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get info() {
      return VAPI.DataRePlay.lift.MemoryInfo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "info"),
      );
    }
    get players() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioRePlay::Data::Player",
        VAPI.AT1130.AudioRePlay.PlayerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "players",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioRePlay.PlayerAsNamedTableRow(raw),
      );
    }
    get delays() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioRePlay::Data::Delay",
        VAPI.AT1130.AudioRePlay.DelayAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "delays",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioRePlay.DelayAsNamedTableRow(raw),
      );
    }
    get statistics() {
      return VAPI.DataRePlay.lift.Statistic(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "statistics"),
      );
    }
    get ecc() {
      return VAPI.Memory.lift.ECCMuxStatistics(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "ecc"),
      );
    }
    get audio_source_slices() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          5,
          "audio_source_slices",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
  }
  export class Buffer
    implements VScript.Referenceable<"AudioRePlay::Data::Buffer">
  {
    readonly type_identifier = "AudioRePlay::Data::Buffer" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get offset(): VScript.dKeyword<
      VScript.VSocket,
      null | ([0, [number]] | [1, [number]]),
      null | ([0, [number]] | [1, [number]]),
      null | VAPI.AudioRePlay.AllocationMode,
      null | VAPI.AudioRePlay.AllocationMode,
      VAPI.AT1130.AudioRePlay.Buffer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | ([0, [number]] | [1, [number]]),
        null | ([0, [number]] | [1, [number]]),
        null | VAPI.AudioRePlay.AllocationMode,
        null | VAPI.AudioRePlay.AllocationMode,
        VAPI.AT1130.AudioRePlay.Buffer
      >(
        this,
        "offset" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioRePlay.lift.AllocationMode,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioRePlay.lower.AllocationMode,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioRePlay.lift.AllocationMode,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AudioRePlay.lower.AllocationMode,
          ),
        },
        (
          parent: VAPI.AT1130.AudioRePlay.Buffer,
          command: null | VAPI.AudioRePlay.AllocationMode,
        ) => (
          void parent,
          void command,
          {
            criterion: "status",
            validator: (status: null | VAPI.AudioRePlay.AllocationMode) =>
              (command === null && status === null) ||
              (command !== null &&
                status !== null &&
                ((command.variant === "Samples" &&
                  status.variant === "Samples" &&
                  status.value.samples >= command.value.samples) ||
                  (command.variant === "Time" &&
                    status.variant === "Time" &&
                    status.value.time.s() >= command.value.time.s()))),
          }
        ),
      );
    }
    get audio_follow_video(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioRePlay.Buffer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioRePlay.Buffer
      >(
        this,
        "audio_follow_video" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get auto_dolby_e_aligner(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.AudioRePlay.Buffer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.AudioRePlay.Buffer
      >(
        this,
        "auto_dolby_e_aligner" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get measurement_reference(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioRePlay.Buffer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioRePlay.Buffer
      >(
        this,
        "measurement_reference" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get current_delay(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, number, number, number, number],
      null | VAPI.AudioRePlay.BufferCurrentDelay,
      VAPI.AT1130.AudioRePlay.Buffer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number, number, number],
        null | VAPI.AudioRePlay.BufferCurrentDelay,
        VAPI.AT1130.AudioRePlay.Buffer
      >(this, "current_delay" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AudioRePlay.lift.BufferCurrentDelay,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AudioRePlay.lower.BufferCurrentDelay,
        ),
      });
    }
  }
  export class Delay
    implements VScript.Referenceable<"AudioRePlay::Data::Delay">
  {
    readonly type_identifier = "AudioRePlay::Data::Delay" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioRePlay.DelayIssues,
      VAPI.AT1130.AudioRePlay.Delay
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioRePlay.DelayIssues,
        VAPI.AT1130.AudioRePlay.Delay
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioRePlay.DelayIssues => ({
          missing_buffer_allocation: (x & 1) !== 0,
          missing_sample_setting: (x & 2) !== 0,
          missing_time_setting: (x & 4) !== 0,
          missing_timesource: (x & 8) !== 0,
          out_of_bounds: (x & 16) !== 0,
          out_of_memory: (x & 32) !== 0,
          out_of_readers: (x & 64) !== 0,
          out_of_writers: (x & 128) !== 0,
          too_small_for_dolby_e_alignment: (x & 256) !== 0,
        }),
        lower: (x: VAPI.AudioRePlay.DelayIssues, _: VScript.VSocket): number =>
          (x.missing_buffer_allocation ? 1 : 0) |
          (x.missing_sample_setting ? 2 : 0) |
          (x.missing_time_setting ? 4 : 0) |
          (x.missing_timesource ? 8 : 0) |
          (x.out_of_bounds ? 16 : 0) |
          (x.out_of_memory ? 32 : 0) |
          (x.out_of_readers ? 64 : 0) |
          (x.out_of_writers ? 128 : 0) |
          (x.too_small_for_dolby_e_alignment ? 256 : 0),
      });
    }
    get capabilities() {
      return VAPI.AudioRePlay.lift.BufferInput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "capabilities"),
      );
    }
    get num_outputs(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.AudioRePlay.Delay
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.AudioRePlay.Delay
      >(
        this,
        "num_outputs" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Restart writer and reader
  */
    get restart(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.AudioRePlay.Delay
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.AudioRePlay.Delay
      >(
        this,
        "restart" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get dolby_e() {
      return VAPI.AudioRePlay.lift.DolbyE(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "dolby_e"),
      );
    }
    get inputs() {
      return VAPI.AT1130.AudioRePlay.lift.DelayInputs(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "inputs"),
      );
    }
    get outputs() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioRePlay::Data::DelayOutput",
        VAPI.AT1130.AudioRePlay.DelayOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 6, "outputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.AudioRePlay.lift.DelayOutput(raw),
      );
    }
  }
  export class DelayAsNamedTableRow extends Delay {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class DelayOutput
    implements VScript.Referenceable<"AudioRePlay::Data::DelayOutput">
  {
    readonly type_identifier = "AudioRePlay::Data::DelayOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.AudioRePlay.DelayOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.AudioRePlay.DelayOutput
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get time() {
      return VAPI.AT1130.AudioRePlay.lift.Time(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "time"),
      );
    }
    get delay() {
      return VAPI.AT1130.AudioRePlay.lift.Buffer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "delay"),
      );
    }
    get afv() {
      return VAPI.AudioRePlay.lift.AFVRef(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "afv"),
      );
    }
    get dolby_e() {
      return VAPI.AudioRePlay.lift.DolbyERef(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "dolby_e"),
      );
    }
    get reader() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioRePlay::Data::Reader",
        VAPI.AudioRePlay.Reader
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 5, "reader"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AudioRePlay.lift.Reader(raw),
      );
    }
    get audio() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "audio"),
      );
    }
  }
  export class Player
    implements VScript.Referenceable<"AudioRePlay::Data::Player">
  {
    readonly type_identifier = "AudioRePlay::Data::Player" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AudioRePlay.PlayerIssues,
      VAPI.AT1130.AudioRePlay.Player
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioRePlay.PlayerIssues,
        VAPI.AT1130.AudioRePlay.Player
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AudioRePlay.PlayerIssues => ({
          missing_timesource: (x & 1) !== 0,
          out_of_memory: (x & 2) !== 0,
          out_of_readers: (x & 4) !== 0,
        }),
        lower: (x: VAPI.AudioRePlay.PlayerIssues, _: VScript.VSocket): number =>
          (x.missing_timesource ? 1 : 0) |
          (x.out_of_memory ? 2 : 0) |
          (x.out_of_readers ? 4 : 0),
      });
    }
    get upload_header() {
      return VAPI.AudioRePlay.lift.UploadHeader(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "upload_header"),
      );
    }
    get capabilities() {
      return VAPI.AudioRePlay.lift.BufferInput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "capabilities"),
      );
    }
    get gang() {
      return VAPI.AT1130.AudioRePlay.lift.Relations(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "gang"),
      );
    }

    /**
    Restart writer and reader
  */
    get restart(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.AudioRePlay.Player
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.AudioRePlay.Player
      >(
        this,
        "restart" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.AudioRePlay.lift.PlayerOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "output"),
      );
    }
  }
  export class PlayerAsNamedTableRow extends Player {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class PlayerOutput
    implements VScript.Referenceable<"AudioRePlay::Data::PlayerOutput">
  {
    readonly type_identifier = "AudioRePlay::Data::PlayerOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.AudioRePlay.PlayerOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.AudioRePlay.PlayerOutput
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get time() {
      return VAPI.AT1130.AudioRePlay.lift.Time(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "time"),
      );
    }
    get control() {
      return VAPI.AudioRePlay.lift.Control(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "control"),
      );
    }
    get reader() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioRePlay::Data::Reader",
        VAPI.AudioRePlay.Reader
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 3, "reader"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AudioRePlay.lift.Reader(raw),
      );
    }
    get audio() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "audio"),
      );
    }
  }
  export class RelationAudio
    implements VScript.Referenceable<"AudioRePlay::Data::RelationAudio">
  {
    readonly type_identifier = "AudioRePlay::Data::RelationAudio" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get leader(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.AudioRePlay.Player,
      | null
      | (VScript.Referenceable<"AudioRePlay::Data::Player"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioRePlay.RelationAudio
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.AudioRePlay.Player,
        | null
        | (VScript.Referenceable<"AudioRePlay::Data::Player"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioRePlay.RelationAudio
      >(
        this,
        "leader" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.AudioRePlay.Player(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioRePlay::Data::Player"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.AudioRePlay.Player(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioRePlay::Data::Player"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get followers() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioRePlay::Data::RelationAudio::Followers",
        VAPI.AT1130.AudioRePlay.RelationAudioFollowers
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "followers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.AudioRePlay.lift.RelationAudioFollowers(raw),
      );
    }
  }
  export class RelationVideo
    implements VScript.Referenceable<"AudioRePlay::Data::RelationVideo">
  {
    readonly type_identifier = "AudioRePlay::Data::RelationVideo" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get leader(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.VideoPlayer.Player,
      | null
      | (VScript.Referenceable<"VideoPlayer::Data::Player"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioRePlay.RelationVideo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.VideoPlayer.Player,
        | null
        | (VScript.Referenceable<"VideoPlayer::Data::Player"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioRePlay.RelationVideo
      >(
        this,
        "leader" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.VideoPlayer.Player(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"VideoPlayer::Data::Player"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.VideoPlayer.Player(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"VideoPlayer::Data::Player"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get followers() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioRePlay::Data::RelationVideo::Followers",
        VAPI.AT1130.AudioRePlay.RelationVideoFollowers
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "followers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.AudioRePlay.lift.RelationVideoFollowers(raw),
      );
    }
  }
  export class Relations
    implements VScript.Referenceable<"AudioRePlay::Data::Relations">
  {
    readonly type_identifier = "AudioRePlay::Data::Relations" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video() {
      return VAPI.AT1130.AudioRePlay.lift.RelationVideo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return VAPI.AT1130.AudioRePlay.lift.RelationAudio(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "audio"),
      );
    }
  }
  export class Time
    implements VScript.Referenceable<"AudioRePlay::Data::Time">
  {
    readonly type_identifier = "AudioRePlay::Data::Time" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioRePlay.Time
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioRePlay.Time
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
  }
  export class RelationAudioFollowers
    implements
      VScript.Referenceable<"AudioRePlay::Data::RelationAudio::Followers">
  {
    readonly type_identifier =
      "AudioRePlay::Data::RelationAudio::Followers" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.AudioRePlay.Player,
      VAPI.AT1130.AudioRePlay.RelationAudioFollowers
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.AudioRePlay.Player,
        VAPI.AT1130.AudioRePlay.RelationAudioFollowers
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.AudioRePlay.Player(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"AudioRePlay::Data::Player"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class RelationVideoFollowers
    implements
      VScript.Referenceable<"AudioRePlay::Data::RelationVideo::Followers">
  {
    readonly type_identifier =
      "AudioRePlay::Data::RelationVideo::Followers" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.VideoPlayer.Player,
      VAPI.AT1130.AudioRePlay.RelationVideoFollowers
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.VideoPlayer.Player,
        VAPI.AT1130.AudioRePlay.RelationVideoFollowers
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.VideoPlayer.Player(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"VideoPlayer::Data::Player"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class DelayInputs
    implements VScript.Referenceable<"AudioRePlay::Data::Delay::Inputs">
  {
    readonly type_identifier = "AudioRePlay::Data::Delay::Inputs" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.AudioRePlay.DelayInputs
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.AudioRePlay.DelayInputs
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioRePlay.DelayInputs
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioRePlay.DelayInputs
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get writer() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioRePlay::Data::Writer",
        VAPI.AudioRePlay.Writer
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "writer"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AudioRePlay.lift.Writer(raw),
      );
    }
  }
}
export namespace AudioShuffler {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    Shuffler: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Shuffler(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    Shuffler: (_x: Shuffler) => _x.raw.kwl,
  } as const;
  export class All
    implements VScript.Referenceable<"AudioShuffler::Data::All">
  {
    readonly type_identifier = "AudioShuffler::Data::All" as const;
    get runtime_constants() {
      return {
        num_shuffler_instances: this.raw.backing_store.get_runtime_constant(
          "AudioShuffler::num_shuffler_instances",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get global_cross_fade(): VScript.rwKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | VScript.Duration,
      null | VScript.Duration,
      VAPI.AT1130.AudioShuffler.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | VScript.Duration,
        null | VScript.Duration,
        VAPI.AT1130.AudioShuffler.All
      >(
        this,
        "global_cross_fade" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.liftNanoseconds,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.lowerNanoseconds,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.liftNanoseconds,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.lowerNanoseconds,
          ),
        },
        null,
      );
    }
    get instances() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioShuffler::Data::Shuffler",
        VAPI.AT1130.AudioShuffler.ShufflerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.AudioShuffler.ShufflerAsNamedTableRow(raw),
      );
    }
  }
  export class Shuffler
    implements VScript.Referenceable<"AudioShuffler::Data::Shuffler">
  {
    readonly type_identifier = "AudioShuffler::Data::Shuffler" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get genlock(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Genlock.AT1130Genlock,
      | null
      | (VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioShuffler.Shuffler
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Genlock.AT1130Genlock,
        | null
        | (VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioShuffler.Shuffler
      >(
        this,
        "genlock" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Genlock.AT1130Genlock(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Genlock.AT1130Genlock(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "channels",
        "Audio::Data::Essence",
        VScript.Referenceable<"Audio::Data::Essence"> &
          VAPI.AT1130.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1130.AudioShuffler.Shuffler
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VScript.MaybeSparseArray<null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "channels",
          "Audio::Data::Essence",
          VScript.Referenceable<"Audio::Data::Essence"> &
            VAPI.AT1130.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1130.AudioShuffler.Shuffler
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
                VScript.VSocket,
                "channels",
                "Audio::Data::Essence",
                VScript.Referenceable<"Audio::Data::Essence"> &
                  VAPI.AT1130.Audio.Essence,
                | null
                | [
                    null | string,
                    number,
                    boolean,
                    [number, number, number, number, number],
                  ],
                null | VAPI.Audio.Channel
              >(
                (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
                  new VAPI.AT1130.Audio.Essence(
                    VScript.VAPIHelpers.get_subtree(_socket, kwl),
                  ),
                "channels" as VScript.SysName,
                {
                  lift: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lift.Channel,
                  ),
                  lower: VScript.VAPIHelpers.liftOrLowerNullable(
                    VAPI.Audio.lower.Channel,
                  ),
                },
              ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                VScript.VAPIHelpers.lowerRefinedIndexedReference<
                  VScript.VSocket,
                  "channels",
                  "Audio::Data::Essence",
                  VScript.Referenceable<"Audio::Data::Essence"> &
                    VAPI.AT1130.Audio.Essence,
                  | null
                  | [
                      null | string,
                      number,
                      boolean,
                      [number, number, number, number, number],
                    ],
                  null | VAPI.Audio.Channel
                >(),
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get cross_fade(): VScript.rwKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | VScript.Duration,
      null | VScript.Duration,
      VAPI.AT1130.AudioShuffler.Shuffler
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | VScript.Duration,
        null | VScript.Duration,
        VAPI.AT1130.AudioShuffler.Shuffler
      >(
        this,
        "cross_fade" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.liftNanoseconds,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.lowerNanoseconds,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.liftNanoseconds,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.lowerNanoseconds,
          ),
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "output"),
      );
    }
  }
  export class ShufflerAsNamedTableRow extends Shuffler {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
}
export namespace AudioSignalGenerator {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    OUT: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new OUT(_raw),
    OUTS: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new OUTS(_raw),
    AllAlsa: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AllAlsa(_raw),
    AllGenlock: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AllGenlock(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    OUT: (_x: OUT) => _x.raw.kwl,
    OUTS: (_x: OUTS) => _x.raw.kwl,
    AllAlsa: (_x: AllAlsa) => _x.raw.kwl,
    AllGenlock: (_x: AllGenlock) => _x.raw.kwl,
  } as const;
  export class All
    implements VScript.Referenceable<"AudioSignalGenerator::Data::All">
  {
    readonly type_identifier = "AudioSignalGenerator::Data::All" as const;
    get runtime_constants() {
      return {
        num_alsa_interfaces: this.raw.backing_store.get_runtime_constant(
          "AudioSignalGenerator::num_alsa_interfaces",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get genlock() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "AudioSignalGenerator::Data::All::Genlock",
        VAPI.AT1130.AudioSignalGenerator.AllGenlock
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 0, "genlock"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.AudioSignalGenerator.lift.AllGenlock(st),
      );
    }
    get alsa() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "AudioSignalGenerator::Data::All::Alsa",
        VAPI.AT1130.AudioSignalGenerator.AllAlsa
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 1, "alsa"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.AudioSignalGenerator.lift.AllAlsa(st),
      );
    }
  }
  export class OUT
    implements VScript.Referenceable<"AudioSignalGenerator::Data::OUT">
  {
    readonly type_identifier = "AudioSignalGenerator::Data::OUT" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get level(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.Audio.Level,
      VAPI.Audio.Level,
      VAPI.Audio.Level,
      VAPI.Audio.Level,
      VAPI.AT1130.AudioSignalGenerator.OUT
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Audio.Level,
        VAPI.Audio.Level,
        VAPI.Audio.Level,
        VAPI.Audio.Level,
        VAPI.AT1130.AudioSignalGenerator.OUT
      >(
        this,
        "level" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "output"),
      );
    }
  }
  export class OUTS
    implements VScript.Referenceable<"AudioSignalGenerator::Data::OUTS">
  {
    readonly type_identifier = "AudioSignalGenerator::Data::OUTS" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get signal_silence() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          0,
          "signal_silence",
        ),
      );
    }
    get signal_400hz() {
      return VAPI.AT1130.AudioSignalGenerator.lift.OUT(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "signal_400hz"),
      );
    }
    get signal_440hz() {
      return VAPI.AT1130.AudioSignalGenerator.lift.OUT(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "signal_440hz"),
      );
    }
    get signal_1000hz() {
      return VAPI.AT1130.AudioSignalGenerator.lift.OUT(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "signal_1000hz"),
      );
    }
    get source_slice() {
      return VAPI.Audio.lift.SignalSourceSlice(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "source_slice"),
      );
    }
  }
  export class AllAlsa
    implements VScript.Referenceable<"AudioSignalGenerator::Data::All::Alsa">
  {
    readonly type_identifier = "AudioSignalGenerator::Data::All::Alsa" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "output"),
      );
    }
    get source_slice() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          1,
          "source_slice",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.AudioSignalGenerator.AllAlsa
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.AudioSignalGenerator.AllAlsa
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
  }
  export class AllGenlock
    implements VScript.Referenceable<"AudioSignalGenerator::Data::All::Genlock">
  {
    readonly type_identifier =
      "AudioSignalGenerator::Data::All::Genlock" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get f48000() {
      return VAPI.AT1130.AudioSignalGenerator.lift.OUTS(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "f48000"),
      );
    }
    get f96000() {
      return VAPI.AT1130.AudioSignalGenerator.lift.OUTS(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "f96000"),
      );
    }
  }
}
export namespace Cluster {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    ClusterGlobal: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new ClusterGlobal(_raw),
    ClusterGlobalRuntime: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new ClusterGlobalRuntime(_raw),
    ClusterLocal: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new ClusterLocal(_raw),
    ClusterLocalRuntime: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new ClusterLocalRuntime(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    ClusterGlobal: (_x: ClusterGlobal) => _x.raw.kwl,
    ClusterGlobalRuntime: (_x: ClusterGlobalRuntime) => _x.raw.kwl,
    ClusterLocal: (_x: ClusterLocal) => _x.raw.kwl,
    ClusterLocalRuntime: (_x: ClusterLocalRuntime) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"Cluster::Data::All"> {
    readonly type_identifier = "Cluster::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get global() {
      return VAPI.AT1130.Cluster.lift.ClusterGlobal(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "global"),
      );
    }
    get local() {
      return VAPI.AT1130.Cluster.lift.ClusterLocal(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "local"),
      );
    }
  }
  export class ClusterGlobal
    implements VScript.Referenceable<"Cluster::Data::ClusterGlobal">
  {
    readonly type_identifier = "Cluster::Data::ClusterGlobal" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get configuration() {
      return VAPI.Cluster.lift.ClusterGlobalConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "configuration"),
      );
    }
    get runtime() {
      return VAPI.AT1130.Cluster.lift.ClusterGlobalRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "runtime"),
      );
    }
  }
  export class ClusterGlobalRuntime
    implements VScript.Referenceable<"Cluster::Data::ClusterGlobalRuntime">
  {
    readonly type_identifier = "Cluster::Data::ClusterGlobalRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get connected_to_myself(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.Cluster.ClusterGlobalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.Cluster.ClusterGlobalRuntime
      >(this, "connected_to_myself" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get nodes() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterNodes::Data::ClusterNodeGlobalRuntime",
        VAPI.ClusterNodes.ClusterNodeGlobalRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 1, "nodes"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.ClusterNodes.lift.ClusterNodeGlobalRuntime(raw),
      );
    }
    get sources() {
      return VAPI.AT1130.ClusterSources.lift.ClusterSourcesGlobalRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "sources"),
      );
    }
    get outputs() {
      return VAPI.ClusterOutputs.lift.ClusterOutputsGlobalRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "outputs"),
      );
    }
    get monitoring_objects() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterMonitoringObjects::Data::ClusterMonitoringObjectGlobalRuntime",
        VAPI.AT1130.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          4,
          "monitoring_objects",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterMonitoringObjects.lift.ClusterMonitoringObjectGlobalRuntime(
            raw,
          ),
      );
    }
  }
  export class ClusterLocal
    implements VScript.Referenceable<"Cluster::Data::ClusterLocal">
  {
    readonly type_identifier = "Cluster::Data::ClusterLocal" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get runtime() {
      return VAPI.AT1130.Cluster.lift.ClusterLocalRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "runtime"),
      );
    }
  }
  export class ClusterLocalRuntime
    implements VScript.Referenceable<"Cluster::Data::ClusterLocalRuntime">
  {
    readonly type_identifier = "Cluster::Data::ClusterLocalRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get processors() {
      return VAPI.AT1130.ClusterProcessors.lift.ClusterProcessorsLocalRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "processors"),
      );
    }
    get statistics() {
      return VAPI.Cluster.lift.ClusterStatistics(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "statistics"),
      );
    }
  }
}
export namespace ClusterMonitoringObjects {
  export const lift = {
    ClusterAudioMonitoringObjectRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterAudioMonitoringObjectRuntime(_raw),
    ClusterMetadataMonitoringObjectRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterMetadataMonitoringObjectRuntime(_raw),
    ClusterMonitoringObjectGlobalRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterMonitoringObjectGlobalRuntime(_raw),
    ClusterVideoMonitoringObjectRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterVideoMonitoringObjectRuntime(_raw),
  } as const;
  export const lower = {
    ClusterAudioMonitoringObjectRuntime: (
      _x: ClusterAudioMonitoringObjectRuntime,
    ) => _x.raw.kwl,
    ClusterMetadataMonitoringObjectRuntime: (
      _x: ClusterMetadataMonitoringObjectRuntime,
    ) => _x.raw.kwl,
    ClusterMonitoringObjectGlobalRuntime: (
      _x: ClusterMonitoringObjectGlobalRuntime,
    ) => _x.raw.kwl,
    ClusterVideoMonitoringObjectRuntime: (
      _x: ClusterVideoMonitoringObjectRuntime,
    ) => _x.raw.kwl,
  } as const;
  export class ClusterAudioMonitoringObjectRuntime
    implements
      VScript.Referenceable<"ClusterMonitoringObjects::Data::ClusterAudioMonitoringObjectRuntime">
  {
    readonly type_identifier =
      "ClusterMonitoringObjects::Data::ClusterAudioMonitoringObjectRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get source(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntime
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"ClusterSources::Data::ClusterAudioSourceRuntime"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get alarms(): VScript.rKeyword<
      VScript.VSocket,
      [boolean, boolean, boolean, boolean, boolean, boolean],
      VAPI.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntimeAlarms,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [boolean, boolean, boolean, boolean, boolean, boolean],
        VAPI.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntimeAlarms,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntime
      >(this, "alarms" as VScript.SysName, {
        lift: VAPI.ClusterMonitoringObjects.lift
          .ClusterAudioMonitoringObjectRuntimeAlarms,
        lower:
          VAPI.ClusterMonitoringObjects.lower
            .ClusterAudioMonitoringObjectRuntimeAlarms,
      });
    }
  }
  export class ClusterMetadataMonitoringObjectRuntime
    implements
      VScript.Referenceable<"ClusterMonitoringObjects::Data::ClusterMetadataMonitoringObjectRuntime">
  {
    readonly type_identifier =
      "ClusterMonitoringObjects::Data::ClusterMetadataMonitoringObjectRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get source(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntime
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"ClusterSources::Data::ClusterMetadataSourceRuntime"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get alarms(): VScript.rKeyword<
      VScript.VSocket,
      [boolean, boolean, boolean, boolean],
      VAPI.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntimeAlarms,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [boolean, boolean, boolean, boolean],
        VAPI.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntimeAlarms,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntime
      >(this, "alarms" as VScript.SysName, {
        lift: VAPI.ClusterMonitoringObjects.lift
          .ClusterMetadataMonitoringObjectRuntimeAlarms,
        lower:
          VAPI.ClusterMonitoringObjects.lower
            .ClusterMetadataMonitoringObjectRuntimeAlarms,
      });
    }
  }
  export class ClusterMonitoringObjectGlobalRuntime
    implements
      VScript.Referenceable<"ClusterMonitoringObjects::Data::ClusterMonitoringObjectGlobalRuntime">
  {
    readonly type_identifier =
      "ClusterMonitoringObjects::Data::ClusterMonitoringObjectGlobalRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get alarm(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
      >(this, "alarm" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get alarm_severity_level(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.ClusterMonitoringObjects.SeverityLevel,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ClusterMonitoringObjects.SeverityLevel,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
      >(this, "alarm_severity_level" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get video() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "ClusterMonitoringObjects::Data::ClusterVideoMonitoringObjectRuntime",
        VAPI.AT1130.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 2, "video"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterMonitoringObjects.lift.ClusterVideoMonitoringObjectRuntime(
            st,
          ),
      );
    }
    get audio() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "ClusterMonitoringObjects::Data::ClusterAudioMonitoringObjectRuntime",
        VAPI.AT1130.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntime
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 3, "audio"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterMonitoringObjects.lift.ClusterAudioMonitoringObjectRuntime(
            st,
          ),
      );
    }
    get metadata() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "ClusterMonitoringObjects::Data::ClusterMetadataMonitoringObjectRuntime",
        VAPI.AT1130.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntime
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          4,
          "metadata",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterMonitoringObjects.lift.ClusterMetadataMonitoringObjectRuntime(
            st,
          ),
      );
    }
    get user_labels() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "ClusterSources::Data::ClusterSourceLabelDual",
        VAPI.ClusterSources.ClusterSourceLabelDual
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          5,
          "user_labels",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.ClusterSources.lift.ClusterSourceLabelDual(st),
      );
    }
    get configuration(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalConfiguration,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalConfiguration,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
      >(this, "configuration" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"ClusterMonitoringObjects::Data::ClusterMonitoringObjectGlobalConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class ClusterVideoMonitoringObjectRuntime
    implements
      VScript.Referenceable<"ClusterMonitoringObjects::Data::ClusterVideoMonitoringObjectRuntime">
  {
    readonly type_identifier =
      "ClusterMonitoringObjects::Data::ClusterVideoMonitoringObjectRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get source(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"ClusterSources::Data::ClusterVideoSourceRuntime"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get alarms(): VScript.rKeyword<
      VScript.VSocket,
      [boolean, boolean, boolean, boolean, boolean],
      VAPI.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntimeAlarms,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [boolean, boolean, boolean, boolean, boolean],
        VAPI.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntimeAlarms,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
      >(this, "alarms" as VScript.SysName, {
        lift: VAPI.ClusterMonitoringObjects.lift
          .ClusterVideoMonitoringObjectRuntimeAlarms,
        lower:
          VAPI.ClusterMonitoringObjects.lower
            .ClusterVideoMonitoringObjectRuntimeAlarms,
      });
    }
    get tally_mask(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.ClusterMonitoringObjects.TUnsignedMax,
      VAPI.ClusterMonitoringObjects.TUnsignedMax,
      VAPI.AT1130.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.ClusterMonitoringObjects.TUnsignedMax,
        VAPI.ClusterMonitoringObjects.TUnsignedMax,
        VAPI.AT1130.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
      >(
        this,
        "tally_mask" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get label() {
      return VAPI.ClusterSources.lift.ClusterSourceLabelDual(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "label"),
      );
    }
  }
}
export namespace ClusterProcessors {
  export const lift = {
    ClusterProcessorMipMapsDualOutputRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterProcessorMipMapsDualOutputRuntime(_raw),
    ClusterProcessorMipMapsDualOutputRuntimeSource: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterProcessorMipMapsDualOutputRuntimeSource(_raw),
    ClusterProcessorsLocalRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterProcessorsLocalRuntime(_raw),
    ClusterProcessorsMetadataRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterProcessorsMetadataRuntime(_raw),
    ClusterProcessorsMipMapsRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterProcessorsMipMapsRuntime(_raw),
  } as const;
  export const lower = {
    ClusterProcessorMipMapsDualOutputRuntime: (
      _x: ClusterProcessorMipMapsDualOutputRuntime,
    ) => _x.raw.kwl,
    ClusterProcessorMipMapsDualOutputRuntimeSource: (
      _x: ClusterProcessorMipMapsDualOutputRuntimeSource,
    ) => _x.raw.kwl,
    ClusterProcessorsLocalRuntime: (_x: ClusterProcessorsLocalRuntime) =>
      _x.raw.kwl,
    ClusterProcessorsMetadataRuntime: (_x: ClusterProcessorsMetadataRuntime) =>
      _x.raw.kwl,
    ClusterProcessorsMipMapsRuntime: (_x: ClusterProcessorsMipMapsRuntime) =>
      _x.raw.kwl,
  } as const;
  export class ClusterProcessorMipMapsDualOutputRuntime
    implements
      VScript.Referenceable<"ClusterProcessors::Data::ClusterProcessorMipMapsDualOutputRuntime">
  {
    readonly type_identifier =
      "ClusterProcessors::Data::ClusterProcessorMipMapsDualOutputRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get local_sources() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "ClusterProcessors::Data::ClusterProcessorMipMapsDualOutputRuntimeSource",
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          0,
          "local_sources",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterProcessors.lift.ClusterProcessorMipMapsDualOutputRuntimeSource(
            st,
          ),
      );
    }
  }
  export class ClusterProcessorMipMapsDualOutputRuntimeSource
    implements
      VScript.Referenceable<"ClusterProcessors::Data::ClusterProcessorMipMapsDualOutputRuntimeSource">
  {
    readonly type_identifier =
      "ClusterProcessors::Data::ClusterProcessorMipMapsDualOutputRuntimeSource" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get full_size(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "full_size" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get source(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"ClusterSources::Data::ClusterVideoSourceRuntime"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get source_sdp(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "source_sdp" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get input_primary_port(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.ClusterSources.Ports,
      null | VAPI.ClusterSources.Ports,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.Ports,
        null | VAPI.ClusterSources.Ports,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "input_primary_port" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get input_secondary_port(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.ClusterSources.Ports,
      null | VAPI.ClusterSources.Ports,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.Ports,
        null | VAPI.ClusterSources.Ports,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "input_secondary_port" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get output_primary_port(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.ClusterSources.Ports,
      null | VAPI.ClusterSources.Ports,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.Ports,
        null | VAPI.ClusterSources.Ports,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "output_primary_port" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get output_secondary_port(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.ClusterSources.Ports,
      null | VAPI.ClusterSources.Ports,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.Ports,
        null | VAPI.ClusterSources.Ports,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "output_secondary_port" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    IP address of the mipmap RTP stream
  */
    get output_src_ip_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "output_src_ip_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    IP address of the secondary mipmap RTP stream
  */
    get output_secondary_src_ip_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "output_secondary_src_ip_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get crossbar_select(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "crossbar_select" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class ClusterProcessorsLocalRuntime
    implements
      VScript.Referenceable<"ClusterProcessors::Data::ClusterProcessorsLocalRuntime">
  {
    readonly type_identifier =
      "ClusterProcessors::Data::ClusterProcessorsLocalRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get mipmaps() {
      return VAPI.AT1130.ClusterProcessors.lift.ClusterProcessorsMipMapsRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "mipmaps"),
      );
    }
    get metadata() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterProcessors::Data::ClusterProcessorsMetadataRuntime",
        VAPI.AT1130.ClusterProcessors.ClusterProcessorsMetadataRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "metadata",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterProcessors.lift.ClusterProcessorsMetadataRuntime(
            raw,
          ),
      );
    }
    get ppms() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterProcessors::Data::ClusterProcessorsPPMSRuntime",
        VAPI.ClusterProcessors.ClusterProcessorsPPMSRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "ppms"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.ClusterProcessors.lift.ClusterProcessorsPPMSRuntime(raw),
      );
    }
  }
  export class ClusterProcessorsMetadataRuntime
    implements
      VScript.Referenceable<"ClusterProcessors::Data::ClusterProcessorsMetadataRuntime">
  {
    readonly type_identifier =
      "ClusterProcessors::Data::ClusterProcessorsMetadataRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get source(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime,
      VAPI.AT1130.ClusterProcessors.ClusterProcessorsMetadataRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime,
        VAPI.AT1130.ClusterProcessors.ClusterProcessorsMetadataRuntime
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"ClusterSources::Data::ClusterMetadataSourceRuntime"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class ClusterProcessorsMipMapsRuntime
    implements
      VScript.Referenceable<"ClusterProcessors::Data::ClusterProcessorsMipMapsRuntime">
  {
    readonly type_identifier =
      "ClusterProcessors::Data::ClusterProcessorsMipMapsRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get outputs() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterProcessors::Data::ClusterProcessorMipMapsDualOutputRuntime",
        VAPI.AT1130.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 0, "outputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterProcessors.lift.ClusterProcessorMipMapsDualOutputRuntime(
            raw,
          ),
      );
    }
    get inputs() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterProcessors::Data::ClusterProcessorMipMapsInputRuntime",
        VAPI.ClusterProcessors.ClusterProcessorMipMapsInputRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 1, "inputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.ClusterProcessors.lift.ClusterProcessorMipMapsInputRuntime(raw),
      );
    }
  }
}
export namespace ClusterSources {
  export const lift = {
    ClusterAudioSourceRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterAudioSourceRuntime(_raw),
    ClusterAudioSourceRuntimeLocal: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterAudioSourceRuntimeLocal(_raw),
    ClusterMetadataSourceLocalRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterMetadataSourceLocalRuntime(_raw),
    ClusterMetadataSourceRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterMetadataSourceRuntime(_raw),
    ClusterSourcesGlobalRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterSourcesGlobalRuntime(_raw),
    ClusterVideoSourceRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterVideoSourceRuntime(_raw),
    ClusterVideoSourceRuntimeLocal: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new ClusterVideoSourceRuntimeLocal(_raw),
  } as const;
  export const lower = {
    ClusterAudioSourceRuntime: (_x: ClusterAudioSourceRuntime) => _x.raw.kwl,
    ClusterAudioSourceRuntimeLocal: (_x: ClusterAudioSourceRuntimeLocal) =>
      _x.raw.kwl,
    ClusterMetadataSourceLocalRuntime: (
      _x: ClusterMetadataSourceLocalRuntime,
    ) => _x.raw.kwl,
    ClusterMetadataSourceRuntime: (_x: ClusterMetadataSourceRuntime) =>
      _x.raw.kwl,
    ClusterSourcesGlobalRuntime: (_x: ClusterSourcesGlobalRuntime) =>
      _x.raw.kwl,
    ClusterVideoSourceRuntime: (_x: ClusterVideoSourceRuntime) => _x.raw.kwl,
    ClusterVideoSourceRuntimeLocal: (_x: ClusterVideoSourceRuntimeLocal) =>
      _x.raw.kwl,
  } as const;
  export class ClusterAudioSourceRuntime
    implements
      VScript.Referenceable<"ClusterSources::Data::ClusterAudioSourceRuntime">
  {
    readonly type_identifier =
      "ClusterSources::Data::ClusterAudioSourceRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get transport_format(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.ClusterSources.SourceTransportFormat,
      null | VAPI.ClusterSources.SourceTransportFormat,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.SourceTransportFormat,
        null | VAPI.ClusterSources.SourceTransportFormat,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
      >(this, "transport_format" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get num_channels(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
      >(this, "num_channels" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get peak_meters(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Audio.PeakMeter>,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
      >(this, "peak_meters" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get ip_configuration(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.ClusterSources.ClusterIPSourceConfiguration,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.ClusterSources.ClusterIPSourceConfiguration,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
      >(this, "ip_configuration" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.ClusterSources.ClusterIPSourceConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"ClusterSources::Data::ClusterIPSourceConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get local() {
      return VAPI.AT1130.ClusterSources.lift.ClusterAudioSourceRuntimeLocal(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "local"),
      );
    }
    get tally_mask(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.ClusterSources.TUnsignedMax,
      VAPI.ClusterSources.TUnsignedMax,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.ClusterSources.TUnsignedMax,
        VAPI.ClusterSources.TUnsignedMax,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
      >(
        this,
        "tally_mask" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get label() {
      return VAPI.ClusterSources.lift.ClusterSourceLabelDual(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "label"),
      );
    }
    get lifeness_count(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
      >(this, "lifeness_count" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get bytes_per_second(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
      >(this, "bytes_per_second" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class ClusterAudioSourceRuntimeLocal
    implements
      VScript.Referenceable<"ClusterSources::Data::ClusterAudioSourceRuntimeLocal">
  {
    readonly type_identifier =
      "ClusterSources::Data::ClusterAudioSourceRuntimeLocal" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get audio_essence(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.Audio.Essence,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.Audio.Essence,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntimeLocal
      >(this, "audio_essence" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.Audio.Essence(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"Audio::Data::Essence"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get bad_sdp(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntimeLocal
      >(this, "bad_sdp" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get used_channel_id_start(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntimeLocal
      >(this, "used_channel_id_start" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get used_channels_num(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntimeLocal
      >(this, "used_channels_num" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class ClusterMetadataSourceLocalRuntime
    implements
      VScript.Referenceable<"ClusterSources::Data::ClusterMetadataSourceLocalRuntime">
  {
    readonly type_identifier =
      "ClusterSources::Data::ClusterMetadataSourceLocalRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get bad_sdp(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceLocalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceLocalRuntime
      >(this, "bad_sdp" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get time_source(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.Time.Source,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceLocalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.Time.Source,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceLocalRuntime
      >(this, "time_source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.Time.Source(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"Time::Data::Source"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get closed_caption(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.Video.ClosedCaption,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceLocalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.Video.ClosedCaption,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceLocalRuntime
      >(this, "closed_caption" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.Video.ClosedCaption(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"Video::Data::ClosedCaption"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class ClusterMetadataSourceRuntime
    implements
      VScript.Referenceable<"ClusterSources::Data::ClusterMetadataSourceRuntime">
  {
    readonly type_identifier =
      "ClusterSources::Data::ClusterMetadataSourceRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get global_source_id(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.ClusterSources.MetadataSourceID,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ClusterSources.MetadataSourceID,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "global_source_id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get transport_format(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.ClusterSources.SourceTransportFormat,
      null | VAPI.ClusterSources.SourceTransportFormat,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.SourceTransportFormat,
        null | VAPI.ClusterSources.SourceTransportFormat,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "transport_format" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Source IP address of the metadata RTP stream
  */
    get src_ip_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "src_ip_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Source IP address of the metadata RTP stream
  */
    get secondary_src_ip_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "secondary_src_ip_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Destination IP address of the metadata RTP stream
  */
    get dest_ip_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "dest_ip_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Destination IP address of the metadata RTP stream
  */
    get secondary_dest_ip_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "secondary_dest_ip_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get ip_configuration(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.ClusterSources.ClusterIPSourceConfiguration,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.ClusterSources.ClusterIPSourceConfiguration,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "ip_configuration" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.ClusterSources.ClusterIPSourceConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"ClusterSources::Data::ClusterIPSourceConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get local() {
      return VAPI.AT1130.ClusterSources.lift.ClusterMetadataSourceLocalRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "local"),
      );
    }
    get lifeness_count(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "lifeness_count" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get time_code(): VScript.rKeyword<
      VScript.VSocket,
      [
        null | VScript.TimecodePayload,
        null | VScript.TimecodePayload,
        null | VScript.TimecodePayload,
      ],
      VAPI.ClusterSources.TimestampedTimecode,
      VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          null | VScript.TimecodePayload,
          null | VScript.TimecodePayload,
          null | VScript.TimecodePayload,
        ],
        VAPI.ClusterSources.TimestampedTimecode,
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(this, "time_code" as VScript.SysName, {
        lift: VAPI.ClusterSources.lift.TimestampedTimecode,
        lower: VAPI.ClusterSources.lower.TimestampedTimecode,
      });
    }
    get closed_caption() {
      return VAPI.ClusterSources.lift.ClusterMetadataSourceCC(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          11,
          "closed_caption",
        ),
      );
    }
  }
  export class ClusterSourcesGlobalRuntime
    implements
      VScript.Referenceable<"ClusterSources::Data::ClusterSourcesGlobalRuntime">
  {
    readonly type_identifier =
      "ClusterSources::Data::ClusterSourcesGlobalRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterSources::Data::ClusterVideoSourceRuntime",
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 0, "video"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterSources.lift.ClusterVideoSourceRuntime(raw),
      );
    }
    get audio() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterSources::Data::ClusterAudioSourceRuntime",
        VAPI.AT1130.ClusterSources.ClusterAudioSourceRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 1, "audio"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterSources.lift.ClusterAudioSourceRuntime(raw),
      );
    }
    get metadata() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterSources::Data::ClusterMetadataSourceRuntime",
        VAPI.AT1130.ClusterSources.ClusterMetadataSourceRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "metadata",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.ClusterSources.lift.ClusterMetadataSourceRuntime(raw),
      );
    }
  }
  export class ClusterVideoSourceRuntime
    implements
      VScript.Referenceable<"ClusterSources::Data::ClusterVideoSourceRuntime">
  {
    readonly type_identifier =
      "ClusterSources::Data::ClusterVideoSourceRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get global_source_id(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.ClusterSources.VideoSourceID,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ClusterSources.VideoSourceID,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(this, "global_source_id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get transport_format(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.ClusterSources.SourceTransportFormat,
      null | VAPI.ClusterSources.SourceTransportFormat,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.SourceTransportFormat,
        null | VAPI.ClusterSources.SourceTransportFormat,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(this, "transport_format" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get video_standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(this, "video_standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get ip_configuration(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.ClusterSources.ClusterIPSourceConfiguration,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.ClusterSources.ClusterIPSourceConfiguration,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(this, "ip_configuration" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.ClusterSources.ClusterIPSourceConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"ClusterSources::Data::ClusterIPSourceConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }

    /**
    Source IP address of the mipmap RTP stream
  */
    get resolution_levels_src_ip_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(this, "resolution_levels_src_ip_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Source IP address of the mipmap RTP stream
  */
    get secondary_resolution_levels_src_ip_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(this, "secondary_resolution_levels_src_ip_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get resolution_levels() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "ClusterSources::Data::ClusterVideoSourceRuntimeResolutionLevel",
        VAPI.ClusterSources.ClusterVideoSourceRuntimeResolutionLevel
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          7,
          "resolution_levels",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.ClusterSources.lift.ClusterVideoSourceRuntimeResolutionLevel(st),
      );
    }
    get local() {
      return VAPI.AT1130.ClusterSources.lift.ClusterVideoSourceRuntimeLocal(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "local"),
      );
    }
    get tally_mask(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.ClusterSources.TUnsignedMax,
      VAPI.ClusterSources.TUnsignedMax,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.ClusterSources.TUnsignedMax,
        VAPI.ClusterSources.TUnsignedMax,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(
        this,
        "tally_mask" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get label() {
      return VAPI.ClusterSources.lift.ClusterSourceLabelDual(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 10, "label"),
      );
    }
    get lifeness_count(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntime
      >(this, "lifeness_count" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class ClusterVideoSourceRuntimeLocal
    implements
      VScript.Referenceable<"ClusterSources::Data::ClusterVideoSourceRuntimeLocal">
  {
    readonly type_identifier =
      "ClusterSources::Data::ClusterVideoSourceRuntimeLocal" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video_essence(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntimeLocal
      >(this, "video_essence" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.Video.Essence(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"Video::Data::Essence"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get bad_sdp(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.ClusterSources.ClusterVideoSourceRuntimeLocal
      >(this, "bad_sdp" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
}
export namespace ColorCorrection {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    CC1D: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new CC1D(_raw),
    CC3D: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new CC3D(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    CC1D: (_x: CC1D) => _x.raw.kwl,
    CC3D: (_x: CC3D) => _x.raw.kwl,
  } as const;
  export class All
    implements VScript.Referenceable<"ColorCorrection::Data::All">
  {
    readonly type_identifier = "ColorCorrection::Data::All" as const;
    get runtime_constants() {
      return {
        num_color_correction: this.raw.backing_store.get_runtime_constant(
          "ColorCorrection::num_color_correction",
        ) as number,
        num_3d_color_correction: this.raw.backing_store.get_runtime_constant(
          "ColorCorrection::num_3d_color_correction",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get cc1d() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "ColorCorrection::Data::CC1D",
        VAPI.AT1130.ColorCorrection.CC1DAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "cc1d",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.ColorCorrection.CC1DAsNamedTableRow(raw),
      );
    }
    get cc3d() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "ColorCorrection::Data::CC3D",
        VAPI.AT1130.ColorCorrection.CC3DAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "cc3d",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.ColorCorrection.CC3DAsNamedTableRow(raw),
      );
    }
  }
  export class CC1D
    implements VScript.Referenceable<"ColorCorrection::Data::CC1D">
  {
    readonly type_identifier = "ColorCorrection::Data::CC1D" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get v_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.ColorCorrection.CC1D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.ColorCorrection.CC1D
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "output"),
      );
    }
    get reserve_uhd_resources(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.ColorCorrection.CC1D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.ColorCorrection.CC1D
      >(
        this,
        "reserve_uhd_resources" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Selects which parameter sets are used to control this color correction
  */
    get color_schema(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.ColorCorrection.ColorSchema,
      VAPI.ColorCorrection.ColorSchema,
      VAPI.ColorCorrection.ColorSchema,
      VAPI.ColorCorrection.ColorSchema,
      VAPI.AT1130.ColorCorrection.CC1D
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.AT1130.ColorCorrection.CC1D
      >(
        this,
        "color_schema" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    When set changes the output color space to the specified one
  */
    get output_cs(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.Video.ColorSpace,
      null | VAPI.Video.ColorSpace,
      null | VAPI.Video.ColorSpace,
      null | VAPI.Video.ColorSpace,
      VAPI.AT1130.ColorCorrection.CC1D
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.Video.ColorSpace,
        null | VAPI.Video.ColorSpace,
        null | VAPI.Video.ColorSpace,
        null | VAPI.Video.ColorSpace,
        VAPI.AT1130.ColorCorrection.CC1D
      >(
        this,
        "output_cs" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get yuv() {
      return VAPI.ColorCorrection.lift.YUV(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "yuv"),
      );
    }
    get rgb() {
      return VAPI.ColorCorrection.lift.CC1DRgb(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "rgb"),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.ColorCorrection.CC1DIssues,
      VAPI.AT1130.ColorCorrection.CC1D
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ColorCorrection.CC1DIssues,
        VAPI.AT1130.ColorCorrection.CC1D
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.ColorCorrection.CC1DIssues => ({
          missing_input_mapper: (x & 1) !== 0,
          no_hw_resources_available: (x & 2) !== 0,
          no_uhd_resources_allocated: (x & 4) !== 0,
        }),
        lower: (
          x: VAPI.ColorCorrection.CC1DIssues,
          _: VScript.VSocket,
        ): number =>
          (x.missing_input_mapper ? 1 : 0) |
          (x.no_hw_resources_available ? 2 : 0) |
          (x.no_uhd_resources_allocated ? 4 : 0),
      });
    }
  }
  export class CC1DAsNamedTableRow extends CC1D {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class CC3D
    implements VScript.Referenceable<"ColorCorrection::Data::CC3D">
  {
    readonly type_identifier = "ColorCorrection::Data::CC3D" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get v_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.ColorCorrection.CC3D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.ColorCorrection.CC3D
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "output"),
      );
    }
    get reserve_uhd_resources(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.ColorCorrection.CC3D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.ColorCorrection.CC3D
      >(
        this,
        "reserve_uhd_resources" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Selects which parameter sets are used to control this color correction
  */
    get color_schema(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.ColorCorrection.ColorSchema,
      VAPI.ColorCorrection.ColorSchema,
      VAPI.ColorCorrection.ColorSchema,
      VAPI.ColorCorrection.ColorSchema,
      VAPI.AT1130.ColorCorrection.CC3D
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.AT1130.ColorCorrection.CC3D
      >(
        this,
        "color_schema" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get yuv() {
      return VAPI.ColorCorrection.lift.YUV(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "yuv"),
      );
    }
    get lut_name(): VScript.dKeyword<
      VScript.VSocket,
      string,
      string,
      string,
      string,
      VAPI.AT1130.ColorCorrection.CC3D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1130.ColorCorrection.CC3D
      >(
        this,
        "lut_name" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get lut_info() {
      return VAPI.ColorCorrection.lift.CC3DLutInfo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "lut_info"),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.ColorCorrection.CC3DIssues,
      VAPI.AT1130.ColorCorrection.CC3D
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ColorCorrection.CC3DIssues,
        VAPI.AT1130.ColorCorrection.CC3D
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.ColorCorrection.CC3DIssues => ({
          missing_input_mapper: (x & 1) !== 0,
          no_hw_resources_available: (x & 2) !== 0,
          no_uhd_resources_allocated: (x & 4) !== 0,
        }),
        lower: (
          x: VAPI.ColorCorrection.CC3DIssues,
          _: VScript.VSocket,
        ): number =>
          (x.missing_input_mapper ? 1 : 0) |
          (x.no_hw_resources_available ? 2 : 0) |
          (x.no_uhd_resources_allocated ? 4 : 0),
      });
    }
  }
  export class CC3DAsNamedTableRow extends CC3D {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
}
export namespace Definitions {
  export const lift = {
    AudioControl: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioControl(_raw),
    TimecodeInserterBlank: (
      _raw: [],
      _socket: VScript.VSocket,
    ): TimecodeInserterBlank => {
      return {};
    },
    TimecodeInserterFreerun: (
      _raw: [[boolean, boolean], [number, number, number, number]],
      _socket: VScript.VSocket,
    ): TimecodeInserterFreerun => {
      return {
        enable: VAPI.AT1130.Definitions.lift.TimecodeInserterFreerunEnable(
          _raw[0],
          _socket,
        ),
        initial_timecode:
          VAPI.AT1130.Definitions.lift.TimecodeInserterFreerunInitialTimecode(
            _raw[1],
            _socket,
          ),
      };
    },
    TimecodeInserterGenerator: (
      _raw: [[boolean, boolean], null | string],
      _socket: VScript.VSocket,
    ): TimecodeInserterGenerator => {
      return {
        enable: VAPI.AT1130.Definitions.lift.TimecodeInserterGeneratorEnable(
          _raw[0],
          _socket,
        ),
        t_src:
          _raw[1] === null
            ? null
            : new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[1] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    TimecodeInserterPassthrough: (
      _raw: [],
      _socket: VScript.VSocket,
    ): TimecodeInserterPassthrough => {
      return {};
    },
    TimecodeInserter: (
      _raw:
        | [0, []]
        | [1, []]
        | [2, [[boolean, boolean], [number, number, number, number]]]
        | [3, [[boolean, boolean], null | string]],
      _socket: VScript.VSocket,
    ): TimecodeInserter => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "Passthrough",
            value: VAPI.AT1130.Definitions.lift.TimecodeInserterPassthrough(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "Blank",
            value: VAPI.AT1130.Definitions.lift.TimecodeInserterBlank(
              _raw[1],
              _socket,
            ),
          };
        case 2:
          return {
            variant: "Freerun",
            value: VAPI.AT1130.Definitions.lift.TimecodeInserterFreerun(
              _raw[1],
              _socket,
            ),
          };
        case 3:
          return {
            variant: "Generator",
            value: VAPI.AT1130.Definitions.lift.TimecodeInserterGenerator(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    VancControl: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new VancControl(_raw),
    TimecodeInserterFreerunEnable: (
      _raw: [boolean, boolean],
      _socket: VScript.VSocket,
    ): TimecodeInserterFreerunEnable => {
      return {
        ltc: _raw[0],
        vitc: _raw[1],
      };
    },
    TimecodeInserterGeneratorEnable: (
      _raw: [boolean, boolean],
      _socket: VScript.VSocket,
    ): TimecodeInserterGeneratorEnable => {
      return {
        ltc: _raw[0],
        vitc: _raw[1],
      };
    },
    TimecodeInserterFreerunInitialTimecode: (
      _raw: [number, number, number, number],
      _socket: VScript.VSocket,
    ): TimecodeInserterFreerunInitialTimecode => {
      return {
        hours: _raw[0],
        minutes: _raw[1],
        seconds: _raw[2],
        frames: _raw[3],
      };
    },
  } as const;
  export const lower = {
    AudioControl: (_x: AudioControl) => _x.raw.kwl,
    TimecodeInserterBlank: (_x: {}, _socket: VScript.VSocket): [] => [],
    TimecodeInserterFreerun: (
      _x: {
        enable: VAPI.AT1130.Definitions.TimecodeInserterFreerunEnable;
        initial_timecode: VAPI.AT1130.Definitions.TimecodeInserterFreerunInitialTimecode;
      },
      _socket: VScript.VSocket,
    ): [[boolean, boolean], [number, number, number, number]] => [
      VAPI.AT1130.Definitions.lower.TimecodeInserterFreerunEnable(
        _x.enable,
        _socket,
      ),
      VAPI.AT1130.Definitions.lower.TimecodeInserterFreerunInitialTimecode(
        _x.initial_timecode,
        _socket,
      ),
    ],
    TimecodeInserterGenerator: (
      _x: {
        enable: VAPI.AT1130.Definitions.TimecodeInserterGeneratorEnable;
        t_src: null | VAPI.AT1130.Time.Source;
      },
      _socket: VScript.VSocket,
    ): [[boolean, boolean], null | string] => [
      VAPI.AT1130.Definitions.lower.TimecodeInserterGeneratorEnable(
        _x.enable,
        _socket,
      ),
      _x.t_src === null ? null : _x.t_src.raw.kwl,
    ],
    TimecodeInserterPassthrough: (_x: {}, _socket: VScript.VSocket): [] => [],
    TimecodeInserter: (
      _x:
        | {
            variant: "Passthrough";
            value: VAPI.AT1130.Definitions.TimecodeInserterPassthrough;
          }
        | {
            variant: "Blank";
            value: VAPI.AT1130.Definitions.TimecodeInserterBlank;
          }
        | {
            variant: "Freerun";
            value: VAPI.AT1130.Definitions.TimecodeInserterFreerun;
          }
        | {
            variant: "Generator";
            value: VAPI.AT1130.Definitions.TimecodeInserterGenerator;
          },
      _socket: VScript.VSocket,
    ):
      | [0, []]
      | [1, []]
      | [2, [[boolean, boolean], [number, number, number, number]]]
      | [3, [[boolean, boolean], null | string]] => {
      switch (_x.variant) {
        case "Passthrough":
          return [
            0,
            VAPI.AT1130.Definitions.lower.TimecodeInserterPassthrough(
              _x.value,
              _socket,
            ),
          ];
        case "Blank":
          return [
            1,
            VAPI.AT1130.Definitions.lower.TimecodeInserterBlank(
              _x.value,
              _socket,
            ),
          ];
        case "Freerun":
          return [
            2,
            VAPI.AT1130.Definitions.lower.TimecodeInserterFreerun(
              _x.value,
              _socket,
            ),
          ];
        case "Generator":
          return [
            3,
            VAPI.AT1130.Definitions.lower.TimecodeInserterGenerator(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    VancControl: (_x: VancControl) => _x.raw.kwl,
    TimecodeInserterFreerunEnable: (
      _x: { ltc: boolean; vitc: boolean },
      _socket: VScript.VSocket,
    ): [boolean, boolean] => [_x.ltc, _x.vitc],
    TimecodeInserterGeneratorEnable: (
      _x: { ltc: boolean; vitc: boolean },
      _socket: VScript.VSocket,
    ): [boolean, boolean] => [_x.ltc, _x.vitc],
    TimecodeInserterFreerunInitialTimecode: (
      _x: { hours: number; minutes: number; seconds: number; frames: number },
      _socket: VScript.VSocket,
    ): [number, number, number, number] => [
      _x.hours,
      _x.minutes,
      _x.seconds,
      _x.frames,
    ],
  } as const;
  export class AudioControl
    implements VScript.Referenceable<"Definitions::Data::AudioControl">
  {
    readonly type_identifier = "Definitions::Data::AudioControl" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get group_enable(): VScript.dKeyword<
      VScript.VSocket,
      Array<VAPI.Definitions.TRSEmbedder>,
      VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
      Array<VAPI.Definitions.TRSEmbedder>,
      VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
      VAPI.AT1130.Definitions.AudioControl
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        Array<VAPI.Definitions.TRSEmbedder>,
        VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
        Array<VAPI.Definitions.TRSEmbedder>,
        VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
        VAPI.AT1130.Definitions.AudioControl
      >(
        this,
        "group_enable" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get source(): VScript.dKeyword<
      VScript.VSocket,
      [null | string, null | number | string],
      [null | string, null | number | string],
      VAPI.AT1130.Audio.TimedSource,
      VAPI.AT1130.Audio.TimedSource,
      VAPI.AT1130.Definitions.AudioControl
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1130.Audio.TimedSource,
        VAPI.AT1130.Audio.TimedSource,
        VAPI.AT1130.Definitions.AudioControl
      >(
        this,
        "source" as VScript.SysName,
        {
          lift: VAPI.AT1130.Audio.lift.TimedSource,
          lower: VAPI.AT1130.Audio.lower.TimedSource,
        },
        {
          lift: VAPI.AT1130.Audio.lift.TimedSource,
          lower: VAPI.AT1130.Audio.lower.TimedSource,
        },
        null,
      );
    }
  }
  export interface TimecodeInserterBlank {}
  export interface TimecodeInserterFreerun {
    enable: VAPI.AT1130.Definitions.TimecodeInserterFreerunEnable;
    initial_timecode: VAPI.AT1130.Definitions.TimecodeInserterFreerunInitialTimecode;
  }
  export interface TimecodeInserterGenerator {
    enable: VAPI.AT1130.Definitions.TimecodeInserterGeneratorEnable;
    t_src: null | VAPI.AT1130.Time.Source;
  }
  export interface TimecodeInserterPassthrough {}
  export type TimecodeInserter =
    | {
        variant: "Passthrough";
        value: VAPI.AT1130.Definitions.TimecodeInserterPassthrough;
      }
    | { variant: "Blank"; value: VAPI.AT1130.Definitions.TimecodeInserterBlank }
    | {
        variant: "Freerun";
        value: VAPI.AT1130.Definitions.TimecodeInserterFreerun;
      }
    | {
        variant: "Generator";
        value: VAPI.AT1130.Definitions.TimecodeInserterGenerator;
      };
  export class VancControl
    implements VScript.Referenceable<"Definitions::Data::VancControl">
  {
    readonly type_identifier = "Definitions::Data::VancControl" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get passthrough_c_y_0(): VScript.dKeyword<
      VScript.VSocket,
      [
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
      ],
      [
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
      ],
      VAPI.Definitions.BypassReplaceFlags,
      VAPI.Definitions.BypassReplaceFlags,
      VAPI.AT1130.Definitions.VancControl
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
        ],
        [
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
          boolean,
        ],
        VAPI.Definitions.BypassReplaceFlags,
        VAPI.Definitions.BypassReplaceFlags,
        VAPI.AT1130.Definitions.VancControl
      >(
        this,
        "passthrough_c_y_0" as VScript.SysName,
        {
          lift: VAPI.Definitions.lift.BypassReplaceFlags,
          lower: VAPI.Definitions.lower.BypassReplaceFlags,
        },
        {
          lift: VAPI.Definitions.lift.BypassReplaceFlags,
          lower: VAPI.Definitions.lower.BypassReplaceFlags,
        },
        null,
      );
    }
    get timecode_inserter(): VScript.dKeyword<
      VScript.VSocket,
      | [0, []]
      | [1, []]
      | [2, [[boolean, boolean], [number, number, number, number]]]
      | [3, [[boolean, boolean], null | string]],
      | [0, []]
      | [1, []]
      | [2, [[boolean, boolean], [number, number, number, number]]]
      | [3, [[boolean, boolean], null | string]],
      VAPI.AT1130.Definitions.TimecodeInserter,
      VAPI.AT1130.Definitions.TimecodeInserter,
      VAPI.AT1130.Definitions.VancControl
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        | [0, []]
        | [1, []]
        | [2, [[boolean, boolean], [number, number, number, number]]]
        | [3, [[boolean, boolean], null | string]],
        | [0, []]
        | [1, []]
        | [2, [[boolean, boolean], [number, number, number, number]]]
        | [3, [[boolean, boolean], null | string]],
        VAPI.AT1130.Definitions.TimecodeInserter,
        VAPI.AT1130.Definitions.TimecodeInserter,
        VAPI.AT1130.Definitions.VancControl
      >(
        this,
        "timecode_inserter" as VScript.SysName,
        {
          lift: VAPI.AT1130.Definitions.lift.TimecodeInserter,
          lower: VAPI.AT1130.Definitions.lower.TimecodeInserter,
        },
        {
          lift: VAPI.AT1130.Definitions.lift.TimecodeInserter,
          lower: VAPI.AT1130.Definitions.lower.TimecodeInserter,
        },
        null,
      );
    }
    get afd_inserter(): VScript.rwKeyword<
      VScript.VSocket,
      [0, []] | [1, []] | [2, [null | VAPI.Definitions.VANCAfdCode]],
      [0, []] | [1, []] | [2, [null | VAPI.Definitions.VANCAfdCode]],
      VAPI.Definitions.VANCAfdInserter,
      VAPI.Definitions.VANCAfdInserter,
      VAPI.AT1130.Definitions.VancControl
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        [0, []] | [1, []] | [2, [null | VAPI.Definitions.VANCAfdCode]],
        [0, []] | [1, []] | [2, [null | VAPI.Definitions.VANCAfdCode]],
        VAPI.Definitions.VANCAfdInserter,
        VAPI.Definitions.VANCAfdInserter,
        VAPI.AT1130.Definitions.VancControl
      >(
        this,
        "afd_inserter" as VScript.SysName,
        {
          lift: VAPI.Definitions.lift.VANCAfdInserter,
          lower: VAPI.Definitions.lower.VANCAfdInserter,
        },
        {
          lift: VAPI.Definitions.lift.VANCAfdInserter,
          lower: VAPI.Definitions.lower.VANCAfdInserter,
        },
        null,
      );
    }
    get override_smpte_352_payload(): VScript.rwKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      null | VAPI.Primitives.Unsigned32,
      VAPI.AT1130.Definitions.VancControl
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | VAPI.Primitives.Unsigned32,
        null | VAPI.Primitives.Unsigned32,
        VAPI.AT1130.Definitions.VancControl
      >(
        this,
        "override_smpte_352_payload" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
  export interface TimecodeInserterFreerunEnable {
    ltc: boolean;
    vitc: boolean;
  }
  export interface TimecodeInserterGeneratorEnable {
    ltc: boolean;
    vitc: boolean;
  }
  export interface TimecodeInserterFreerunInitialTimecode {
    hours: number;
    minutes: number;
    seconds: number;
    frames: number;
  }
}
export namespace EthernetStats {
  export const lift = {
    PortStatistics: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PortStatistics(_raw),
  } as const;
  export const lower = {
    PortStatistics: (_x: PortStatistics) => _x.raw.kwl,
  } as const;
  export class PortStatistics
    implements VScript.Referenceable<"EthernetStats::Data::PortStatistics">
  {
    readonly type_identifier = "EthernetStats::Data::PortStatistics" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    Number of received frames less than 64 bytes and reporting a CRC error
  */
    get rx_fragments(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_fragments" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received oversized frames reporting a CRC error
  */
    get rx_jabbers(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_jabbers" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received packets with FCS errors
  */
    get rx_fcserr(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_fcserr" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received frames with a frame of length at least 64, with CRC
    error
  */
    get rx_crcerr_okpkt(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_crcerr_okpkt" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored multicast frames received, excluding control frames
  */
    get rx_mcast_data_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_mcast_data_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored broadcast frames received, excluding control frames
  */
    get rx_bcast_data_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_bcast_data_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored unicast frames received, excluding control frames
  */
    get rx_ucast_data_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_ucast_data_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored multicast control frames received
  */
    get rx_mcast_ctrl_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_mcast_ctrl_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored broadcast control frames received
  */
    get rx_bcast_ctrl_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_bcast_ctrl_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored unicast control frames received
  */
    get rx_ucast_ctrl_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_ucast_ctrl_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored pause frames received
  */
    get rx_pause_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_pause_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of 64-byte received frames, including the CRC field but excluding
    the preamble and SFD bytes
  */
    get rx_64b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_64b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received frames between 65-127 bytes
  */
    get rx_65to127b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_65to127b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received frames between 128-255 bytes
  */
    get rx_128to255b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_128to255b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received frames between 256-511 bytes
  */
    get rx_256to511b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_256to511b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received frames between 512 –1023 bytes
  */
    get rx_512to1023b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_512to1023b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received frames between 1024–1518 bytes
  */
    get rx_1024to1518b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_1024to1518b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received frames between 1519-1536 bytes
  */
    get rx_1519to1536b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_1519to1536b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of oversized frames received
  */
    get rx_oversize(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_oversize" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid multicast frames received, excluding control frames
  */
    get rx_mcast_data_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_mcast_data_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid broadcast frames received, excluding control frames
  */
    get rx_bcast_data_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_bcast_data_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid unicast frames received, excluding control frames
  */
    get rx_ucast_data_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_ucast_data_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid multicast frames received, excluding data frames
  */
    get rx_mcast_ctrl_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_mcast_ctrl_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid broadcast frames received, excluding data frames
  */
    get rx_bcast_ctrl_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_bcast_ctrl_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid unicast frames received, excluding data frames
  */
    get rx_ucast_ctrl_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_ucast_ctrl_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received pause frames, with or without error
  */
    get rx_pause(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_pause" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received runt packets
  */
    get rx_runt(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_runt" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of RX frame starts
  */
    get rx_st(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_st" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of RX length errors
  */
    get rx_lenerr(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_lenerr" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of RX PFC frame with CRC error
  */
    get rx_pfc_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_pfc_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of RX PFC frames without error
  */
    get rx_pfc(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_pfc" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of received payload bytes in frames with no FCS, undersized,
    oversized, or payload length errors, VLAN/SVLAN header bytes are removed
    from the count
  */
    get rx_payload_octetsok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.BytesCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.BytesCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_payload_octetsok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.BytesCounter,
        lower: VAPI.EthernetStats.lower.BytesCounter,
      });
    }

    /**
    Number of received bytes in frames with no FCS, undersized, oversized, or
    payload length errors
  */
    get rx_frame_octetsok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.BytesCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.BytesCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_frame_octetsok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.BytesCounter,
        lower: VAPI.EthernetStats.lower.BytesCounter,
      });
    }

    /**
    Number of corrected FEC errors
  */
    get rx_rsfec_corr(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.EventsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.EventsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_rsfec_corr" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.EventsCounter,
        lower: VAPI.EthernetStats.lower.EventsCounter,
      });
    }

    /**
    Number of uncorrected FEC errors
  */
    get rx_rsfec_uncorr(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.EventsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.EventsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_rsfec_uncorr" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.EventsCounter,
        lower: VAPI.EthernetStats.lower.EventsCounter,
      });
    }

    /**
    Number of IP frames received with errors in the IP header
  */
    get rx_ip_hdr_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_ip_hdr_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of IPv4 frames received with wrong header checksum
  */
    get rx_ipv4_chksum_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_ipv4_chksum_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of fragmented IP received
  */
    get rx_fragmented(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_fragmented" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of IP frames received with wrong total length
  */
    get rx_ip_totlen_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_ip_totlen_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of UDP frames received with wrong total length
  */
    get rx_udp_totlen_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_udp_totlen_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of UDP frames received with wrong checksum
  */
    get rx_udp_chksum_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_udp_chksum_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of truncated UDP frames received
  */
    get rx_udp_length_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "rx_udp_length_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted frames less than 64 bytes and reporting a CRC error
  */
    get tx_fragments(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_fragments" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted oversized frames reporting a CRC error
  */
    get tx_jabbers(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_jabbers" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted packets with FCS errors
  */
    get tx_fcserr(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_fcserr" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted frames with a frame of length at least 64, with CRC
    error
  */
    get tx_crcerr_okpkt(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_crcerr_okpkt" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored multicast frames transmitted, excluding control frames
  */
    get tx_mcast_data_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_mcast_data_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored broadcast frames transmitted, excluding control frames
  */
    get tx_bcast_data_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_bcast_data_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored unicast frames transmitted, excluding control frames
  */
    get tx_ucast_data_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_ucast_data_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored multicast control frames transmitted
  */
    get tx_mcast_ctrl_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_mcast_ctrl_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored broadcast control frames transmitted
  */
    get tx_bcast_ctrl_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_bcast_ctrl_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored unicast control frames transmitted
  */
    get tx_ucast_ctrl_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_ucast_ctrl_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of errored pause frames transmitted
  */
    get tx_pause_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_pause_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of 64-byte transmitted frames, including the CRC field but
    excluding the preamble and SFD bytes
  */
    get tx_64b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_64b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted frames between 65-127 bytes
  */
    get tx_65to127b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_65to127b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted frames between 128-255 bytes
  */
    get tx_128to255b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_128to255b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted frames between 256-511 bytes
  */
    get tx_256to511b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_256to511b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted frames between 512 –1023 bytes
  */
    get tx_512to1023b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_512to1023b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted frames between 1024–1518 bytes
  */
    get tx_1024to1518b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_1024to1518b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted frames between 1519-1536 bytes
  */
    get tx_1519to1536b(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_1519to1536b" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of oversized frames transmitted
  */
    get tx_oversize(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_oversize" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid multicast frames transmitted, excluding control frames
  */
    get tx_mcast_data_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_mcast_data_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid broadcast frames transmitted, excluding control frames
  */
    get tx_bcast_data_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_bcast_data_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid unicast frames transmitted, excluding control frames
  */
    get tx_ucast_data_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_ucast_data_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid multicast frames transmitted, excluding data frames
  */
    get tx_mcast_ctrl_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_mcast_ctrl_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid broadcast frames transmitted, excluding data frames
  */
    get tx_bcast_ctrl_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_bcast_ctrl_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of valid unicast frames transmitted, excluding data frames
  */
    get tx_ucast_ctrl_ok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_ucast_ctrl_ok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted pause frames, with or without error
  */
    get tx_pause(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_pause" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted runt packets
  */
    get tx_runt(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_runt" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of TX frame starts
  */
    get tx_st(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_st" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of TX length errors
  */
    get tx_lenerr(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_lenerr" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of TX PFC frame with CRC error
  */
    get tx_pfc_err(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_pfc_err" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of TX PFC frames without error
  */
    get tx_pfc(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.PacketsCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.PacketsCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_pfc" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.PacketsCounter,
        lower: VAPI.EthernetStats.lower.PacketsCounter,
      });
    }

    /**
    Number of transmitted payload bytes in frames with no FCS, undersized,
    oversized, or payload length errors, VLAN/SVLAN header bytes are removed
    from the count
  */
    get tx_payload_octetsok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.BytesCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.BytesCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_payload_octetsok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.BytesCounter,
        lower: VAPI.EthernetStats.lower.BytesCounter,
      });
    }

    /**
    Number of transmitted bytes in frames with no FCS, undersized, oversized,
    or payload length errors
  */
    get tx_frame_octetsok(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.EthernetStats.BytesCounter,
      VAPI.AT1130.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.EthernetStats.BytesCounter,
        VAPI.AT1130.EthernetStats.PortStatistics
      >(this, "tx_frame_octetsok" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.BytesCounter,
        lower: VAPI.EthernetStats.lower.BytesCounter,
      });
    }
  }
}
export namespace Genlock {
  export const lift = {
    AT1130Genlock: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AT1130Genlock(_raw),
    AT1130GenlockBackend: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AT1130GenlockBackend(_raw),
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    SingleGenlockState: (
      _raw: [
        VAPI.Servos.State,
        [number, number, number, number, number, number, number],
        null | [number | string, number, number],
        (
          | null
          | [[number, number, number, number], [number, number, number, number]]
        ),
        number,
      ],
      _socket: VScript.VSocket,
    ): SingleGenlockState => {
      return {
        state: _raw[0],
        counters: VAPI.Servos.lift.Counters(_raw[1], _socket),
        anchor:
          _raw[2] === null ? null : VAPI.Genlock.lift.Anchor(_raw[2], _socket),
        position:
          _raw[3] === null
            ? null
            : VAPI.Genlock.lift.GenlockPosition(_raw[3], _socket),
        slew_rate: _raw[4],
      };
    },
    AT1130GenlockBackendDtNodes: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new AT1130GenlockBackendDtNodes(_raw),
    AT1130GenlockBackendLanes: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new AT1130GenlockBackendLanes(_raw),
    AT1130GenlockSettings: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AT1130GenlockSettings(_raw),
  } as const;
  export const lower = {
    AT1130Genlock: (_x: AT1130Genlock) => _x.raw.kwl,
    AT1130GenlockBackend: (_x: AT1130GenlockBackend) => _x.raw.kwl,
    All: (_x: All) => _x.raw.kwl,
    SingleGenlockState: (
      _x: {
        state: VAPI.Servos.State;

        /**
              counter values may be negative to indicate deviations beyond
              the holdover threshold
            */
        counters: VAPI.Servos.Counters;
        anchor: null | VAPI.Genlock.Anchor;
        position: null | VAPI.Genlock.GenlockPosition;
        slew_rate: number;
      },
      _socket: VScript.VSocket,
    ): [
      VAPI.Servos.State,
      [number, number, number, number, number, number, number],
      null | [number | string, number, number],
      (
        | null
        | [[number, number, number, number], [number, number, number, number]]
      ),
      number,
    ] => [
      _x.state,
      VAPI.Servos.lower.Counters(_x.counters, _socket),
      _x.anchor === null ? null : VAPI.Genlock.lower.Anchor(_x.anchor, _socket),
      _x.position === null
        ? null
        : VAPI.Genlock.lower.GenlockPosition(_x.position, _socket),
      _x.slew_rate,
    ],
    AT1130GenlockBackendDtNodes: (_x: AT1130GenlockBackendDtNodes) =>
      _x.raw.kwl,
    AT1130GenlockBackendLanes: (_x: AT1130GenlockBackendLanes) => _x.raw.kwl,
    AT1130GenlockSettings: (_x: AT1130GenlockSettings) => _x.raw.kwl,
  } as const;
  export class AT1130Genlock
    implements VScript.Referenceable<"Genlock::Data::AT1130Genlock">
  {
    readonly type_identifier = "Genlock::Data::AT1130Genlock" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.Genlock.AT1130Genlock
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.Genlock.AT1130Genlock
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.Genlock.AT1130Genlock
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.Genlock.AT1130Genlock
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get settings() {
      return VAPI.AT1130.Genlock.lift.AT1130GenlockSettings(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "settings"),
      );
    }
    get backend() {
      return VAPI.AT1130.Genlock.lift.AT1130GenlockBackend(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "backend"),
      );
    }
  }
  export class AT1130GenlockBackend
    implements VScript.Referenceable<"Genlock::Data::AT1130GenlockBackend">
  {
    readonly type_identifier = "Genlock::Data::AT1130GenlockBackend" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get lanes() {
      return VAPI.AT1130.Genlock.lift.AT1130GenlockBackendLanes(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "lanes"),
      );
    }
    get dt_nodes() {
      return VAPI.AT1130.Genlock.lift.AT1130GenlockBackendDtNodes(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "dt_nodes"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "ptp_traits"),
      );
    }

    /**
    Most clock control units continuously adjust their target's operating
    frequency until the time and/or frequency offset between source and
    target matches a user-defined value. These units require no data beyond
    frame rate, source type, frequency offset and offset.
    
    However, other clock operations implicitly guarantee synchronicity by
    rigidly linking their target's operating frequency to the source
    frequency. This implicit link may be broken when the timing source
    changes discontinuously. For example, an uncalibrated PTP clock may
    perform arbitrarily large offset and/or frequency jumps, yet after
    reachieving calibration will again report its offset to the internal PTP
    reference frame as 0.0 ± 0.0. To signal such 'timing shocks' to
    consumers, every timing source performing discontinuous changes in a way
    that breaks implicit synchronicity has to increase its continuity_index
    (with wraparound behaviour in the unlikely case of overflow).
  */
    get continuity_index(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.PTP.ContinuityIndex,
      VAPI.AT1130.Genlock.AT1130GenlockBackend
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.PTP.ContinuityIndex,
        VAPI.AT1130.Genlock.AT1130GenlockBackend
      >(this, "continuity_index" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "output"),
      );
    }
  }
  export class All implements VScript.Referenceable<"Genlock::Data::All"> {
    readonly type_identifier = "Genlock::Data::All" as const;
    get runtime_constants() {
      return {
        num_physical_audio_genlocks:
          this.raw.backing_store.get_runtime_constant(
            "Genlock::num_physical_audio_genlocks",
          ) as number,
        num_physical_video_genlocks:
          this.raw.backing_store.get_runtime_constant(
            "Genlock::num_physical_video_genlocks",
          ) as number,
        num_video_genlocks: this.raw.backing_store.get_runtime_constant(
          "Genlock::num_video_genlocks",
        ) as number,
        num_audio_genlocks: this.raw.backing_store.get_runtime_constant(
          "Genlock::num_audio_genlocks",
        ) as number,
        num_genlocks: this.raw.backing_store.get_runtime_constant(
          "Genlock::num_genlocks",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get instances() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Genlock::Data::AT1130Genlock",
        VAPI.AT1130.Genlock.AT1130Genlock
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.Genlock.lift.AT1130Genlock(st),
      );
    }
    get analog_ref_mgmt() {
      return VAPI.AT1130.Time.lift.AnalogReference(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "analog_ref_mgmt",
        ),
      );
    }
  }
  export interface SingleGenlockState {
    state: VAPI.Servos.State;

    /**
    counter values may be negative to indicate deviations beyond the holdover
    threshold
  */
    counters: VAPI.Servos.Counters;
    anchor: null | VAPI.Genlock.Anchor;
    position: null | VAPI.Genlock.GenlockPosition;
    slew_rate: number;
  }
  export class AT1130GenlockBackendDtNodes
    implements
      VScript.Referenceable<"Genlock::Data::AT1130GenlockBackend::DtNodes">
  {
    readonly type_identifier =
      "Genlock::Data::AT1130GenlockBackend::DtNodes" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get audio(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1130.Genlock.AT1130GenlockBackendDtNodes
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1130.Genlock.AT1130GenlockBackendDtNodes
      >(this, "audio" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
      });
    }
    get video(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1130.Genlock.AT1130GenlockBackendDtNodes
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1130.Genlock.AT1130GenlockBackendDtNodes
      >(this, "video" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
      });
    }
  }
  export class AT1130GenlockBackendLanes
    implements
      VScript.Referenceable<"Genlock::Data::AT1130GenlockBackend::Lanes">
  {
    readonly type_identifier =
      "Genlock::Data::AT1130GenlockBackend::Lanes" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get audio(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          VAPI.Servos.State,
          [number, number, number, number, number, number, number],
          null | [number | string, number, number],
          (
            | null
            | [
                [number, number, number, number],
                [number, number, number, number],
              ]
          ),
          number,
        ],
      null | VAPI.AT1130.Genlock.SingleGenlockState,
      VAPI.AT1130.Genlock.AT1130GenlockBackendLanes
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            VAPI.Servos.State,
            [number, number, number, number, number, number, number],
            null | [number | string, number, number],
            (
              | null
              | [
                  [number, number, number, number],
                  [number, number, number, number],
                ]
            ),
            number,
          ],
        null | VAPI.AT1130.Genlock.SingleGenlockState,
        VAPI.AT1130.Genlock.AT1130GenlockBackendLanes
      >(this, "audio" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.Genlock.lift.SingleGenlockState,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.Genlock.lower.SingleGenlockState,
        ),
      });
    }
    get video_f50_ish(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          VAPI.Servos.State,
          [number, number, number, number, number, number, number],
          null | [number | string, number, number],
          (
            | null
            | [
                [number, number, number, number],
                [number, number, number, number],
              ]
          ),
          number,
        ],
      null | VAPI.AT1130.Genlock.SingleGenlockState,
      VAPI.AT1130.Genlock.AT1130GenlockBackendLanes
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            VAPI.Servos.State,
            [number, number, number, number, number, number, number],
            null | [number | string, number, number],
            (
              | null
              | [
                  [number, number, number, number],
                  [number, number, number, number],
                ]
            ),
            number,
          ],
        null | VAPI.AT1130.Genlock.SingleGenlockState,
        VAPI.AT1130.Genlock.AT1130GenlockBackendLanes
      >(this, "video_f50_ish" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.Genlock.lift.SingleGenlockState,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.Genlock.lower.SingleGenlockState,
        ),
      });
    }
    get video_f59_ish(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          VAPI.Servos.State,
          [number, number, number, number, number, number, number],
          null | [number | string, number, number],
          (
            | null
            | [
                [number, number, number, number],
                [number, number, number, number],
              ]
          ),
          number,
        ],
      null | VAPI.AT1130.Genlock.SingleGenlockState,
      VAPI.AT1130.Genlock.AT1130GenlockBackendLanes
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            VAPI.Servos.State,
            [number, number, number, number, number, number, number],
            null | [number | string, number, number],
            (
              | null
              | [
                  [number, number, number, number],
                  [number, number, number, number],
                ]
            ),
            number,
          ],
        null | VAPI.AT1130.Genlock.SingleGenlockState,
        VAPI.AT1130.Genlock.AT1130GenlockBackendLanes
      >(this, "video_f59_ish" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.Genlock.lift.SingleGenlockState,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.Genlock.lower.SingleGenlockState,
        ),
      });
    }
  }
  export class AT1130GenlockSettings
    implements VScript.Referenceable<"Genlock::Data::AT1130Genlock::Settings">
  {
    readonly type_identifier =
      "Genlock::Data::AT1130Genlock::Settings" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get audio() {
      return VAPI.Genlock.lift.SingleGenlockSettings(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "audio"),
      );
    }
    get video() {
      return VAPI.Genlock.lift.SingleGenlockSettings(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "video"),
      );
    }
  }
}
export namespace IOModule {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    TimingAsynchronous: (
      _raw: [VAPI.Audio.Frequency],
      _socket: VScript.VSocket,
    ): TimingAsynchronous => {
      return { frequency: _raw[0] };
    },
    HwStatus: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HwStatus(_raw),
    MADIInput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MADIInput(_raw),
    SDIPayload: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SDIPayload(_raw),
    SDITxPll: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SDITxPll(_raw),
    SDIInput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SDIInput(_raw),
    SDIOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SDIOutput(_raw),
    TimingSynchronousOrSyntonous: (
      _raw: [null | string, VAPI.Audio.Frequency],
      _socket: VScript.VSocket,
    ): TimingSynchronousOrSyntonous => {
      return {
        genlock:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.Genlock.AT1130Genlock(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        frequency: _raw[1],
      };
    },
    Timing: (
      _raw:
        | [0, [null | string, VAPI.Audio.Frequency]]
        | [1, [VAPI.Audio.Frequency]],
      _socket: VScript.VSocket,
    ): Timing => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "SynchronousOrSyntonous",
            value: VAPI.AT1130.IOModule.lift.TimingSynchronousOrSyntonous(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "Asynchronous",
            value: VAPI.AT1130.IOModule.lift.TimingAsynchronous(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    HwStatusEye: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HwStatusEye(_raw),
    Input: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Input(_raw),
    Merger: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Merger(_raw),
    Output: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Output(_raw),
    MergerOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MergerOutput(_raw),
    SyncOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SyncOutput(_raw),
    TxClock: (
      _raw: [VAPI.AT1130.IOModule.TxClockRole, null | string],
      _socket: VScript.VSocket,
    ): TxClock => {
      return {
        role: _raw[0],
        pll:
          _raw[1] === null
            ? null
            : new VAPI.AT1130.IOModule.SDITxPll(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[1] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    WclkOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new WclkOutput(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    TimingAsynchronous: (
      _x: { frequency: VAPI.Audio.Frequency },
      _socket: VScript.VSocket,
    ): [VAPI.Audio.Frequency] => [_x.frequency],
    HwStatus: (_x: HwStatus) => _x.raw.kwl,
    MADIInput: (_x: MADIInput) => _x.raw.kwl,
    SDIPayload: (_x: SDIPayload) => _x.raw.kwl,
    SDITxPll: (_x: SDITxPll) => _x.raw.kwl,
    SDIInput: (_x: SDIInput) => _x.raw.kwl,
    SDIOutput: (_x: SDIOutput) => _x.raw.kwl,
    TimingSynchronousOrSyntonous: (
      _x: {
        genlock: null | VAPI.AT1130.Genlock.AT1130Genlock;
        frequency: VAPI.Audio.Frequency;
      },
      _socket: VScript.VSocket,
    ): [null | string, VAPI.Audio.Frequency] => [
      _x.genlock === null ? null : _x.genlock.raw.kwl,
      _x.frequency,
    ],
    Timing: (
      _x:
        | {
            variant: "SynchronousOrSyntonous";
            value: VAPI.AT1130.IOModule.TimingSynchronousOrSyntonous;
          }
        | {
            variant: "Asynchronous";
            value: VAPI.AT1130.IOModule.TimingAsynchronous;
          },
      _socket: VScript.VSocket,
    ):
      | [0, [null | string, VAPI.Audio.Frequency]]
      | [1, [VAPI.Audio.Frequency]] => {
      switch (_x.variant) {
        case "SynchronousOrSyntonous":
          return [
            0,
            VAPI.AT1130.IOModule.lower.TimingSynchronousOrSyntonous(
              _x.value,
              _socket,
            ),
          ];
        case "Asynchronous":
          return [
            1,
            VAPI.AT1130.IOModule.lower.TimingAsynchronous(_x.value, _socket),
          ];
      }
    },
    HwStatusEye: (_x: HwStatusEye) => _x.raw.kwl,
    Input: (_x: Input) => _x.raw.kwl,
    Merger: (_x: Merger) => _x.raw.kwl,
    Output: (_x: Output) => _x.raw.kwl,
    MergerOutput: (_x: MergerOutput) => _x.raw.kwl,
    SyncOutput: (_x: SyncOutput) => _x.raw.kwl,
    TxClock: (
      _x: {
        role: VAPI.AT1130.IOModule.TxClockRole;
        pll: null | VAPI.AT1130.IOModule.SDITxPll;
      },
      _socket: VScript.VSocket,
    ): [VAPI.AT1130.IOModule.TxClockRole, null | string] => [
      _x.role,
      _x.pll === null ? null : _x.pll.raw.kwl,
    ],
    WclkOutput: (_x: WclkOutput) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"IOModule::Data::All"> {
    readonly type_identifier = "IOModule::Data::All" as const;
    get runtime_constants() {
      return {
        should_deembed_all_metadata:
          this.raw.backing_store.get_runtime_constant(
            "IOModule::should_deembed_all_metadata",
          ) as boolean,
        num_sdi_tx_plls: this.raw.backing_store.get_runtime_constant(
          "IOModule::num_sdi_tx_plls",
        ) as number,
        num_metadata_extractors_per_sdi_input:
          this.raw.backing_store.get_runtime_constant(
            "IOModule::num_metadata_extractors_per_sdi_input",
          ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get info() {
      return VAPI.IOModule.lift.BncMode(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "info"),
      );
    }
    get analog_ref() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "Time::Data::Source",
        VAPI.AT1130.Time.Source
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "analog_ref",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.Time.lift.Source(raw),
      );
    }
    get analog_ref_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "analog_ref_traits",
        ),
      );
    }
    get configuration() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::Configuration",
        VAPI.IOModule.Configuration
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          3,
          "configuration",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.IOModule.lift.Configuration(raw),
      );
    }
    get merger() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::Merger",
        VAPI.AT1130.IOModule.Merger
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 4, "merger"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.IOModule.lift.Merger(raw),
      );
    }
    get output() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::Output",
        VAPI.AT1130.IOModule.Output
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 5, "output"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.IOModule.lift.Output(raw),
      );
    }
    get input() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::Input",
        VAPI.AT1130.IOModule.Input
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 6, "input"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.IOModule.lift.Input(raw),
      );
    }
    get sync_output() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::SyncOutput",
        VAPI.AT1130.IOModule.SyncOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          7,
          "sync_output",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.IOModule.lift.SyncOutput(raw),
      );
    }
    get wclk_output() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::WclkOutput",
        VAPI.AT1130.IOModule.WclkOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          8,
          "wclk_output",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.IOModule.lift.WclkOutput(raw),
      );
    }
    get sdi_tx_plls() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "IOModule::Data::SDITxPll",
        VAPI.AT1130.IOModule.SDITxPll
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          9,
          "sdi_tx_plls",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.IOModule.lift.SDITxPll(st),
      );
    }
  }
  export interface TimingAsynchronous {
    frequency: VAPI.Audio.Frequency;
  }
  export class HwStatus
    implements VScript.Referenceable<"IOModule::Data::HwStatus">
  {
    readonly type_identifier = "IOModule::Data::HwStatus" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get timestamped_signature(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, Array<number>],
      null | VAPI.Video.TimestampedSignature,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, Array<number>],
        null | VAPI.Video.TimestampedSignature,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "timestamped_signature" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Video.lift.TimestampedSignature,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Video.lower.TimestampedSignature,
        ),
      });
    }
    get irq_index(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "irq_index" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get deemb_read_overflow(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "deemb_read_overflow" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get deemb_read_underflow(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "deemb_read_underflow" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get deemb_read_running(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "deemb_read_running" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get phy_rx_locked_status(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.IOModule.DecoderGroupPhyRxLockedStatus,
      null | VAPI.IOModule.DecoderGroupPhyRxLockedStatus,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.IOModule.DecoderGroupPhyRxLockedStatus,
        null | VAPI.IOModule.DecoderGroupPhyRxLockedStatus,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "phy_rx_locked_status" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get phy_rx_calibrate_busy(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.IOModule.DecoderGroupPhyRxCalibrateBusy,
      null | VAPI.IOModule.DecoderGroupPhyRxCalibrateBusy,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.IOModule.DecoderGroupPhyRxCalibrateBusy,
        null | VAPI.IOModule.DecoderGroupPhyRxCalibrateBusy,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "phy_rx_calibrate_busy" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get phy_rx_locked_status_changed(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter16,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "phy_rx_locked_status_changed" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get smpte_352_c(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.Primitives.Unsigned32,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "smpte_352_c" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get smpte_352_y(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.Primitives.Unsigned32,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "smpte_352_y" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get h_blank(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "h_blank" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get h_blank_changed(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter16,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "h_blank_changed" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get h_active(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "h_active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get h_active_changed(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter16,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "h_active_changed" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get f_period(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "f_period" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftNanoseconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerNanoseconds,
        ),
      });
    }
    get interlace(): VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "interlace" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get substream_2_s_i(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.SubStream2SI,
      null | VAPI.Video.SubStream2SI,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.SubStream2SI,
        null | VAPI.Video.SubStream2SI,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "substream_2_s_i" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get input_substream(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.SubStream,
      null | VAPI.Video.SubStream,
      VAPI.AT1130.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.SubStream,
        null | VAPI.Video.SubStream,
        VAPI.AT1130.IOModule.HwStatus
      >(this, "input_substream" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get eye() {
      return VAPI.AT1130.IOModule.lift.HwStatusEye(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 19, "eye"),
      );
    }
  }
  export class MADIInput
    implements VScript.Referenceable<"IOModule::Data::MADIInput">
  {
    readonly type_identifier = "IOModule::Data::MADIInput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.IOModule.MADIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.IOModule.MADIInput
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fifo_underflow_counter(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.SaturatingCounter16,
      VAPI.AT1130.IOModule.MADIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.SaturatingCounter16,
        VAPI.AT1130.IOModule.MADIInput
      >(this, "fifo_underflow_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fifo_overflow_counter(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.SaturatingCounter16,
      VAPI.AT1130.IOModule.MADIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.SaturatingCounter16,
        VAPI.AT1130.IOModule.MADIInput
      >(this, "fifo_overflow_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get clear_fifo_error_counters(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.IOModule.MADIInput
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.IOModule.MADIInput
      >(
        this,
        "clear_fifo_error_counters" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "output"),
      );
    }
  }
  export class SDIPayload
    implements VScript.Referenceable<"IOModule::Data::SDIPayload">
  {
    readonly type_identifier = "IOModule::Data::SDIPayload" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "audio"),
      );
    }
    get afd(): VScript.rKeyword<
      VScript.VSocket,
      null | [VAPI.Video.AspectRatio, number, number, number, number, number],
      null | VAPI.Video.AFD,
      VAPI.AT1130.IOModule.SDIPayload
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [VAPI.Video.AspectRatio, number, number, number, number, number],
        null | VAPI.Video.AFD,
        VAPI.AT1130.IOModule.SDIPayload
      >(this, "afd" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(VAPI.Video.lift.AFD),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(VAPI.Video.lower.AFD),
      });
    }
    get cc() {
      return VAPI.Video.lift.ClosedCaption(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "cc"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "ptp_traits"),
      );
    }
  }
  export class SDITxPll
    implements VScript.Referenceable<"IOModule::Data::SDITxPll">
  {
    readonly type_identifier = "IOModule::Data::SDITxPll" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get dt_node(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1130.IOModule.SDITxPll
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1130.IOModule.SDITxPll
      >(this, "dt_node" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
      });
    }
    get servo(): VScript.rKeyword<
      VScript.VSocket,
      [
        VAPI.Servos.State,
        null | number,
        number,
        number,
        (
          | null
          | [
              [number, number, number, number],
              null | [number, number, number, number],
            ]
        ),
        [number, number, number, number, number, number, number],
        number,
      ],
      VAPI.Servos.Metrics,
      VAPI.AT1130.IOModule.SDITxPll
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.Servos.State,
          null | number,
          number,
          number,
          (
            | null
            | [
                [number, number, number, number],
                null | [number, number, number, number],
              ]
          ),
          [number, number, number, number, number, number, number],
          number,
        ],
        VAPI.Servos.Metrics,
        VAPI.AT1130.IOModule.SDITxPll
      >(this, "servo" as VScript.SysName, {
        lift: VAPI.Servos.lift.Metrics,
        lower: VAPI.Servos.lower.Metrics,
      });
    }
    get num_resets(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter32,
      VAPI.AT1130.IOModule.SDITxPll
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter32,
        VAPI.AT1130.IOModule.SDITxPll
      >(this, "num_resets" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class SDIInput
    implements VScript.Referenceable<"IOModule::Data::SDIInput">
  {
    readonly type_identifier = "IOModule::Data::SDIInput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get override_pixel_format(): VScript.rwKeyword<
      VScript.VSocket,
      [
        VAPI.Video.OverrideColorSpace,
        VAPI.Video.OverrideBitDepth,
        VAPI.Video.OverrideTransferCharacteristics,
      ],
      [
        VAPI.Video.OverrideColorSpace,
        VAPI.Video.OverrideBitDepth,
        VAPI.Video.OverrideTransferCharacteristics,
      ],
      VAPI.Video.OverridePixelFormat,
      VAPI.Video.OverridePixelFormat,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        [
          VAPI.Video.OverrideColorSpace,
          VAPI.Video.OverrideBitDepth,
          VAPI.Video.OverrideTransferCharacteristics,
        ],
        [
          VAPI.Video.OverrideColorSpace,
          VAPI.Video.OverrideBitDepth,
          VAPI.Video.OverrideTransferCharacteristics,
        ],
        VAPI.Video.OverridePixelFormat,
        VAPI.Video.OverridePixelFormat,
        VAPI.AT1130.IOModule.SDIInput
      >(
        this,
        "override_pixel_format" as VScript.SysName,
        {
          lift: VAPI.Video.lift.OverridePixelFormat,
          lower: VAPI.Video.lower.OverridePixelFormat,
        },
        {
          lift: VAPI.Video.lift.OverridePixelFormat,
          lower: VAPI.Video.lower.OverridePixelFormat,
        },
        null,
      );
    }
    get sub_stream(): VScript.dKeyword<
      VScript.VSocket,
      null | VAPI.Video.SubStream,
      null | VAPI.Video.SubStream,
      null | VAPI.Video.SubStream,
      null | VAPI.Video.SubStream,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | VAPI.Video.SubStream,
        null | VAPI.Video.SubStream,
        null | VAPI.Video.SubStream,
        null | VAPI.Video.SubStream,
        VAPI.AT1130.IOModule.SDIInput
      >(
        this,
        "sub_stream" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    How to deembed audio from 12G SDI inputs
  */
    get audio_12g_mode(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.IOModule.Audio12GMode,
      VAPI.IOModule.Audio12GMode,
      VAPI.IOModule.Audio12GMode,
      VAPI.IOModule.Audio12GMode,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.IOModule.Audio12GMode,
        VAPI.IOModule.Audio12GMode,
        VAPI.IOModule.Audio12GMode,
        VAPI.IOModule.Audio12GMode,
        VAPI.AT1130.IOModule.SDIInput
      >(
        this,
        "audio_12g_mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Which closed caption format to decode on input
  */
    get cc_mode(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.IOModule.ClosedCaptionDeembedMode,
      null | VAPI.IOModule.ClosedCaptionDeembedMode,
      null | VAPI.IOModule.ClosedCaptionDeembedMode,
      null | VAPI.IOModule.ClosedCaptionDeembedMode,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.IOModule.ClosedCaptionDeembedMode,
        null | VAPI.IOModule.ClosedCaptionDeembedMode,
        null | VAPI.IOModule.ClosedCaptionDeembedMode,
        null | VAPI.IOModule.ClosedCaptionDeembedMode,
        VAPI.AT1130.IOModule.SDIInput
      >(
        this,
        "cc_mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Which line 21 field to decode in CEA708 mode
  */
    get cc_field(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.Video.CEA608Field,
      VAPI.Video.CEA608Field,
      VAPI.Video.CEA608Field,
      VAPI.Video.CEA608Field,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.Video.CEA608Field,
        VAPI.Video.CEA608Field,
        VAPI.Video.CEA608Field,
        VAPI.Video.CEA608Field,
        VAPI.AT1130.IOModule.SDIInput
      >(
        this,
        "cc_field" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get cc_channel(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.Video.ClosedCaptionChannel,
      null | VAPI.Video.ClosedCaptionChannel,
      null | VAPI.Video.ClosedCaptionChannel,
      null | VAPI.Video.ClosedCaptionChannel,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.Video.ClosedCaptionChannel,
        null | VAPI.Video.ClosedCaptionChannel,
        null | VAPI.Video.ClosedCaptionChannel,
        null | VAPI.Video.ClosedCaptionChannel,
        VAPI.AT1130.IOModule.SDIInput
      >(
        this,
        "cc_channel" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get hw_status() {
      return VAPI.AT1130.IOModule.lift.HwStatus(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "hw_status"),
      );
    }
    get output() {
      return VAPI.AT1130.IOModule.lift.SDIPayload(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "output"),
      );
    }
    get mode(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.Video.BNCInputFreq,
      VAPI.Video.BNCInputFreq,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.Video.BNCInputFreq,
        VAPI.Video.BNCInputFreq,
        VAPI.AT1130.IOModule.SDIInput
      >(this, "mode" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get supports_12g(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.IOModule.SDIInput
      >(this, "supports_12g" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    All audio groups which are part of the gang mode are started / stopped
    together. This ensures consistent audio phase for all these groups. All
    enabled groups must be present before de-embedding starts, and when one
    group encounters errors all are reset.
  */
    get deembedder_gang(): VScript.rwKeyword<
      VScript.VSocket,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      Array<boolean>,
      VScript.MaybeSparseArray<boolean>,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1130.IOModule.SDIInput
      >(
        this,
        "deembedder_gang" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }

    /**
    @brief restart deembedder
    @desc Restart audio deembedder to synchronize the groups
  */
    get restart_deembedder(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.IOModule.SDIInput
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.IOModule.SDIInput
      >(
        this,
        "restart_deembedder" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get metadata_extractor() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "MetadataProcessor::Data::MetadataExtractor",
        VAPI.AT1130.MetadataProcessor.MetadataExtractor
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          12,
          "metadata_extractor",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.MetadataProcessor.lift.MetadataExtractor(raw),
      );
    }
  }
  export class SDIOutput
    implements VScript.Referenceable<"IOModule::Data::SDIOutput">
  {
    readonly type_identifier = "IOModule::Data::SDIOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get constraints() {
      return VAPI.IOModule.lift.Constraints(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "constraints"),
      );
    }
    get sub_stream(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.SubStream,
      null | VAPI.Video.SubStream,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.SubStream,
        null | VAPI.Video.SubStream,
        VAPI.AT1130.IOModule.SDIOutput
      >(this, "sub_stream" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.IOModule.SDIOutput
      >(this, "standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get supports_12g(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.IOModule.SDIOutput
      >(this, "supports_12g" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.IOModule.SDIOutput
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        (
          parent: VAPI.AT1130.IOModule.SDIOutput,
          command: null | VAPI.AT1130.Time.Source,
        ) => (
          void parent,
          void command,
          {
            criterion: "status",
            validator: (status: null | VAPI.AT1130.Time.Source) =>
              command === null || VScript.same(command, status),
          }
        ),
      );
    }
    get v_src(): VScript.dKeyword<
      VScript.VSocket,
      [null | string, null | number | string],
      [null | string, null | number | string],
      VAPI.AT1130.Video.TimedSource,
      VAPI.AT1130.Video.TimedSource,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1130.Video.TimedSource,
        VAPI.AT1130.Video.TimedSource,
        VAPI.AT1130.IOModule.SDIOutput
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VAPI.AT1130.Video.lift.TimedSource,
          lower: VAPI.AT1130.Video.lower.TimedSource,
        },
        {
          lift: VAPI.AT1130.Video.lift.TimedSource,
          lower: VAPI.AT1130.Video.lower.TimedSource,
        },
        null,
      );
    }
    get phase_target(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.IOModule.SDIOutput
      >(
        this,
        "phase_target" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get in_phase(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1130.IOModule.SDIOutput
      >(this, "in_phase" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftNanoseconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerNanoseconds,
        ),
      });
    }
    get phase_rst_counter(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter16,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1130.IOModule.SDIOutput
      >(this, "phase_rst_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1130.IOModule.SDIOutputIssues,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1130.IOModule.SDIOutputIssues,
        VAPI.AT1130.IOModule.SDIOutput
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1130.IOModule.SDIOutputIssues => ({
          different_genlocks: (x & 1) !== 0,
          input_out_of_linephaser_range: (x & 2) !== 0,
          missing_t_src: (x & 4) !== 0,
          no_12g_support: (x & 8) !== 0,
          std_mismatch: (x & 16) !== 0,
        }),
        lower: (
          x: VAPI.AT1130.IOModule.SDIOutputIssues,
          _: VScript.VSocket,
        ): number =>
          (x.different_genlocks ? 1 : 0) |
          (x.input_out_of_linephaser_range ? 2 : 0) |
          (x.missing_t_src ? 4 : 0) |
          (x.no_12g_support ? 8 : 0) |
          (x.std_mismatch ? 16 : 0),
      });
    }
    get vanc_control() {
      return VAPI.AT1130.Definitions.lift.VancControl(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 10, "vanc_control"),
      );
    }
    get embedded_audio(): VScript.dKeyword<
      VScript.VSocket,
      Array<VAPI.Definitions.TRSEmbedder>,
      VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
      Array<VAPI.Definitions.TRSEmbedder>,
      VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        Array<VAPI.Definitions.TRSEmbedder>,
        VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
        Array<VAPI.Definitions.TRSEmbedder>,
        VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
        VAPI.AT1130.IOModule.SDIOutput
      >(
        this,
        "embedded_audio" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }

    /**
    Time when the SDI output was last enabled. Changing the standards or
    disconnecting the video source counts as disabling.
  */
    get last_enable_time(): VScript.rKeyword<
      VScript.VSocket,
      null | number | string,
      null | VAPI.Primitives.Timestamp,
      VAPI.AT1130.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number | string,
        null | VAPI.Primitives.Timestamp,
        VAPI.AT1130.IOModule.SDIOutput
      >(this, "last_enable_time" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftTimestamp,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerTimestamp,
        ),
      });
    }
    async set_video_source(
      x: VAPI.AT1130.Video.Essence | VAPI.AT1130.Video.TimedSource | null,
      pars?: { timeout?: VScript.Duration },
    ) {
      const options =
        pars?.timeout !== undefined ? { timeout: pars.timeout } : {};
      let is_null = x === null;
      try {
        if (x === null || x instanceof VAPI.AT1130.Video.Essence) {
          await this.v_src.command.write(
            {
              source: x as null | VAPI.AT1130.Video.Essence, // FIXME: do we really need this cast?
              switch_time: null,
            },
            options,
          );
        } else {
          is_null = x.source === null;
          await this.v_src.command.write(x, options);
        }
        const maybe_essence: VAPI.AT1130.Video.Essence | null =
          x === null
            ? null
            : x instanceof VAPI.AT1130.Video.Essence
              ? x
              : x.source;
        if (maybe_essence !== null) {
          const essence_std = await maybe_essence.standard.read();
          if (essence_std !== null) {
            let invalidated = false;
            const w = await maybe_essence.standard.watch((std) => {
              if (std !== essence_std) invalidated = true;
            });
            try {
              const tx_pll = VScript.enforce_nonnull(
                (
                  await new VAPI.AT1130.IOModule.Output(
                    this.raw
                      .parent as VScript.DataViews.Subtree<VScript.VSocket>,
                  ).tx_clock.wait_until(
                    (maybe_clock) => maybe_clock !== null,
                    options,
                  )
                )?.pll,
              );
              // FIXME: we'd really need to use a massive timeout for far-future
              // switch_time's, or skip the servo.wait_until stage entirely?
              await Promise.all([
                tx_pll.servo.wait_until(
                  (servo) => servo.state === "Calibrated",
                  options,
                ),
                this.standard.wait_until((std) => std === essence_std),
              ]);
            } catch (e) {
              if (!invalidated) throw e;
            } finally {
              w.unwatch();
            }
          }
        }
      } catch (e) {
        const v_src_provides_genlock = async () => {
          VScript.enforce(x !== null);
          const essence = x instanceof VAPI.AT1130.Video.Essence ? x : x.source;
          VScript.enforce(essence !== null);
          return essence.media_clock.genlock.read() !== null;
        };
        if (!(this as any)) {
          throw new Error(
            `Unable to set video source, as the supplied output instance is null. Please make sure the referenced output exists and, if this is a bidirectional IO module, configured to act as an output`,
          );
        } else if (!is_null && (await this.t_src.status.read()) === null) {
          throw new Error(
            `Unable to set video source of ${this.raw.kwl}: please set ${this.raw.kwl}.t_src to something non-null`,
          );
        } else if (
          !is_null &&
          (await new VAPI.AT1130.IOModule.Output(
            this.raw.parent as VScript.DataViews.Subtree<VScript.VSocket>,
          ).tx_clock.read()) === null &&
          (await v_src_provides_genlock()) === false
        ) {
          throw new Error(
            `${this.raw.kwl} has not been assigned a tx_clock; please make sure ${this.raw.kwl}.t_src specifies a valid time source (i.e., one that references a calibrated genlock instance)`,
          );
        } else {
          throw e;
        }
      }
    }
  }
  export interface TimingSynchronousOrSyntonous {
    genlock: null | VAPI.AT1130.Genlock.AT1130Genlock;
    frequency: VAPI.Audio.Frequency;
  }
  export type Timing =
    | {
        variant: "SynchronousOrSyntonous";
        value: VAPI.AT1130.IOModule.TimingSynchronousOrSyntonous;
      }
    | {
        variant: "Asynchronous";
        value: VAPI.AT1130.IOModule.TimingAsynchronous;
      };
  export class HwStatusEye
    implements VScript.Referenceable<"IOModule::Data::HwStatus::Eye">
  {
    readonly type_identifier = "IOModule::Data::HwStatus::Eye" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get eye_measure_time(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.IOModule.HwStatusEye
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.IOModule.HwStatusEye
      >(
        this,
        "eye_measure_time" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }

    /**
    Generate eye diagram
  */
    get generate(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.IOModule.HwStatusEye
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.IOModule.HwStatusEye
      >(
        this,
        "generate" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get progress(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.IOModule.HwStatusEye
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.IOModule.HwStatusEye
      >(this, "progress" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    @brief URL of the eye diagram
    @desc An update to this keyword signals a new eye diagram has been
    generated
  */
    get url(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.IOModule.HwStatusEye
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.IOModule.HwStatusEye
      >(this, "url" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    @brief Measure eye opening only
    @desc Only measure horizontal eye opening (much faster than a full eye)
  */
    get measure_ui(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.IOModule.HwStatusEye
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.IOModule.HwStatusEye
      >(
        this,
        "measure_ui" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get ui_measure_time(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.IOModule.HwStatusEye
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.IOModule.HwStatusEye
      >(
        this,
        "ui_measure_time" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get ui(): VScript.rKeyword<
      VScript.VSocket,
      [null | number, null | number],
      VAPI.IOModule.EyeShape,
      VAPI.AT1130.IOModule.HwStatusEye
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | number, null | number],
        VAPI.IOModule.EyeShape,
        VAPI.AT1130.IOModule.HwStatusEye
      >(this, "ui" as VScript.SysName, {
        lift: VAPI.IOModule.lift.EyeShape,
        lower: VAPI.IOModule.lower.EyeShape,
      });
    }
  }
  export class Input implements VScript.Referenceable<"IOModule::Data::Input"> {
    readonly type_identifier = "IOModule::Data::Input" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get mode(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.IOModule.SDIMADIMode,
      VAPI.IOModule.SDIMADIMode,
      VAPI.IOModule.SDIMADIMode,
      VAPI.IOModule.SDIMADIMode,
      VAPI.AT1130.IOModule.Input
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.AT1130.IOModule.Input
      >(
        this,
        "mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get audio_timing(): VScript.dKeyword<
      VScript.VSocket,
      [0, [null | string, VAPI.Audio.Frequency]] | [1, [VAPI.Audio.Frequency]],
      [0, [null | string, VAPI.Audio.Frequency]] | [1, [VAPI.Audio.Frequency]],
      VAPI.AT1130.IOModule.Timing,
      VAPI.AT1130.IOModule.Timing,
      VAPI.AT1130.IOModule.Input
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        | [0, [null | string, VAPI.Audio.Frequency]]
        | [1, [VAPI.Audio.Frequency]],
        | [0, [null | string, VAPI.Audio.Frequency]]
        | [1, [VAPI.Audio.Frequency]],
        VAPI.AT1130.IOModule.Timing,
        VAPI.AT1130.IOModule.Timing,
        VAPI.AT1130.IOModule.Input
      >(
        this,
        "audio_timing" as VScript.SysName,
        {
          lift: VAPI.AT1130.IOModule.lift.Timing,
          lower: VAPI.AT1130.IOModule.lower.Timing,
        },
        {
          lift: VAPI.AT1130.IOModule.lift.Timing,
          lower: VAPI.AT1130.IOModule.lower.Timing,
        },
        (
          parent: VAPI.AT1130.IOModule.Input,
          command: VAPI.AT1130.IOModule.Timing,
        ) => (
          void parent,
          void command,
          {
            criterion: "status",
            validator: (status: VAPI.AT1130.IOModule.Timing) =>
              (command === null && status === null) ||
              (command !== null &&
                status !== null &&
                command.value.frequency == status.value.frequency &&
                ((command.variant === "SynchronousOrSyntonous" &&
                  status.variant === "SynchronousOrSyntonous" &&
                  (command.value.genlock === null ||
                    VScript.same(
                      command.value.genlock,
                      status.value.genlock,
                    ))) ||
                  (command.variant === "Asynchronous" &&
                    status.variant === "Asynchronous"))),
          }
        ),
      );
    }
    get sdi() {
      return VAPI.AT1130.IOModule.lift.SDIInput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "sdi"),
      );
    }
    get madi() {
      return VAPI.AT1130.IOModule.lift.MADIInput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "madi"),
      );
    }
    get audio_source_slices() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          4,
          "audio_source_slices",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
  }
  export type SDIOutputIssues = {
    different_genlocks: boolean;
    input_out_of_linephaser_range: boolean;
    missing_t_src: boolean;
    no_12g_support: boolean;
    std_mismatch: boolean;
  };
  export type SyncOutputIssues = { missing_t_src: boolean };
  export class Merger
    implements VScript.Referenceable<"IOModule::Data::Merger">
  {
    readonly type_identifier = "IOModule::Data::Merger" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    Merger: combines quad-link-2si signals to a single-link UHD signal. The
    corresponding SDI inputs are declared in `connected_to`. The order of the
    substream is adjusted by the information of the payload identifier. To
    set or reorder the substream, use the `sub_stream` parameter
  */
    get substream_2_s_i(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.IOModule.Merger
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.IOModule.Merger
      >(
        this,
        "substream_2_s_i" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get connected_to() {
      return VAPI.IOModule.lift.MergerConnectedTo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "connected_to"),
      );
    }
    get output() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::Merger::Output",
        VAPI.AT1130.IOModule.MergerOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "output"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.IOModule.lift.MergerOutput(raw),
      );
    }
  }
  export class Output
    implements VScript.Referenceable<"IOModule::Data::Output">
  {
    readonly type_identifier = "IOModule::Data::Output" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get mode(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.IOModule.SDIMADIMode,
      VAPI.IOModule.SDIMADIMode,
      VAPI.IOModule.SDIMADIMode,
      VAPI.IOModule.SDIMADIMode,
      VAPI.AT1130.IOModule.Output
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.AT1130.IOModule.Output
      >(
        this,
        "mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Number of times since last enable the output FIFO had to resync (sampled
    only every 100ms)
  */
    get resync_counter(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter32,
      VAPI.AT1130.IOModule.Output
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter32,
        VAPI.AT1130.IOModule.Output
      >(this, "resync_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get sdi() {
      return VAPI.AT1130.IOModule.lift.SDIOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "sdi"),
      );
    }
    get madi() {
      return VAPI.IOModule.lift.MADIOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "madi"),
      );
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      [null | string, null | number | string],
      [null | string, null | number | string],
      VAPI.AT1130.Audio.TimedSource,
      VAPI.AT1130.Audio.TimedSource,
      VAPI.AT1130.IOModule.Output
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1130.Audio.TimedSource,
        VAPI.AT1130.Audio.TimedSource,
        VAPI.AT1130.IOModule.Output
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VAPI.AT1130.Audio.lift.TimedSource,
          lower: VAPI.AT1130.Audio.lower.TimedSource,
        },
        {
          lift: VAPI.AT1130.Audio.lift.TimedSource,
          lower: VAPI.AT1130.Audio.lower.TimedSource,
        },
        null,
      );
    }
    get peak_meter(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Audio.PeakMeter>,
      VAPI.AT1130.IOModule.Output
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1130.IOModule.Output
      >(this, "peak_meter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get tx_pll_group(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.IOModule.Output
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.IOModule.Output
      >(this, "tx_pll_group" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get tx_clock(): VScript.rKeyword<
      VScript.VSocket,
      null | [VAPI.AT1130.IOModule.TxClockRole, null | string],
      null | VAPI.AT1130.IOModule.TxClock,
      VAPI.AT1130.IOModule.Output
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [VAPI.AT1130.IOModule.TxClockRole, null | string],
        null | VAPI.AT1130.IOModule.TxClock,
        VAPI.AT1130.IOModule.Output
      >(this, "tx_clock" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.IOModule.lift.TxClock,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.IOModule.lower.TxClock,
        ),
      });
    }
  }
  export class MergerOutput
    implements VScript.Referenceable<"IOModule::Data::Merger::Output">
  {
    readonly type_identifier = "IOModule::Data::Merger::Output" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::Essence",
        VAPI.AT1130.Audio.Essence
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 1, "audio"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.Audio.lift.Essence(st),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "ptp_traits"),
      );
    }
  }
  export type TxClockRole = "Master" | "Slave";
  export class SyncOutput
    implements VScript.Referenceable<"IOModule::Data::SyncOutput">
  {
    readonly type_identifier = "IOModule::Data::SyncOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get standard(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.IOModule.SyncOutputStandard,
      null | VAPI.IOModule.SyncOutputStandard,
      null | VAPI.IOModule.SyncOutputStandard,
      null | VAPI.IOModule.SyncOutputStandard,
      VAPI.AT1130.IOModule.SyncOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.IOModule.SyncOutputStandard,
        null | VAPI.IOModule.SyncOutputStandard,
        null | VAPI.IOModule.SyncOutputStandard,
        null | VAPI.IOModule.SyncOutputStandard,
        VAPI.AT1130.IOModule.SyncOutput
      >(
        this,
        "standard" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.IOModule.SyncOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.IOModule.SyncOutput
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get phase_rst_counter(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter32,
      VAPI.AT1130.IOModule.SyncOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter32,
        VAPI.AT1130.IOModule.SyncOutput
      >(this, "phase_rst_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Number of times since last enable the output FIFO had to resync (sampled
    only every 100ms)
  */
    get resync_counter(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter32,
      VAPI.AT1130.IOModule.SyncOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter32,
        VAPI.AT1130.IOModule.SyncOutput
      >(this, "resync_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1130.IOModule.SyncOutputIssues,
      VAPI.AT1130.IOModule.SyncOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1130.IOModule.SyncOutputIssues,
        VAPI.AT1130.IOModule.SyncOutput
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1130.IOModule.SyncOutputIssues => ({
          missing_t_src: (x & 1) !== 0,
        }),
        lower: (
          x: VAPI.AT1130.IOModule.SyncOutputIssues,
          _: VScript.VSocket,
        ): number => (x.missing_t_src ? 1 : 0),
      });
    }
    get tx_pll_group(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.IOModule.SyncOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.IOModule.SyncOutput
      >(this, "tx_pll_group" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get tx_clock(): VScript.rKeyword<
      VScript.VSocket,
      null | [VAPI.AT1130.IOModule.TxClockRole, null | string],
      null | VAPI.AT1130.IOModule.TxClock,
      VAPI.AT1130.IOModule.SyncOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [VAPI.AT1130.IOModule.TxClockRole, null | string],
        null | VAPI.AT1130.IOModule.TxClock,
        VAPI.AT1130.IOModule.SyncOutput
      >(this, "tx_clock" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.IOModule.lift.TxClock,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.IOModule.lower.TxClock,
        ),
      });
    }
  }
  export interface TxClock {
    role: VAPI.AT1130.IOModule.TxClockRole;
    pll: null | VAPI.AT1130.IOModule.SDITxPll;
  }
  export class WclkOutput
    implements VScript.Referenceable<"IOModule::Data::WclkOutput">
  {
    readonly type_identifier = "IOModule::Data::WclkOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get source(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Genlock.AT1130Genlock,
      | null
      | (VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.IOModule.WclkOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Genlock.AT1130Genlock,
        | null
        | (VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.IOModule.WclkOutput
      >(
        this,
        "source" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Genlock.AT1130Genlock(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Genlock.AT1130Genlock(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Genlock::Data::AT1130Genlock"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
  }
}
export namespace J2KDecoder {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    J2KDecoderChannel: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new J2KDecoderChannel(_raw),
    J2KDecoderRuntime: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new J2KDecoderRuntime(_raw),
    J2KDecoderVideoRuntime: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new J2KDecoderVideoRuntime(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    J2KDecoderChannel: (_x: J2KDecoderChannel) => _x.raw.kwl,
    J2KDecoderRuntime: (_x: J2KDecoderRuntime) => _x.raw.kwl,
    J2KDecoderVideoRuntime: (_x: J2KDecoderVideoRuntime) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"J2KDecoder::Data::All"> {
    readonly type_identifier = "J2KDecoder::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get decoders() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "J2KDecoder::Data::J2KDecoderChannel",
        VAPI.AT1130.J2KDecoder.J2KDecoderChannelAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "decoders",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.J2KDecoder.J2KDecoderChannelAsNamedTableRow(raw),
      );
    }
    get statistics() {
      return VAPI.J2KDecoder.lift.J2KDecoderStatistics(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "statistics"),
      );
    }
  }
  export class J2KDecoderChannel
    implements VScript.Referenceable<"J2KDecoder::Data::J2KDecoderChannel">
  {
    readonly type_identifier = "J2KDecoder::Data::J2KDecoderChannel" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get configuration() {
      return VAPI.J2KDecoder.lift.J2KDecoderConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "configuration"),
      );
    }
    get runtime() {
      return VAPI.AT1130.J2KDecoder.lift.J2KDecoderRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "runtime"),
      );
    }
  }
  export class J2KDecoderChannelAsNamedTableRow extends J2KDecoderChannel {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class J2KDecoderRuntime
    implements VScript.Referenceable<"J2KDecoder::Data::J2KDecoderRuntime">
  {
    readonly type_identifier = "J2KDecoder::Data::J2KDecoderRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get rtp() {
      return VAPI.J2KDecoder.lift.J2KDecoderRTPRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "rtp"),
      );
    }
    get mpt2() {
      return VAPI.J2KDecoder.lift.J2KDecoderMPT2Runtime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "mpt2"),
      );
    }
    get j2k() {
      return VAPI.J2KDecoder.lift.J2KDecoderJ2KRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "j2k"),
      );
    }
    get video() {
      return VAPI.AT1130.J2KDecoder.lift.J2KDecoderVideoRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "video"),
      );
    }
    get audio() {
      return VAPI.J2KDecoder.lift.J2KDecoderAudioRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "audio"),
      );
    }
    get metadata() {
      return VAPI.J2KDecoder.lift.J2KDecoderMetadataRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "metadata"),
      );
    }
  }
  export class J2KDecoderVideoRuntime
    implements VScript.Referenceable<"J2KDecoder::Data::J2KDecoderVideoRuntime">
  {
    readonly type_identifier =
      "J2KDecoder::Data::J2KDecoderVideoRuntime" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video_standard(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.Video.Standard,
      VAPI.Video.Standard,
      VAPI.AT1130.J2KDecoder.J2KDecoderVideoRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.Video.Standard,
        VAPI.Video.Standard,
        VAPI.AT1130.J2KDecoder.J2KDecoderVideoRuntime
      >(this, "video_standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get signal() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "signal"),
      );
    }
  }
}
export namespace MasterClock {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    GPSReceiver: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new GPSReceiver(_raw),
    LTCGenerator: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new LTCGenerator(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    GPSReceiver: (_x: GPSReceiver) => _x.raw.kwl,
    LTCGenerator: (_x: LTCGenerator) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"MasterClock::Data::All"> {
    readonly type_identifier = "MasterClock::Data::All" as const;
    get runtime_constants() {
      return {
        num_ltc_slices: this.raw.backing_store.get_runtime_constant(
          "MasterClock::num_ltc_slices",
        ) as number,
        num_ltc_generators: this.raw.backing_store.get_runtime_constant(
          "MasterClock::num_ltc_generators",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get gps_receivers() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "MasterClock::Data::GPSReceiver",
        VAPI.AT1130.MasterClock.GPSReceiver
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "gps_receivers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.MasterClock.lift.GPSReceiver(raw),
      );
    }
    get ltc_generators() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "MasterClock::Data::LTCGenerator",
        VAPI.AT1130.MasterClock.LTCGeneratorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "ltc_generators",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.MasterClock.LTCGeneratorAsNamedTableRow(raw),
      );
    }
    get ltc_slice() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          2,
          "ltc_slice",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
  }
  export class GPSReceiver
    implements VScript.Referenceable<"MasterClock::Data::GPSReceiver">
  {
    readonly type_identifier = "MasterClock::Data::GPSReceiver" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get date(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, number, number],
      null | VAPI.MasterClock.GPSReceiverDate,
      VAPI.AT1130.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number],
        null | VAPI.MasterClock.GPSReceiverDate,
        VAPI.AT1130.MasterClock.GPSReceiver
      >(this, "date" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MasterClock.lift.GPSReceiverDate,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MasterClock.lower.GPSReceiverDate,
        ),
      });
    }
    get time_of_day(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, number, number],
      null | VAPI.MasterClock.GPSReceiverTimeOfDay,
      VAPI.AT1130.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number],
        null | VAPI.MasterClock.GPSReceiverTimeOfDay,
        VAPI.AT1130.MasterClock.GPSReceiver
      >(this, "time_of_day" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MasterClock.lift.GPSReceiverTimeOfDay,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MasterClock.lower.GPSReceiverTimeOfDay,
        ),
      });
    }
    get num_satellites(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.MasterClock.GPSReceiver
      >(this, "num_satellites" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get used_satellites(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.MasterClock.GPSReceiver
      >(this, "used_satellites" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get removed_satellites(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.MasterClock.GPSReceiver
      >(this, "removed_satellites" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "ptp_traits"),
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output"),
      );
    }
  }
  export class LTCGenerator
    implements VScript.Referenceable<"MasterClock::Data::LTCGenerator">
  {
    readonly type_identifier = "MasterClock::Data::LTCGenerator" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get timezone(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.MasterClock.Timezone,
      VAPI.MasterClock.Timezone,
      VAPI.MasterClock.Timezone,
      VAPI.MasterClock.Timezone,
      VAPI.AT1130.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.MasterClock.Timezone,
        VAPI.MasterClock.Timezone,
        VAPI.MasterClock.Timezone,
        VAPI.MasterClock.Timezone,
        VAPI.AT1130.MasterClock.LTCGenerator
      >(
        this,
        "timezone" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get custom_timezone_offset(): VScript.dKeyword<
      VScript.VSocket,
      [number, number],
      [number, number],
      VAPI.MasterClock.TimezoneOffset,
      VAPI.MasterClock.TimezoneOffset,
      VAPI.AT1130.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [number, number],
        [number, number],
        VAPI.MasterClock.TimezoneOffset,
        VAPI.MasterClock.TimezoneOffset,
        VAPI.AT1130.MasterClock.LTCGenerator
      >(
        this,
        "custom_timezone_offset" as VScript.SysName,
        {
          lift: VAPI.MasterClock.lift.TimezoneOffset,
          lower: VAPI.MasterClock.lower.TimezoneOffset,
        },
        {
          lift: VAPI.MasterClock.lift.TimezoneOffset,
          lower: VAPI.MasterClock.lower.TimezoneOffset,
        },
        null,
      );
    }
    get frame_rate(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.MasterClock.TimecodeRate,
      VAPI.MasterClock.TimecodeRate,
      VAPI.MasterClock.TimecodeRate,
      VAPI.MasterClock.TimecodeRate,
      VAPI.AT1130.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.MasterClock.TimecodeRate,
        VAPI.MasterClock.TimecodeRate,
        VAPI.MasterClock.TimecodeRate,
        VAPI.MasterClock.TimecodeRate,
        VAPI.AT1130.MasterClock.LTCGenerator
      >(
        this,
        "frame_rate" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    * `UTC` (Universal Time, Coordinated) is the standard for wall clock
    time. It is the standard that all timezones are based on. UTC has leap
    seconds to account for differences in the Earth's rotational speed. *When
    in doubt, always use `UTC`*
    
    * `TAI` (International Atomic Time) is the time standard used by PTP. It
    is a linear time standard that does not have leap seconds. TAI is
    currently ahead of UTC by 37 seconds.
  */
    get time_standard(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.Time.Standard,
      VAPI.Time.Standard,
      VAPI.Time.Standard,
      VAPI.Time.Standard,
      VAPI.AT1130.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.AT1130.MasterClock.LTCGenerator
      >(
        this,
        "time_standard" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get reset_counter(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.MasterClock.LTCGenerator
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.MasterClock.LTCGenerator
      >(this, "reset_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.MasterClock.LTCGenerator
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output"),
      );
    }
  }
  export class LTCGeneratorAsNamedTableRow extends LTCGenerator {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
}
export namespace MetadataProcessor {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    MetadataExtractor: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MetadataExtractor(_raw),
    MetadataInserter: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MetadataInserter(_raw),
    Request: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Request(_raw),
    Response: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Response(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    MetadataExtractor: (_x: MetadataExtractor) => _x.raw.kwl,
    MetadataInserter: (_x: MetadataInserter) => _x.raw.kwl,
    Request: (_x: Request) => _x.raw.kwl,
    Response: (_x: Response) => _x.raw.kwl,
  } as const;
  export class All
    implements VScript.Referenceable<"MetadataProcessor::Data::All">
  {
    readonly type_identifier = "MetadataProcessor::Data::All" as const;
    get runtime_constants() {
      return {
        num_metadata_inserters: this.raw.backing_store.get_runtime_constant(
          "MetadataProcessor::num_metadata_inserters",
        ) as number,
        num_metadata_extractors: this.raw.backing_store.get_runtime_constant(
          "MetadataProcessor::num_metadata_extractors",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get rtp_channel(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.MetadataProcessor.ChannelState,
      VAPI.MetadataProcessor.ChannelState,
      VAPI.AT1130.MetadataProcessor.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.MetadataProcessor.ChannelState,
        VAPI.MetadataProcessor.ChannelState,
        VAPI.AT1130.MetadataProcessor.All
      >(this, "rtp_channel" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get responses() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "MetadataProcessor::Data::Response",
        VAPI.AT1130.MetadataProcessor.Response
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "responses",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.MetadataProcessor.lift.Response(raw),
      );
    }
  }
  export class MetadataExtractor
    implements
      VScript.Referenceable<"MetadataProcessor::Data::MetadataExtractor">
  {
    readonly type_identifier =
      "MetadataProcessor::Data::MetadataExtractor" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.MetadataProcessor.MetadataExtractor
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get extractor_type(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.MetadataProcessor.MetadataExtractorExtractorType,
      null | VAPI.MetadataProcessor.MetadataExtractorExtractorType,
      VAPI.AT1130.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.MetadataProcessor.MetadataExtractorExtractorType,
        null | VAPI.MetadataProcessor.MetadataExtractorExtractorType,
        VAPI.AT1130.MetadataProcessor.MetadataExtractor
      >(this, "extractor_type" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get bnc_node(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1130.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1130.MetadataProcessor.MetadataExtractor
      >(this, "bnc_node" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
      });
    }
    get media_clock(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.Time.Source,
      VAPI.AT1130.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.Time.Source,
        VAPI.AT1130.MetadataProcessor.MetadataExtractor
      >(this, "media_clock" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.Time.Source(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"Time::Data::Source"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.MetadataProcessor.MetadataExtractor
      >(this, "standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get rtp_requested(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.MetadataProcessor.MetadataExtractor
      >(this, "rtp_requested" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get rtp_index(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.MetadataProcessor.RTPIndex,
      VAPI.AT1130.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.MetadataProcessor.RTPIndex,
        VAPI.AT1130.MetadataProcessor.MetadataExtractor
      >(this, "rtp_index" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class MetadataInserter
    implements
      VScript.Referenceable<"MetadataProcessor::Data::MetadataInserter">
  {
    readonly type_identifier =
      "MetadataProcessor::Data::MetadataInserter" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video_dt_node(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1130.MetadataProcessor.MetadataInserter
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1130.MetadataProcessor.MetadataInserter
      >(this, "video_dt_node" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
      });
    }
    get media_clock(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.Time.Source,
      VAPI.AT1130.MetadataProcessor.MetadataInserter
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.Time.Source,
        VAPI.AT1130.MetadataProcessor.MetadataInserter
      >(this, "media_clock" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.Time.Source(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"Time::Data::Source"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.MetadataProcessor.MetadataExtractor,
      | null
      | (VScript.Referenceable<"MetadataProcessor::Data::MetadataExtractor"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.MetadataProcessor.MetadataInserter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.MetadataProcessor.MetadataExtractor,
        | null
        | (VScript.Referenceable<"MetadataProcessor::Data::MetadataExtractor"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.MetadataProcessor.MetadataInserter
      >(
        this,
        "src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.MetadataProcessor.MetadataExtractor(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"MetadataProcessor::Data::MetadataExtractor"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.MetadataProcessor.MetadataExtractor(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"MetadataProcessor::Data::MetadataExtractor"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get filter(): VScript.dKeyword<
      VScript.VSocket,
      [
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
      ],
      [
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
        null | VAPI.MetadataProcessor.FilterSetting,
      ],
      VAPI.MetadataProcessor.Filter,
      VAPI.MetadataProcessor.Filter,
      VAPI.AT1130.MetadataProcessor.MetadataInserter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
        ],
        [
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
        ],
        VAPI.MetadataProcessor.Filter,
        VAPI.MetadataProcessor.Filter,
        VAPI.AT1130.MetadataProcessor.MetadataInserter
      >(
        this,
        "filter" as VScript.SysName,
        {
          lift: VAPI.MetadataProcessor.lift.Filter,
          lower: VAPI.MetadataProcessor.lower.Filter,
        },
        {
          lift: VAPI.MetadataProcessor.lift.Filter,
          lower: VAPI.MetadataProcessor.lower.Filter,
        },
        null,
      );
    }
    get vanc_locations(): VScript.dKeyword<
      VScript.VSocket,
      [
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        number,
      ],
      [
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        number,
      ],
      VAPI.MetadataProcessor.VANCEmbedderLocations,
      VAPI.MetadataProcessor.VANCEmbedderLocations,
      VAPI.AT1130.MetadataProcessor.MetadataInserter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          number,
        ],
        [
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          number,
        ],
        VAPI.MetadataProcessor.VANCEmbedderLocations,
        VAPI.MetadataProcessor.VANCEmbedderLocations,
        VAPI.AT1130.MetadataProcessor.MetadataInserter
      >(
        this,
        "vanc_locations" as VScript.SysName,
        {
          lift: VAPI.MetadataProcessor.lift.VANCEmbedderLocations,
          lower: VAPI.MetadataProcessor.lower.VANCEmbedderLocations,
        },
        {
          lift: VAPI.MetadataProcessor.lift.VANCEmbedderLocations,
          lower: VAPI.MetadataProcessor.lower.VANCEmbedderLocations,
        },
        null,
      );
    }
    get fine_print(): VScript.dKeyword<
      VScript.VSocket,
      [VAPI.MetadataProcessor.OnChecksumError, null | number, null | number],
      [VAPI.MetadataProcessor.OnChecksumError, null | number, null | number],
      VAPI.MetadataProcessor.FinePrint,
      VAPI.MetadataProcessor.FinePrint,
      VAPI.AT1130.MetadataProcessor.MetadataInserter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [VAPI.MetadataProcessor.OnChecksumError, null | number, null | number],
        [VAPI.MetadataProcessor.OnChecksumError, null | number, null | number],
        VAPI.MetadataProcessor.FinePrint,
        VAPI.MetadataProcessor.FinePrint,
        VAPI.AT1130.MetadataProcessor.MetadataInserter
      >(
        this,
        "fine_print" as VScript.SysName,
        {
          lift: VAPI.MetadataProcessor.lift.FinePrint,
          lower: VAPI.MetadataProcessor.lower.FinePrint,
        },
        {
          lift: VAPI.MetadataProcessor.lift.FinePrint,
          lower: VAPI.MetadataProcessor.lower.FinePrint,
        },
        null,
      );
    }
  }
  export class Request
    implements VScript.Referenceable<"MetadataProcessor::Data::Request">
  {
    readonly type_identifier = "MetadataProcessor::Data::Request" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get inserter_standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.MetadataProcessor.Request
      >(this, "inserter_standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get src(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.MetadataProcessor.MetadataExtractor,
      VAPI.AT1130.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.MetadataProcessor.MetadataExtractor,
        VAPI.AT1130.MetadataProcessor.Request
      >(this, "src" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.MetadataProcessor.MetadataExtractor(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"MetadataProcessor::Data::MetadataExtractor"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get dst(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.MetadataProcessor.MetadataInserter,
      VAPI.AT1130.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.MetadataProcessor.MetadataInserter,
        VAPI.AT1130.MetadataProcessor.Request
      >(this, "dst" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.MetadataProcessor.MetadataInserter(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"MetadataProcessor::Data::MetadataInserter"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get filter(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
        ],
      null | VAPI.MetadataProcessor.Filter,
      VAPI.AT1130.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
          ],
        null | VAPI.MetadataProcessor.Filter,
        VAPI.AT1130.MetadataProcessor.Request
      >(this, "filter" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MetadataProcessor.lift.Filter,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MetadataProcessor.lower.Filter,
        ),
      });
    }
    get vanc_locations(): VScript.rKeyword<
      VScript.VSocket,
      [
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        number,
      ],
      VAPI.MetadataProcessor.VANCEmbedderLocations,
      VAPI.AT1130.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          number,
        ],
        VAPI.MetadataProcessor.VANCEmbedderLocations,
        VAPI.AT1130.MetadataProcessor.Request
      >(this, "vanc_locations" as VScript.SysName, {
        lift: VAPI.MetadataProcessor.lift.VANCEmbedderLocations,
        lower: VAPI.MetadataProcessor.lower.VANCEmbedderLocations,
      });
    }
    get fine_print(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [VAPI.MetadataProcessor.OnChecksumError, null | number, null | number],
      null | VAPI.MetadataProcessor.FinePrint,
      VAPI.AT1130.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            VAPI.MetadataProcessor.OnChecksumError,
            null | number,
            null | number,
          ],
        null | VAPI.MetadataProcessor.FinePrint,
        VAPI.AT1130.MetadataProcessor.Request
      >(this, "fine_print" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MetadataProcessor.lift.FinePrint,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MetadataProcessor.lower.FinePrint,
        ),
      });
    }
  }
  export class Response
    implements VScript.Referenceable<"MetadataProcessor::Data::Response">
  {
    readonly type_identifier = "MetadataProcessor::Data::Response" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get extractor_standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.MetadataProcessor.Response
      >(this, "extractor_standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get inserter_standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.MetadataProcessor.Response
      >(this, "inserter_standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get src(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.MetadataProcessor.MetadataExtractor,
      VAPI.AT1130.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.MetadataProcessor.MetadataExtractor,
        VAPI.AT1130.MetadataProcessor.Response
      >(this, "src" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.MetadataProcessor.MetadataExtractor(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"MetadataProcessor::Data::MetadataExtractor"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get dst(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.MetadataProcessor.MetadataInserter,
      VAPI.AT1130.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.MetadataProcessor.MetadataInserter,
        VAPI.AT1130.MetadataProcessor.Response
      >(this, "dst" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.MetadataProcessor.MetadataInserter(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"MetadataProcessor::Data::MetadataInserter"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get filter(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
          null | VAPI.MetadataProcessor.FilterSetting,
        ],
      null | VAPI.MetadataProcessor.Filter,
      VAPI.AT1130.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
            null | VAPI.MetadataProcessor.FilterSetting,
          ],
        null | VAPI.MetadataProcessor.Filter,
        VAPI.AT1130.MetadataProcessor.Response
      >(this, "filter" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MetadataProcessor.lift.Filter,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MetadataProcessor.lower.Filter,
        ),
      });
    }
    get vanc_locations(): VScript.rKeyword<
      VScript.VSocket,
      [
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        null | number,
        number,
      ],
      VAPI.MetadataProcessor.VANCEmbedderLocations,
      VAPI.AT1130.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          null | number,
          number,
        ],
        VAPI.MetadataProcessor.VANCEmbedderLocations,
        VAPI.AT1130.MetadataProcessor.Response
      >(this, "vanc_locations" as VScript.SysName, {
        lift: VAPI.MetadataProcessor.lift.VANCEmbedderLocations,
        lower: VAPI.MetadataProcessor.lower.VANCEmbedderLocations,
      });
    }
    get fine_print(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [VAPI.MetadataProcessor.OnChecksumError, null | number, null | number],
      null | VAPI.MetadataProcessor.FinePrint,
      VAPI.AT1130.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            VAPI.MetadataProcessor.OnChecksumError,
            null | number,
            null | number,
          ],
        null | VAPI.MetadataProcessor.FinePrint,
        VAPI.AT1130.MetadataProcessor.Response
      >(this, "fine_print" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MetadataProcessor.lift.FinePrint,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.MetadataProcessor.lower.FinePrint,
        ),
      });
    }
    get statistics(): VScript.rKeyword<
      VScript.VSocket,
      [
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
      ],
      VAPI.MetadataProcessor.ResponseStatistics,
      VAPI.AT1130.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
        ],
        VAPI.MetadataProcessor.ResponseStatistics,
        VAPI.AT1130.MetadataProcessor.Response
      >(this, "statistics" as VScript.SysName, {
        lift: VAPI.MetadataProcessor.lift.ResponseStatistics,
        lower: VAPI.MetadataProcessor.lower.ResponseStatistics,
      });
    }

    /**
    Metadata inserters generally attempt to match their video stream's
    underlying media clock by delaying the supplied ANC streams accordingly.
    If the desired media clock offset cannot be met because, e.g., the ANC
    stream is already coming in too late, or Timecode/AFD continuity
    requirements force the inserter to soften its mediaclock criterion,
    packets may either be discarded or embedded out-of-phase. In the latter
    case, the mismatch between the embedded ANC stream's de-facto mediaclock
    and its target value is represented by `phase_mismatch`, with negative
    values corresponding to late ANC streams.
  */
    get phase_mismatch(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, number, number, number],
      null | VAPI.Time.TimestampedOffset,
      VAPI.AT1130.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number, number],
        null | VAPI.Time.TimestampedOffset,
        VAPI.AT1130.MetadataProcessor.Response
      >(this, "phase_mismatch" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lift.TimestampedOffset,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lower.TimestampedOffset,
        ),
      });
    }
  }
}
export namespace Monitoring {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    AudioLoudness: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioLoudness(_raw),
    AudioPhaseCorrelation: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioPhaseCorrelation(_raw),
    LiveView: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new LiveView(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    AudioLoudness: (_x: AudioLoudness) => _x.raw.kwl,
    AudioPhaseCorrelation: (_x: AudioPhaseCorrelation) => _x.raw.kwl,
    LiveView: (_x: LiveView) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"Monitoring::Data::All"> {
    readonly type_identifier = "Monitoring::Data::All" as const;
    get runtime_constants() {
      return {
        num_audio_phase_correlation:
          this.raw.backing_store.get_runtime_constant(
            "Monitoring::num_audio_phase_correlation",
          ) as number,
        num_audio_loudness_instances:
          this.raw.backing_store.get_runtime_constant(
            "Monitoring::num_audio_loudness_instances",
          ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get audio() {
      return VAPI.Monitoring.lift.Audio(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "audio"),
      );
    }
    get video() {
      return VAPI.Monitoring.lift.Video(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "video"),
      );
    }
    get live_view() {
      return VAPI.AT1130.Monitoring.lift.LiveView(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "live_view"),
      );
    }
    get correlation() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "Monitoring::Data::AudioPhaseCorrelation",
        VAPI.AT1130.Monitoring.AudioPhaseCorrelationAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          3,
          "correlation",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.Monitoring.AudioPhaseCorrelationAsNamedTableRow(raw),
      );
    }
    get loudness() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "Monitoring::Data::AudioLoudness",
        VAPI.AT1130.Monitoring.AudioLoudnessAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "loudness",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.Monitoring.AudioLoudnessAsNamedTableRow(raw),
      );
    }
  }
  export class AudioLoudness
    implements VScript.Referenceable<"Monitoring::Data::AudioLoudness">
  {
    readonly type_identifier = "Monitoring::Data::AudioLoudness" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.Monitoring.AudioLoudness
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.Monitoring.AudioLoudness
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get channels() {
      return VAPI.Monitoring.lift.AudioLoudnessChannels(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "channels"),
      );
    }
    get mode(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.Monitoring.LoudnessMode,
      VAPI.Monitoring.LoudnessMode,
      VAPI.Monitoring.LoudnessMode,
      VAPI.Monitoring.LoudnessMode,
      VAPI.AT1130.Monitoring.AudioLoudness
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Monitoring.LoudnessMode,
        VAPI.Monitoring.LoudnessMode,
        VAPI.Monitoring.LoudnessMode,
        VAPI.Monitoring.LoudnessMode,
        VAPI.AT1130.Monitoring.AudioLoudness
      >(
        this,
        "mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Set to false to pause gated_loudness measurement and back to true to
    resume
  */
    get active(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.Monitoring.AudioLoudness
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.Monitoring.AudioLoudness
      >(
        this,
        "active" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    True peak meters
    
    Order: left, right, center, surround_left, surround_right,
    rear_surround_left, rear_surround_right
  */
    get true_peak_meter(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Audio.PeakMeter>,
      VAPI.AT1130.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1130.Monitoring.AudioLoudness
      >(this, "true_peak_meter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Measured over the last 400 ms
  */
    get momentary_loudness(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.Monitoring.AudioLoudness
      >(this, "momentary_loudness" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Measured over the last 3 s
  */
    get short_term_loudness(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.Monitoring.AudioLoudness
      >(this, "short_term_loudness" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get gated_loudness(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.Monitoring.AudioLoudness
      >(this, "gated_loudness" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    How much data has been recorded for the gated loudness measurement so far
  */
    get gated_loudness_recorded(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VScript.Duration,
      VAPI.AT1130.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VScript.Duration,
        VAPI.AT1130.Monitoring.AudioLoudness
      >(this, "gated_loudness_recorded" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftNanoseconds,
        lower: VScript.VAPIHelpers.lowerNanoseconds,
      });
    }

    /**
    Reset
  */
    get reset(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.Monitoring.AudioLoudness
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.Monitoring.AudioLoudness
      >(
        this,
        "reset" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
  export class AudioLoudnessAsNamedTableRow extends AudioLoudness {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class AudioPhaseCorrelation
    implements VScript.Referenceable<"Monitoring::Data::AudioPhaseCorrelation">
  {
    readonly type_identifier =
      "Monitoring::Data::AudioPhaseCorrelation" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.Monitoring.AudioPhaseCorrelation
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.Monitoring.AudioPhaseCorrelation
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get pairs(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.Monitoring.AudioPhaseCorrelation
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.Monitoring.AudioPhaseCorrelation
      >(
        this,
        "pairs" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get peak_meter(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Audio.PeakMeter>,
      VAPI.AT1130.Monitoring.AudioPhaseCorrelation
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1130.Monitoring.AudioPhaseCorrelation
      >(this, "peak_meter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get correlation(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<number>,
      VAPI.AT1130.Monitoring.AudioPhaseCorrelation
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<number>,
        VAPI.AT1130.Monitoring.AudioPhaseCorrelation
      >(this, "correlation" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class AudioPhaseCorrelationAsNamedTableRow extends AudioPhaseCorrelation {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class LiveView
    implements VScript.Referenceable<"Monitoring::Data::LiveView">
  {
    readonly type_identifier = "Monitoring::Data::LiveView" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get v_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.Monitoring.LiveView
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.Monitoring.LiveView
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.Monitoring.LiveView
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.Monitoring.LiveView
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get timestamped_signature(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, Array<number>],
      null | VAPI.Video.TimestampedSignature,
      VAPI.AT1130.Monitoring.LiveView
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, Array<number>],
        null | VAPI.Video.TimestampedSignature,
        VAPI.AT1130.Monitoring.LiveView
      >(this, "timestamped_signature" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Video.lift.TimestampedSignature,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Video.lower.TimestampedSignature,
        ),
      });
    }
  }
}
export namespace MultiviewerIO {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
  } as const;
  export const lower = { All: (_x: All) => _x.raw.kwl } as const;
  export class All
    implements VScript.Referenceable<"MultiviewerIO::Data::All">
  {
    readonly type_identifier = "MultiviewerIO::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get distributed() {
      return VAPI.MultiviewerIO.lift.DistributedMultiviewer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "distributed"),
      );
    }
    get cores() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "MultiviewerIO::Data::ManifoldCore",
        VAPI.MultiviewerIO.ManifoldCore
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 1, "cores"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.MultiviewerIO.lift.ManifoldCore(st),
      );
    }
    get outputs() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Video::Data::Essence",
        VAPI.AT1130.Video.Essence
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 2, "outputs"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.Video.lift.Essence(st),
      );
    }
  }
}
export namespace NetworkInterfaces {
  export const lift = {
    PMASettingsManualRxAdaptive: (
      _raw: [
        VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
        VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
        boolean,
      ],
      _socket: VScript.VSocket,
    ): PMASettingsManualRxAdaptive => {
      return {
        profile: _raw[0],
        effort: _raw[1],
        continuous: _raw[2],
      };
    },
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    PMASettingsDisabled: (
      _raw: [],
      _socket: VScript.VSocket,
    ): PMASettingsDisabled => {
      return {};
    },
    PMASettingsManualRxDisabled: (
      _raw: [],
      _socket: VScript.VSocket,
    ): PMASettingsManualRxDisabled => {
      return {};
    },
    LaneStatistics: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new LaneStatistics(_raw),
    PMASettingsManual: (
      _raw: [
        (
          | [0, []]
          | [
              1,
              [
                VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
                VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
                boolean,
              ],
            ]
        ),
        [number, number, number, number, number],
      ],
      _socket: VScript.VSocket,
    ): PMASettingsManual => {
      return {
        rx: VAPI.AT1130.NetworkInterfaces.lift.PMASettingsManualRx(
          _raw[0],
          _socket,
        ),
        tx: VAPI.AT1130.NetworkInterfaces.lift.PMASettingsManualTx(
          _raw[1],
          _socket,
        ),
      };
    },
    PMASettings: (
      _raw:
        | [0, []]
        | [1, []]
        | [2, []]
        | [
            3,
            [
              (
                | [0, []]
                | [
                    1,
                    [
                      VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
                      VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
                      boolean,
                    ],
                  ]
              ),
              [number, number, number, number, number],
            ],
          ],
      _socket: VScript.VSocket,
    ): PMASettings => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "Disabled",
            value: VAPI.AT1130.NetworkInterfaces.lift.PMASettingsDisabled(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "RecommendedOptical",
            value:
              VAPI.AT1130.NetworkInterfaces.lift.PMASettingsRecommendedOptical(
                _raw[1],
                _socket,
              ),
          };
        case 2:
          return {
            variant: "RecommendedCopper",
            value:
              VAPI.AT1130.NetworkInterfaces.lift.PMASettingsRecommendedCopper(
                _raw[1],
                _socket,
              ),
          };
        case 3:
          return {
            variant: "Manual",
            value: VAPI.AT1130.NetworkInterfaces.lift.PMASettingsManual(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    PTPCalibration: (
      _raw: [
        VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus,
        VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus,
        null | number,
        null | number,
      ],
      _socket: VScript.VSocket,
    ): PTPCalibration => {
      return {
        rx: _raw[0],
        tx: _raw[1],
        rx_ppm: _raw[2],
        tx_ppm: _raw[3],
      };
    },
    Port: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new Port(_raw),
    RXPMAStatus: (
      _raw: [
        VAPI.AT1130.NetworkInterfaces.RXPMAStatusState,
        Array<
          [
            null | [number, number],
            null | boolean,
            null | number,
            null | [number, number, number, number, number, number],
          ]
        >,
      ],
      _socket: VScript.VSocket,
    ): RXPMAStatus => {
      return {
        state: _raw[0],
        lanes: _raw[1].map((el) =>
          VAPI.AT1130.NetworkInterfaces.lift.RXPMAStatusLanes(el, _socket),
        ),
      };
    },
    PMASettingsRecommendedCopper: (
      _raw: [],
      _socket: VScript.VSocket,
    ): PMASettingsRecommendedCopper => {
      return {};
    },
    PMASettingsRecommendedOptical: (
      _raw: [],
      _socket: VScript.VSocket,
    ): PMASettingsRecommendedOptical => {
      return {};
    },
    RXPMAStatusLanesAdaptationTimes: (
      _raw: [number, number],
      _socket: VScript.VSocket,
    ): RXPMAStatusLanesAdaptationTimes => {
      return {
        initial: VScript.VAPIHelpers.liftNanoseconds(_raw[0], _socket),
        external: VScript.VAPIHelpers.liftNanoseconds(_raw[1], _socket),
      };
    },
    RXPMAStatusLanes: (
      _raw: [
        null | [number, number],
        null | boolean,
        null | number,
        null | [number, number, number, number, number, number],
      ],
      _socket: VScript.VSocket,
    ): RXPMAStatusLanes => {
      return {
        adaptation_times:
          _raw[0] === null
            ? null
            : VAPI.AT1130.NetworkInterfaces.lift.RXPMAStatusLanesAdaptationTimes(
                _raw[0],
                _socket,
              ),
        freq_locked: _raw[1],
        eye_opening: _raw[2],
        rx_eq:
          _raw[3] === null
            ? null
            : VAPI.AT1130.NetworkInterfaces.lift.RXPMAStatusLanesRxEq(
                _raw[3],
                _socket,
              ),
      };
    },
    PMASettingsManualRx: (
      _raw:
        | [0, []]
        | [
            1,
            [
              VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
              VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
              boolean,
            ],
          ],
      _socket: VScript.VSocket,
    ): PMASettingsManualRx => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "Disabled",
            value:
              VAPI.AT1130.NetworkInterfaces.lift.PMASettingsManualRxDisabled(
                _raw[1],
                _socket,
              ),
          };
        case 1:
          return {
            variant: "Adaptive",
            value:
              VAPI.AT1130.NetworkInterfaces.lift.PMASettingsManualRxAdaptive(
                _raw[1],
                _socket,
              ),
          };
      }
    },
    RXPMAStatusLanesRxEq: (
      _raw: [number, number, number, number, number, number],
      _socket: VScript.VSocket,
    ): RXPMAStatusLanesRxEq => {
      return {
        gain_lf: _raw[0],
        gain_hf: _raw[1],
        rf_b0: _raw[2],
        rf_b1: _raw[3],
        rf_p1: _raw[4],
        rf_p2: _raw[5],
      };
    },
    PMASettingsManualTx: (
      _raw: [number, number, number, number, number],
      _socket: VScript.VSocket,
    ): PMASettingsManualTx => {
      return {
        pre3: _raw[0],
        pre2: _raw[1],
        pre1: _raw[2],
        main: _raw[3],
        post: _raw[4],
      };
    },
  } as const;
  export const lower = {
    PMASettingsManualRxAdaptive: (
      _x: {
        profile: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile;
        effort: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort;
        continuous: boolean;
      },
      _socket: VScript.VSocket,
    ): [
      VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
      VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
      boolean,
    ] => [_x.profile, _x.effort, _x.continuous],
    All: (_x: All) => _x.raw.kwl,
    PMASettingsDisabled: (_x: {}, _socket: VScript.VSocket): [] => [],
    PMASettingsManualRxDisabled: (_x: {}, _socket: VScript.VSocket): [] => [],
    LaneStatistics: (_x: LaneStatistics) => _x.raw.kwl,
    PMASettingsManual: (
      _x: {
        rx: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRx;
        tx: VAPI.AT1130.NetworkInterfaces.PMASettingsManualTx;
      },
      _socket: VScript.VSocket,
    ): [
      (
        | [0, []]
        | [
            1,
            [
              VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
              VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
              boolean,
            ],
          ]
      ),
      [number, number, number, number, number],
    ] => [
      VAPI.AT1130.NetworkInterfaces.lower.PMASettingsManualRx(_x.rx, _socket),
      VAPI.AT1130.NetworkInterfaces.lower.PMASettingsManualTx(_x.tx, _socket),
    ],
    PMASettings: (
      _x:
        | {
            variant: "Disabled";
            value: VAPI.AT1130.NetworkInterfaces.PMASettingsDisabled;
          }
        | {
            variant: "RecommendedOptical";
            value: VAPI.AT1130.NetworkInterfaces.PMASettingsRecommendedOptical;
          }
        | {
            variant: "RecommendedCopper";
            value: VAPI.AT1130.NetworkInterfaces.PMASettingsRecommendedCopper;
          }
        | {
            variant: "Manual";
            value: VAPI.AT1130.NetworkInterfaces.PMASettingsManual;
          },
      _socket: VScript.VSocket,
    ):
      | [0, []]
      | [1, []]
      | [2, []]
      | [
          3,
          [
            (
              | [0, []]
              | [
                  1,
                  [
                    VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
                    VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
                    boolean,
                  ],
                ]
            ),
            [number, number, number, number, number],
          ],
        ] => {
      switch (_x.variant) {
        case "Disabled":
          return [
            0,
            VAPI.AT1130.NetworkInterfaces.lower.PMASettingsDisabled(
              _x.value,
              _socket,
            ),
          ];
        case "RecommendedOptical":
          return [
            1,
            VAPI.AT1130.NetworkInterfaces.lower.PMASettingsRecommendedOptical(
              _x.value,
              _socket,
            ),
          ];
        case "RecommendedCopper":
          return [
            2,
            VAPI.AT1130.NetworkInterfaces.lower.PMASettingsRecommendedCopper(
              _x.value,
              _socket,
            ),
          ];
        case "Manual":
          return [
            3,
            VAPI.AT1130.NetworkInterfaces.lower.PMASettingsManual(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    PTPCalibration: (
      _x: {
        rx: VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus;
        tx: VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus;
        rx_ppm: null | number;
        tx_ppm: null | number;
      },
      _socket: VScript.VSocket,
    ): [
      VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus,
      VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus,
      null | number,
      null | number,
    ] => [_x.rx, _x.tx, _x.rx_ppm, _x.tx_ppm],
    Port: (_x: Port) => _x.raw.kwl,
    RXPMAStatus: (
      _x: {
        state: VAPI.AT1130.NetworkInterfaces.RXPMAStatusState;
        lanes: Array<VAPI.AT1130.NetworkInterfaces.RXPMAStatusLanes>;
      },
      _socket: VScript.VSocket,
    ): [
      VAPI.AT1130.NetworkInterfaces.RXPMAStatusState,
      Array<
        [
          null | [number, number],
          null | boolean,
          null | number,
          null | [number, number, number, number, number, number],
        ]
      >,
    ] => [
      _x.state,
      _x.lanes.map((el) =>
        VAPI.AT1130.NetworkInterfaces.lower.RXPMAStatusLanes(el, _socket),
      ),
    ],
    PMASettingsRecommendedCopper: (_x: {}, _socket: VScript.VSocket): [] => [],
    PMASettingsRecommendedOptical: (_x: {}, _socket: VScript.VSocket): [] => [],
    RXPMAStatusLanesAdaptationTimes: (
      _x: { initial: VScript.Duration; external: VScript.Duration },
      _socket: VScript.VSocket,
    ): [number, number] => [
      VScript.VAPIHelpers.lowerNanoseconds(_x.initial, _socket),
      VScript.VAPIHelpers.lowerNanoseconds(_x.external, _socket),
    ],
    RXPMAStatusLanes: (
      _x: {
        adaptation_times: null | VAPI.AT1130.NetworkInterfaces.RXPMAStatusLanesAdaptationTimes;
        freq_locked: null | boolean;
        eye_opening: null | VAPI.Primitives.Unsigned16;
        rx_eq: null | VAPI.AT1130.NetworkInterfaces.RXPMAStatusLanesRxEq;
      },
      _socket: VScript.VSocket,
    ): [
      null | [number, number],
      null | boolean,
      null | number,
      null | [number, number, number, number, number, number],
    ] => [
      _x.adaptation_times === null
        ? null
        : VAPI.AT1130.NetworkInterfaces.lower.RXPMAStatusLanesAdaptationTimes(
            _x.adaptation_times,
            _socket,
          ),
      _x.freq_locked,
      _x.eye_opening,
      _x.rx_eq === null
        ? null
        : VAPI.AT1130.NetworkInterfaces.lower.RXPMAStatusLanesRxEq(
            _x.rx_eq,
            _socket,
          ),
    ],
    PMASettingsManualRx: (
      _x:
        | {
            variant: "Disabled";
            value: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxDisabled;
          }
        | {
            variant: "Adaptive";
            value: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptive;
          },
      _socket: VScript.VSocket,
    ):
      | [0, []]
      | [
          1,
          [
            VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
            VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
            boolean,
          ],
        ] => {
      switch (_x.variant) {
        case "Disabled":
          return [
            0,
            VAPI.AT1130.NetworkInterfaces.lower.PMASettingsManualRxDisabled(
              _x.value,
              _socket,
            ),
          ];
        case "Adaptive":
          return [
            1,
            VAPI.AT1130.NetworkInterfaces.lower.PMASettingsManualRxAdaptive(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    RXPMAStatusLanesRxEq: (
      _x: {
        gain_lf: VAPI.Primitives.Signed16;
        gain_hf: VAPI.Primitives.Signed16;
        rf_b0: VAPI.Primitives.Signed16;
        rf_b1: VAPI.Primitives.Signed16;
        rf_p1: VAPI.Primitives.Signed16;
        rf_p2: VAPI.Primitives.Signed16;
      },
      _socket: VScript.VSocket,
    ): [number, number, number, number, number, number] => [
      _x.gain_lf,
      _x.gain_hf,
      _x.rf_b0,
      _x.rf_b1,
      _x.rf_p1,
      _x.rf_p2,
    ],
    PMASettingsManualTx: (
      _x: {
        pre3: number;
        pre2: number;
        pre1: number;
        main: number;
        post: number;
      },
      _socket: VScript.VSocket,
    ): [number, number, number, number, number] => [
      _x.pre3,
      _x.pre2,
      _x.pre1,
      _x.main,
      _x.post,
    ],
  } as const;
  export interface PMASettingsManualRxAdaptive {
    profile: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile;
    effort: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort;
    continuous: boolean;
  }
  export class All
    implements VScript.Referenceable<"NetworkInterfaces::Data::All">
  {
    readonly type_identifier = "NetworkInterfaces::Data::All" as const;
    get runtime_constants() {
      return {
        max_rx_streams: this.raw.backing_store.get_runtime_constant(
          "NetworkInterfaces::max_rx_streams",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    Save all interfaces
  */
    get save_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.NetworkInterfaces.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.NetworkInterfaces.All
      >(
        this,
        "save_config" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Revert all interfaces
  */
    get revert_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.NetworkInterfaces.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.NetworkInterfaces.All
      >(
        this,
        "revert_config" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Save all syslog settings
  */
    get save_syslog_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.NetworkInterfaces.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.NetworkInterfaces.All
      >(
        this,
        "save_syslog_config" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Revert all syslog settings
  */
    get revert_syslog_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.NetworkInterfaces.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.NetworkInterfaces.All
      >(
        this,
        "revert_syslog_config" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get ports() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "NetworkInterfaces::Data::Port",
        VAPI.AT1130.NetworkInterfaces.Port
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 4, "ports"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.NetworkInterfaces.lift.Port(raw),
      );
    }
    get hostname() {
      return VAPI.NetworkInterfaces.lift.HostnameConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "hostname"),
      );
    }
    get current_veth_configuration() {
      return VAPI.NetworkInterfaces.lift.CurrentVirtualEthernetConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          6,
          "current_veth_configuration",
        ),
      );
    }
    get desired_veth_configuration() {
      return VAPI.NetworkInterfaces.lift.DesiredVirtualEthernetConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          7,
          "desired_veth_configuration",
        ),
      );
    }
    async download_config() {
      return await assemble_config_record(this);
    }
    async upload_config(
      nc:
        | NetworkConfig<"AT1130", "write">
        | LiteralNetworkConfig<"AT1130", "write">,
    ) {
      return await do_upload_config(this.raw.backing_store, nc);
    }
  }
  export interface PMASettingsDisabled {}
  export interface PMASettingsManualRxDisabled {}
  export type Lane = "P0" | "P1";
  export class LaneStatistics
    implements VScript.Referenceable<"NetworkInterfaces::Data::LaneStatistics">
  {
    readonly type_identifier =
      "NetworkInterfaces::Data::LaneStatistics" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get lane(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.AT1130.NetworkInterfaces.Lane,
      null | VAPI.AT1130.NetworkInterfaces.Lane,
      VAPI.AT1130.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.AT1130.NetworkInterfaces.Lane,
        null | VAPI.AT1130.NetworkInterfaces.Lane,
        VAPI.AT1130.NetworkInterfaces.LaneStatistics
      >(this, "lane" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.NetworkInterfaces.LaneStatistics
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    maximum throughput (per direction)
  */
    get max_throughput(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.NetworkInterfaces.LaneStatistics
      >(this, "max_throughput" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get tx_streams(): VScript.rKeywordReferenceable<
      VScript.VSocket,
      "tx_streams",
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      Array<[number, number, number, number]>,
      Array<VAPI.EthernetStats.Counter>,
      "NetworkInterfaces::Data::LaneStatistics",
      VAPI.AT1130.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeywordReferenceable<
        VScript.VSocket,
        "tx_streams",
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        Array<[number, number, number, number]>,
        Array<VAPI.EthernetStats.Counter>,
        "NetworkInterfaces::Data::LaneStatistics",
        VAPI.AT1130.NetworkInterfaces.LaneStatistics
      >(
        this,
        "tx_streams" as VScript.SysName,
        {
          lift: VAPI.EthernetStats.lift.Counter,
          lower: VAPI.EthernetStats.lower.Counter,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(VAPI.EthernetStats.lift.Counter),
          lower: VScript.VAPIHelpers.lowerArray(
            VAPI.EthernetStats.lower.Counter,
          ),
        },
      );
    }
    get tx_all_streams(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1130.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1130.NetworkInterfaces.LaneStatistics
      >(this, "tx_all_streams" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
  }
  export interface PMASettingsManual {
    rx: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRx;
    tx: VAPI.AT1130.NetworkInterfaces.PMASettingsManualTx;
  }
  export type PMASettings =
    | {
        variant: "Disabled";
        value: VAPI.AT1130.NetworkInterfaces.PMASettingsDisabled;
      }
    | {
        variant: "RecommendedOptical";
        value: VAPI.AT1130.NetworkInterfaces.PMASettingsRecommendedOptical;
      }
    | {
        variant: "RecommendedCopper";
        value: VAPI.AT1130.NetworkInterfaces.PMASettingsRecommendedCopper;
      }
    | {
        variant: "Manual";
        value: VAPI.AT1130.NetworkInterfaces.PMASettingsManual;
      };
  export interface PTPCalibration {
    rx: VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus;
    tx: VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus;
    rx_ppm: null | number;
    tx_ppm: null | number;
  }
  export type PTPCalibrationStatus =
    | "COLLECTING_INITIAL_HW_PARAMETERS"
    | "INITIAL_CALIBRATION_DONE"
    | "STARTING_PTP_UI_TRACKING"
    | "PTP_UI_TRACKING_ACTIVE"
    | "NO_CALIBRATION_NEEDED";
  export class Port
    implements VScript.Referenceable<"NetworkInterfaces::Data::Port">
  {
    readonly type_identifier = "NetworkInterfaces::Data::Port" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get port_id(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.AT1130.Primitives.NetworkPortID,
      null | VAPI.AT1130.Primitives.NetworkPortID,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.AT1130.Primitives.NetworkPortID,
        null | VAPI.AT1130.Primitives.NetworkPortID,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "port_id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get device_name(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "device_name" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    maximum throughput (per direction)
  */
    get max_throughput(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "max_throughput" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get port_mode(): VScript.dKeyword<
      VScript.VSocket,
      null | VAPI.AT1130.NetworkInterfaces.PortMode,
      null | VAPI.AT1130.NetworkInterfaces.PortMode,
      null | VAPI.AT1130.NetworkInterfaces.PortMode,
      null | VAPI.AT1130.NetworkInterfaces.PortMode,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | VAPI.AT1130.NetworkInterfaces.PortMode,
        null | VAPI.AT1130.NetworkInterfaces.PortMode,
        null | VAPI.AT1130.NetworkInterfaces.PortMode,
        null | VAPI.AT1130.NetworkInterfaces.PortMode,
        VAPI.AT1130.NetworkInterfaces.Port
      >(
        this,
        "port_mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get fault_status(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.NetworkInterfaces.FaultStatus,
      null | VAPI.NetworkInterfaces.FaultStatus,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.NetworkInterfaces.FaultStatus,
        null | VAPI.NetworkInterfaces.FaultStatus,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "fault_status" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get health() {
      return VAPI.NetworkInterfaces.lift.Health(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "health"),
      );
    }
    get phy_link_up(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "phy_link_up" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get link_up(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "link_up" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    System runtime since boot
  */
    get link_up_last_changed(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VScript.Duration,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VScript.Duration,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "link_up_last_changed" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftNanoseconds,
        lower: VScript.VAPIHelpers.lowerNanoseconds,
      });
    }

    /**
    How often link_up has changed since boot
  */
    get link_up_changed_count(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "link_up_changed_count" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    MAC address, stored in big-endian order.
  */
    get mac_address(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      VAPI.NetworkInterfaces.MacAddress,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        VAPI.NetworkInterfaces.MacAddress,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "mac_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get supports_ptp(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "supports_ptp" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get supports_rtp(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "supports_rtp" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get ptp_status(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus,
          VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus,
          null | number,
          null | number,
        ],
      null | VAPI.AT1130.NetworkInterfaces.PTPCalibration,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus,
            VAPI.AT1130.NetworkInterfaces.PTPCalibrationStatus,
            null | number,
            null | number,
          ],
        null | VAPI.AT1130.NetworkInterfaces.PTPCalibration,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "ptp_status" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.NetworkInterfaces.lift.PTPCalibration,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.NetworkInterfaces.lower.PTPCalibration,
        ),
      });
    }

    /**
    How often PTP calibration had to be restarted
  */
    get ptp_watchdog_count(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "ptp_watchdog_count" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    @brief Reset ethernet interface
    @desc Enter /eio_sys_rst/ to reset interface and start adaption again
  */
    get eio_sys_rst(): VScript.rwKeyword<
      VScript.VSocket,
      string,
      string,
      string,
      string,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1130.NetworkInterfaces.Port
      >(
        this,
        "eio_sys_rst" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1130.NetworkInterfaces.PortIssues,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1130.NetworkInterfaces.PortIssues,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1130.NetworkInterfaces.PortIssues => ({
          pma_settings_change_require_port_reset: (x & 1) !== 0,
          use_adaptive_pma_settings: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.AT1130.NetworkInterfaces.PortIssues,
          _: VScript.VSocket,
        ): number =>
          (x.pma_settings_change_require_port_reset ? 1 : 0) |
          (x.use_adaptive_pma_settings ? 2 : 0),
      });
    }
    get pma_settings(): VScript.rwKeyword<
      VScript.VSocket,
      | [0, []]
      | [1, []]
      | [2, []]
      | [
          3,
          [
            (
              | [0, []]
              | [
                  1,
                  [
                    VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
                    VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
                    boolean,
                  ],
                ]
            ),
            [number, number, number, number, number],
          ],
        ],
      | [0, []]
      | [1, []]
      | [2, []]
      | [
          3,
          [
            (
              | [0, []]
              | [
                  1,
                  [
                    VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
                    VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
                    boolean,
                  ],
                ]
            ),
            [number, number, number, number, number],
          ],
        ],
      VAPI.AT1130.NetworkInterfaces.PMASettings,
      VAPI.AT1130.NetworkInterfaces.PMASettings,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        | [0, []]
        | [1, []]
        | [2, []]
        | [
            3,
            [
              (
                | [0, []]
                | [
                    1,
                    [
                      VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
                      VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
                      boolean,
                    ],
                  ]
              ),
              [number, number, number, number, number],
            ],
          ],
        | [0, []]
        | [1, []]
        | [2, []]
        | [
            3,
            [
              (
                | [0, []]
                | [
                    1,
                    [
                      VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveProfile,
                      VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptiveEffort,
                      boolean,
                    ],
                  ]
              ),
              [number, number, number, number, number],
            ],
          ],
        VAPI.AT1130.NetworkInterfaces.PMASettings,
        VAPI.AT1130.NetworkInterfaces.PMASettings,
        VAPI.AT1130.NetworkInterfaces.Port
      >(
        this,
        "pma_settings" as VScript.SysName,
        {
          lift: VAPI.AT1130.NetworkInterfaces.lift.PMASettings,
          lower: VAPI.AT1130.NetworkInterfaces.lower.PMASettings,
        },
        {
          lift: VAPI.AT1130.NetworkInterfaces.lift.PMASettings,
          lower: VAPI.AT1130.NetworkInterfaces.lower.PMASettings,
        },
        null,
      );
    }
    get rx_pma_status(): VScript.rKeyword<
      VScript.VSocket,
      [
        VAPI.AT1130.NetworkInterfaces.RXPMAStatusState,
        Array<
          [
            null | [number, number],
            null | boolean,
            null | number,
            null | [number, number, number, number, number, number],
          ]
        >,
      ],
      VAPI.AT1130.NetworkInterfaces.RXPMAStatus,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.AT1130.NetworkInterfaces.RXPMAStatusState,
          Array<
            [
              null | [number, number],
              null | boolean,
              null | number,
              null | [number, number, number, number, number, number],
            ]
          >,
        ],
        VAPI.AT1130.NetworkInterfaces.RXPMAStatus,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "rx_pma_status" as VScript.SysName, {
        lift: VAPI.AT1130.NetworkInterfaces.lift.RXPMAStatus,
        lower: VAPI.AT1130.NetworkInterfaces.lower.RXPMAStatus,
      });
    }

    /**
    To execute shell commands on this interface, you will first need to enter
    its hosting network namespace. E.g., if `network_namespace` reads
    `ns_eth0.2`, the following command lists its IP addresses: `ip netns exec
    ns_eth0.2 ip addr show`
  */
    get network_namespace(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "network_namespace" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get current_configuration() {
      return VAPI.NetworkInterfaces.lift.CurrentPortConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          21,
          "current_configuration",
        ),
      );
    }

    /**
    Save interface
  */
    get save_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.NetworkInterfaces.Port
      >(
        this,
        "save_config" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Revert interface
  */
    get revert_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.NetworkInterfaces.Port
      >(
        this,
        "revert_config" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get desired_configuration() {
      return VAPI.NetworkInterfaces.lift.DesiredPortConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          24,
          "desired_configuration",
        ),
      );
    }

    /**
    Save syslog settings
  */
    get save_syslog_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.NetworkInterfaces.Port
      >(
        this,
        "save_syslog_config" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Revert syslog settings
  */
    get revert_syslog_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.NetworkInterfaces.Port
      >(
        this,
        "revert_syslog_config" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get current_syslog_configuration() {
      return VAPI.NetworkInterfaces.lift.CurrentSyslogConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          27,
          "current_syslog_configuration",
        ),
      );
    }
    get desired_syslog_configuration() {
      return VAPI.NetworkInterfaces.lift.DesiredSyslogConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          28,
          "desired_syslog_configuration",
        ),
      );
    }
    get virtual_interfaces() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "NetworkInterfaces::Data::VirtualInterface",
        VAPI.NetworkInterfaces.VirtualInterface
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          29,
          "virtual_interfaces",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.NetworkInterfaces.lift.VirtualInterface(raw),
      );
    }

    /**
    Updated every time a virtual interface is added, removed, or has its list
    of ip addresses changed (not necessarily monotonic, since PTP-derived).
  */
    get last_vifc_change(): VScript.rKeyword<
      VScript.VSocket,
      null | number | string,
      null | VAPI.Primitives.Timestamp,
      VAPI.AT1130.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number | string,
        null | VAPI.Primitives.Timestamp,
        VAPI.AT1130.NetworkInterfaces.Port
      >(this, "last_vifc_change" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftTimestamp,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerTimestamp,
        ),
      });
    }
    get fpga_lane_statistics() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "NetworkInterfaces::Data::LaneStatistics",
        VAPI.AT1130.NetworkInterfaces.LaneStatistics
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          31,
          "fpga_lane_statistics",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.NetworkInterfaces.lift.LaneStatistics(raw),
      );
    }
    /**
    aggregate statistics as obtained by summing over all of a
    (FPGA-connected) port's internal lanes. Note that management ports never
    report traffic statistics, regardless of their actual activity
  */

    get aggregate_traffic_statistics() {
      return VAPI.AT1130.EthernetStats.lift.PortStatistics(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          32,
          "aggregate_traffic_statistics",
        ),
      );
    }
    get lldp_neighbors() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "NetworkInterfaces::Data::LLDPNeighbor",
        VAPI.NetworkInterfaces.LLDPNeighbor
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          33,
          "lldp_neighbors",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.NetworkInterfaces.lift.LLDPNeighbor(raw),
      );
    }
  }
  export type PortMode = "eth1g" | "eth100g" | "eth100g_nofec" | "eth100g_aui2";
  export interface RXPMAStatus {
    state: VAPI.AT1130.NetworkInterfaces.RXPMAStatusState;
    lanes: Array<VAPI.AT1130.NetworkInterfaces.RXPMAStatusLanes>;
  }
  export interface PMASettingsRecommendedCopper {}
  export interface PMASettingsRecommendedOptical {}
  export interface RXPMAStatusLanesAdaptationTimes {
    initial: VScript.Duration;
    external: VScript.Duration;
  }
  export type PMASettingsManualRxAdaptiveEffort = "LOW" | "HIGH";
  export type PortIssues = {
    pma_settings_change_require_port_reset: boolean;
    use_adaptive_pma_settings: boolean;
  };
  export interface RXPMAStatusLanes {
    adaptation_times: null | VAPI.AT1130.NetworkInterfaces.RXPMAStatusLanesAdaptationTimes;
    freq_locked: null | boolean;
    eye_opening: null | VAPI.Primitives.Unsigned16;
    rx_eq: null | VAPI.AT1130.NetworkInterfaces.RXPMAStatusLanesRxEq;
  }
  export type PMASettingsManualRxAdaptiveProfile = "LR" | "VSR";
  export type PMASettingsManualRx =
    | {
        variant: "Disabled";
        value: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxDisabled;
      }
    | {
        variant: "Adaptive";
        value: VAPI.AT1130.NetworkInterfaces.PMASettingsManualRxAdaptive;
      };
  export interface RXPMAStatusLanesRxEq {
    gain_lf: VAPI.Primitives.Signed16;
    gain_hf: VAPI.Primitives.Signed16;
    rf_b0: VAPI.Primitives.Signed16;
    rf_b1: VAPI.Primitives.Signed16;
    rf_p1: VAPI.Primitives.Signed16;
    rf_p2: VAPI.Primitives.Signed16;
  }
  export type RXPMAStatusState =
    | "NO_QSFP"
    | "NO_ADAPTATION"
    | "CONFIGURING"
    | "SEARCHING_FOR_SIGNAL"
    | "ADAPTATION"
    | "MONITORING"
    | "ONE_TIME_ADAPTATION_COMPLETED"
    | "RESETTING_INTERFACE"
    | "IO_ERROR";
  export interface PMASettingsManualTx {
    pre3: number;
    pre2: number;
    pre1: number;
    main: number;
    post: number;
  }
  export const Enums = {
    PortMode: [
      "eth1g",
      "eth100g",
      "eth100g_nofec",
      "eth100g_aui2",
    ] as PortMode[],
    PTPCalibrationStatus: [
      "COLLECTING_INITIAL_HW_PARAMETERS",
      "INITIAL_CALIBRATION_DONE",
      "STARTING_PTP_UI_TRACKING",
      "PTP_UI_TRACKING_ACTIVE",
      "NO_CALIBRATION_NEEDED",
    ] as PTPCalibrationStatus[],
    Lane: ["P0", "P1"] as Lane[],
  } as const;
}
export namespace PCap {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    InternalStateAwaitingReplayStartTime: (
      _raw: [],
      _socket: VScript.VSocket,
    ): InternalStateAwaitingReplayStartTime => {
      return {};
    },
    Instance: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Instance(_raw),
    InternalState: (
      _raw:
        | [
            0,
            (
              | [0, []]
              | [1, [number, number, number]]
              | [2, [null | number, null | number | string]]
            ),
          ]
        | [1, []],
      _socket: VScript.VSocket,
    ): InternalState => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "Established",
            value: VAPI.AT1130.PCap.lift.Mode(_raw[1], _socket),
          };
        case 1:
          return {
            variant: "AwaitingReplayStartTime",
            value: VAPI.AT1130.PCap.lift.InternalStateAwaitingReplayStartTime(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    Mode: (
      _raw:
        | [0, []]
        | [1, [number, number, number]]
        | [2, [null | number, null | number | string]],
      _socket: VScript.VSocket,
    ): Mode => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "Store",
            value: VAPI.AT1130.PCap.lift.ModeStore(_raw[1], _socket),
          };
        case 1:
          return {
            variant: "StoreAndForward",
            value: VAPI.AT1130.PCap.lift.ModeStoreAndForward(_raw[1], _socket),
          };
        case 2:
          return {
            variant: "Replay",
            value: VAPI.AT1130.PCap.lift.ModeReplay(_raw[1], _socket),
          };
      }
    },
    ModeReplay: (
      _raw: [null | number, null | number | string],
      _socket: VScript.VSocket,
    ): ModeReplay => {
      return {
        pause_between_loops:
          _raw[0] === null
            ? null
            : VScript.VAPIHelpers.liftNanoseconds(_raw[0], _socket),
        start_time:
          _raw[1] === null
            ? null
            : VScript.VAPIHelpers.liftTimestamp(_raw[1], _socket),
      };
    },
    ModeStore: (_raw: [], _socket: VScript.VSocket): ModeStore => {
      return {};
    },
    ModeStoreAndForward: (
      _raw: [number, number, number],
      _socket: VScript.VSocket,
    ): ModeStoreAndForward => {
      return {
        min_delay: VScript.VAPIHelpers.liftNanoseconds(_raw[0], _socket),
        jitter: VScript.VAPIHelpers.liftNanoseconds(_raw[1], _socket),
        packet_loss_rate: _raw[2],
      };
    },
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    InternalStateAwaitingReplayStartTime: (
      _x: {},
      _socket: VScript.VSocket,
    ): [] => [],
    Instance: (_x: Instance) => _x.raw.kwl,
    InternalState: (
      _x:
        | { variant: "Established"; value: VAPI.AT1130.PCap.Mode }
        | {
            variant: "AwaitingReplayStartTime";
            value: VAPI.AT1130.PCap.InternalStateAwaitingReplayStartTime;
          },
      _socket: VScript.VSocket,
    ):
      | [
          0,
          (
            | [0, []]
            | [1, [number, number, number]]
            | [2, [null | number, null | number | string]]
          ),
        ]
      | [1, []] => {
      switch (_x.variant) {
        case "Established":
          return [0, VAPI.AT1130.PCap.lower.Mode(_x.value, _socket)];
        case "AwaitingReplayStartTime":
          return [
            1,
            VAPI.AT1130.PCap.lower.InternalStateAwaitingReplayStartTime(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    Mode: (
      _x:
        | { variant: "Store"; value: VAPI.AT1130.PCap.ModeStore }
        | {
            variant: "StoreAndForward";
            value: VAPI.AT1130.PCap.ModeStoreAndForward;
          }
        | { variant: "Replay"; value: VAPI.AT1130.PCap.ModeReplay },
      _socket: VScript.VSocket,
    ):
      | [0, []]
      | [1, [number, number, number]]
      | [2, [null | number, null | number | string]] => {
      switch (_x.variant) {
        case "Store":
          return [0, VAPI.AT1130.PCap.lower.ModeStore(_x.value, _socket)];
        case "StoreAndForward":
          return [
            1,
            VAPI.AT1130.PCap.lower.ModeStoreAndForward(_x.value, _socket),
          ];
        case "Replay":
          return [2, VAPI.AT1130.PCap.lower.ModeReplay(_x.value, _socket)];
      }
    },
    ModeReplay: (
      _x: {
        /**
            Set this to null to disable looping
          */
        pause_between_loops: null | VAPI.PCap.Delay;

        /**
            Start readout at this PTP timestamp
          */
        start_time: null | VAPI.Primitives.Timestamp;
      },
      _socket: VScript.VSocket,
    ): [null | number, null | number | string] => [
      _x.pause_between_loops === null
        ? null
        : VScript.VAPIHelpers.lowerNanoseconds(_x.pause_between_loops, _socket),
      _x.start_time === null
        ? null
        : VScript.VAPIHelpers.lowerTimestamp(_x.start_time, _socket),
    ],
    ModeStore: (_x: {}, _socket: VScript.VSocket): [] => [],
    ModeStoreAndForward: (
      _x: {
        min_delay: VAPI.PCap.Delay;
        jitter: VScript.Duration;

        /**
            fraction of packets to be randomly excluded from retransmission,
            adjustable between 0.0 (inclusive) and 1.0 (exclusive) in steps
            of 2^(-32).
          */
        packet_loss_rate: number;
      },
      _socket: VScript.VSocket,
    ): [number, number, number] => [
      VScript.VAPIHelpers.lowerNanoseconds(_x.min_delay, _socket),
      VScript.VAPIHelpers.lowerNanoseconds(_x.jitter, _socket),
      _x.packet_loss_rate,
    ],
  } as const;
  export class All implements VScript.Referenceable<"PCap::Data::All"> {
    readonly type_identifier = "PCap::Data::All" as const;
    get runtime_constants() {
      return {
        num_instances: this.raw.backing_store.get_runtime_constant(
          "PCap::num_instances",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get instances() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "PCap::Data::Instance",
        VAPI.AT1130.PCap.Instance
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.PCap.lift.Instance(st),
      );
    }
  }
  export interface InternalStateAwaitingReplayStartTime {}
  export class Instance
    implements VScript.Referenceable<"PCap::Data::Instance">
  {
    readonly type_identifier = "PCap::Data::Instance" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get ingress(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.NetworkInterfaces.Port,
      VAPI.AT1130.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.NetworkInterfaces.Port,
        VAPI.AT1130.PCap.Instance
      >(this, "ingress" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.NetworkInterfaces.Port(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::Port"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get egress(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.NetworkInterfaces.Port,
      VAPI.AT1130.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.NetworkInterfaces.Port,
        VAPI.AT1130.PCap.Instance
      >(this, "egress" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.NetworkInterfaces.Port(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::Port"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get mode(): VScript.dKeyword<
      VScript.VSocket,
      | null
      | (
          | [0, []]
          | [1, [number, number, number]]
          | [2, [null | number, null | number | string]]
        ),
      | null
      | (
          | [0, []]
          | [1, [number, number, number]]
          | [2, [null | number, null | number | string]]
        ),
      null | VAPI.AT1130.PCap.Mode,
      null | VAPI.AT1130.PCap.Mode,
      VAPI.AT1130.PCap.Instance
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        | null
        | (
            | [0, []]
            | [1, [number, number, number]]
            | [2, [null | number, null | number | string]]
          ),
        | null
        | (
            | [0, []]
            | [1, [number, number, number]]
            | [2, [null | number, null | number | string]]
          ),
        null | VAPI.AT1130.PCap.Mode,
        null | VAPI.AT1130.PCap.Mode,
        VAPI.AT1130.PCap.Instance
      >(
        this,
        "mode" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.PCap.lift.Mode,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.PCap.lower.Mode,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.PCap.lift.Mode,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.PCap.lower.Mode,
          ),
        },
        null,
      );
    }

    /**
    Memory area currently holding valid pcap data
  */
    get cur_range(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number],
      VAPI.PCap.MemoryRange,
      VAPI.AT1130.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number],
        VAPI.PCap.MemoryRange,
        VAPI.AT1130.PCap.Instance
      >(this, "cur_range" as VScript.SysName, {
        lift: VAPI.PCap.lift.MemoryRange,
        lower: VAPI.PCap.lower.MemoryRange,
      });
    }
    get pending_dma_transfers(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.PCap.InstancePendingDmaTransfers,
      VAPI.AT1130.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.PCap.InstancePendingDmaTransfers,
        VAPI.AT1130.PCap.Instance
      >(this, "pending_dma_transfers" as VScript.SysName, {
        lift: VAPI.PCap.lift.InstancePendingDmaTransfers,
        lower: VAPI.PCap.lower.InstancePendingDmaTransfers,
      });
    }
    get capacity_at_cur_rate(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1130.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1130.PCap.Instance
      >(this, "capacity_at_cur_rate" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftNanoseconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerNanoseconds,
        ),
      });
    }
    get uploaded_file() {
      return VAPI.PCap.lift.FileInfo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "uploaded_file"),
      );
    }
    get igmp_memberships() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "PCap::Data::IGMPMembership",
        VAPI.PCap.IGMPMembershipAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          7,
          "igmp_memberships",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.PCap.IGMPMembershipAsNamedTableRow(raw),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1130.PCap.InstanceIssues,
      VAPI.AT1130.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1130.PCap.InstanceIssues,
        VAPI.AT1130.PCap.Instance
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1130.PCap.InstanceIssues => ({
          missing_pcap_file: (x & 1) !== 0,
          pending_dma_requests: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.AT1130.PCap.InstanceIssues,
          _: VScript.VSocket,
        ): number =>
          (x.missing_pcap_file ? 1 : 0) | (x.pending_dma_requests ? 2 : 0),
      });
    }
  }
  export type InternalState =
    | { variant: "Established"; value: VAPI.AT1130.PCap.Mode }
    | {
        variant: "AwaitingReplayStartTime";
        value: VAPI.AT1130.PCap.InternalStateAwaitingReplayStartTime;
      };
  export type Mode =
    | { variant: "Store"; value: VAPI.AT1130.PCap.ModeStore }
    | {
        variant: "StoreAndForward";
        value: VAPI.AT1130.PCap.ModeStoreAndForward;
      }
    | { variant: "Replay"; value: VAPI.AT1130.PCap.ModeReplay };
  export interface ModeReplay {
    /**
    Set this to null to disable looping
  */
    pause_between_loops: null | VAPI.PCap.Delay;

    /**
    Start readout at this PTP timestamp
  */
    start_time: null | VAPI.Primitives.Timestamp;
  }
  export interface ModeStore {}
  export interface ModeStoreAndForward {
    min_delay: VAPI.PCap.Delay;
    jitter: VScript.Duration;

    /**
    fraction of packets to be randomly excluded from retransmission,
    adjustable between 0.0 (inclusive) and 1.0 (exclusive) in steps of
    2^(-32).
  */
    packet_loss_rate: number;
  }
  export type InstanceIssues = {
    missing_pcap_file: boolean;
    pending_dma_requests: boolean;
  };
}
export namespace PTPClock {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
  } as const;
  export const lower = { All: (_x: All) => _x.raw.kwl } as const;
  export class All implements VScript.Referenceable<"PTPClock::Data::All"> {
    readonly type_identifier = "PTPClock::Data::All" as const;
    get runtime_constants() {
      return {
        allows_clock_randomization: this.raw.backing_store.get_runtime_constant(
          "PTPClock::allows_clock_randomization",
        ) as boolean,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.PTPClock.All
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.PTPClock.All
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get state(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.PTPClock.State,
      VAPI.PTPClock.State,
      VAPI.AT1130.PTPClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.PTPClock.State,
        VAPI.PTPClock.State,
        VAPI.AT1130.PTPClock.All
      >(this, "state" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    when `mode` is set to `LockToInput`, the PTP clock will attempt to
    synchronize with the external time source designated by `input`. This is
    the default setting and typically the only option suitable for production
    use.
    
    When `mode` is set to `UseInternalOscillator`, the PTP clock will first
    reset its speed to the nominal clock rate generated by its internal
    oscillator, and in the following suspend all clock control operations.
    Likewise, `Disconnect` suspends all clock control operations but in
    contrast to `UseInternalOscillator` continues to run at the current value
    of `relative_clock_speed`
  */
    get mode(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.PTPClock.Mode,
      VAPI.PTPClock.Mode,
      VAPI.PTPClock.Mode,
      VAPI.PTPClock.Mode,
      VAPI.AT1130.PTPClock.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.PTPClock.Mode,
        VAPI.PTPClock.Mode,
        VAPI.PTPClock.Mode,
        VAPI.PTPClock.Mode,
        VAPI.AT1130.PTPClock.All
      >(
        this,
        "mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get statistics() {
      return VAPI.PTPClock.lift.AllStatistics(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "statistics"),
      );
    }
    get relative_clock_speed(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.PTPClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.PTPClock.All
      >(this, "relative_clock_speed" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get parameters() {
      return VAPI.PTPClock.lift.AllParameters(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "parameters"),
      );
    }
    get micro_epochs(): VScript.rKeyword<
      VScript.VSocket,
      [
        [
          number,
          number,
          number | string,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
        ],
        [
          number,
          number,
          number | string,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
        ],
        null | number,
        null | number,
      ],
      VAPI.PTPClock.MicroEpochs,
      VAPI.AT1130.PTPClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          [
            number,
            number,
            number | string,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
          ],
          [
            number,
            number,
            number | string,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
          ],
          null | number,
          null | number,
        ],
        VAPI.PTPClock.MicroEpochs,
        VAPI.AT1130.PTPClock.All
      >(this, "micro_epochs" as VScript.SysName, {
        lift: VAPI.PTPClock.lift.MicroEpochs,
        lower: VAPI.PTPClock.lower.MicroEpochs,
      });
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "ptp_traits"),
      );
    }

    /**
    @brief Randomize clock
    @desc Do not push this button
  */
    get randomize_clock(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.PTPClock.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.PTPClock.All
      >(
        this,
        "randomize_clock" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
}
export namespace PTPFlows {
  export const lift = {
    Agent: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Agent(_raw),
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    Master: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Master(_raw),
    MasterSettings: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MasterSettings(_raw),
    Port: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new Port(_raw),
    PortBestMasters: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PortBestMasters(_raw),
    AgentLatchedVifc: (
      _raw: [null | number, VAPI.AT1130.NetworkInterfaces.Lane],
      _socket: VScript.VSocket,
    ): AgentLatchedVifc => {
      return {
        vlan_id: _raw[0],
        lane: _raw[1],
      };
    },
    MasterVisibleVia: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MasterVisibleVia(_raw),
  } as const;
  export const lower = {
    Agent: (_x: Agent) => _x.raw.kwl,
    All: (_x: All) => _x.raw.kwl,
    Master: (_x: Master) => _x.raw.kwl,
    MasterSettings: (_x: MasterSettings) => _x.raw.kwl,
    Port: (_x: Port) => _x.raw.kwl,
    PortBestMasters: (_x: PortBestMasters) => _x.raw.kwl,
    AgentLatchedVifc: (
      _x: {
        vlan_id: null | VAPI.Primitives.VlanID;
        lane: VAPI.AT1130.NetworkInterfaces.Lane;
      },
      _socket: VScript.VSocket,
    ): [null | number, VAPI.AT1130.NetworkInterfaces.Lane] => [
      _x.vlan_id,
      _x.lane,
    ],
    MasterVisibleVia: (_x: MasterVisibleVia) => _x.raw.kwl,
  } as const;
  export class Agent implements VScript.Referenceable<"PTPFlows::Data::Agent"> {
    readonly type_identifier = "PTPFlows::Data::Agent" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get mode(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.PTPFlows.AgentMode,
      VAPI.PTPFlows.AgentMode,
      VAPI.PTPFlows.AgentMode,
      VAPI.PTPFlows.AgentMode,
      VAPI.AT1130.PTPFlows.Agent
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.PTPFlows.AgentMode,
        VAPI.PTPFlows.AgentMode,
        VAPI.PTPFlows.AgentMode,
        VAPI.PTPFlows.AgentMode,
        VAPI.AT1130.PTPFlows.Agent
      >(
        this,
        "mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get state(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.PTPFlows.AgentState,
      VAPI.PTPFlows.AgentState,
      VAPI.AT1130.PTPFlows.Agent
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.PTPFlows.AgentState,
        VAPI.PTPFlows.AgentState,
        VAPI.AT1130.PTPFlows.Agent
      >(this, "state" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get domain(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.PTP.Domain,
      VAPI.PTP.Domain,
      VAPI.AT1130.PTPFlows.Agent
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTP.Domain,
        VAPI.PTP.Domain,
        VAPI.AT1130.PTPFlows.Agent
      >(
        this,
        "domain" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get hosting_port(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.PTPFlows.Port,
      | null
      | (VScript.Referenceable<"PTPFlows::Data::Port"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.PTPFlows.Agent
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.PTPFlows.Port,
        | null
        | (VScript.Referenceable<"PTPFlows::Data::Port"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.PTPFlows.Agent
      >(
        this,
        "hosting_port" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.PTPFlows.Port(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"PTPFlows::Data::Port"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.PTPFlows.Port(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"PTPFlows::Data::Port"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }

    /**
    Because port references may be invalidated on changes to the network
    configuration, PTP agents store their lane and VLAN ids instead, and use
    those to either recover hosting port information on startup, or reject
    their configuration as invalid if the previously selected PTP port is no
    longer available
  */
    get latched_vifc(): VScript.rKeyword<
      VScript.VSocket,
      null | [null | number, VAPI.AT1130.NetworkInterfaces.Lane],
      null | VAPI.AT1130.PTPFlows.AgentLatchedVifc,
      VAPI.AT1130.PTPFlows.Agent
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [null | number, VAPI.AT1130.NetworkInterfaces.Lane],
        null | VAPI.AT1130.PTPFlows.AgentLatchedVifc,
        VAPI.AT1130.PTPFlows.Agent
      >(this, "latched_vifc" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.PTPFlows.lift.AgentLatchedVifc,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.PTPFlows.lower.AgentLatchedVifc,
        ),
      });
    }

    /**
    best (as defined by the Best Master Clock algorithm) PTP master visible
    on this interface and within this PTP domain, excluding this agent
    itself.
  */
    get best_foreign_master(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.PTPFlows.Master,
      VAPI.AT1130.PTPFlows.Agent
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.PTPFlows.Master,
        VAPI.AT1130.PTPFlows.Agent
      >(this, "best_foreign_master" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.PTPFlows.Master(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"PTPFlows::Data::Master"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get slave_settings() {
      return VAPI.PTPFlows.lift.SlaveSettings(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          6,
          "slave_settings",
        ),
      );
    }
    get master_settings() {
      return VAPI.AT1130.PTPFlows.lift.MasterSettings(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          7,
          "master_settings",
        ),
      );
    }
    get slave_statistics() {
      return VAPI.PTPFlows.lift.AgentSlaveStatistics(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          8,
          "slave_statistics",
        ),
      );
    }
    get master_statistics() {
      return VAPI.PTPFlows.lift.AgentMasterStatistics(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          9,
          "master_statistics",
        ),
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 10, "output"),
      );
    }
  }
  export class AgentAsNamedTableRow extends Agent {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class All implements VScript.Referenceable<"PTPFlows::Data::All"> {
    readonly type_identifier = "PTPFlows::Data::All" as const;
    get runtime_constants() {
      return {
        supports_delayresp_in_hardware:
          this.raw.backing_store.get_runtime_constant(
            "PTPFlows::supports_delayresp_in_hardware",
          ) as boolean,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get general_settings() {
      return VAPI.PTPFlows.lift.AllGeneralSettings(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          0,
          "general_settings",
        ),
      );
    }
    get agents() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "PTPFlows::Data::Agent",
        VAPI.AT1130.PTPFlows.AgentAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "agents",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.PTPFlows.AgentAsNamedTableRow(raw),
      );
    }
    get ports() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "PTPFlows::Data::Port",
        VAPI.AT1130.PTPFlows.Port
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "ports"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.PTPFlows.lift.Port(raw),
      );
    }
    get visible_masters() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "PTPFlows::Data::Master",
        VAPI.AT1130.PTPFlows.Master
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          3,
          "visible_masters",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.PTPFlows.lift.Master(raw),
      );
    }
  }
  export class Master
    implements VScript.Referenceable<"PTPFlows::Data::Master">
  {
    readonly type_identifier = "PTPFlows::Data::Master" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get gen_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.PTPFlows.Master
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.PTPFlows.Master
      >(this, "gen_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get evt_address(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.AT1130.PTPFlows.Master
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1130.PTPFlows.Master
      >(this, "evt_address" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get visible_via() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "PTPFlows::Data::Master::VisibleVia",
        VAPI.AT1130.PTPFlows.MasterVisibleVia
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "visible_via",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.PTPFlows.lift.MasterVisibleVia(raw),
      );
    }
    /**
    PTP traits as extracted from the most recently received announce message
  */

    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "ptp_traits"),
      );
    }
  }
  export class MasterSettings
    implements VScript.Referenceable<"PTPFlows::Data::MasterSettings">
  {
    readonly type_identifier = "PTPFlows::Data::MasterSettings" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    base-2 logarithm of the announce interval in seconds. E.g., a setting of
    -2 will cause this agent to emit announce messages 4 times a second; 2
    times a second if this is set to -1.
  */
    get log2_announce_interval(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.PTPFlows.MasterSettingsLog2AnnounceInterval,
      VAPI.PTPFlows.MasterSettingsLog2AnnounceInterval,
      VAPI.AT1130.PTPFlows.MasterSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTPFlows.MasterSettingsLog2AnnounceInterval,
        VAPI.PTPFlows.MasterSettingsLog2AnnounceInterval,
        VAPI.AT1130.PTPFlows.MasterSettings
      >(
        this,
        "log2_announce_interval" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    base-2 logarithm of the sync interval in seconds. E.g., a setting of -3
    will cause this agent to emit sync and followup messages 8 times a
    second; 4 times a second if this is set to -2.
  */
    get log2_sync_interval(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.PTPFlows.MasterSettingsLog2SyncInterval,
      VAPI.PTPFlows.MasterSettingsLog2SyncInterval,
      VAPI.AT1130.PTPFlows.MasterSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTPFlows.MasterSettingsLog2SyncInterval,
        VAPI.PTPFlows.MasterSettingsLog2SyncInterval,
        VAPI.AT1130.PTPFlows.MasterSettings
      >(
        this,
        "log2_sync_interval" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get delay_decimation_factor(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.PTPFlows.MasterSettingsDelayDecimationFactor,
      VAPI.AT1130.PTPFlows.MasterSettings
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.PTPFlows.MasterSettingsDelayDecimationFactor,
        VAPI.AT1130.PTPFlows.MasterSettings
      >(this, "delay_decimation_factor" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get grandmaster() {
      return VAPI.PTPFlows.lift.MasterSettingsGrandmaster(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "grandmaster"),
      );
    }

    /**
    unlike sync and follow-up messages, which contain no client-dependent
    information and are thus useful to all clients within their PTP domain,
    delay request/response messages are useful only to the inquiring client
    (and perhaps to the master if it wishes to monitor its clients' timing
    properties). Exchanging these messages via unicast reduces both network
    traffic and local workload but yields otherwise identical results (this
    mode may also be called `Hybrid` on other products). If
    `delay_resp_routing` is set to `Multicast`, all delay responses emitted
    by this agent will be sent to the PTP multicast address `224.0.1.129`
  */
    get delay_resp_routing(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.PTPFlows.Routing,
      VAPI.PTPFlows.Routing,
      VAPI.PTPFlows.Routing,
      VAPI.PTPFlows.Routing,
      VAPI.AT1130.PTPFlows.MasterSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.PTPFlows.Routing,
        VAPI.PTPFlows.Routing,
        VAPI.PTPFlows.Routing,
        VAPI.PTPFlows.Routing,
        VAPI.AT1130.PTPFlows.MasterSettings
      >(
        this,
        "delay_resp_routing" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.PTPFlows.MasterSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.PTPFlows.MasterSettings
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
  }
  export class Port implements VScript.Referenceable<"PTPFlows::Data::Port"> {
    readonly type_identifier = "PTPFlows::Data::Port" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.PTPFlows.Port
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.PTPFlows.Port
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get hosting_interface(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.NetworkInterfaces.VirtualInterface,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.NetworkInterfaces.VirtualInterface,
        VAPI.AT1130.PTPFlows.Port
      >(this, "hosting_interface" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.NetworkInterfaces.VirtualInterface(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::VirtualInterface"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get lane(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.AT1130.NetworkInterfaces.Lane,
      null | VAPI.AT1130.NetworkInterfaces.Lane,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.AT1130.NetworkInterfaces.Lane,
        null | VAPI.AT1130.NetworkInterfaces.Lane,
        VAPI.AT1130.PTPFlows.Port
      >(this, "lane" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get port_identity(): VScript.rKeyword<
      VScript.VSocket,
      [Array<number>, number],
      VAPI.PTP.PortIdentity,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [Array<number>, number],
        VAPI.PTP.PortIdentity,
        VAPI.AT1130.PTPFlows.Port
      >(this, "port_identity" as VScript.SysName, {
        lift: VAPI.PTP.lift.PortIdentity,
        lower: VAPI.PTP.lower.PortIdentity,
      });
    }
    get best_masters() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "PTPFlows::Data::Port::BestMasters",
        VAPI.AT1130.PTPFlows.PortBestMasters
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          5,
          "best_masters",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.PTPFlows.lift.PortBestMasters(st),
      );
    }

    /**
    use this TTL value for all multicast event messages (UDP port 319) sent
    out from this PTP port
  */
    get multicast_event_ttl(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.PTPFlows.Port
      >(
        this,
        "multicast_event_ttl" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    use this DSCP for all event messages (UDP port 319) sent out from this
    PTP port
  */
    get event_dscp(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.PTPFlows.DiffServCodePoint,
      VAPI.PTPFlows.DiffServCodePoint,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTPFlows.DiffServCodePoint,
        VAPI.PTPFlows.DiffServCodePoint,
        VAPI.AT1130.PTPFlows.Port
      >(
        this,
        "event_dscp" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    use this TTL value for all general multicast messages (UDP port 320) sent
    out from this PTP port
  */
    get multicast_general_ttl(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.PTPFlows.Port
      >(
        this,
        "multicast_general_ttl" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    use this DSCP for all general messages (UDP port 320) sent out from this
    PTP port
  */
    get general_dscp(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.PTPFlows.DiffServCodePoint,
      VAPI.PTPFlows.DiffServCodePoint,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTPFlows.DiffServCodePoint,
        VAPI.PTPFlows.DiffServCodePoint,
        VAPI.AT1130.PTPFlows.Port
      >(
        this,
        "general_dscp" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1130.PTPFlows.PortIssues,
      VAPI.AT1130.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1130.PTPFlows.PortIssues,
        VAPI.AT1130.PTPFlows.Port
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1130.PTPFlows.PortIssues => ({
          denied_general_dscp_request: (x & 1) !== 0,
          denied_general_ttl_request: (x & 2) !== 0,
          unresolved_dscp_request: (x & 4) !== 0,
          unresolved_ttl_request: (x & 8) !== 0,
          waiting_for_rx_calibration: (x & 16) !== 0,
          waiting_for_tx_calibration: (x & 32) !== 0,
        }),
        lower: (
          x: VAPI.AT1130.PTPFlows.PortIssues,
          _: VScript.VSocket,
        ): number =>
          (x.denied_general_dscp_request ? 1 : 0) |
          (x.denied_general_ttl_request ? 2 : 0) |
          (x.unresolved_dscp_request ? 4 : 0) |
          (x.unresolved_ttl_request ? 8 : 0) |
          (x.waiting_for_rx_calibration ? 16 : 0) |
          (x.waiting_for_tx_calibration ? 32 : 0),
      });
    }
  }
  export class PortBestMasters
    implements VScript.Referenceable<"PTPFlows::Data::Port::BestMasters">
  {
    readonly type_identifier = "PTPFlows::Data::Port::BestMasters" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.PTPFlows.Master,
      VAPI.AT1130.PTPFlows.PortBestMasters
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.PTPFlows.Master,
        VAPI.AT1130.PTPFlows.PortBestMasters
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.PTPFlows.Master(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"PTPFlows::Data::Master"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export type PortIssues = {
    denied_general_dscp_request: boolean;
    denied_general_ttl_request: boolean;
    unresolved_dscp_request: boolean;
    unresolved_ttl_request: boolean;
    waiting_for_rx_calibration: boolean;
    waiting_for_tx_calibration: boolean;
  };
  /**
  Because port references may be invalidated on changes to the network
  configuration, PTP agents store their lane and VLAN ids instead, and use
  those to either recover hosting port information on startup, or reject
  their configuration as invalid if the previously selected PTP port is no
  longer available
*/
  export interface AgentLatchedVifc {
    vlan_id: null | VAPI.Primitives.VlanID;
    lane: VAPI.AT1130.NetworkInterfaces.Lane;
  }
  export class MasterVisibleVia
    implements VScript.Referenceable<"PTPFlows::Data::Master::VisibleVia">
  {
    readonly type_identifier = "PTPFlows::Data::Master::VisibleVia" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get port(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.PTPFlows.Port,
      VAPI.AT1130.PTPFlows.MasterVisibleVia
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.PTPFlows.Port,
        VAPI.AT1130.PTPFlows.MasterVisibleVia
      >(this, "port" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.PTPFlows.Port(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"PTPFlows::Data::Port"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }

    /**
    time at which an announce message from this master had last been received
    via the referenced port, measured relative to process initialization time
  */
    get announced_at(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1130.PTPFlows.MasterVisibleVia
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1130.PTPFlows.MasterVisibleVia
      >(this, "announced_at" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftNanoseconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerNanoseconds,
        ),
      });
    }
  }
}
export namespace Primitives {
  export type NetworkPortID =
    | "FRONT_MANAGEMENT"
    | "REAR_MANAGEMENT"
    | "PORT0"
    | "PORT1";
  export const Enums = {
    NetworkPortID: [
      "FRONT_MANAGEMENT",
      "REAR_MANAGEMENT",
      "PORT0",
      "PORT1",
    ] as NetworkPortID[],
  } as const;
}
export namespace RTPReceiver {
  export const lift = {
    ReadSpeedAdaptive: (
      _raw: [],
      _socket: VScript.VSocket,
    ): ReadSpeedAdaptive => {
      return {};
    },
    AffineNetworkSource: (
      _raw: [null | string, number],
      _socket: VScript.VSocket,
    ): AffineNetworkSource => {
      return {
        source:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.NetworkSource(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        seqnr_offset: _raw[1],
      };
    },
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    AncBurstReceiver: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AncBurstReceiver(_raw),
    AssociatedStream: (
      _raw: [null | string, number, null | [number, number, number, number]],
      _socket: VScript.VSocket,
    ): AssociatedStream => {
      return {
        stream:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.PacketStream(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        subflow_index: _raw[1],
        read_delay:
          _raw[2] === null
            ? null
            : VAPI.Time.lift.TimestampedOffset(_raw[2], _socket),
      };
    },
    AudioBackend: (
      _raw: [
        number,
        number,
        null | string,
        Array<null | number>,
        number,
        number,
        Array<null | number>,
      ],
      _socket: VScript.VSocket,
    ): AudioBackend => {
      return {
        group: _raw[0],
        instance: _raw[1],
        servo:
          _raw[2] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.AudioServo(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[2] as VScript.KWLName<"full">,
                ),
              ),
        slices: _raw[3],
        channel: _raw[4],
        read_pair: _raw[5],
        fifo_blocks: _raw[6],
      };
    },
    AudioCapabilities: (
      _raw: [
        number,
        VAPI.AT1130.RTPReceiver.AudioCapabilitiesPayloadLimit,
        boolean,
        [0, [null | string]] | [1, []],
      ],
      _socket: VScript.VSocket,
    ): AudioCapabilities => {
      return {
        channel_capacity: _raw[0],
        payload_limit: _raw[1],
        supports_clean_switching: _raw[2],
        read_speed: VAPI.AT1130.RTPReceiver.lift.ReadSpeed(_raw[3], _socket),
      };
    },
    AudioFlowPartition: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioFlowPartition(_raw),
    AudioReceiver: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioReceiver(_raw),
    AudioServo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioServo(_raw),
    TimingTargetBufferMidpoint: (
      _raw: [],
      _socket: VScript.VSocket,
    ): TimingTargetBufferMidpoint => {
      return {};
    },
    BufferProfile: (
      _raw: [number, number, number],
      _socket: VScript.VSocket,
    ): BufferProfile => {
      return {
        channel: _raw[0],
        pseudo_channel: _raw[1],
        blockcount: _raw[2],
      };
    },
    BufferSizes: (
      _raw: [
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
      ],
      _socket: VScript.VSocket,
    ): BufferSizes => {
      return {
        for_audio: _raw[0],
        for_2022_6: _raw[1],
        for_2110_20_uhd_singlelink: _raw[2],
        for_2110_20_other: _raw[3],
        for_2042_2: _raw[4],
        for_jpeg_xs: _raw[5],
        for_passthrough: _raw[6],
      };
    },
    TimingTargetEgressPlusX: (
      _raw: [number],
      _socket: VScript.VSocket,
    ): TimingTargetEgressPlusX => {
      return {
        read_delay: VScript.VAPIHelpers.liftSeconds(_raw[0], _socket),
      };
    },
    TimingTargetForeignMediaClock: (
      _raw: [null | string, number, VAPI.RTPReceiver.BackpressurePolicy],
      _socket: VScript.VSocket,
    ): TimingTargetForeignMediaClock => {
      return {
        foreign_receiver:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.MediaReceiver(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        extra_delay: VScript.VAPIHelpers.liftSeconds(_raw[1], _socket),
        on_backpressure: _raw[2],
      };
    },
    TimingTargetForeignReadDelay: (
      _raw: [null | string, number, VAPI.RTPReceiver.BackpressurePolicy],
      _socket: VScript.VSocket,
    ): TimingTargetForeignReadDelay => {
      return {
        foreign_receiver:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.MediaReceiver(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        extra_delay: VScript.VAPIHelpers.liftSeconds(_raw[1], _socket),
        on_backpressure: _raw[2],
      };
    },
    TimingTargetIngressPlusX: (
      _raw: [number],
      _socket: VScript.VSocket,
    ): TimingTargetIngressPlusX => {
      return {
        read_delay: VScript.VAPIHelpers.liftSeconds(_raw[0], _socket),
      };
    },
    JpegXsVideoBackend: (
      _raw: [
        number,
        Array<null | number>,
        number,
        null | [number, number, [number, number], number, number],
      ],
      _socket: VScript.VSocket,
    ): JpegXsVideoBackend => {
      return {
        group: _raw[0],
        instances: _raw[1],
        channel: _raw[2],
        metadata:
          _raw[3] === null
            ? null
            : VAPI.AT1130.RTPReceiver.lift.MetadataBackend(_raw[3], _socket),
      };
    },
    ReadSpeedLockToGenlock: (
      _raw: [null | string],
      _socket: VScript.VSocket,
    ): ReadSpeedLockToGenlock => {
      return {
        genlock:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.Genlock.AT1130Genlock(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    MediaReceiver: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MediaReceiver(_raw),
    MemoryChannelInfo: (
      _raw: [
        number,
        number,
        [
          Array<null | number>,
          Array<null | number>,
          Array<null | [number, number]>,
        ],
        number,
      ],
      _socket: VScript.VSocket,
    ): MemoryChannelInfo => {
      return {
        channel: _raw[0],
        pseudo_channel: _raw[1],
        connected_to: VAPI.AT1130.RTPReceiver.lift.MemoryChannelInfoConnectedTo(
          _raw[2],
          _socket,
        ),
        blocks_left: _raw[3],
      };
    },
    MetadataBackend: (
      _raw: [number, number, [number, number], number, number],
      _socket: VScript.VSocket,
    ): MetadataBackend => {
      return {
        group: _raw[0],
        instance: _raw[1],
        stats_id: VAPI.RTPReceiver.lift.StatsID(_raw[2], _socket),
        read_id: _raw[3],
        channel: _raw[4],
      };
    },
    NativeVideoBackend: (
      _raw: [
        number,
        Array<null | number>,
        number,
        null | [number, number, [number, number], number, number],
      ],
      _socket: VScript.VSocket,
    ): NativeVideoBackend => {
      return {
        group: _raw[0],
        instances: _raw[1],
        channel: _raw[2],
        metadata:
          _raw[3] === null
            ? null
            : VAPI.AT1130.RTPReceiver.lift.MetadataBackend(_raw[3], _socket),
      };
    },
    NetworkSource: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new NetworkSource(_raw),
    PacketStream: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PacketStream(_raw),
    PacketTracer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PacketTracer(_raw),
    PassthroughEssence: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PassthroughEssence(_raw),
    PassthroughFlowPartition: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new PassthroughFlowPartition(_raw),
    PassthroughReceiver: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PassthroughReceiver(_raw),
    ReadSpeed: (
      _raw: [0, [null | string]] | [1, []],
      _socket: VScript.VSocket,
    ): ReadSpeed => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "LockToGenlock",
            value: VAPI.AT1130.RTPReceiver.lift.ReadSpeedLockToGenlock(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "Adaptive",
            value: VAPI.AT1130.RTPReceiver.lift.ReadSpeedAdaptive(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    ReserveAudioBackend: (
      _raw: [
        number,
        number,
        Array<null | number>,
        number,
        number,
        Array<null | number>,
        null | number,
      ],
      _socket: VScript.VSocket,
    ): ReserveAudioBackend => {
      return {
        group: _raw[0],
        instance: _raw[1],
        slices: _raw[2],
        channel: _raw[3],
        read_pair: _raw[4],
        fifo_blocks: _raw[5],
        fence: _raw[6],
      };
    },
    Session: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Session(_raw),
    TimingTargetTimeSource: (
      _raw: [null | string, boolean],
      _socket: VScript.VSocket,
    ): TimingTargetTimeSource => {
      return {
        t_src:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        use_rtp_timestamp: _raw[1],
      };
    },
    Timing: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Timing(_raw),
    TimingTarget: (
      _raw:
        | [0, [number]]
        | [1, [number]]
        | [2, [null | string, boolean]]
        | [3, []]
        | [4, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]]
        | [5, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]],
      _socket: VScript.VSocket,
    ): TimingTarget => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "IngressPlusX",
            value: VAPI.AT1130.RTPReceiver.lift.TimingTargetIngressPlusX(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "EgressPlusX",
            value: VAPI.AT1130.RTPReceiver.lift.TimingTargetEgressPlusX(
              _raw[1],
              _socket,
            ),
          };
        case 2:
          return {
            variant: "TimeSource",
            value: VAPI.AT1130.RTPReceiver.lift.TimingTargetTimeSource(
              _raw[1],
              _socket,
            ),
          };
        case 3:
          return {
            variant: "BufferMidpoint",
            value: VAPI.AT1130.RTPReceiver.lift.TimingTargetBufferMidpoint(
              _raw[1],
              _socket,
            ),
          };
        case 4:
          return {
            variant: "ForeignReadDelay",
            value: VAPI.AT1130.RTPReceiver.lift.TimingTargetForeignReadDelay(
              _raw[1],
              _socket,
            ),
          };
        case 5:
          return {
            variant: "ForeignMediaClock",
            value: VAPI.AT1130.RTPReceiver.lift.TimingTargetForeignMediaClock(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    VideoBackend: (
      _raw: [
        (
          | null
          | [
              number,
              Array<null | number>,
              number,
              null | [number, number, [number, number], number, number],
            ]
        ),
        (
          | null
          | [
              number,
              Array<null | number>,
              number,
              null | [number, number, [number, number], number, number],
            ]
        ),
        null | string,
      ],
      _socket: VScript.VSocket,
    ): VideoBackend => {
      return {
        native:
          _raw[0] === null
            ? null
            : VAPI.AT1130.RTPReceiver.lift.NativeVideoBackend(_raw[0], _socket),
        jpeg_xs:
          _raw[1] === null
            ? null
            : VAPI.AT1130.RTPReceiver.lift.JpegXsVideoBackend(_raw[1], _socket),
        servo:
          _raw[2] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.VideoServo(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[2] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    VideoCapabilities: (
      _raw: [
        boolean,
        boolean,
        null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt211020Caliber,
        null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt20422Caliber,
        null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
        boolean,
        boolean,
        [0, [null | string]] | [1, []],
      ],
      _socket: VScript.VSocket,
    ): VideoCapabilities => {
      return {
        supports_2022_6: _raw[0],
        supports_uhd_sample_interleaved: _raw[1],
        st2110_20_caliber: _raw[2],
        st2042_2_caliber: _raw[3],
        jpeg_xs_caliber: _raw[4],
        supports_2110_40: _raw[5],
        supports_clean_switching: _raw[6],
        read_speed: VAPI.AT1130.RTPReceiver.lift.ReadSpeed(_raw[7], _socket),
      };
    },
    VideoFlowPartition: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new VideoFlowPartition(_raw),
    VideoReceiver: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new VideoReceiver(_raw),
    VideoServo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new VideoServo(_raw),
    MemoryChannelInfoConnectedToAudio: (
      _raw: [number, number],
      _socket: VScript.VSocket,
    ): MemoryChannelInfoConnectedToAudio => {
      return {
        block: _raw[0],
        fifo_blocks_left: _raw[1],
      };
    },
    MemoryChannelInfoConnectedTo: (
      _raw: [
        Array<null | number>,
        Array<null | number>,
        Array<null | [number, number]>,
      ],
      _socket: VScript.VSocket,
    ): MemoryChannelInfoConnectedTo => {
      return {
        video_native: _raw[0],
        video_jpegxs: _raw[1],
        audio: _raw[2].map((el) =>
          el === null
            ? null
            : VAPI.AT1130.RTPReceiver.lift.MemoryChannelInfoConnectedToAudio(
                el,
                _socket,
              ),
        ),
      };
    },
    AllDiagnostics: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AllDiagnostics(_raw),
    AllDiagnosticsRtpInputFillLevel: (
      _raw: [number, number],
      _socket: VScript.VSocket,
    ): AllDiagnosticsRtpInputFillLevel => {
      return {
        min: _raw[0],
        max: _raw[1],
      };
    },
    PassthroughReceiverFlowPartitions: (
      _raw: [null | string, null | string],
      _socket: VScript.VSocket,
    ): PassthroughReceiverFlowPartitions => {
      return {
        sdp_a:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.PassthroughFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        sdp_b:
          _raw[1] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.PassthroughFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[1] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    AudioReceiverMediaSpecificFlowPartitions: (
      _raw: [null | string, null | string],
      _socket: VScript.VSocket,
    ): AudioReceiverMediaSpecificFlowPartitions => {
      return {
        sdp_a:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.AudioFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        sdp_b:
          _raw[1] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.AudioFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[1] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    VideoReceiverMediaSpecificFlowPartitions: (
      _raw: [null | string, null | string],
      _socket: VScript.VSocket,
    ): VideoReceiverMediaSpecificFlowPartitions => {
      return {
        sdp_a:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.VideoFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        sdp_b:
          _raw[1] === null
            ? null
            : new VAPI.AT1130.RTPReceiver.VideoFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[1] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    AllDiagnosticsIgmpPerformanceMetricsIgmpLatency: (
      _raw: [
        null | VAPI.AT1130.Primitives.NetworkPortID,
        null | string,
        null | string,
        null | number,
        null | number,
        null | number,
        null | number,
      ],
      _socket: VScript.VSocket,
    ): AllDiagnosticsIgmpPerformanceMetricsIgmpLatency => {
      return {
        port: _raw[0],
        src: _raw[1],
        dst: _raw[2],
        time_to_first_mpacket:
          _raw[3] === null
            ? null
            : VScript.VAPIHelpers.liftSeconds(_raw[3], _socket),
        first_rtp_timestamp: _raw[4],
        first_rtp_seqnr: _raw[5],
        mpacket_interval:
          _raw[6] === null
            ? null
            : VScript.VAPIHelpers.liftSeconds(_raw[6], _socket),
      };
    },
    AllDiagnosticsIgmpPerformanceMetrics: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new AllDiagnosticsIgmpPerformanceMetrics(_raw),
    AncBurstReceiverMediaClock: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new AncBurstReceiverMediaClock(_raw),
    AudioReceiverMediaSpecific: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new AudioReceiverMediaSpecific(_raw),
    VideoReceiverMediaSpecific: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new VideoReceiverMediaSpecific(_raw),
    PassthroughEssenceMemoryBlocks: (
      _raw: [number, Array<null | number>],
      _socket: VScript.VSocket,
    ): PassthroughEssenceMemoryBlocks => {
      return {
        channel: _raw[0],
        blocks: _raw[1],
      };
    },
    AudioReceiverMediaSpecificOutput: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new AudioReceiverMediaSpecificOutput(_raw),
    VideoReceiverMediaSpecificOutput: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new VideoReceiverMediaSpecificOutput(_raw),
    MediaReceiverPacketStreams: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new MediaReceiverPacketStreams(_raw),
    AllDiagnosticsRtpInputPacketsDiscarded: (
      _raw: [number, number, number, number],
      _socket: VScript.VSocket,
    ): AllDiagnosticsRtpInputPacketsDiscarded => {
      return {
        input_errors: _raw[0],
        oversized: _raw[1],
        data_fifo_full: _raw[2],
        info_fifo_full: _raw[3],
      };
    },
    AllDiagnosticsRtpInput: (
      _raw: [number, [number, number, number, number], [number, number]],
      _socket: VScript.VSocket,
    ): AllDiagnosticsRtpInput => {
      return {
        packets_written: _raw[0],
        packets_discarded:
          VAPI.AT1130.RTPReceiver.lift.AllDiagnosticsRtpInputPacketsDiscarded(
            _raw[1],
            _socket,
          ),
        fill_level:
          VAPI.AT1130.RTPReceiver.lift.AllDiagnosticsRtpInputFillLevel(
            _raw[2],
            _socket,
          ),
      };
    },
    AllSettings: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AllSettings(_raw),
    PacketStreamStreamParameters: (
      _raw: [
        number,
        null | string,
        null | string,
        null | string,
        VAPI.RTPReceiver.PacketStreamType,
        number,
        VAPI.AT1130.RTPReceiver.PacketStreamStreamParametersIrqRate,
      ],
      _socket: VScript.VSocket,
    ): PacketStreamStreamParameters => {
      return {
        seqnr_offset: _raw[0],
        src_address: _raw[1],
        dst_address: _raw[2],
        interface:
          _raw[3] === null
            ? null
            : new VAPI.NetworkInterfaces.VirtualInterface(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[3] as VScript.KWLName<"full">,
                ),
              ),
        type: _raw[4],
        pseudo_channel: _raw[5],
        irq_rate: _raw[6],
      };
    },
  } as const;
  export const lower = {
    ReadSpeedAdaptive: (_x: {}, _socket: VScript.VSocket): [] => [],
    AffineNetworkSource: (
      _x: {
        source: null | VAPI.AT1130.RTPReceiver.NetworkSource;
        seqnr_offset: VAPI.Primitives.Unsigned16;
      },
      _socket: VScript.VSocket,
    ): [null | string, number] => [
      _x.source === null ? null : _x.source.raw.kwl,
      _x.seqnr_offset,
    ],
    All: (_x: All) => _x.raw.kwl,
    AncBurstReceiver: (_x: AncBurstReceiver) => _x.raw.kwl,
    AssociatedStream: (
      _x: {
        stream: null | VAPI.AT1130.RTPReceiver.PacketStream;

        /**
          used to distinguish between a video flow's underlying video streams
          (subflows 0 to 3 for a quad-link flow, 0 otherwise), and its
          2110-40 sidecar (4), if any
        */
        subflow_index: VAPI.RTPReceiver.SubflowIndex;
        read_delay: null | VAPI.Time.TimestampedOffset;
      },
      _socket: VScript.VSocket,
    ): [null | string, number, null | [number, number, number, number]] => [
      _x.stream === null ? null : _x.stream.raw.kwl,
      _x.subflow_index,
      _x.read_delay === null
        ? null
        : VAPI.Time.lower.TimestampedOffset(_x.read_delay, _socket),
    ],
    AudioBackend: (
      _x: {
        group: VAPI.RTPReceiver.AudioBlockIndex;
        instance: VAPI.RTPReceiver.AudioInstanceIndex;
        servo: null | VAPI.AT1130.RTPReceiver.AudioServo;
        slices: Array<null | VAPI.RTPReceiver.LocalSliceIndex>;
        channel: VAPI.AT1130.RTPReceiver.RAMChannel;

        /**
          determines the internal read index; reads from the main memory
          region use `2*read_pair`, reads from the alternate region use
          `2*read_pair+1`
        */
        read_pair: number;
        fifo_blocks: Array<null | VAPI.AT1130.RTPReceiver.AudioDecoderFIFOBlock>;
      },
      _socket: VScript.VSocket,
    ): [
      number,
      number,
      null | string,
      Array<null | number>,
      number,
      number,
      Array<null | number>,
    ] => [
      _x.group,
      _x.instance,
      _x.servo === null ? null : _x.servo.raw.kwl,
      _x.slices,
      _x.channel,
      _x.read_pair,
      _x.fifo_blocks,
    ],
    AudioCapabilities: (
      _x: {
        channel_capacity: VAPI.RTPReceiver.ChannelCapacity;
        payload_limit: VAPI.AT1130.RTPReceiver.AudioCapabilitiesPayloadLimit;
        supports_clean_switching: boolean;
        read_speed: VAPI.AT1130.RTPReceiver.ReadSpeed;
      },
      _socket: VScript.VSocket,
    ): [
      number,
      VAPI.AT1130.RTPReceiver.AudioCapabilitiesPayloadLimit,
      boolean,
      [0, [null | string]] | [1, []],
    ] => [
      _x.channel_capacity,
      _x.payload_limit,
      _x.supports_clean_switching,
      VAPI.AT1130.RTPReceiver.lower.ReadSpeed(_x.read_speed, _socket),
    ],
    AudioFlowPartition: (_x: AudioFlowPartition) => _x.raw.kwl,
    AudioReceiver: (_x: AudioReceiver) => _x.raw.kwl,
    AudioServo: (_x: AudioServo) => _x.raw.kwl,
    TimingTargetBufferMidpoint: (_x: {}, _socket: VScript.VSocket): [] => [],
    BufferProfile: (
      _x: {
        channel: VAPI.AT1130.RTPReceiver.RAMChannel;
        pseudo_channel: VAPI.AT1130.RTPReceiver.RAMPseudoChannel;
        blockcount: VAPI.RTPReceiver.BlockCount;
      },
      _socket: VScript.VSocket,
    ): [number, number, number] => [
      _x.channel,
      _x.pseudo_channel,
      _x.blockcount,
    ],
    BufferSizes: (
      _x: {
        for_audio: VAPI.AT1130.RTPReceiver.BufferSize;
        for_2022_6: VAPI.AT1130.RTPReceiver.BufferSize;
        for_2110_20_uhd_singlelink: VAPI.AT1130.RTPReceiver.BufferSize;
        for_2110_20_other: VAPI.AT1130.RTPReceiver.BufferSize;
        for_2042_2: VAPI.AT1130.RTPReceiver.BufferSize;
        for_jpeg_xs: VAPI.AT1130.RTPReceiver.BufferSize;
        for_passthrough: VAPI.AT1130.RTPReceiver.BufferSize;
      },
      _socket: VScript.VSocket,
    ): [
      VAPI.AT1130.RTPReceiver.BufferSize,
      VAPI.AT1130.RTPReceiver.BufferSize,
      VAPI.AT1130.RTPReceiver.BufferSize,
      VAPI.AT1130.RTPReceiver.BufferSize,
      VAPI.AT1130.RTPReceiver.BufferSize,
      VAPI.AT1130.RTPReceiver.BufferSize,
      VAPI.AT1130.RTPReceiver.BufferSize,
    ] => [
      _x.for_audio,
      _x.for_2022_6,
      _x.for_2110_20_uhd_singlelink,
      _x.for_2110_20_other,
      _x.for_2042_2,
      _x.for_jpeg_xs,
      _x.for_passthrough,
    ],
    TimingTargetEgressPlusX: (
      _x: {
        /**
                Read out every packet this late after egress at the sender
                (if sender and receiver are in sync, and RTP timestamps are
                not modified via `rtp_timestamp_override`)
              */
        read_delay: VScript.Duration;
      },
      _socket: VScript.VSocket,
    ): [number] => [VScript.VAPIHelpers.lowerSeconds(_x.read_delay, _socket)],
    TimingTargetForeignMediaClock: (
      _x: {
        foreign_receiver: null | VAPI.AT1130.RTPReceiver.MediaReceiver;
        extra_delay: VScript.Duration;
        on_backpressure: VAPI.RTPReceiver.BackpressurePolicy;
      },
      _socket: VScript.VSocket,
    ): [null | string, number, VAPI.RTPReceiver.BackpressurePolicy] => [
      _x.foreign_receiver === null ? null : _x.foreign_receiver.raw.kwl,
      VScript.VAPIHelpers.lowerSeconds(_x.extra_delay, _socket),
      _x.on_backpressure,
    ],
    TimingTargetForeignReadDelay: (
      _x: {
        foreign_receiver: null | VAPI.AT1130.RTPReceiver.MediaReceiver;
        extra_delay: VScript.Duration;
        on_backpressure: VAPI.RTPReceiver.BackpressurePolicy;
      },
      _socket: VScript.VSocket,
    ): [null | string, number, VAPI.RTPReceiver.BackpressurePolicy] => [
      _x.foreign_receiver === null ? null : _x.foreign_receiver.raw.kwl,
      VScript.VAPIHelpers.lowerSeconds(_x.extra_delay, _socket),
      _x.on_backpressure,
    ],
    TimingTargetIngressPlusX: (
      _x: {
        /**
                Read out every packet this late after arrival at the
                receiving network interface (if `use_rtp_timestamp` is set to
                `false`) or after egress at the sender (if
                `use_rtp_timestamp` is set to `true`, sender and receiver are
                in sync, and RTP timestamps are not modified via
                `rtp_timestamp_override`)
              */
        read_delay: VScript.Duration;
      },
      _socket: VScript.VSocket,
    ): [number] => [VScript.VAPIHelpers.lowerSeconds(_x.read_delay, _socket)],
    JpegXsVideoBackend: (
      _x: {
        group: VAPI.RTPReceiver.JpegXsBlockIndex;
        instances: Array<null | VAPI.RTPReceiver.JpegXsDecoderInstance>;
        channel: VAPI.AT1130.RTPReceiver.RAMChannel;
        metadata: null | VAPI.AT1130.RTPReceiver.MetadataBackend;
      },
      _socket: VScript.VSocket,
    ): [
      number,
      Array<null | number>,
      number,
      null | [number, number, [number, number], number, number],
    ] => [
      _x.group,
      _x.instances,
      _x.channel,
      _x.metadata === null
        ? null
        : VAPI.AT1130.RTPReceiver.lower.MetadataBackend(_x.metadata, _socket),
    ],
    ReadSpeedLockToGenlock: (
      _x: { genlock: null | VAPI.AT1130.Genlock.AT1130Genlock },
      _socket: VScript.VSocket,
    ): [null | string] => [_x.genlock === null ? null : _x.genlock.raw.kwl],
    MediaReceiver: (_x: MediaReceiver) => _x.raw.kwl,
    MemoryChannelInfo: (
      _x: {
        channel: VAPI.AT1130.RTPReceiver.RAMChannel;
        pseudo_channel: VAPI.AT1130.RTPReceiver.RAMPseudoChannel;
        connected_to: VAPI.AT1130.RTPReceiver.MemoryChannelInfoConnectedTo;
        blocks_left: number;
      },
      _socket: VScript.VSocket,
    ): [
      number,
      number,
      [
        Array<null | number>,
        Array<null | number>,
        Array<null | [number, number]>,
      ],
      number,
    ] => [
      _x.channel,
      _x.pseudo_channel,
      VAPI.AT1130.RTPReceiver.lower.MemoryChannelInfoConnectedTo(
        _x.connected_to,
        _socket,
      ),
      _x.blocks_left,
    ],
    MetadataBackend: (
      _x: {
        group: VAPI.AT1130.RTPReceiver.MetadataBackendGroup;
        instance: VAPI.AT1130.RTPReceiver.MetadataBackendInstance;
        stats_id: VAPI.RTPReceiver.StatsID;
        read_id: VAPI.RTPReceiver.MMUReadIndex;
        channel: VAPI.AT1130.RTPReceiver.RAMChannel;
      },
      _socket: VScript.VSocket,
    ): [number, number, [number, number], number, number] => [
      _x.group,
      _x.instance,
      VAPI.RTPReceiver.lower.StatsID(_x.stats_id, _socket),
      _x.read_id,
      _x.channel,
    ],
    NativeVideoBackend: (
      _x: {
        group: VAPI.RTPReceiver.NativeVideoBlockIndex;
        instances: Array<null | VAPI.RTPReceiver.NativeVideoDecoderInstance>;
        channel: VAPI.AT1130.RTPReceiver.RAMChannel;
        metadata: null | VAPI.AT1130.RTPReceiver.MetadataBackend;
      },
      _socket: VScript.VSocket,
    ): [
      number,
      Array<null | number>,
      number,
      null | [number, number, [number, number], number, number],
    ] => [
      _x.group,
      _x.instances,
      _x.channel,
      _x.metadata === null
        ? null
        : VAPI.AT1130.RTPReceiver.lower.MetadataBackend(_x.metadata, _socket),
    ],
    NetworkSource: (_x: NetworkSource) => _x.raw.kwl,
    PacketStream: (_x: PacketStream) => _x.raw.kwl,
    PacketTracer: (_x: PacketTracer) => _x.raw.kwl,
    PassthroughEssence: (_x: PassthroughEssence) => _x.raw.kwl,
    PassthroughFlowPartition: (_x: PassthroughFlowPartition) => _x.raw.kwl,
    PassthroughReceiver: (_x: PassthroughReceiver) => _x.raw.kwl,
    ReadSpeed: (
      _x:
        | {
            variant: "LockToGenlock";
            value: VAPI.AT1130.RTPReceiver.ReadSpeedLockToGenlock;
          }
        | {
            variant: "Adaptive";
            value: VAPI.AT1130.RTPReceiver.ReadSpeedAdaptive;
          },
      _socket: VScript.VSocket,
    ): [0, [null | string]] | [1, []] => {
      switch (_x.variant) {
        case "LockToGenlock":
          return [
            0,
            VAPI.AT1130.RTPReceiver.lower.ReadSpeedLockToGenlock(
              _x.value,
              _socket,
            ),
          ];
        case "Adaptive":
          return [
            1,
            VAPI.AT1130.RTPReceiver.lower.ReadSpeedAdaptive(_x.value, _socket),
          ];
      }
    },
    ReserveAudioBackend: (
      _x: {
        group: VAPI.RTPReceiver.AudioBlockIndex;
        instance: VAPI.RTPReceiver.AudioInstanceIndex;
        slices: Array<null | VAPI.RTPReceiver.LocalSliceIndex>;
        channel: VAPI.AT1130.RTPReceiver.RAMChannel;

        /**
                              determines the internal read index; reads from
                              the main memory region use `2*read_pair`, reads
                              from the alternate region use `2*read_pair+1`
                            */
        read_pair: number;
        fifo_blocks: Array<null | VAPI.AT1130.RTPReceiver.AudioDecoderFIFOBlock>;
        fence: null | VAPI.Time.FreeRunningCounter;
      },
      _socket: VScript.VSocket,
    ): [
      number,
      number,
      Array<null | number>,
      number,
      number,
      Array<null | number>,
      null | number,
    ] => [
      _x.group,
      _x.instance,
      _x.slices,
      _x.channel,
      _x.read_pair,
      _x.fifo_blocks,
      _x.fence,
    ],
    Session: (_x: Session) => _x.raw.kwl,
    TimingTargetTimeSource: (
      _x: { t_src: null | VAPI.AT1130.Time.Source; use_rtp_timestamp: boolean },
      _socket: VScript.VSocket,
    ): [null | string, boolean] => [
      _x.t_src === null ? null : _x.t_src.raw.kwl,
      _x.use_rtp_timestamp,
    ],
    Timing: (_x: Timing) => _x.raw.kwl,
    TimingTarget: (
      _x:
        | {
            variant: "IngressPlusX";
            value: VAPI.AT1130.RTPReceiver.TimingTargetIngressPlusX;
          }
        | {
            variant: "EgressPlusX";
            value: VAPI.AT1130.RTPReceiver.TimingTargetEgressPlusX;
          }
        | {
            variant: "TimeSource";
            value: VAPI.AT1130.RTPReceiver.TimingTargetTimeSource;
          }
        | {
            variant: "BufferMidpoint";
            value: VAPI.AT1130.RTPReceiver.TimingTargetBufferMidpoint;
          }
        | {
            variant: "ForeignReadDelay";
            value: VAPI.AT1130.RTPReceiver.TimingTargetForeignReadDelay;
          }
        | {
            variant: "ForeignMediaClock";
            value: VAPI.AT1130.RTPReceiver.TimingTargetForeignMediaClock;
          },
      _socket: VScript.VSocket,
    ):
      | [0, [number]]
      | [1, [number]]
      | [2, [null | string, boolean]]
      | [3, []]
      | [4, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]]
      | [5, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]] => {
      switch (_x.variant) {
        case "IngressPlusX":
          return [
            0,
            VAPI.AT1130.RTPReceiver.lower.TimingTargetIngressPlusX(
              _x.value,
              _socket,
            ),
          ];
        case "EgressPlusX":
          return [
            1,
            VAPI.AT1130.RTPReceiver.lower.TimingTargetEgressPlusX(
              _x.value,
              _socket,
            ),
          ];
        case "TimeSource":
          return [
            2,
            VAPI.AT1130.RTPReceiver.lower.TimingTargetTimeSource(
              _x.value,
              _socket,
            ),
          ];
        case "BufferMidpoint":
          return [
            3,
            VAPI.AT1130.RTPReceiver.lower.TimingTargetBufferMidpoint(
              _x.value,
              _socket,
            ),
          ];
        case "ForeignReadDelay":
          return [
            4,
            VAPI.AT1130.RTPReceiver.lower.TimingTargetForeignReadDelay(
              _x.value,
              _socket,
            ),
          ];
        case "ForeignMediaClock":
          return [
            5,
            VAPI.AT1130.RTPReceiver.lower.TimingTargetForeignMediaClock(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    VideoBackend: (
      _x: {
        native: null | VAPI.AT1130.RTPReceiver.NativeVideoBackend;
        jpeg_xs: null | VAPI.AT1130.RTPReceiver.JpegXsVideoBackend;
        servo: null | VAPI.AT1130.RTPReceiver.VideoServo;
      },
      _socket: VScript.VSocket,
    ): [
      (
        | null
        | [
            number,
            Array<null | number>,
            number,
            null | [number, number, [number, number], number, number],
          ]
      ),
      (
        | null
        | [
            number,
            Array<null | number>,
            number,
            null | [number, number, [number, number], number, number],
          ]
      ),
      null | string,
    ] => [
      _x.native === null
        ? null
        : VAPI.AT1130.RTPReceiver.lower.NativeVideoBackend(_x.native, _socket),
      _x.jpeg_xs === null
        ? null
        : VAPI.AT1130.RTPReceiver.lower.JpegXsVideoBackend(_x.jpeg_xs, _socket),
      _x.servo === null ? null : _x.servo.raw.kwl,
    ],
    VideoCapabilities: (
      _x: {
        supports_2022_6: boolean;
        supports_uhd_sample_interleaved: boolean;
        st2110_20_caliber: null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt211020Caliber;
        st2042_2_caliber: null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt20422Caliber;
        jpeg_xs_caliber: null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesJpegXsCaliber;
        supports_2110_40: boolean;
        supports_clean_switching: boolean;
        read_speed: VAPI.AT1130.RTPReceiver.ReadSpeed;
      },
      _socket: VScript.VSocket,
    ): [
      boolean,
      boolean,
      null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt211020Caliber,
      null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt20422Caliber,
      null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
      boolean,
      boolean,
      [0, [null | string]] | [1, []],
    ] => [
      _x.supports_2022_6,
      _x.supports_uhd_sample_interleaved,
      _x.st2110_20_caliber,
      _x.st2042_2_caliber,
      _x.jpeg_xs_caliber,
      _x.supports_2110_40,
      _x.supports_clean_switching,
      VAPI.AT1130.RTPReceiver.lower.ReadSpeed(_x.read_speed, _socket),
    ],
    VideoFlowPartition: (_x: VideoFlowPartition) => _x.raw.kwl,
    VideoReceiver: (_x: VideoReceiver) => _x.raw.kwl,
    VideoServo: (_x: VideoServo) => _x.raw.kwl,
    MemoryChannelInfoConnectedToAudio: (
      _x: { block: VAPI.RTPReceiver.AudioBlockIndex; fifo_blocks_left: number },
      _socket: VScript.VSocket,
    ): [number, number] => [_x.block, _x.fifo_blocks_left],
    MemoryChannelInfoConnectedTo: (
      _x: {
        video_native: Array<null | VAPI.RTPReceiver.NativeVideoBlockIndex>;
        video_jpegxs: Array<null | VAPI.RTPReceiver.JpegXsBlockIndex>;
        audio: Array<null | VAPI.AT1130.RTPReceiver.MemoryChannelInfoConnectedToAudio>;
      },
      _socket: VScript.VSocket,
    ): [
      Array<null | number>,
      Array<null | number>,
      Array<null | [number, number]>,
    ] => [
      _x.video_native,
      _x.video_jpegxs,
      _x.audio.map((el) =>
        el === null
          ? null
          : VAPI.AT1130.RTPReceiver.lower.MemoryChannelInfoConnectedToAudio(
              el,
              _socket,
            ),
      ),
    ],
    AllDiagnostics: (_x: AllDiagnostics) => _x.raw.kwl,
    AllDiagnosticsRtpInputFillLevel: (
      _x: { min: VAPI.Primitives.Unsigned8; max: VAPI.Primitives.Unsigned8 },
      _socket: VScript.VSocket,
    ): [number, number] => [_x.min, _x.max],
    PassthroughReceiverFlowPartitions: (
      _x: {
        sdp_a: null | VAPI.AT1130.RTPReceiver.PassthroughFlowPartition;
        sdp_b: null | VAPI.AT1130.RTPReceiver.PassthroughFlowPartition;
      },
      _socket: VScript.VSocket,
    ): [null | string, null | string] => [
      _x.sdp_a === null ? null : _x.sdp_a.raw.kwl,
      _x.sdp_b === null ? null : _x.sdp_b.raw.kwl,
    ],
    AudioReceiverMediaSpecificFlowPartitions: (
      _x: {
        sdp_a: null | VAPI.AT1130.RTPReceiver.AudioFlowPartition;
        sdp_b: null | VAPI.AT1130.RTPReceiver.AudioFlowPartition;
      },
      _socket: VScript.VSocket,
    ): [null | string, null | string] => [
      _x.sdp_a === null ? null : _x.sdp_a.raw.kwl,
      _x.sdp_b === null ? null : _x.sdp_b.raw.kwl,
    ],
    VideoReceiverMediaSpecificFlowPartitions: (
      _x: {
        sdp_a: null | VAPI.AT1130.RTPReceiver.VideoFlowPartition;
        sdp_b: null | VAPI.AT1130.RTPReceiver.VideoFlowPartition;
      },
      _socket: VScript.VSocket,
    ): [null | string, null | string] => [
      _x.sdp_a === null ? null : _x.sdp_a.raw.kwl,
      _x.sdp_b === null ? null : _x.sdp_b.raw.kwl,
    ],
    AllDiagnosticsIgmpPerformanceMetricsIgmpLatency: (
      _x: {
        port: null | VAPI.AT1130.Primitives.NetworkPortID;
        src: null | string;
        dst: null | string;
        time_to_first_mpacket: null | VScript.Duration;
        first_rtp_timestamp: null | VAPI.Time.RTPTimestamp;
        first_rtp_seqnr: null | VAPI.RTPReceiver.Seqnr;

        /**
                                          time between two m-packets. This
                                          defines the latency measurement's
                                          uncertainty and depends on video
                                          standards, transport formats and
                                          (for audio streams) on the
                                          currently configured IRQ rate
                                        */
        mpacket_interval: null | VScript.Duration;
      },
      _socket: VScript.VSocket,
    ): [
      null | VAPI.AT1130.Primitives.NetworkPortID,
      null | string,
      null | string,
      null | number,
      null | number,
      null | number,
      null | number,
    ] => [
      _x.port,
      _x.src,
      _x.dst,
      _x.time_to_first_mpacket === null
        ? null
        : VScript.VAPIHelpers.lowerSeconds(_x.time_to_first_mpacket, _socket),
      _x.first_rtp_timestamp,
      _x.first_rtp_seqnr,
      _x.mpacket_interval === null
        ? null
        : VScript.VAPIHelpers.lowerSeconds(_x.mpacket_interval, _socket),
    ],
    AllDiagnosticsIgmpPerformanceMetrics: (
      _x: AllDiagnosticsIgmpPerformanceMetrics,
    ) => _x.raw.kwl,
    AncBurstReceiverMediaClock: (_x: AncBurstReceiverMediaClock) => _x.raw.kwl,
    AudioReceiverMediaSpecific: (_x: AudioReceiverMediaSpecific) => _x.raw.kwl,
    VideoReceiverMediaSpecific: (_x: VideoReceiverMediaSpecific) => _x.raw.kwl,
    PassthroughEssenceMemoryBlocks: (
      _x: {
        channel: VAPI.AT1130.RTPReceiver.RAMChannel;
        blocks: Array<null | VAPI.AT1130.RTPReceiver.RAMBlock>;
      },
      _socket: VScript.VSocket,
    ): [number, Array<null | number>] => [_x.channel, _x.blocks],
    AudioReceiverMediaSpecificOutput: (_x: AudioReceiverMediaSpecificOutput) =>
      _x.raw.kwl,
    VideoReceiverMediaSpecificOutput: (_x: VideoReceiverMediaSpecificOutput) =>
      _x.raw.kwl,
    MediaReceiverPacketStreams: (_x: MediaReceiverPacketStreams) => _x.raw.kwl,
    AllDiagnosticsRtpInputPacketsDiscarded: (
      _x: {
        input_errors: VAPI.Primitives.CyclicCounter32;
        oversized: VAPI.Primitives.CyclicCounter32;
        data_fifo_full: VAPI.Primitives.CyclicCounter32;
        info_fifo_full: VAPI.Primitives.CyclicCounter32;
      },
      _socket: VScript.VSocket,
    ): [number, number, number, number] => [
      _x.input_errors,
      _x.oversized,
      _x.data_fifo_full,
      _x.info_fifo_full,
    ],
    AllDiagnosticsRtpInput: (
      _x: {
        packets_written: VAPI.Primitives.CyclicCounter32;
        packets_discarded: VAPI.AT1130.RTPReceiver.AllDiagnosticsRtpInputPacketsDiscarded;
        fill_level: VAPI.AT1130.RTPReceiver.AllDiagnosticsRtpInputFillLevel;
      },
      _socket: VScript.VSocket,
    ): [number, [number, number, number, number], [number, number]] => [
      _x.packets_written,
      VAPI.AT1130.RTPReceiver.lower.AllDiagnosticsRtpInputPacketsDiscarded(
        _x.packets_discarded,
        _socket,
      ),
      VAPI.AT1130.RTPReceiver.lower.AllDiagnosticsRtpInputFillLevel(
        _x.fill_level,
        _socket,
      ),
    ],
    AllSettings: (_x: AllSettings) => _x.raw.kwl,
    PacketStreamStreamParameters: (
      _x: {
        /**
                                                          Seqnr offset
                                                          relative to other
                                                          packet streams
                                                          mapped to the same
                                                          memory region. N
                                                          packet streams
                                                          hence define N-1
                                                          meaningful offsets.
                                                        */
        seqnr_offset: VAPI.RTPReceiver.SeqnrDifference;

        /**
                                                          IP (unicast)
                                                          address of the RTP
                                                          stream sender
                                                        */
        src_address: null | string;

        /**
                                                          IP (multicast)
                                                          destination address
                                                          of the RTP stream
                                                        */
        dst_address: null | string;
        interface: null | VAPI.NetworkInterfaces.VirtualInterface;
        type: VAPI.RTPReceiver.PacketStreamType;
        pseudo_channel: VAPI.AT1130.RTPReceiver.RAMPseudoChannel;
        irq_rate: VAPI.AT1130.RTPReceiver.PacketStreamStreamParametersIrqRate;
      },
      _socket: VScript.VSocket,
    ): [
      number,
      null | string,
      null | string,
      null | string,
      VAPI.RTPReceiver.PacketStreamType,
      number,
      VAPI.AT1130.RTPReceiver.PacketStreamStreamParametersIrqRate,
    ] => [
      _x.seqnr_offset,
      _x.src_address,
      _x.dst_address,
      _x.interface === null ? null : _x.interface.raw.kwl,
      _x.type,
      _x.pseudo_channel,
      _x.irq_rate,
    ],
  } as const;
  export interface ReadSpeedAdaptive {}
  export interface AffineNetworkSource {
    source: null | VAPI.AT1130.RTPReceiver.NetworkSource;
    seqnr_offset: VAPI.Primitives.Unsigned16;
  }
  export class All implements VScript.Referenceable<"RTPReceiver::Data::All"> {
    readonly type_identifier = "RTPReceiver::Data::All" as const;
    get runtime_constants() {
      return {
        total_2022_6_audio_slices: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::total_2022_6_audio_slices",
        ) as number,
        supports_2110_40_in_software:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::supports_2110_40_in_software",
          ) as boolean,
        max_audio_receivers: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_audio_receivers",
        ) as number,
        uhd_packsize_2042_2: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::uhd_packsize_2042_2",
        ) as number,
        uhd_packsize_2110_20: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::uhd_packsize_2110_20",
        ) as number,
        supports_2110_40_in_hardware:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::supports_2110_40_in_hardware",
          ) as boolean,
        max_metadata_receivers: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_metadata_receivers",
        ) as number,
        video_memory_channels: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::video_memory_channels",
        ) as number,
        num_native_video_receiver_blocks:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::num_native_video_receiver_blocks",
          ) as number,
        audio_memory_channels: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::audio_memory_channels",
        ) as number,
        total_2110_30_audio_slices: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::total_2110_30_audio_slices",
        ) as number,
        max_audio_flow_partitions: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_audio_flow_partitions",
        ) as number,
        max_network_sources: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_network_sources",
        ) as number,
        num_metadata_extractors_per_video_receiver:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::num_metadata_extractors_per_video_receiver",
          ) as number,
        blocks_per_memory_channel: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::blocks_per_memory_channel",
        ) as number,
        audio_fifo_blocks_per_memory_channel:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::audio_fifo_blocks_per_memory_channel",
          ) as number,
        max_st2042_2_uhd_video_receivers:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::max_st2042_2_uhd_video_receivers",
          ) as number,
        max_sessions: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_sessions",
        ) as number,
        num_jpeg_xs_video_receiver_blocks:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::num_jpeg_xs_video_receiver_blocks",
          ) as number,
        max_passthrough_receivers: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_passthrough_receivers",
        ) as number,
        max_video_buffers: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_video_buffers",
        ) as number,
        num_packet_tracers: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::num_packet_tracers",
        ) as number,
        audio_fifo_blocks_per_memory_interface:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::audio_fifo_blocks_per_memory_interface",
          ) as number,
        max_anc_burst_receivers: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_anc_burst_receivers",
        ) as number,
        max_metadata_streams: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_metadata_streams",
        ) as number,
        max_video_flow_partitions: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_video_flow_partitions",
        ) as number,
        max_st2110_20_uhd_video_receivers:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::max_st2110_20_uhd_video_receivers",
          ) as number,
        max_passthrough_flow_partitions:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::max_passthrough_flow_partitions",
          ) as number,
        has_fixed_audio_pseudo_channel:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::has_fixed_audio_pseudo_channel",
          ) as boolean,
        max_native_video_receivers: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_native_video_receivers",
        ) as number,
        num_audio_receiver_blocks: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::num_audio_receiver_blocks",
        ) as number,
        max_video_receivers: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_video_receivers",
        ) as number,
        max_metadata_buffers: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::max_metadata_buffers",
        ) as number,
        max_jpeg_xs_video_receivers:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::max_jpeg_xs_video_receivers",
          ) as number,
        num_metadata_receiver_blocks:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::num_metadata_receiver_blocks",
          ) as number,
        num_audio_servos: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::num_audio_servos",
        ) as number,
        num_video_servos: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::num_video_servos",
        ) as number,
        max_st2042_2_video_receivers:
          this.raw.backing_store.get_runtime_constant(
            "RTPReceiver::max_st2042_2_video_receivers",
          ) as number,
        uhd_packsize_2si: this.raw.backing_store.get_runtime_constant(
          "RTPReceiver::uhd_packsize_2si",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get license_information() {
      return VAPI.RTPReceiver.lift.AllLicenseInformation(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          0,
          "license_information",
        ),
      );
    }
    get diagnostics() {
      return VAPI.AT1130.RTPReceiver.lift.AllDiagnostics(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "diagnostics"),
      );
    }
    get settings() {
      return VAPI.AT1130.RTPReceiver.lift.AllSettings(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "settings"),
      );
    }
    get latest_allocation_id(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.CapabilityRequestID,
      VAPI.AT1130.RTPReceiver.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.CapabilityRequestID,
        VAPI.AT1130.RTPReceiver.All
      >(this, "latest_allocation_id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get sessions() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPReceiver::Data::Session",
        VAPI.AT1130.RTPReceiver.SessionAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "sessions",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.RTPReceiver.SessionAsNamedTableRow(raw),
      );
    }
    get audio_receivers() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPReceiver::Data::AudioReceiver",
        VAPI.AT1130.RTPReceiver.AudioReceiverAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          5,
          "audio_receivers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.RTPReceiver.AudioReceiverAsNamedTableRow(raw),
      );
    }
    get passthrough_receivers() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPReceiver::Data::PassthroughReceiver",
        VAPI.AT1130.RTPReceiver.PassthroughReceiverAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "passthrough_receivers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.RTPReceiver.PassthroughReceiverAsNamedTableRow(raw),
      );
    }
    get video_receivers() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPReceiver::Data::VideoReceiver",
        VAPI.AT1130.RTPReceiver.VideoReceiverAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          7,
          "video_receivers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.RTPReceiver.VideoReceiverAsNamedTableRow(raw),
      );
    }
    get anc_burst_receivers() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPReceiver::Data::AncBurstReceiver",
        VAPI.AT1130.RTPReceiver.AncBurstReceiverAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          8,
          "anc_burst_receivers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.RTPReceiver.AncBurstReceiverAsNamedTableRow(raw),
      );
    }
    get signal_slices_2110_30() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          9,
          "signal_slices_2110_30",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
    get signal_slices_2022_6() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          10,
          "signal_slices_2022_6",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
    get packet_streams() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPReceiver::Data::PacketStream",
        VAPI.AT1130.RTPReceiver.PacketStream
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          11,
          "packet_streams",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPReceiver.lift.PacketStream(raw),
      );
    }
    get network_sources() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPReceiver::Data::NetworkSource",
        VAPI.AT1130.RTPReceiver.NetworkSource
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          12,
          "network_sources",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPReceiver.lift.NetworkSource(raw),
      );
    }
    get audio_flow_partitions() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPReceiver::Data::AudioFlowPartition",
        VAPI.AT1130.RTPReceiver.AudioFlowPartition
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          13,
          "audio_flow_partitions",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPReceiver.lift.AudioFlowPartition(raw),
      );
    }
    get passthrough_flow_partitions() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPReceiver::Data::PassthroughFlowPartition",
        VAPI.AT1130.RTPReceiver.PassthroughFlowPartition
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          14,
          "passthrough_flow_partitions",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPReceiver.lift.PassthroughFlowPartition(raw),
      );
    }
    get video_flow_partitions() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPReceiver::Data::VideoFlowPartition",
        VAPI.AT1130.RTPReceiver.VideoFlowPartition
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          15,
          "video_flow_partitions",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPReceiver.lift.VideoFlowPartition(raw),
      );
    }
    get derived_ptp_traits() {
      return VAPI.RTPReceiver.lift.AllDerivedPtpTraits(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          16,
          "derived_ptp_traits",
        ),
      );
    }
    get audio_servos() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "RTPReceiver::Data::AudioServo",
        VAPI.AT1130.RTPReceiver.AudioServo
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          17,
          "audio_servos",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPReceiver.lift.AudioServo(st),
      );
    }
    get video_servos() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "RTPReceiver::Data::VideoServo",
        VAPI.AT1130.RTPReceiver.VideoServo
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          18,
          "video_servos",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPReceiver.lift.VideoServo(st),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.AllIssues,
      VAPI.AT1130.RTPReceiver.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.AllIssues,
        VAPI.AT1130.RTPReceiver.All
      >(this, "issues" as VScript.SysName, {
        lift: (x: number, _: VScript.VSocket): VAPI.RTPReceiver.AllIssues => ({
          out_of_bandwidth: (x & 1) !== 0,
          required_port_down: (x & 2) !== 0,
        }),
        lower: (x: VAPI.RTPReceiver.AllIssues, _: VScript.VSocket): number =>
          (x.out_of_bandwidth ? 1 : 0) | (x.required_port_down ? 2 : 0),
      });
    }
  }
  export class AncBurstReceiver
    implements VScript.Referenceable<"RTPReceiver::Data::AncBurstReceiver">
  {
    readonly type_identifier = "RTPReceiver::Data::AncBurstReceiver" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get generic() {
      return VAPI.AT1130.RTPReceiver.lift.MediaReceiver(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "generic"),
      );
    }
    get media_clock() {
      return VAPI.AT1130.RTPReceiver.lift.AncBurstReceiverMediaClock(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "media_clock"),
      );
    }
  }
  export class AncBurstReceiverAsNamedTableRow extends AncBurstReceiver {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  /**
  for every subflow index, the first entry to appear in this list represents
  its rear guard
*/
  export interface AssociatedStream {
    stream: null | VAPI.AT1130.RTPReceiver.PacketStream;

    /**
    used to distinguish between a video flow's underlying video streams
    (subflows 0 to 3 for a quad-link flow, 0 otherwise), and its 2110-40
    sidecar (4), if any
  */
    subflow_index: VAPI.RTPReceiver.SubflowIndex;
    read_delay: null | VAPI.Time.TimestampedOffset;
  }
  export interface AudioBackend {
    group: VAPI.RTPReceiver.AudioBlockIndex;
    instance: VAPI.RTPReceiver.AudioInstanceIndex;
    servo: null | VAPI.AT1130.RTPReceiver.AudioServo;
    slices: Array<null | VAPI.RTPReceiver.LocalSliceIndex>;
    channel: VAPI.AT1130.RTPReceiver.RAMChannel;

    /**
    determines the internal read index; reads from the main memory region use
    `2*read_pair`, reads from the alternate region use `2*read_pair+1`
  */
    read_pair: number;
    fifo_blocks: Array<null | VAPI.AT1130.RTPReceiver.AudioDecoderFIFOBlock>;
  }
  export interface AudioCapabilities {
    channel_capacity: VAPI.RTPReceiver.ChannelCapacity;
    payload_limit: VAPI.AT1130.RTPReceiver.AudioCapabilitiesPayloadLimit;
    supports_clean_switching: boolean;
    read_speed: VAPI.AT1130.RTPReceiver.ReadSpeed;
  }
  export type AudioDecoderFIFOBlock = number;
  export class AudioFlowPartition
    implements VScript.Referenceable<"RTPReceiver::Data::AudioFlowPartition">
  {
    readonly type_identifier = "RTPReceiver::Data::AudioFlowPartition" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get id(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.PartitionID,
      VAPI.AT1130.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PartitionID,
        VAPI.AT1130.RTPReceiver.AudioFlowPartition
      >(this, "id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get format(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Audio.Format,
      null | VAPI.Audio.Format,
      VAPI.AT1130.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Audio.Format,
        null | VAPI.Audio.Format,
        VAPI.AT1130.RTPReceiver.AudioFlowPartition
      >(this, "format" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get frequency(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Audio.Frequency,
      null | VAPI.Audio.Frequency,
      VAPI.AT1130.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Audio.Frequency,
        null | VAPI.Audio.Frequency,
        VAPI.AT1130.RTPReceiver.AudioFlowPartition
      >(this, "frequency" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get channelcount(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.RTPReceiver.AudioFlowPartition
      >(this, "channelcount" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get samplecount(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.RTPReceiver.AudioFlowPartition
      >(this, "samplecount" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Network sources feeding this flow partition; if more than 8 sources feed
    into a single partition, surplus sources will not be published via the
    web interface
  */
    get sources(): VScript.rKeyword<
      VScript.VSocket,
      Array<[null | string, number]>,
      Array<VAPI.AT1130.RTPReceiver.AffineNetworkSource>,
      VAPI.AT1130.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number]>,
        Array<VAPI.AT1130.RTPReceiver.AffineNetworkSource>,
        VAPI.AT1130.RTPReceiver.AudioFlowPartition
      >(this, "sources" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1130.RTPReceiver.lift.AffineNetworkSource,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1130.RTPReceiver.lower.AffineNetworkSource,
        ),
      });
    }
  }
  export class AudioReceiver
    implements VScript.Referenceable<"RTPReceiver::Data::AudioReceiver">
  {
    readonly type_identifier = "RTPReceiver::Data::AudioReceiver" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get generic() {
      return VAPI.AT1130.RTPReceiver.lift.MediaReceiver(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "generic"),
      );
    }
    get media_specific() {
      return VAPI.AT1130.RTPReceiver.lift.AudioReceiverMediaSpecific(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "media_specific",
        ),
      );
    }
  }
  export class AudioReceiverAsNamedTableRow extends AudioReceiver {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class AudioServo
    implements VScript.Referenceable<"RTPReceiver::Data::AudioServo">
  {
    readonly type_identifier = "RTPReceiver::Data::AudioServo" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get relative_speed(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.RTPReceiver.AudioServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.RTPReceiver.AudioServo
      >(this, "relative_speed" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get max_relative_speed(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.RTPReceiver.AudioServo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.RTPReceiver.AudioServo
      >(
        this,
        "max_relative_speed" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get max_acceleration(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.RTPReceiver.AudioServo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.RTPReceiver.AudioServo
      >(
        this,
        "max_acceleration" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get prioritize(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.AudioServoPrioritize,
      VAPI.RTPReceiver.AudioServoPrioritize,
      VAPI.AT1130.RTPReceiver.AudioServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.AudioServoPrioritize,
        VAPI.RTPReceiver.AudioServoPrioritize,
        VAPI.AT1130.RTPReceiver.AudioServo
      >(this, "prioritize" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get backend() {
      return VAPI.AT1130.Genlock.lift.AT1130GenlockBackend(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "backend"),
      );
    }
    get sop_dt_node(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1130.RTPReceiver.AudioServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1130.RTPReceiver.AudioServo
      >(this, "sop_dt_node" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
      });
    }
  }
  export interface TimingTargetBufferMidpoint {}
  export interface BufferProfile {
    channel: VAPI.AT1130.RTPReceiver.RAMChannel;
    pseudo_channel: VAPI.AT1130.RTPReceiver.RAMPseudoChannel;
    blockcount: VAPI.RTPReceiver.BlockCount;
  }
  export type BufferSize =
    | "UpTo4MB"
    | "UpTo8MB"
    | "UpTo12MB"
    | "UpTo16MB"
    | "UpTo24MB"
    | "UpTo32MB"
    | "UpTo48MB"
    | "UpTo96MB";
  export interface BufferSizes {
    for_audio: VAPI.AT1130.RTPReceiver.BufferSize;
    for_2022_6: VAPI.AT1130.RTPReceiver.BufferSize;
    for_2110_20_uhd_singlelink: VAPI.AT1130.RTPReceiver.BufferSize;
    for_2110_20_other: VAPI.AT1130.RTPReceiver.BufferSize;
    for_2042_2: VAPI.AT1130.RTPReceiver.BufferSize;
    for_jpeg_xs: VAPI.AT1130.RTPReceiver.BufferSize;
    for_passthrough: VAPI.AT1130.RTPReceiver.BufferSize;
  }
  export interface TimingTargetEgressPlusX {
    /**
    Read out every packet this late after egress at the sender (if sender and
    receiver are in sync, and RTP timestamps are not modified via
    `rtp_timestamp_override`)
  */
    read_delay: VScript.Duration;
  }
  export interface TimingTargetForeignMediaClock {
    foreign_receiver: null | VAPI.AT1130.RTPReceiver.MediaReceiver;
    extra_delay: VScript.Duration;
    on_backpressure: VAPI.RTPReceiver.BackpressurePolicy;
  }
  export interface TimingTargetForeignReadDelay {
    foreign_receiver: null | VAPI.AT1130.RTPReceiver.MediaReceiver;
    extra_delay: VScript.Duration;
    on_backpressure: VAPI.RTPReceiver.BackpressurePolicy;
  }
  export interface TimingTargetIngressPlusX {
    /**
    Read out every packet this late after arrival at the receiving network
    interface (if `use_rtp_timestamp` is set to `false`) or after egress at
    the sender (if `use_rtp_timestamp` is set to `true`, sender and receiver
    are in sync, and RTP timestamps are not modified via
    `rtp_timestamp_override`)
  */
    read_delay: VScript.Duration;
  }
  export interface JpegXsVideoBackend {
    group: VAPI.RTPReceiver.JpegXsBlockIndex;
    instances: Array<null | VAPI.RTPReceiver.JpegXsDecoderInstance>;
    channel: VAPI.AT1130.RTPReceiver.RAMChannel;
    metadata: null | VAPI.AT1130.RTPReceiver.MetadataBackend;
  }
  export interface ReadSpeedLockToGenlock {
    genlock: null | VAPI.AT1130.Genlock.AT1130Genlock;
  }
  export class MediaReceiver
    implements VScript.Referenceable<"RTPReceiver::Data::MediaReceiver">
  {
    readonly type_identifier = "RTPReceiver::Data::MediaReceiver" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get tracks(): VScript.rKeyword<
      VScript.VSocket,
      [
        VAPI.RTPReceiver.TrackSet,
        VAPI.RTPReceiver.OrderedTrackSet,
        null | VAPI.RTPReceiver.Track,
        null | VAPI.RTPReceiver.Track,
        null | VAPI.RTPReceiver.Track,
        null | VAPI.RTPReceiver.Track,
      ],
      VAPI.RTPReceiver.UsedReceiverTracks,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.RTPReceiver.TrackSet,
          VAPI.RTPReceiver.OrderedTrackSet,
          null | VAPI.RTPReceiver.Track,
          null | VAPI.RTPReceiver.Track,
          null | VAPI.RTPReceiver.Track,
          null | VAPI.RTPReceiver.Track,
        ],
        VAPI.RTPReceiver.UsedReceiverTracks,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(this, "tracks" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.UsedReceiverTracks,
        lower: VAPI.RTPReceiver.lower.UsedReceiverTracks,
      });
    }
    get main_region_holds(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.Track,
      VAPI.RTPReceiver.Track,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.Track,
        VAPI.RTPReceiver.Track,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(this, "main_region_holds" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get hosting_session(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.RTPReceiver.Session,
      | null
      | (VScript.Referenceable<"RTPReceiver::Data::Session"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.RTPReceiver.Session,
        | null
        | (VScript.Referenceable<"RTPReceiver::Data::Session"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(
        this,
        "hosting_session" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPReceiver.Session(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPReceiver::Data::Session"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPReceiver.Session(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPReceiver::Data::Session"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get ingress(): VScript.rKeyword<
      VScript.VSocket,
      [VAPI.RTPReceiver.IngressTrackState, VAPI.RTPReceiver.IngressTrackState],
      VAPI.RTPReceiver.Ingress,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.RTPReceiver.IngressTrackState,
          VAPI.RTPReceiver.IngressTrackState,
        ],
        VAPI.RTPReceiver.Ingress,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(this, "ingress" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.Ingress,
        lower: VAPI.RTPReceiver.lower.Ingress,
      });
    }
    get egress(): VScript.rKeyword<
      VScript.VSocket,
      [Array<null | [boolean, null | number]>],
      VAPI.RTPReceiver.Egress,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [Array<null | [boolean, null | number]>],
        VAPI.RTPReceiver.Egress,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(this, "egress" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.Egress,
        lower: VAPI.RTPReceiver.lower.Egress,
      });
    }
    get expecting(): VScript.rKeyword<
      VScript.VSocket,
      [boolean, [boolean, boolean]],
      VAPI.RTPReceiver.Expectations,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [boolean, [boolean, boolean]],
        VAPI.RTPReceiver.Expectations,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(this, "expecting" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.Expectations,
        lower: VAPI.RTPReceiver.lower.Expectations,
      });
    }

    /**
    Clear error counters
  */
    get clear_error_counters(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(
        this,
        "clear_error_counters" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Clear event counters
  */
    get clear_event_counters(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(
        this,
        "clear_event_counters" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.MediaReceiverIssues,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.MediaReceiverIssues,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.RTPReceiver.MediaReceiverIssues => ({
          impossible_clean_switch_request: (x & 1) !== 0,
          missing_or_uncalibrated_t_src: (x & 2) !== 0,
          missing_streams: (x & 4) !== 0,
          phase_mismatch: (x & 8) !== 0,
          uncalibrated_genlock: (x & 16) !== 0,
          undersized_timing_window: (x & 32) !== 0,
          unsatisfied_capability_request: (x & 64) !== 0,
          useless_capability_assignment: (x & 128) !== 0,
        }),
        lower: (
          x: VAPI.RTPReceiver.MediaReceiverIssues,
          _: VScript.VSocket,
        ): number =>
          (x.impossible_clean_switch_request ? 1 : 0) |
          (x.missing_or_uncalibrated_t_src ? 2 : 0) |
          (x.missing_streams ? 4 : 0) |
          (x.phase_mismatch ? 8 : 0) |
          (x.uncalibrated_genlock ? 16 : 0) |
          (x.undersized_timing_window ? 32 : 0) |
          (x.unsatisfied_capability_request ? 64 : 0) |
          (x.useless_capability_assignment ? 128 : 0),
      });
    }

    /**
    Ideally, this keyword shouldn't exist. In practice however, capability
    requests are currently processed eagerly, s.t. the outcome of a
    capability allocation attempt may depend on the order in which individual
    receivers are serviced. To ensure full state recovery across reboots, we
    thus store this ordering explicitly
  */
    get capability_request(): VScript.rKeyword<
      VScript.VSocket,
      [null | number, null | number],
      VAPI.RTPReceiver.CapabilityRequestIDs,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | number, null | number],
        VAPI.RTPReceiver.CapabilityRequestIDs,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(this, "capability_request" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.CapabilityRequestIDs,
        lower: VAPI.RTPReceiver.lower.CapabilityRequestIDs,
      });
    }
    get flight_permit() {
      return VAPI.RTPReceiver.lift.MediaReceiverFlightPermit(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          11,
          "flight_permit",
        ),
      );
    }
    get error_counters() {
      return VAPI.RTPReceiver.lift.MediaReceiverErrorCounters(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          12,
          "error_counters",
        ),
      );
    }
    get event_counters() {
      return VAPI.RTPReceiver.lift.MediaReceiverEventCounters(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          13,
          "event_counters",
        ),
      );
    }
    get preparation_time(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(
        this,
        "preparation_time" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get cooldown_time(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(
        this,
        "cooldown_time" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get timing() {
      return VAPI.AT1130.RTPReceiver.lift.Timing(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 16, "timing"),
      );
    }
    get packet_streams() {
      return VAPI.AT1130.RTPReceiver.lift.MediaReceiverPacketStreams(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          17,
          "packet_streams",
        ),
      );
    }
    get required_redundancy_level(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.RTPReceiver.MediaReceiverRequiredRedundancyLevel,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.RTPReceiver.MediaReceiverRequiredRedundancyLevel,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(this, "required_redundancy_level" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.MediaReceiverRequiredRedundancyLevel,
        lower: VAPI.RTPReceiver.lower.MediaReceiverRequiredRedundancyLevel,
      });
    }
    get redundancy_levels() {
      return VAPI.RTPReceiver.lift.MediaReceiverRedundancyLevels(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          19,
          "redundancy_levels",
        ),
      );
    }
    get latency_spread() {
      return VAPI.RTPReceiver.lift.MediaReceiverLatencySpread(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          20,
          "latency_spread",
        ),
      );
    }

    /**
    when set to `FirstStreamPresent`, the first packet stream to provide this
    receiver with valid format and timing characteristics will be used as the
    basis for the ensuing readout attempt. When set to `AllStreamsPresent`,
    the receiver will stall until all packet streams have been registered at
    their respective network interfaces. Whereas `FirstStreamPresent` may
    slightly reduce the time to readout, `AllStreamsPresent` is safer as it
    ensures immediate SPS protection (if so configured), and allows the
    receiver to correctly pick a rearguard stream if different network paths
    exhibit different transmission delays. In both cases, the set of packet
    streams considered encompasses only those flows directly referenced by
    this receiver's media description, not the auxiliary flows that may be
    routed to the receiver through stream sharing.
  */
    get initiate_readout_on(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
      VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
      VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
      VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
      VAPI.AT1130.RTPReceiver.MediaReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
        VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
        VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
        VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
        VAPI.AT1130.RTPReceiver.MediaReceiver
      >(
        this,
        "initiate_readout_on" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
  export interface MemoryChannelInfo {
    channel: VAPI.AT1130.RTPReceiver.RAMChannel;
    pseudo_channel: VAPI.AT1130.RTPReceiver.RAMPseudoChannel;
    connected_to: VAPI.AT1130.RTPReceiver.MemoryChannelInfoConnectedTo;
    blocks_left: number;
  }
  export interface MetadataBackend {
    group: VAPI.AT1130.RTPReceiver.MetadataBackendGroup;
    instance: VAPI.AT1130.RTPReceiver.MetadataBackendInstance;
    stats_id: VAPI.RTPReceiver.StatsID;
    read_id: VAPI.RTPReceiver.MMUReadIndex;
    channel: VAPI.AT1130.RTPReceiver.RAMChannel;
  }
  export interface NativeVideoBackend {
    group: VAPI.RTPReceiver.NativeVideoBlockIndex;
    instances: Array<null | VAPI.RTPReceiver.NativeVideoDecoderInstance>;
    channel: VAPI.AT1130.RTPReceiver.RAMChannel;
    metadata: null | VAPI.AT1130.RTPReceiver.MetadataBackend;
  }
  export class NetworkSource
    implements VScript.Referenceable<"RTPReceiver::Data::NetworkSource">
  {
    readonly type_identifier = "RTPReceiver::Data::NetworkSource" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get packet_stream(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPReceiver.PacketStream,
      VAPI.AT1130.RTPReceiver.NetworkSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPReceiver.PacketStream,
        VAPI.AT1130.RTPReceiver.NetworkSource
      >(this, "packet_stream" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPReceiver.PacketStream(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPReceiver::Data::PacketStream"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class PacketStream
    implements VScript.Referenceable<"RTPReceiver::Data::PacketStream">
  {
    readonly type_identifier = "RTPReceiver::Data::PacketStream" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get stream_parameters(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          number,
          null | string,
          null | string,
          null | string,
          VAPI.RTPReceiver.PacketStreamType,
          number,
          VAPI.AT1130.RTPReceiver.PacketStreamStreamParametersIrqRate,
        ],
      null | VAPI.AT1130.RTPReceiver.PacketStreamStreamParameters,
      VAPI.AT1130.RTPReceiver.PacketStream
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            number,
            null | string,
            null | string,
            null | string,
            VAPI.RTPReceiver.PacketStreamType,
            number,
            VAPI.AT1130.RTPReceiver.PacketStreamStreamParametersIrqRate,
          ],
        null | VAPI.AT1130.RTPReceiver.PacketStreamStreamParameters,
        VAPI.AT1130.RTPReceiver.PacketStream
      >(this, "stream_parameters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.RTPReceiver.lift.PacketStreamStreamParameters,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.RTPReceiver.lower.PacketStreamStreamParameters,
        ),
      });
    }

    /**
    no. of m-packets received since the last stream start (for audio streams,
    this refers to virtual m-packets). Note that for interlaced video
    streams, this number only includes lower field m-packets, i.e., a 50i
    2110 stream should report 25 m-packets per second.
  */
    get mpackets_received(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned64,
      VAPI.AT1130.RTPReceiver.PacketStream
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.Primitives.Unsigned64,
        VAPI.AT1130.RTPReceiver.PacketStream
      >(this, "mpackets_received" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get traffic_stats(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1130.RTPReceiver.PacketStream
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1130.RTPReceiver.PacketStream
      >(this, "traffic_stats" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get media_clock() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "media_clock"),
      );
    }
  }
  export class PacketTracer
    implements VScript.Referenceable<"RTPReceiver::Data::PacketTracer">
  {
    readonly type_identifier = "RTPReceiver::Data::PacketTracer" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    Set to true to enable realtime packet tracing in one of various modes.
    Note that packet tracing is CPU-intensive, and hence will always come up
    disabled after reboots.
  */
    get active(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(
        this,
        "active" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get mode(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.PacketTracerMode,
      VAPI.RTPReceiver.PacketTracerMode,
      VAPI.RTPReceiver.PacketTracerMode,
      VAPI.RTPReceiver.PacketTracerMode,
      VAPI.AT1130.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.PacketTracerMode,
        VAPI.RTPReceiver.PacketTracerMode,
        VAPI.RTPReceiver.PacketTracerMode,
        VAPI.RTPReceiver.PacketTracerMode,
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(
        this,
        "mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Set this to `Store` to have the packet tracer store packet details (up to
    some limited maximum log file size) that can later be downloaded via
    HTTP.
  */
    get packet_details(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.PacketTracerPacketDetails,
      VAPI.RTPReceiver.PacketTracerPacketDetails,
      VAPI.RTPReceiver.PacketTracerPacketDetails,
      VAPI.RTPReceiver.PacketTracerPacketDetails,
      VAPI.AT1130.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.PacketTracerPacketDetails,
        VAPI.RTPReceiver.PacketTracerPacketDetails,
        VAPI.RTPReceiver.PacketTracerPacketDetails,
        VAPI.RTPReceiver.PacketTracerPacketDetails,
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(
        this,
        "packet_details" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get filters() {
      return VAPI.RTPReceiver.lift.PacketTracerFilters(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "filters"),
      );
    }

    /**
    Reorder up to this many consecutive RTP packets before trying to check
    for missing sequence numbers
  */
    get reordering_depth(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(
        this,
        "reordering_depth" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get port(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.NetworkInterfaces.Port,
      | null
      | (VScript.Referenceable<"NetworkInterfaces::Data::Port"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.NetworkInterfaces.Port,
        | null
        | (VScript.Referenceable<"NetworkInterfaces::Data::Port"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(
        this,
        "port" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.NetworkInterfaces.Port(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"NetworkInterfaces::Data::Port"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.NetworkInterfaces.Port(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"NetworkInterfaces::Data::Port"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.PacketTracerIssues,
      VAPI.AT1130.RTPReceiver.PacketTracer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PacketTracerIssues,
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.RTPReceiver.PacketTracerIssues => ({
          cannot_activate_while_downloading: (x & 1) !== 0,
          cannot_reconfigure_while_active: (x & 2) !== 0,
          invalid_port_assignment: (x & 4) !== 0,
          missing_port_assignment: (x & 8) !== 0,
          non_ipv4_dst_address: (x & 16) !== 0,
          non_multicast_dst_address: (x & 32) !== 0,
          unordered_port_range: (x & 64) !== 0,
        }),
        lower: (
          x: VAPI.RTPReceiver.PacketTracerIssues,
          _: VScript.VSocket,
        ): number =>
          (x.cannot_activate_while_downloading ? 1 : 0) |
          (x.cannot_reconfigure_while_active ? 2 : 0) |
          (x.invalid_port_assignment ? 4 : 0) |
          (x.missing_port_assignment ? 8 : 0) |
          (x.non_ipv4_dst_address ? 16 : 0) |
          (x.non_multicast_dst_address ? 32 : 0) |
          (x.unordered_port_range ? 64 : 0),
      });
    }
    get cur_run(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          number,
          number | string,
          number | string,
          number,
          number,
          number,
          number,
          number,
          number,
          VAPI.RTPReceiver.PacketTracerRunPacketDetails,
          VAPI.RTPReceiver.PacketTracerMode,
        ],
      null | VAPI.RTPReceiver.PacketTracerRun,
      VAPI.AT1130.RTPReceiver.PacketTracer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            number,
            number | string,
            number | string,
            number,
            number,
            number,
            number,
            number,
            number,
            VAPI.RTPReceiver.PacketTracerRunPacketDetails,
            VAPI.RTPReceiver.PacketTracerMode,
          ],
        null | VAPI.RTPReceiver.PacketTracerRun,
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(this, "cur_run" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.RTPReceiver.lift.PacketTracerRun,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.RTPReceiver.lower.PacketTracerRun,
        ),
      });
    }
    get prev_run(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          number,
          number | string,
          number | string,
          number,
          number,
          number,
          number,
          number,
          number,
          VAPI.RTPReceiver.PacketTracerRunPacketDetails,
          VAPI.RTPReceiver.PacketTracerMode,
        ],
      null | VAPI.RTPReceiver.PacketTracerRun,
      VAPI.AT1130.RTPReceiver.PacketTracer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            number,
            number | string,
            number | string,
            number,
            number,
            number,
            number,
            number,
            number,
            VAPI.RTPReceiver.PacketTracerRunPacketDetails,
            VAPI.RTPReceiver.PacketTracerMode,
          ],
        null | VAPI.RTPReceiver.PacketTracerRun,
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(this, "prev_run" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.RTPReceiver.lift.PacketTracerRun,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.RTPReceiver.lower.PacketTracerRun,
        ),
      });
    }
    get num_pending_downloads(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.NumDownloads,
      VAPI.AT1130.RTPReceiver.PacketTracer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.NumDownloads,
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(this, "num_pending_downloads" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class PassthroughEssence
    implements VScript.Referenceable<"RTPReceiver::Data::PassthroughEssence">
  {
    readonly type_identifier = "RTPReceiver::Data::PassthroughEssence" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.RTPReceiver.PassthroughEssence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.RTPReceiver.PassthroughEssence
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get stream_id(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.RTPReceiver.PacketStreamIndex,
      VAPI.AT1130.RTPReceiver.PassthroughEssence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.RTPReceiver.PacketStreamIndex,
        VAPI.AT1130.RTPReceiver.PassthroughEssence
      >(this, "stream_id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get memory_blocks(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, Array<null | number>],
      null | VAPI.AT1130.RTPReceiver.PassthroughEssenceMemoryBlocks,
      VAPI.AT1130.RTPReceiver.PassthroughEssence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, Array<null | number>],
        null | VAPI.AT1130.RTPReceiver.PassthroughEssenceMemoryBlocks,
        VAPI.AT1130.RTPReceiver.PassthroughEssence
      >(this, "memory_blocks" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.RTPReceiver.lift.PassthroughEssenceMemoryBlocks,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.RTPReceiver.lower.PassthroughEssenceMemoryBlocks,
        ),
      });
    }
    get sdp(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.RTPReceiver.PassthroughEssence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.RTPReceiver.PassthroughEssence
      >(this, "sdp" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class PassthroughFlowPartition
    implements
      VScript.Referenceable<"RTPReceiver::Data::PassthroughFlowPartition">
  {
    readonly type_identifier =
      "RTPReceiver::Data::PassthroughFlowPartition" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get id(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.PartitionID,
      VAPI.AT1130.RTPReceiver.PassthroughFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PartitionID,
        VAPI.AT1130.RTPReceiver.PassthroughFlowPartition
      >(this, "id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Network sources feeding this flow partition; if more than 8 sources feed
    into a single partition, surplus sources will not be published via the
    web interface
  */
    get sources(): VScript.rKeyword<
      VScript.VSocket,
      Array<[null | string, number]>,
      Array<VAPI.AT1130.RTPReceiver.AffineNetworkSource>,
      VAPI.AT1130.RTPReceiver.PassthroughFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number]>,
        Array<VAPI.AT1130.RTPReceiver.AffineNetworkSource>,
        VAPI.AT1130.RTPReceiver.PassthroughFlowPartition
      >(this, "sources" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1130.RTPReceiver.lift.AffineNetworkSource,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1130.RTPReceiver.lower.AffineNetworkSource,
        ),
      });
    }
  }
  export class PassthroughReceiver
    implements VScript.Referenceable<"RTPReceiver::Data::PassthroughReceiver">
  {
    readonly type_identifier =
      "RTPReceiver::Data::PassthroughReceiver" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get tracks(): VScript.rKeyword<
      VScript.VSocket,
      [
        VAPI.RTPReceiver.TrackSet,
        VAPI.RTPReceiver.OrderedTrackSet,
        null | VAPI.RTPReceiver.Track,
        null | VAPI.RTPReceiver.Track,
        null | VAPI.RTPReceiver.Track,
        null | VAPI.RTPReceiver.Track,
      ],
      VAPI.RTPReceiver.UsedReceiverTracks,
      VAPI.AT1130.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.RTPReceiver.TrackSet,
          VAPI.RTPReceiver.OrderedTrackSet,
          null | VAPI.RTPReceiver.Track,
          null | VAPI.RTPReceiver.Track,
          null | VAPI.RTPReceiver.Track,
          null | VAPI.RTPReceiver.Track,
        ],
        VAPI.RTPReceiver.UsedReceiverTracks,
        VAPI.AT1130.RTPReceiver.PassthroughReceiver
      >(this, "tracks" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.UsedReceiverTracks,
        lower: VAPI.RTPReceiver.lower.UsedReceiverTracks,
      });
    }
    get hosting_session(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.RTPReceiver.Session,
      | null
      | (VScript.Referenceable<"RTPReceiver::Data::Session"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.RTPReceiver.Session,
        | null
        | (VScript.Referenceable<"RTPReceiver::Data::Session"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.RTPReceiver.PassthroughReceiver
      >(
        this,
        "hosting_session" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPReceiver.Session(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPReceiver::Data::Session"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPReceiver.Session(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPReceiver::Data::Session"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get ingress(): VScript.rKeyword<
      VScript.VSocket,
      [VAPI.RTPReceiver.IngressTrackState, VAPI.RTPReceiver.IngressTrackState],
      VAPI.RTPReceiver.Ingress,
      VAPI.AT1130.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.RTPReceiver.IngressTrackState,
          VAPI.RTPReceiver.IngressTrackState,
        ],
        VAPI.RTPReceiver.Ingress,
        VAPI.AT1130.RTPReceiver.PassthroughReceiver
      >(this, "ingress" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.Ingress,
        lower: VAPI.RTPReceiver.lower.Ingress,
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.PassthroughReceiverIssues,
      VAPI.AT1130.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PassthroughReceiverIssues,
        VAPI.AT1130.RTPReceiver.PassthroughReceiver
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.RTPReceiver.PassthroughReceiverIssues => ({
          subscription_failed: (x & 1) !== 0,
        }),
        lower: (
          x: VAPI.RTPReceiver.PassthroughReceiverIssues,
          _: VScript.VSocket,
        ): number => (x.subscription_failed ? 1 : 0),
      });
    }
    get output() {
      return VAPI.AT1130.RTPReceiver.lift.PassthroughEssence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "output"),
      );
    }
    get reserved_buffer_id(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.RTPReceiver.BufferID,
      VAPI.AT1130.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.RTPReceiver.BufferID,
        VAPI.AT1130.RTPReceiver.PassthroughReceiver
      >(this, "reserved_buffer_id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Ideally, this keyword shouldn't exist. In practice however, capability
    requests are currently processed eagerly, s.t. the outcome of a
    capability allocation attempt may depend on the order in which individual
    receivers are serviced. To ensure full state recovery across reboots, we
    thus store this ordering explicitly
  */
    get capability_request(): VScript.rKeyword<
      VScript.VSocket,
      [null | number, null | number],
      VAPI.RTPReceiver.CapabilityRequestIDs,
      VAPI.AT1130.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | number, null | number],
        VAPI.RTPReceiver.CapabilityRequestIDs,
        VAPI.AT1130.RTPReceiver.PassthroughReceiver
      >(this, "capability_request" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.CapabilityRequestIDs,
        lower: VAPI.RTPReceiver.lower.CapabilityRequestIDs,
      });
    }
    get flow_partitions(): VScript.rKeyword<
      VScript.VSocket,
      [null | string, null | string],
      VAPI.AT1130.RTPReceiver.PassthroughReceiverFlowPartitions,
      VAPI.AT1130.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | string, null | string],
        VAPI.AT1130.RTPReceiver.PassthroughReceiverFlowPartitions,
        VAPI.AT1130.RTPReceiver.PassthroughReceiver
      >(this, "flow_partitions" as VScript.SysName, {
        lift: VAPI.AT1130.RTPReceiver.lift.PassthroughReceiverFlowPartitions,
        lower: VAPI.AT1130.RTPReceiver.lower.PassthroughReceiverFlowPartitions,
      });
    }
  }
  export class PassthroughReceiverAsNamedTableRow extends PassthroughReceiver {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export type RAMBlock = number;
  export type RAMChannel = number;
  export type RAMPseudoChannel = number;
  export type ReadSpeed =
    | {
        variant: "LockToGenlock";
        value: VAPI.AT1130.RTPReceiver.ReadSpeedLockToGenlock;
      }
    | { variant: "Adaptive"; value: VAPI.AT1130.RTPReceiver.ReadSpeedAdaptive };
  export interface ReserveAudioBackend {
    group: VAPI.RTPReceiver.AudioBlockIndex;
    instance: VAPI.RTPReceiver.AudioInstanceIndex;
    slices: Array<null | VAPI.RTPReceiver.LocalSliceIndex>;
    channel: VAPI.AT1130.RTPReceiver.RAMChannel;

    /**
    determines the internal read index; reads from the main memory region use
    `2*read_pair`, reads from the alternate region use `2*read_pair+1`
  */
    read_pair: number;
    fifo_blocks: Array<null | VAPI.AT1130.RTPReceiver.AudioDecoderFIFOBlock>;
    fence: null | VAPI.Time.FreeRunningCounter;
  }
  export class Session
    implements VScript.Referenceable<"RTPReceiver::Data::Session">
  {
    readonly type_identifier = "RTPReceiver::Data::Session" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    A session only supports clean switching if all of its media receivers do
    (see
    `{audio,video}_receivers[*].media_specific.capabilities.supports_clean_switching`)
  */
    get supports_clean_switching(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.RTPReceiver.Session
      >(this, "supports_clean_switching" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get switch_type(): VScript.dKeyword<
      VScript.VSocket,
      [0, []] | [1, [number | string]] | [2, [number | string]],
      [0, []] | [1, [number | string]] | [2, [number | string]],
      VAPI.RTPReceiver.SwitchType,
      VAPI.RTPReceiver.SwitchType,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [0, []] | [1, [number | string]] | [2, [number | string]],
        [0, []] | [1, [number | string]] | [2, [number | string]],
        VAPI.RTPReceiver.SwitchType,
        VAPI.RTPReceiver.SwitchType,
        VAPI.AT1130.RTPReceiver.Session
      >(
        this,
        "switch_type" as VScript.SysName,
        {
          lift: VAPI.RTPReceiver.lift.SwitchType,
          lower: VAPI.RTPReceiver.lower.SwitchType,
        },
        {
          lift: VAPI.RTPReceiver.lift.SwitchType,
          lower: VAPI.RTPReceiver.lower.SwitchType,
        },
        null,
      );
    }
    get video_receivers(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.RTPReceiver.VideoReceiver>,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.RTPReceiver.VideoReceiver>,
        VAPI.AT1130.RTPReceiver.Session
      >(this, "video_receivers" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPReceiver.VideoReceiver(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPReceiver::Data::VideoReceiver"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
    get audio_receivers(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.RTPReceiver.AudioReceiver>,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.RTPReceiver.AudioReceiver>,
        VAPI.AT1130.RTPReceiver.Session
      >(this, "audio_receivers" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPReceiver.AudioReceiver(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPReceiver::Data::AudioReceiver"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
    get anc_burst_receivers(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.RTPReceiver.AncBurstReceiver>,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.RTPReceiver.AncBurstReceiver>,
        VAPI.AT1130.RTPReceiver.Session
      >(this, "anc_burst_receivers" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPReceiver.AncBurstReceiver(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPReceiver::Data::AncBurstReceiver"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
    get passthrough_receivers(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.RTPReceiver.PassthroughReceiver>,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.RTPReceiver.PassthroughReceiver>,
        VAPI.AT1130.RTPReceiver.Session
      >(this, "passthrough_receivers" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPReceiver.PassthroughReceiver(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPReceiver::Data::PassthroughReceiver"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
    get active(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.RTPReceiver.Session
      >(
        this,
        "active" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get sdp_a(): VScript.dKeyword<
      VScript.VSocket,
      string,
      string,
      string,
      string,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1130.RTPReceiver.Session
      >(
        this,
        "sdp_a" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get sdp_b(): VScript.dKeyword<
      VScript.VSocket,
      string,
      string,
      string,
      string,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1130.RTPReceiver.Session
      >(
        this,
        "sdp_b" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get interfaces(): VScript.dKeyword<
      VScript.VSocket,
      [null | string, null | string],
      [null | string, null | string],
      VAPI.RTPReceiver.SessionInterfaces,
      VAPI.RTPReceiver.SessionInterfaces,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | string],
        [null | string, null | string],
        VAPI.RTPReceiver.SessionInterfaces,
        VAPI.RTPReceiver.SessionInterfaces,
        VAPI.AT1130.RTPReceiver.Session
      >(
        this,
        "interfaces" as VScript.SysName,
        {
          lift: VAPI.RTPReceiver.lift.SessionInterfaces,
          lower: VAPI.RTPReceiver.lower.SessionInterfaces,
        },
        {
          lift: VAPI.RTPReceiver.lift.SessionInterfaces,
          lower: VAPI.RTPReceiver.lower.SessionInterfaces,
        },
        null,
      );
    }
    get used_tracks(): VScript.rKeyword<
      VScript.VSocket,
      [
        VAPI.RTPReceiver.TrackSet,
        VAPI.RTPReceiver.TrackSet,
        VAPI.RTPReceiver.TrackSet,
        VAPI.RTPReceiver.TrackSet,
      ],
      VAPI.RTPReceiver.UsedSessionTracks,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.RTPReceiver.TrackSet,
          VAPI.RTPReceiver.TrackSet,
          VAPI.RTPReceiver.TrackSet,
          VAPI.RTPReceiver.TrackSet,
        ],
        VAPI.RTPReceiver.UsedSessionTracks,
        VAPI.AT1130.RTPReceiver.Session
      >(this, "used_tracks" as VScript.SysName, {
        lift: VAPI.RTPReceiver.lift.UsedSessionTracks,
        lower: VAPI.RTPReceiver.lower.UsedSessionTracks,
      });
    }
    get last_accepted_track(): VScript.rKeyword<
      VScript.VSocket,
      null | [VAPI.RTPReceiver.Track, number, number, Array<number>],
      null | VAPI.RTPReceiver.SessionLastAcceptedTrack,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [VAPI.RTPReceiver.Track, number, number, Array<number>],
        null | VAPI.RTPReceiver.SessionLastAcceptedTrack,
        VAPI.AT1130.RTPReceiver.Session
      >(this, "last_accepted_track" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.RTPReceiver.lift.SessionLastAcceptedTrack,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.RTPReceiver.lower.SessionLastAcceptedTrack,
        ),
      });
    }
    get event_counters() {
      return VAPI.RTPReceiver.lift.SessionEventCounters(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          12,
          "event_counters",
        ),
      );
    }
    get version_window() {
      return VAPI.RTPReceiver.lift.SessionVersionWindow(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          13,
          "version_window",
        ),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.SessionIssues,
      VAPI.AT1130.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.SessionIssues,
        VAPI.AT1130.RTPReceiver.Session
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.RTPReceiver.SessionIssues => ({
          switch_type_request_blocked: (x & 1) !== 0,
        }),
        lower: (
          x: VAPI.RTPReceiver.SessionIssues,
          _: VScript.VSocket,
        ): number => (x.switch_type_request_blocked ? 1 : 0),
      });
    }
    async set_sdp(
      track: VAPI.RTPReceiver.Track,
      sdp: string | null,
      pars?: { timeout?: VScript.Duration; retry_interval?: VScript.Duration },
    ) {
      // set to something != 0, so sending an unversioned request to a freshly
      // initialized session won't inadvertently come back with the correct
      // response version
      const INIT_VERSION = 10;
      const target_version =
        ((await this.last_accepted_track.read())?.controller_version ??
          INIT_VERSION) + 1;
      let resolved = false;
      // FIXME: should have another write variant that allows event-driven external resolution, so we
      // could explicitly have watcher's callback declare success on the ensuing write call. The current
      // implementation of set_sdp will perform one unneeded write/check cycle instead
      const watcher = await this.last_accepted_track.watch((new_lat) => {
        if (new_lat?.controller_version === target_version) resolved = true;
      });
      const transformed_sdp = (() => {
        const trimmed = (sdp ?? "").trim();
        if (trimmed.length === 0)
          return `v=0\no=- 0 0 IN IP4 0.0.0.0\ns=empty\nt=0 0\na=controller-version:${target_version}`;
        const split = split_sdp(trimmed);
        return (
          split.header +
          `\na=controller-version:${target_version}\n` +
          split.media_descriptions.map((md) => md.text).join("\n")
        );
      })();
      try {
        // FIXME: apparently the RTPReceiverDriver doesn't like trailing newlines??
        await (track === "A" ? this.sdp_a : this.sdp_b).command.write(
          transformed_sdp.trim(),
          {
            retry_until: {
              criterion: "custom",
              validator: async () => resolved,
            },
            ...(pars ?? {}),
          },
        );
      } finally {
        watcher.unwatch();
      }
    }
  }
  export class SessionAsNamedTableRow extends Session {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export interface TimingTargetTimeSource {
    t_src: null | VAPI.AT1130.Time.Source;
    use_rtp_timestamp: boolean;
  }
  export class Timing
    implements VScript.Referenceable<"RTPReceiver::Data::Timing">
  {
    readonly type_identifier = "RTPReceiver::Data::Timing" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    If possible, maintain at least this much distance from both buffer ends.
    Note that JPEG XS receivers will always enforce a safety margin of at
    least 4ms.
  */
    get safety_margin(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.RTPReceiver.Timing
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.RTPReceiver.Timing
      >(
        this,
        "safety_margin" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftSeconds,
          lower: VScript.VAPIHelpers.lowerSeconds,
        },
        {
          lift: VScript.VAPIHelpers.liftSeconds,
          lower: VScript.VAPIHelpers.lowerSeconds,
        },
        null,
      );
    }

    /**
    Capacity of the receive buffer, as dictated by buffer settings, packet
    rates and limitations of the statistics engine
  */
    get buffer_capacity(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1130.RTPReceiver.Timing
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1130.RTPReceiver.Timing
      >(this, "buffer_capacity" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftSeconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerSeconds,
        ),
      });
    }
    get target(): VScript.dKeyword<
      VScript.VSocket,
      | [0, [number]]
      | [1, [number]]
      | [2, [null | string, boolean]]
      | [3, []]
      | [4, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]]
      | [5, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]],
      | [0, [number]]
      | [1, [number]]
      | [2, [null | string, boolean]]
      | [3, []]
      | [4, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]]
      | [5, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]],
      VAPI.AT1130.RTPReceiver.TimingTarget,
      VAPI.AT1130.RTPReceiver.TimingTarget,
      VAPI.AT1130.RTPReceiver.Timing
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        | [0, [number]]
        | [1, [number]]
        | [2, [null | string, boolean]]
        | [3, []]
        | [4, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]]
        | [5, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]],
        | [0, [number]]
        | [1, [number]]
        | [2, [null | string, boolean]]
        | [3, []]
        | [4, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]]
        | [5, [null | string, number, VAPI.RTPReceiver.BackpressurePolicy]],
        VAPI.AT1130.RTPReceiver.TimingTarget,
        VAPI.AT1130.RTPReceiver.TimingTarget,
        VAPI.AT1130.RTPReceiver.Timing
      >(
        this,
        "target" as VScript.SysName,
        {
          lift: VAPI.AT1130.RTPReceiver.lift.TimingTarget,
          lower: VAPI.AT1130.RTPReceiver.lower.TimingTarget,
        },
        {
          lift: VAPI.AT1130.RTPReceiver.lift.TimingTarget,
          lower: VAPI.AT1130.RTPReceiver.lower.TimingTarget,
        },
        null,
      );
    }

    /**
    estimated time until |distance to buffer boundary| < 0.5 *
    `safety_margin`
  */
    get expected_time_to_collision(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1130.RTPReceiver.Timing
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1130.RTPReceiver.Timing
      >(this, "expected_time_to_collision" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftSeconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerSeconds,
        ),
      });
    }
    get read_delay() {
      return VAPI.RTPReceiver.lift.TimingReadDelay(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "read_delay"),
      );
    }
    get read_delay_bounds(): VScript.dKeyword<
      VScript.VSocket,
      [null | number, null | number],
      [null | number, null | number],
      VAPI.RTPReceiver.TimingReadDelayBounds,
      VAPI.RTPReceiver.TimingReadDelayBounds,
      VAPI.AT1130.RTPReceiver.Timing
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | number, null | number],
        [null | number, null | number],
        VAPI.RTPReceiver.TimingReadDelayBounds,
        VAPI.RTPReceiver.TimingReadDelayBounds,
        VAPI.AT1130.RTPReceiver.Timing
      >(
        this,
        "read_delay_bounds" as VScript.SysName,
        {
          lift: VAPI.RTPReceiver.lift.TimingReadDelayBounds,
          lower: VAPI.RTPReceiver.lower.TimingReadDelayBounds,
        },
        {
          lift: VAPI.RTPReceiver.lift.TimingReadDelayBounds,
          lower: VAPI.RTPReceiver.lower.TimingReadDelayBounds,
        },
        null,
      );
    }
    get current_phase() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "current_phase"),
      );
    }
    get safety_mismatch(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1130.RTPReceiver.Timing
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1130.RTPReceiver.Timing
      >(this, "safety_mismatch" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftSeconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerSeconds,
        ),
      });
    }
    get phase_control() {
      return VAPI.RTPReceiver.lift.TimingPhaseControl(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "phase_control"),
      );
    }

    /**
    delay readout of newly incoming streams until at least this many mpackets
    have been received. While this increases readout latency, this may also
    improve robustness if there is reason to believe that stream setup may
    sometimes be 'dirty' (e.g., with gaps within the first few received video
    frames)
  */
    get mpackets_warmup(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.RTPReceiver.Timing
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.RTPReceiver.Timing
      >(
        this,
        "mpackets_warmup" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
  export type TimingTarget =
    | {
        variant: "IngressPlusX";
        value: VAPI.AT1130.RTPReceiver.TimingTargetIngressPlusX;
      }
    | {
        variant: "EgressPlusX";
        value: VAPI.AT1130.RTPReceiver.TimingTargetEgressPlusX;
      }
    | {
        variant: "TimeSource";
        value: VAPI.AT1130.RTPReceiver.TimingTargetTimeSource;
      }
    | {
        variant: "BufferMidpoint";
        value: VAPI.AT1130.RTPReceiver.TimingTargetBufferMidpoint;
      }
    | {
        variant: "ForeignReadDelay";
        value: VAPI.AT1130.RTPReceiver.TimingTargetForeignReadDelay;
      }
    | {
        variant: "ForeignMediaClock";
        value: VAPI.AT1130.RTPReceiver.TimingTargetForeignMediaClock;
      };
  export interface VideoBackend {
    native: null | VAPI.AT1130.RTPReceiver.NativeVideoBackend;
    jpeg_xs: null | VAPI.AT1130.RTPReceiver.JpegXsVideoBackend;
    servo: null | VAPI.AT1130.RTPReceiver.VideoServo;
  }
  export interface VideoCapabilities {
    supports_2022_6: boolean;
    supports_uhd_sample_interleaved: boolean;
    st2110_20_caliber: null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt211020Caliber;
    st2042_2_caliber: null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt20422Caliber;
    jpeg_xs_caliber: null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesJpegXsCaliber;
    supports_2110_40: boolean;
    supports_clean_switching: boolean;
    read_speed: VAPI.AT1130.RTPReceiver.ReadSpeed;
  }
  export class VideoFlowPartition
    implements VScript.Referenceable<"RTPReceiver::Data::VideoFlowPartition">
  {
    readonly type_identifier = "RTPReceiver::Data::VideoFlowPartition" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get id(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.PartitionID,
      VAPI.AT1130.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PartitionID,
        VAPI.AT1130.RTPReceiver.VideoFlowPartition
      >(this, "id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get sdp_standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.RTPReceiver.VideoFlowPartition
      >(this, "sdp_standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fmt_standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.RTPReceiver.VideoFlowPartition
      >(this, "fmt_standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get transport_format(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.TransportFormat,
      null | VAPI.Video.TransportFormat,
      VAPI.AT1130.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.TransportFormat,
        null | VAPI.Video.TransportFormat,
        VAPI.AT1130.RTPReceiver.VideoFlowPartition
      >(this, "transport_format" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Network sources feeding this flow partition; if more than 8 sources feed
    into a single partition, surplus sources will not be published via the
    web interface
  */
    get sources(): VScript.rKeyword<
      VScript.VSocket,
      Array<[null | string, number]>,
      Array<VAPI.AT1130.RTPReceiver.AffineNetworkSource>,
      VAPI.AT1130.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number]>,
        Array<VAPI.AT1130.RTPReceiver.AffineNetworkSource>,
        VAPI.AT1130.RTPReceiver.VideoFlowPartition
      >(this, "sources" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1130.RTPReceiver.lift.AffineNetworkSource,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1130.RTPReceiver.lower.AffineNetworkSource,
        ),
      });
    }
  }
  export class VideoReceiver
    implements VScript.Referenceable<"RTPReceiver::Data::VideoReceiver">
  {
    readonly type_identifier = "RTPReceiver::Data::VideoReceiver" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get generic() {
      return VAPI.AT1130.RTPReceiver.lift.MediaReceiver(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "generic"),
      );
    }
    get media_specific() {
      return VAPI.AT1130.RTPReceiver.lift.VideoReceiverMediaSpecific(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "media_specific",
        ),
      );
    }
  }
  export class VideoReceiverAsNamedTableRow extends VideoReceiver {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class VideoServo
    implements VScript.Referenceable<"RTPReceiver::Data::VideoServo">
  {
    readonly type_identifier = "RTPReceiver::Data::VideoServo" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get relative_speed(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.RTPReceiver.VideoServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.RTPReceiver.VideoServo
      >(this, "relative_speed" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get max_relative_speed(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.RTPReceiver.VideoServo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.RTPReceiver.VideoServo
      >(
        this,
        "max_relative_speed" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get max_acceleration(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.RTPReceiver.VideoServo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.RTPReceiver.VideoServo
      >(
        this,
        "max_acceleration" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get backend() {
      return VAPI.AT1130.Genlock.lift.AT1130GenlockBackend(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "backend"),
      );
    }
  }
  export interface MemoryChannelInfoConnectedToAudio {
    block: VAPI.RTPReceiver.AudioBlockIndex;
    fifo_blocks_left: number;
  }
  export interface MemoryChannelInfoConnectedTo {
    video_native: Array<null | VAPI.RTPReceiver.NativeVideoBlockIndex>;
    video_jpegxs: Array<null | VAPI.RTPReceiver.JpegXsBlockIndex>;
    audio: Array<null | VAPI.AT1130.RTPReceiver.MemoryChannelInfoConnectedToAudio>;
  }
  export class AllDiagnostics
    implements VScript.Referenceable<"RTPReceiver::Data::All::Diagnostics">
  {
    readonly type_identifier = "RTPReceiver::Data::All::Diagnostics" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    Clear traffic statistics
  */
    get clear_traffic_stats(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.RTPReceiver.AllDiagnostics
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.RTPReceiver.AllDiagnostics
      >(
        this,
        "clear_traffic_stats" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Clear input stage statistics
  */
    get clear_input_statistics(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.RTPReceiver.AllDiagnostics
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.RTPReceiver.AllDiagnostics
      >(
        this,
        "clear_input_statistics" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get aggregate_traffic_stats(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1130.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1130.RTPReceiver.AllDiagnostics
      >(this, "aggregate_traffic_stats" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get memory_channels(): VScript.rKeyword<
      VScript.VSocket,
      Array<
        [
          number,
          number,
          [
            Array<null | number>,
            Array<null | number>,
            Array<null | [number, number]>,
          ],
          number,
        ]
      >,
      Array<VAPI.AT1130.RTPReceiver.MemoryChannelInfo>,
      VAPI.AT1130.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<
          [
            number,
            number,
            [
              Array<null | number>,
              Array<null | number>,
              Array<null | [number, number]>,
            ],
            number,
          ]
        >,
        Array<VAPI.AT1130.RTPReceiver.MemoryChannelInfo>,
        VAPI.AT1130.RTPReceiver.AllDiagnostics
      >(this, "memory_channels" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1130.RTPReceiver.lift.MemoryChannelInfo,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1130.RTPReceiver.lower.MemoryChannelInfo,
        ),
      });
    }
    get rtp_input(): VScript.rKeyword<
      VScript.VSocket,
      Array<
        Array<
          null | [number, [number, number, number, number], [number, number]]
        >
      >,
      Array<Array<null | VAPI.AT1130.RTPReceiver.AllDiagnosticsRtpInput>>,
      VAPI.AT1130.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<
          Array<
            null | [number, [number, number, number, number], [number, number]]
          >
        >,
        Array<Array<null | VAPI.AT1130.RTPReceiver.AllDiagnosticsRtpInput>>,
        VAPI.AT1130.RTPReceiver.AllDiagnostics
      >(this, "rtp_input" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VAPI.AT1130.RTPReceiver.lift.AllDiagnosticsRtpInput,
            ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.lowerArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              VAPI.AT1130.RTPReceiver.lower.AllDiagnosticsRtpInput,
            ),
          ),
        ),
      });
    }
    get mpacket_tracer() {
      return VAPI.RTPReceiver.lift.AllDiagnosticsMpacketTracer(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          5,
          "mpacket_tracer",
        ),
      );
    }
    get packet_tracers() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "RTPReceiver::Data::PacketTracer",
        VAPI.AT1130.RTPReceiver.PacketTracer
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          6,
          "packet_tracers",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPReceiver.lift.PacketTracer(st),
      );
    }
    get igmp_performance_metrics() {
      return VAPI.AT1130.RTPReceiver.lift.AllDiagnosticsIgmpPerformanceMetrics(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          7,
          "igmp_performance_metrics",
        ),
      );
    }

    /**
    Enable this option to have the receiver log every readout attempt to
    syslog. Potentially useful for debugging but very verbose, so you'll
    probably want to keep this disabled in production.
  */
    get log_readout_requests(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.RTPReceiver.AllDiagnostics
      >(
        this,
        "log_readout_requests" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Enable this option to have the receiver log every IGMP join/leave request
    to syslog. Potentially useful for debugging but very verbose, so you'll
    probably want to keep this disabled in production.
  */
    get log_igmp_requests(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.RTPReceiver.AllDiagnostics
      >(
        this,
        "log_igmp_requests" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
  export interface AllDiagnosticsRtpInputFillLevel {
    min: VAPI.Primitives.Unsigned8;
    max: VAPI.Primitives.Unsigned8;
  }
  export interface PassthroughReceiverFlowPartitions {
    sdp_a: null | VAPI.AT1130.RTPReceiver.PassthroughFlowPartition;
    sdp_b: null | VAPI.AT1130.RTPReceiver.PassthroughFlowPartition;
  }
  export interface AudioReceiverMediaSpecificFlowPartitions {
    sdp_a: null | VAPI.AT1130.RTPReceiver.AudioFlowPartition;
    sdp_b: null | VAPI.AT1130.RTPReceiver.AudioFlowPartition;
  }
  export interface VideoReceiverMediaSpecificFlowPartitions {
    sdp_a: null | VAPI.AT1130.RTPReceiver.VideoFlowPartition;
    sdp_b: null | VAPI.AT1130.RTPReceiver.VideoFlowPartition;
  }
  export type MetadataBackendGroup = number;
  export interface AllDiagnosticsIgmpPerformanceMetricsIgmpLatency {
    port: null | VAPI.AT1130.Primitives.NetworkPortID;
    src: null | string;
    dst: null | string;
    time_to_first_mpacket: null | VScript.Duration;
    first_rtp_timestamp: null | VAPI.Time.RTPTimestamp;
    first_rtp_seqnr: null | VAPI.RTPReceiver.Seqnr;

    /**
    time between two m-packets. This defines the latency measurement's
    uncertainty and depends on video standards, transport formats and (for
    audio streams) on the currently configured IRQ rate
  */
    mpacket_interval: null | VScript.Duration;
  }
  export class AllDiagnosticsIgmpPerformanceMetrics
    implements
      VScript.Referenceable<"RTPReceiver::Data::All::Diagnostics::IgmpPerformanceMetrics">
  {
    readonly type_identifier =
      "RTPReceiver::Data::All::Diagnostics::IgmpPerformanceMetrics" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    emit warning message if the time elapsed between an outgoing IGMP join
    request and the arrival of the first corresponding packet (estimated
    conservatively as `time_to_first_mpacket - mpacket_interval`) exceeds
    `warning_threshold`. Note that for interlaced 2110/2042 streams,
    upper-field mpackets are not considered.
  */
    get warning_threshold(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.RTPReceiver.AllDiagnosticsIgmpPerformanceMetrics
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.RTPReceiver.AllDiagnosticsIgmpPerformanceMetrics
      >(
        this,
        "warning_threshold" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftSeconds,
          lower: VScript.VAPIHelpers.lowerSeconds,
        },
        {
          lift: VScript.VAPIHelpers.liftSeconds,
          lower: VScript.VAPIHelpers.lowerSeconds,
        },
        null,
      );
    }
    get igmp_latency(): VScript.rKeyword<
      VScript.VSocket,
      [
        null | VAPI.AT1130.Primitives.NetworkPortID,
        null | string,
        null | string,
        null | number,
        null | number,
        null | number,
        null | number,
      ],
      VAPI.AT1130.RTPReceiver.AllDiagnosticsIgmpPerformanceMetricsIgmpLatency,
      VAPI.AT1130.RTPReceiver.AllDiagnosticsIgmpPerformanceMetrics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          null | VAPI.AT1130.Primitives.NetworkPortID,
          null | string,
          null | string,
          null | number,
          null | number,
          null | number,
          null | number,
        ],
        VAPI.AT1130.RTPReceiver.AllDiagnosticsIgmpPerformanceMetricsIgmpLatency,
        VAPI.AT1130.RTPReceiver.AllDiagnosticsIgmpPerformanceMetrics
      >(this, "igmp_latency" as VScript.SysName, {
        lift: VAPI.AT1130.RTPReceiver.lift
          .AllDiagnosticsIgmpPerformanceMetricsIgmpLatency,
        lower:
          VAPI.AT1130.RTPReceiver.lower
            .AllDiagnosticsIgmpPerformanceMetricsIgmpLatency,
      });
    }
  }
  export type MetadataBackendInstance = number;
  export type PacketStreamStreamParametersIrqRate = "Standard" | "Increased";
  export type VideoCapabilitiesJpegXsCaliber =
    | "JPEG_XS_upto_3G"
    | "JPEG_XS_singlelink_uhd";
  export class AncBurstReceiverMediaClock
    implements
      VScript.Referenceable<"RTPReceiver::Data::AncBurstReceiver::MediaClock">
  {
    readonly type_identifier =
      "RTPReceiver::Data::AncBurstReceiver::MediaClock" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get ingress() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "ingress"),
      );
    }
    get egress() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "egress"),
      );
    }
  }
  export class AudioReceiverMediaSpecific
    implements
      VScript.Referenceable<"RTPReceiver::Data::AudioReceiver::MediaSpecific">
  {
    readonly type_identifier =
      "RTPReceiver::Data::AudioReceiver::MediaSpecific" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      | null
      | [
          number,
          VAPI.AT1130.RTPReceiver.AudioCapabilitiesPayloadLimit,
          boolean,
          [0, [null | string]] | [1, []],
        ],
      | null
      | [
          number,
          VAPI.AT1130.RTPReceiver.AudioCapabilitiesPayloadLimit,
          boolean,
          [0, [null | string]] | [1, []],
        ],
      null | VAPI.AT1130.RTPReceiver.AudioCapabilities,
      null | VAPI.AT1130.RTPReceiver.AudioCapabilities,
      VAPI.AT1130.RTPReceiver.AudioReceiverMediaSpecific
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        | null
        | [
            number,
            VAPI.AT1130.RTPReceiver.AudioCapabilitiesPayloadLimit,
            boolean,
            [0, [null | string]] | [1, []],
          ],
        | null
        | [
            number,
            VAPI.AT1130.RTPReceiver.AudioCapabilitiesPayloadLimit,
            boolean,
            [0, [null | string]] | [1, []],
          ],
        null | VAPI.AT1130.RTPReceiver.AudioCapabilities,
        null | VAPI.AT1130.RTPReceiver.AudioCapabilities,
        VAPI.AT1130.RTPReceiver.AudioReceiverMediaSpecific
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.RTPReceiver.lift.AudioCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.RTPReceiver.lower.AudioCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.RTPReceiver.lift.AudioCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.RTPReceiver.lower.AudioCapabilities,
          ),
        },
        null,
      );
    }
    get backend(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          number,
          number,
          null | string,
          Array<null | number>,
          number,
          number,
          Array<null | number>,
        ],
      null | VAPI.AT1130.RTPReceiver.AudioBackend,
      VAPI.AT1130.RTPReceiver.AudioReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            number,
            number,
            null | string,
            Array<null | number>,
            number,
            number,
            Array<null | number>,
          ],
        null | VAPI.AT1130.RTPReceiver.AudioBackend,
        VAPI.AT1130.RTPReceiver.AudioReceiverMediaSpecific
      >(this, "backend" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.RTPReceiver.lift.AudioBackend,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.RTPReceiver.lower.AudioBackend,
        ),
      });
    }
    get flow_partitions(): VScript.rKeyword<
      VScript.VSocket,
      [null | string, null | string],
      VAPI.AT1130.RTPReceiver.AudioReceiverMediaSpecificFlowPartitions,
      VAPI.AT1130.RTPReceiver.AudioReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | string, null | string],
        VAPI.AT1130.RTPReceiver.AudioReceiverMediaSpecificFlowPartitions,
        VAPI.AT1130.RTPReceiver.AudioReceiverMediaSpecific
      >(this, "flow_partitions" as VScript.SysName, {
        lift: VAPI.AT1130.RTPReceiver.lift
          .AudioReceiverMediaSpecificFlowPartitions,
        lower:
          VAPI.AT1130.RTPReceiver.lower
            .AudioReceiverMediaSpecificFlowPartitions,
      });
    }
    get output() {
      return VAPI.AT1130.RTPReceiver.lift.AudioReceiverMediaSpecificOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "output"),
      );
    }
  }
  export class VideoReceiverMediaSpecific
    implements
      VScript.Referenceable<"RTPReceiver::Data::VideoReceiver::MediaSpecific">
  {
    readonly type_identifier =
      "RTPReceiver::Data::VideoReceiver::MediaSpecific" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      | null
      | [
          boolean,
          boolean,
          null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt211020Caliber,
          null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt20422Caliber,
          null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
          boolean,
          boolean,
          [0, [null | string]] | [1, []],
        ],
      | null
      | [
          boolean,
          boolean,
          null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt211020Caliber,
          null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt20422Caliber,
          null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
          boolean,
          boolean,
          [0, [null | string]] | [1, []],
        ],
      null | VAPI.AT1130.RTPReceiver.VideoCapabilities,
      null | VAPI.AT1130.RTPReceiver.VideoCapabilities,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        | null
        | [
            boolean,
            boolean,
            null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt211020Caliber,
            null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt20422Caliber,
            null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
            boolean,
            boolean,
            [0, [null | string]] | [1, []],
          ],
        | null
        | [
            boolean,
            boolean,
            null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt211020Caliber,
            null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesSt20422Caliber,
            null | VAPI.AT1130.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
            boolean,
            boolean,
            [0, [null | string]] | [1, []],
          ],
        null | VAPI.AT1130.RTPReceiver.VideoCapabilities,
        null | VAPI.AT1130.RTPReceiver.VideoCapabilities,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.RTPReceiver.lift.VideoCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.RTPReceiver.lower.VideoCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.RTPReceiver.lift.VideoCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1130.RTPReceiver.lower.VideoCapabilities,
          ),
        },
        null,
      );
    }
    get backend(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          (
            | null
            | [
                number,
                Array<null | number>,
                number,
                null | [number, number, [number, number], number, number],
              ]
          ),
          (
            | null
            | [
                number,
                Array<null | number>,
                number,
                null | [number, number, [number, number], number, number],
              ]
          ),
          null | string,
        ],
      null | VAPI.AT1130.RTPReceiver.VideoBackend,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            (
              | null
              | [
                  number,
                  Array<null | number>,
                  number,
                  null | [number, number, [number, number], number, number],
                ]
            ),
            (
              | null
              | [
                  number,
                  Array<null | number>,
                  number,
                  null | [number, number, [number, number], number, number],
                ]
            ),
            null | string,
          ],
        null | VAPI.AT1130.RTPReceiver.VideoBackend,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
      >(this, "backend" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.RTPReceiver.lift.VideoBackend,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1130.RTPReceiver.lower.VideoBackend,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.VideoReceiverMediaSpecificIssues,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.VideoReceiverMediaSpecificIssues,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.RTPReceiver.VideoReceiverMediaSpecificIssues => ({
          audio_deembedder_errors: (x & 1) !== 0,
          drop_repeat_frames: (x & 2) !== 0,
          misaligned_anc_data: (x & 4) !== 0,
          no_bbm_capabilities: (x & 8) !== 0,
          video_decoding_errors: (x & 16) !== 0,
        }),
        lower: (
          x: VAPI.RTPReceiver.VideoReceiverMediaSpecificIssues,
          _: VScript.VSocket,
        ): number =>
          (x.audio_deembedder_errors ? 1 : 0) |
          (x.drop_repeat_frames ? 2 : 0) |
          (x.misaligned_anc_data ? 4 : 0) |
          (x.no_bbm_capabilities ? 8 : 0) |
          (x.video_decoding_errors ? 16 : 0),
      });
    }
    get error_counters() {
      return VAPI.RTPReceiver.lift.VideoReceiverMediaSpecificErrorCounters(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          3,
          "error_counters",
        ),
      );
    }
    get event_counters() {
      return VAPI.RTPReceiver.lift.VideoReceiverMediaSpecificEventCounters(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "event_counters",
        ),
      );
    }

    /**
    Reset 2022-6 audio deembedder
  */
    get reset_audio_deembedder(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
      >(
        this,
        "reset_audio_deembedder" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get flow_partitions(): VScript.rKeyword<
      VScript.VSocket,
      [null | string, null | string],
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecificFlowPartitions,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | string, null | string],
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecificFlowPartitions,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
      >(this, "flow_partitions" as VScript.SysName, {
        lift: VAPI.AT1130.RTPReceiver.lift
          .VideoReceiverMediaSpecificFlowPartitions,
        lower:
          VAPI.AT1130.RTPReceiver.lower
            .VideoReceiverMediaSpecificFlowPartitions,
      });
    }
    get output() {
      return VAPI.AT1130.RTPReceiver.lift.VideoReceiverMediaSpecificOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "output"),
      );
    }

    /**
    when this is set to true, a timestamped CRC32 signature of every emitted
    video frame will be published via `signature`
  */
    get publish_signature(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
      >(
        this,
        "publish_signature" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get timestamped_signature(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, Array<number>],
      null | VAPI.Video.TimestampedSignature,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, Array<number>],
        null | VAPI.Video.TimestampedSignature,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
      >(this, "timestamped_signature" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Video.lift.TimestampedSignature,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Video.lower.TimestampedSignature,
        ),
      });
    }
    get hard_metadata_decoder() {
      return VAPI.RTPReceiver.lift.VideoReceiverMediaSpecificHardMetadataDecoder(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          10,
          "hard_metadata_decoder",
        ),
      );
    }
    get soft_metadata_decoder() {
      return VAPI.RTPReceiver.lift.VideoReceiverMediaSpecificSoftMetadataDecoder(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          11,
          "soft_metadata_decoder",
        ),
      );
    }
    get soft_metadata_extractor() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "MetadataProcessor::Data::MetadataExtractor",
        VAPI.AT1130.MetadataProcessor.MetadataExtractor
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          12,
          "soft_metadata_extractor",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.MetadataProcessor.lift.MetadataExtractor(raw),
      );
    }

    /**
    Single video substreams pertaining to a quadlink UHD flow may be
    subscribed to independently, and used as separate 3G streams instead. By
    default, the resulting 3G video essences will be stripped of their
    substream attributes, which affects SDPs generated on retransmission, as
    well as 352 payloads. If you wish to retain original substream
    attributes, set this setting to `PropagateSubstreamAttribute` (but note
    that this setting only takes effect on readout).
  */
    get on_isolated_substream(): VScript.dKeyword<
      VScript.VSocket,
      null | VAPI.RTPReceiver.OnIsolatedSubstream,
      null | VAPI.RTPReceiver.OnIsolatedSubstream,
      null | VAPI.RTPReceiver.OnIsolatedSubstream,
      null | VAPI.RTPReceiver.OnIsolatedSubstream,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | VAPI.RTPReceiver.OnIsolatedSubstream,
        null | VAPI.RTPReceiver.OnIsolatedSubstream,
        null | VAPI.RTPReceiver.OnIsolatedSubstream,
        null | VAPI.RTPReceiver.OnIsolatedSubstream,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
      >(
        this,
        "on_isolated_substream" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    When non-null, this keyword holds decoder state as inferred from
    currently received streams, or as obtained from the underlying hardware
    decoder at runtime.
  */
    get cur_decoder_ws(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | ([0, []] | [1, [[0, []] | [1, []] | [2, [Array<number>]], number]]),
      null | VAPI.RTPReceiver.SingleVideoDecoderWorkingSet,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | ([0, []] | [1, [[0, []] | [1, []] | [2, [Array<number>]], number]]),
        null | VAPI.RTPReceiver.SingleVideoDecoderWorkingSet,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecific
      >(this, "cur_decoder_ws" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.RTPReceiver.lift.SingleVideoDecoderWorkingSet,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.RTPReceiver.lower.SingleVideoDecoderWorkingSet,
        ),
      });
    }
  }
  export interface PassthroughEssenceMemoryBlocks {
    channel: VAPI.AT1130.RTPReceiver.RAMChannel;
    blocks: Array<null | VAPI.AT1130.RTPReceiver.RAMBlock>;
  }
  export class AudioReceiverMediaSpecificOutput
    implements
      VScript.Referenceable<"RTPReceiver::Data::AudioReceiver::MediaSpecific::Output">
  {
    readonly type_identifier =
      "RTPReceiver::Data::AudioReceiver::MediaSpecific::Output" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get audio() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "audio"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "ptp_traits"),
      );
    }
  }
  export class VideoReceiverMediaSpecificOutput
    implements
      VScript.Referenceable<"RTPReceiver::Data::VideoReceiver::MediaSpecific::Output">
  {
    readonly type_identifier =
      "RTPReceiver::Data::VideoReceiver::MediaSpecific::Output" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get cc_channel(): VScript.dKeyword<
      VScript.VSocket,
      null | VAPI.Video.ClosedCaptionChannel,
      null | VAPI.Video.ClosedCaptionChannel,
      null | VAPI.Video.ClosedCaptionChannel,
      null | VAPI.Video.ClosedCaptionChannel,
      VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecificOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | VAPI.Video.ClosedCaptionChannel,
        null | VAPI.Video.ClosedCaptionChannel,
        null | VAPI.Video.ClosedCaptionChannel,
        null | VAPI.Video.ClosedCaptionChannel,
        VAPI.AT1130.RTPReceiver.VideoReceiverMediaSpecificOutput
      >(
        this,
        "cc_channel" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get video() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "video"),
      );
    }
    get start_of_frame() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "start_of_frame",
        ),
      );
    }
    get cc() {
      return VAPI.Video.lift.ClosedCaption(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "cc"),
      );
    }
    get deembedded_audio() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "Audio::Data::Essence",
        VAPI.AT1130.Audio.Essence
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          4,
          "deembedded_audio",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.Audio.lift.Essence(raw),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "ptp_traits"),
      );
    }
  }
  export class MediaReceiverPacketStreams
    implements
      VScript.Referenceable<"RTPReceiver::Data::MediaReceiver::PacketStreams">
  {
    readonly type_identifier =
      "RTPReceiver::Data::MediaReceiver::PacketStreams" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    for every subflow index, the first entry to appear in this list
    represents its rear guard
  */
    get sdp_a(): VScript.rKeyword<
      VScript.VSocket,
      Array<[null | string, number, null | [number, number, number, number]]>,
      Array<VAPI.AT1130.RTPReceiver.AssociatedStream>,
      VAPI.AT1130.RTPReceiver.MediaReceiverPacketStreams
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number, null | [number, number, number, number]]>,
        Array<VAPI.AT1130.RTPReceiver.AssociatedStream>,
        VAPI.AT1130.RTPReceiver.MediaReceiverPacketStreams
      >(this, "sdp_a" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1130.RTPReceiver.lift.AssociatedStream,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1130.RTPReceiver.lower.AssociatedStream,
        ),
      });
    }

    /**
    for every subflow index, the first entry to appear in this list
    represents its rear guard
  */
    get sdp_b(): VScript.rKeyword<
      VScript.VSocket,
      Array<[null | string, number, null | [number, number, number, number]]>,
      Array<VAPI.AT1130.RTPReceiver.AssociatedStream>,
      VAPI.AT1130.RTPReceiver.MediaReceiverPacketStreams
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number, null | [number, number, number, number]]>,
        Array<VAPI.AT1130.RTPReceiver.AssociatedStream>,
        VAPI.AT1130.RTPReceiver.MediaReceiverPacketStreams
      >(this, "sdp_b" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1130.RTPReceiver.lift.AssociatedStream,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1130.RTPReceiver.lower.AssociatedStream,
        ),
      });
    }
  }
  export interface AllDiagnosticsRtpInputPacketsDiscarded {
    input_errors: VAPI.Primitives.CyclicCounter32;
    oversized: VAPI.Primitives.CyclicCounter32;
    data_fifo_full: VAPI.Primitives.CyclicCounter32;
    info_fifo_full: VAPI.Primitives.CyclicCounter32;
  }
  export type AudioCapabilitiesPayloadLimit =
    | "AtMost448Bytes"
    | "AtMost960Bytes"
    | "AtMost1984Bytes";
  export interface AllDiagnosticsRtpInput {
    packets_written: VAPI.Primitives.CyclicCounter32;
    packets_discarded: VAPI.AT1130.RTPReceiver.AllDiagnosticsRtpInputPacketsDiscarded;
    fill_level: VAPI.AT1130.RTPReceiver.AllDiagnosticsRtpInputFillLevel;
  }
  export class AllSettings
    implements VScript.Referenceable<"RTPReceiver::Data::All::Settings">
  {
    readonly type_identifier = "RTPReceiver::Data::All::Settings" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    if `clean_switching_policy` is set to `Tolerant`, packet rates and ST2042
    compression ratios may change across switching boundaries. This ensures
    interoperability between a wider range of transmitters but comes at a
    slight performance penalty, as the receiver first has to determine the
    current packet rate before a switch can be effected. When set to
    `Whatever`, impossible clean switching requests will silently be
    converted into patching operations. Please only use this option as a
    measure of last resort, if at all.
  */
    get clean_switching_policy(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.CleanSwitchingPolicy,
      VAPI.RTPReceiver.CleanSwitchingPolicy,
      VAPI.RTPReceiver.CleanSwitchingPolicy,
      VAPI.RTPReceiver.CleanSwitchingPolicy,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.CleanSwitchingPolicy,
        VAPI.RTPReceiver.CleanSwitchingPolicy,
        VAPI.RTPReceiver.CleanSwitchingPolicy,
        VAPI.RTPReceiver.CleanSwitchingPolicy,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "clean_switching_policy" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    limits IGMP stream subscriptions such that there remains an esimated
    `reserved_bandwidth` % of headroom on every RTP port (non-media traffic
    such as PTP or JSON/WS is not taken into account)
  */
    get reserved_bandwidth(): VScript.rwKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | number,
      null | number,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | number,
        null | number,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "reserved_bandwidth" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get max_concurrent_mpacket_irq_boosts(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.Primitives.Unsigned16,
      VAPI.Primitives.Unsigned16,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.Primitives.Unsigned16,
        VAPI.Primitives.Unsigned16,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "max_concurrent_mpacket_irq_boosts" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get concurrent_mpacket_irq_boosts(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned16,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned16,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(this, "concurrent_mpacket_irq_boosts" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    set this to modern to have generated 2042-raw/2022-6 streams state their
    respective rtp clock rates
  */
    get sdp_format(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.SDP.SDPFormat,
      VAPI.SDP.SDPFormat,
      VAPI.SDP.SDPFormat,
      VAPI.SDP.SDPFormat,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.SDP.SDPFormat,
        VAPI.SDP.SDPFormat,
        VAPI.SDP.SDPFormat,
        VAPI.SDP.SDPFormat,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "sdp_format" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    determines how SDP files entered into `sdp_a_command` or `sdp_b_command`
    translate into their respective `status` counterparts. If
    `sdp_generation` is set to `Verbatim`, accepted SDP files are copied to
    `status` unmodified, even if some or all of the media descriptions within
    could not be serviced due to resource exhaustion. If `sdp_generation` is
    set to `Semantic`, only operationally effective parts of the SDP will be
    emitted.
  */
    get sdp_generation(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.AllSettingsSdpGeneration,
      VAPI.RTPReceiver.AllSettingsSdpGeneration,
      VAPI.RTPReceiver.AllSettingsSdpGeneration,
      VAPI.RTPReceiver.AllSettingsSdpGeneration,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.AllSettingsSdpGeneration,
        VAPI.RTPReceiver.AllSettingsSdpGeneration,
        VAPI.RTPReceiver.AllSettingsSdpGeneration,
        VAPI.RTPReceiver.AllSettingsSdpGeneration,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "sdp_generation" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get num_audio_reserve_receivers(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "num_audio_reserve_receivers" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get rx_error() {
      return VAPI.RTPReceiver.lift.CountableErrorHandler(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "rx_error"),
      );
    }
    get mpacket_error() {
      return VAPI.RTPReceiver.lift.CountableErrorHandler(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "mpacket_error"),
      );
    }
    get offset_2110_error() {
      return VAPI.RTPReceiver.lift.CountableErrorHandler(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          9,
          "offset_2110_error",
        ),
      );
    }
    get linenr_2110_error() {
      return VAPI.RTPReceiver.lift.CountableErrorHandler(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          10,
          "linenr_2110_error",
        ),
      );
    }

    /**
    time after which countable error events (such as RX errors or m-packet
    errors) are automatically cleared. Error accumulators are left unchanged
    until cleared explicitly by the user
  */
    get error_signalling_timeout(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "error_signalling_timeout" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get flight_permit_timeout(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "flight_permit_timeout" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }

    /**
    when in clean-switching mode (i.e., if `switch_time` is neither 0 nor 1),
    SDP writes to `current_target` are rejected, followed by an informational
    error message. Set `on_sdp_collision` to `RejectSilently` to suppress
    this error message.
  */
    get on_sdp_collision(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.AllSettingsOnSdpCollision,
      VAPI.RTPReceiver.AllSettingsOnSdpCollision,
      VAPI.RTPReceiver.AllSettingsOnSdpCollision,
      VAPI.RTPReceiver.AllSettingsOnSdpCollision,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.AllSettingsOnSdpCollision,
        VAPI.RTPReceiver.AllSettingsOnSdpCollision,
        VAPI.RTPReceiver.AllSettingsOnSdpCollision,
        VAPI.RTPReceiver.AllSettingsOnSdpCollision,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "on_sdp_collision" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    some configuration attempts cannot be executed completely. For example, a
    session containing 3 audio receivers will not be able to service a
    connection request if the corresponding SDP contains 4 or more audio
    essences. In these cases, the receiver may either set up as many
    connections as possible and discard the rest (`BestEffort`), or refuse
    the configuration attempt and raise an error message instead (`Refuse`).
  */
    get exhaustion_policy(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.ResourceExhaustionPolicy,
      VAPI.RTPReceiver.ResourceExhaustionPolicy,
      VAPI.RTPReceiver.ResourceExhaustionPolicy,
      VAPI.RTPReceiver.ResourceExhaustionPolicy,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.ResourceExhaustionPolicy,
        VAPI.RTPReceiver.ResourceExhaustionPolicy,
        VAPI.RTPReceiver.ResourceExhaustionPolicy,
        VAPI.RTPReceiver.ResourceExhaustionPolicy,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "exhaustion_policy" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get backend_liveness() {
      return VAPI.RTPReceiver.lift.CountableErrorHandler(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          15,
          "backend_liveness",
        ),
      );
    }
    get premature_read() {
      return VAPI.RTPReceiver.lift.CountableErrorHandler(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          16,
          "premature_read",
        ),
      );
    }

    /**
    Single video substreams pertaining to a quadlink UHD flow may be
    subscribed to independently, and used as separate 3G streams instead. By
    default, the resulting 3G video essences will be stripped of their
    substream attributes, which affects SDPs generated on retransmission, as
    well as 352 payloads. If you wish to retain original substream
    attributes, set this setting to `PropagateSubstreamAttribute` (but note
    that this setting only takes effect on readout).
  */
    get on_isolated_substream(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.RTPReceiver.OnIsolatedSubstream,
      VAPI.RTPReceiver.OnIsolatedSubstream,
      VAPI.RTPReceiver.OnIsolatedSubstream,
      VAPI.RTPReceiver.OnIsolatedSubstream,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.OnIsolatedSubstream,
        VAPI.RTPReceiver.OnIsolatedSubstream,
        VAPI.RTPReceiver.OnIsolatedSubstream,
        VAPI.RTPReceiver.OnIsolatedSubstream,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "on_isolated_substream" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get buffer_sizes(): VScript.dKeyword<
      VScript.VSocket,
      [
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
      ],
      [
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
        VAPI.AT1130.RTPReceiver.BufferSize,
      ],
      VAPI.AT1130.RTPReceiver.BufferSizes,
      VAPI.AT1130.RTPReceiver.BufferSizes,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
        ],
        [
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
          VAPI.AT1130.RTPReceiver.BufferSize,
        ],
        VAPI.AT1130.RTPReceiver.BufferSizes,
        VAPI.AT1130.RTPReceiver.BufferSizes,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "buffer_sizes" as VScript.SysName,
        {
          lift: VAPI.AT1130.RTPReceiver.lift.BufferSizes,
          lower: VAPI.AT1130.RTPReceiver.lower.BufferSizes,
        },
        {
          lift: VAPI.AT1130.RTPReceiver.lift.BufferSizes,
          lower: VAPI.AT1130.RTPReceiver.lower.BufferSizes,
        },
        null,
      );
    }

    /**
    enable this to have panicking 2110-20 receivers freeze all flow of data
    into their respective HBM channels. While this feature can be very useful
    for a post-mortem analysis in case of network-related errors, please keep
    in mind that other receivers sharing the same HBM channel will be
    affected as well. Also, this option should best be used with disabled
    backend liveness error handlers as liveness timeouts may otherwise fire
    too soon for you to retrieve the previously frozen memory contents
  */
    get freeze_memory_on_2110_20_panic(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.RTPReceiver.AllSettings
      >(
        this,
        "freeze_memory_on_2110_20_panic" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
  export type VideoCapabilitiesSt20422Caliber =
    | "ST2042_2_upto_3G"
    | "ST2042_2_singlelink_uhd";
  export type VideoCapabilitiesSt211020Caliber =
    | "ST2110_upto_3G"
    | "ST2110_singlelink_uhd";
  export interface PacketStreamStreamParameters {
    /**
    Seqnr offset relative to other packet streams mapped to the same memory
    region. N packet streams hence define N-1 meaningful offsets.
  */
    seqnr_offset: VAPI.RTPReceiver.SeqnrDifference;

    /**
    IP (unicast) address of the RTP stream sender
  */
    src_address: null | string;

    /**
    IP (multicast) destination address of the RTP stream
  */
    dst_address: null | string;
    interface: null | VAPI.NetworkInterfaces.VirtualInterface;
    type: VAPI.RTPReceiver.PacketStreamType;
    pseudo_channel: VAPI.AT1130.RTPReceiver.RAMPseudoChannel;
    irq_rate: VAPI.AT1130.RTPReceiver.PacketStreamStreamParametersIrqRate;
  }
  export const Enums = {
    BufferSize: [
      "UpTo4MB",
      "UpTo8MB",
      "UpTo12MB",
      "UpTo16MB",
      "UpTo24MB",
      "UpTo32MB",
      "UpTo48MB",
      "UpTo96MB",
    ] as BufferSize[],
  } as const;
}
export namespace RTPTransmitter {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    AudioEncoder: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioEncoder(_raw),
    AudioFlowReference: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioFlowReference(_raw),
    AudioStreamHardware: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioStreamHardware(_raw),
    AudioStreamer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioStreamer(_raw),
    EncoderHWDataEncoderClassic: (
      _raw: [
        boolean,
        boolean,
        boolean,
        boolean,
        boolean,
        number,
        number,
        number,
        number,
        number,
        number,
      ],
      _socket: VScript.VSocket,
    ): EncoderHWDataEncoderClassic => {
      return {
        enabled: _raw[0],
        st2110: _raw[1],
        interlaced: _raw[2],
        vstart: _raw[3],
        vincrement: _raw[4],
        vend0: _raw[5],
        vend1: _raw[6],
        ts_sample_delay: _raw[7],
        ts_increment: _raw[8],
        h_active: _raw[9],
        pixels_per_packet: _raw[10],
      };
    },
    EncoderHWData: (
      _raw:
        | [
            0,
            [
              boolean,
              boolean,
              boolean,
              boolean,
              boolean,
              number,
              number,
              number,
              number,
              number,
              number,
            ],
          ]
        | [1, [boolean, boolean, boolean, number, number]]
        | [
            2,
            [
              null | number,
              null | number,
              null | VAPI.RTPTransmitter.ColorSampleMode,
              null | number,
              null | VAPI.RTPTransmitter.ValidateMode,
              null | number,
              null | VAPI.RTPTransmitter.VideoDepth,
              null | boolean,
              null | Array<number>,
              null | number,
            ],
          ],
      _socket: VScript.VSocket,
    ): EncoderHWData => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "EncoderClassic",
            value: VAPI.AT1130.RTPTransmitter.lift.EncoderHWDataEncoderClassic(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "EncoderVC2",
            value: VAPI.AT1130.RTPTransmitter.lift.EncoderHWDataEncoderVC2(
              _raw[1],
              _socket,
            ),
          };
        case 2:
          return {
            variant: "EncoderJxsCodec",
            value: VAPI.AT1130.RTPTransmitter.lift.EncoderHWDataEncoderJxsCodec(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    EncoderHWDataEncoderJxsCodec: (
      _raw: [
        null | number,
        null | number,
        null | VAPI.RTPTransmitter.ColorSampleMode,
        null | number,
        null | VAPI.RTPTransmitter.ValidateMode,
        null | number,
        null | VAPI.RTPTransmitter.VideoDepth,
        null | boolean,
        null | Array<number>,
        null | number,
      ],
      _socket: VScript.VSocket,
    ): EncoderHWDataEncoderJxsCodec => {
      return {
        width: _raw[0],
        height: _raw[1],
        mode: _raw[2],
        budget_per_frame: _raw[3],
        vld: _raw[4],
        number_of_images: _raw[5],
        video_depth: _raw[6],
        play_mode: _raw[7],
        level_weights: _raw[8],
        profile: _raw[9],
      };
    },
    EncoderHWDataEncoderVC2: (
      _raw: [boolean, boolean, boolean, number, number],
      _socket: VScript.VSocket,
    ): EncoderHWDataEncoderVC2 => {
      return {
        interlace: _raw[0],
        enabled: _raw[1],
        is_uhd: _raw[2],
        target_bytes_per_slice: _raw[3],
        last_slice: _raw[4],
      };
    },
    FlowReference: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new FlowReference(_raw),
    HDRINSMUX: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HDRINSMUX(_raw),
    HDRAudio: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HDRAudio(_raw),
    HDRGeneral: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HDRGeneral(_raw),
    HDRMipmap: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HDRMipmap(_raw),
    HDRVideo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HDRVideo(_raw),
    HardwareStatus: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HardwareStatus(_raw),
    HeaderReference: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HeaderReference(_raw),
    LaneHeader: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new LaneHeader(_raw),
    LaneStatistic: (
      _raw: [number, number, number, number, null | string],
      _socket: VScript.VSocket,
    ): LaneStatistic => {
      return {
        reserved_tdm_output_bandwidth: _raw[0],
        max_tdm_output_bandwidth: _raw[1],
        reserved_bus_bandwidth: _raw[2],
        maxbus_bandwidth: _raw[3],
        fpga_lane_statistic:
          _raw[4] === null
            ? null
            : new VAPI.AT1130.NetworkInterfaces.LaneStatistics(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[4] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    MediaClock: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MediaClock(_raw),
    MediaClockControl: (
      _raw: [0, [null | string]] | [1, []],
      _socket: VScript.VSocket,
    ): MediaClockControl => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "Timesource",
            value: VAPI.AT1130.RTPTransmitter.lift.MediaClockControlTimesource(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "Propagate",
            value: VAPI.AT1130.RTPTransmitter.lift.MediaClockControlPropagate(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    MediaStreamer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MediaStreamer(_raw),
    MediaStreamerVideo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MediaStreamerVideo(_raw),
    MipMapStreamHardware: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MipMapStreamHardware(_raw),
    MipMapStreamer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MipMapStreamer(_raw),
    MultiplexerScheduler: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MultiplexerScheduler(_raw),
    PortStatistic: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PortStatistic(_raw),
    MediaClockControlPropagate: (
      _raw: [],
      _socket: VScript.VSocket,
    ): MediaClockControlPropagate => {
      return {};
    },
    ReStreamer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new ReStreamer(_raw),
    RouterEncoder: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new RouterEncoder(_raw),
    RouterOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new RouterOutput(_raw),
    ST2110Settings: (
      _raw: [VAPI.RTPTransmitter.PackingMode, boolean, boolean],
      _socket: VScript.VSocket,
    ): ST2110Settings => {
      return {
        packing_mode: _raw[0],
        transmit_scheduler_uhd: _raw[1],
        add_st2110_40: _raw[2],
      };
    },
    Session: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Session(_raw),
    MediaClockControlTimesource: (
      _raw: [null | string],
      _socket: VScript.VSocket,
    ): MediaClockControlTimesource => {
      return {
        t_src:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    VideoConfigurationContainer: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new VideoConfigurationContainer(_raw),
    VideoFormat: (
      _raw:
        | [0, []]
        | [1, [VAPI.RTPTransmitter.PackingMode, boolean, boolean]]
        | [2, [VAPI.Video.DiracCompression, boolean]]
        | [
            3,
            [
              [0, [number]] | [1, [number]],
              VAPI.RTPTransmitter.LVLMODE,
              boolean,
              boolean,
            ],
          ],
      _socket: VScript.VSocket,
    ): VideoFormat => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "ST2022_6",
            value: VAPI.RTPTransmitter.lift.ST20226Settings(_raw[1], _socket),
          };
        case 1:
          return {
            variant: "ST2110_20",
            value: VAPI.AT1130.RTPTransmitter.lift.ST2110Settings(
              _raw[1],
              _socket,
            ),
          };
        case 2:
          return {
            variant: "ST2042",
            value: VAPI.RTPTransmitter.lift.ST2042Settings(_raw[1], _socket),
          };
        case 3:
          return {
            variant: "JPEG_XS",
            value: VAPI.RTPTransmitter.lift.JpegXsSettings(_raw[1], _socket),
          };
      }
    },
    VideoStreamHardware: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new VideoStreamHardware(_raw),
    VideoStreamer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new VideoStreamer(_raw),
    XbarEncoder: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new XbarEncoder(_raw),
    HDRINSMUXFlowsAlternate: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new HDRINSMUXFlowsAlternate(_raw),
    MultiplexerSchedulerFlowsAlternate: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new MultiplexerSchedulerFlowsAlternate(_raw),
    AudioStreamHardwareAudioEncoder: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new AudioStreamHardwareAudioEncoder(_raw),
    VideoStreamHardwareEncoderMux: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new VideoStreamHardwareEncoderMux(_raw),
    AudioEncoderError: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioEncoderError(_raw),
    AudioEncoderFlows: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioEncoderFlows(_raw),
    HDRINSMUXFlows: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HDRINSMUXFlows(_raw),
    MultiplexerSchedulerFlows: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new MultiplexerSchedulerFlows(_raw),
    RouterOutputHwCapability: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new RouterOutputHwCapability(_raw),
    PortStatisticInterfaces: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new PortStatisticInterfaces(_raw),
    HDRINSMUXFlowsMain: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new HDRINSMUXFlowsMain(_raw),
    MultiplexerSchedulerFlowsMain: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new MultiplexerSchedulerFlowsMain(_raw),
    VideoStreamHardwareMuxScheduler: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new VideoStreamHardwareMuxScheduler(_raw),
    AudioEncoderRegData: (
      _raw: [number, number, number],
      _socket: VScript.VSocket,
    ): AudioEncoderRegData => {
      return {
        last_sample: _raw[0],
        mode: _raw[1],
        sequence_number: _raw[2],
      };
    },
    HDRINSMUXRegData: (
      _raw: [
        Array<boolean>,
        boolean,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        boolean,
      ],
      _socket: VScript.VSocket,
    ): HDRINSMUXRegData => {
      return {
        enable_port: _raw[0],
        is_2022_6: _raw[1],
        sequence_eol: _raw[2],
        sample_2022_6: _raw[3],
        frame_2022_6: _raw[4],
        rate_2022_6: _raw[5],
        frame_number_2022_6: _raw[6],
        sequence_number: _raw[7],
        scheduler_subslot_2110: _raw[8],
        scheduler_slot_2110: _raw[9],
        scheduler_enable_2110: _raw[10],
      };
    },
    MultiplexerSchedulerRegData: (
      _raw: [Array<boolean>],
      _socket: VScript.VSocket,
    ): MultiplexerSchedulerRegData => {
      return {
        enable_port: _raw[0],
      };
    },
    MipMapStreamHardwareRouterEncoder: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new MipMapStreamHardwareRouterEncoder(_raw),
    VideoStreamHardwareRouterEncoder: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new VideoStreamHardwareRouterEncoder(_raw),
    VideoStreamHardwareXbarEncoder: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new VideoStreamHardwareXbarEncoder(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    AudioEncoder: (_x: AudioEncoder) => _x.raw.kwl,
    AudioFlowReference: (_x: AudioFlowReference) => _x.raw.kwl,
    AudioStreamHardware: (_x: AudioStreamHardware) => _x.raw.kwl,
    AudioStreamer: (_x: AudioStreamer) => _x.raw.kwl,
    EncoderHWDataEncoderClassic: (
      _x: {
        enabled: boolean;
        st2110: boolean;
        interlaced: boolean;

        /**
                  false = start at line nr 0; true = start at line nr 1 (for
                  2nd half of UHD)
                */
        vstart: boolean;

        /**
                  false = increment by 1; true = increment by 2 (for UHD)
                */
        vincrement: boolean;

        /**
                  Last line number for field 0
                */
        vend0: VAPI.Primitives.Unsigned32;

        /**
                  Last line number for field 1
                */
        vend1: VAPI.Primitives.Unsigned32;

        /**
                  Delay in pixels from vend to the SMPTE 2059 alignment point
                  - used for sampling RTP timestamp
                */
        ts_sample_delay: VAPI.Primitives.Unsigned32;

        /**
                  Timestamp increment from field 0 to field 1
                */
        ts_increment: VAPI.Primitives.Unsigned32;
        h_active: VAPI.Primitives.Unsigned32;
        pixels_per_packet: VAPI.Primitives.Unsigned32;
      },
      _socket: VScript.VSocket,
    ): [
      boolean,
      boolean,
      boolean,
      boolean,
      boolean,
      number,
      number,
      number,
      number,
      number,
      number,
    ] => [
      _x.enabled,
      _x.st2110,
      _x.interlaced,
      _x.vstart,
      _x.vincrement,
      _x.vend0,
      _x.vend1,
      _x.ts_sample_delay,
      _x.ts_increment,
      _x.h_active,
      _x.pixels_per_packet,
    ],
    EncoderHWData: (
      _x:
        | {
            variant: "EncoderClassic";
            value: VAPI.AT1130.RTPTransmitter.EncoderHWDataEncoderClassic;
          }
        | {
            variant: "EncoderVC2";
            value: VAPI.AT1130.RTPTransmitter.EncoderHWDataEncoderVC2;
          }
        | {
            variant: "EncoderJxsCodec";
            value: VAPI.AT1130.RTPTransmitter.EncoderHWDataEncoderJxsCodec;
          },
      _socket: VScript.VSocket,
    ):
      | [
          0,
          [
            boolean,
            boolean,
            boolean,
            boolean,
            boolean,
            number,
            number,
            number,
            number,
            number,
            number,
          ],
        ]
      | [1, [boolean, boolean, boolean, number, number]]
      | [
          2,
          [
            null | number,
            null | number,
            null | VAPI.RTPTransmitter.ColorSampleMode,
            null | number,
            null | VAPI.RTPTransmitter.ValidateMode,
            null | number,
            null | VAPI.RTPTransmitter.VideoDepth,
            null | boolean,
            null | Array<number>,
            null | number,
          ],
        ] => {
      switch (_x.variant) {
        case "EncoderClassic":
          return [
            0,
            VAPI.AT1130.RTPTransmitter.lower.EncoderHWDataEncoderClassic(
              _x.value,
              _socket,
            ),
          ];
        case "EncoderVC2":
          return [
            1,
            VAPI.AT1130.RTPTransmitter.lower.EncoderHWDataEncoderVC2(
              _x.value,
              _socket,
            ),
          ];
        case "EncoderJxsCodec":
          return [
            2,
            VAPI.AT1130.RTPTransmitter.lower.EncoderHWDataEncoderJxsCodec(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    EncoderHWDataEncoderJxsCodec: (
      _x: {
        /**
                  Width of the input encoded image, in pixels. Must be a
                  multiple of 2. Up to 4096 for UHD IP-core flavor
                */
        width: null | VAPI.Primitives.Unsigned32;

        /**
                  Height of the input encoded image, in pixels. Must be a
                  multiple of 2, and greater than or equal to 4
                */
        height: null | VAPI.Primitives.Unsigned32;

        /**
                  Contains input mode configuration fields: bit 3-0: color
                  and sub-sampling mode
                */
        mode: null | VAPI.RTPTransmitter.ColorSampleMode;

        /**
                  Budget in bytes per compressed frame, which is allocated to
                  the picture header and the compressed data. Note: To
                  compute this value according to a bit per pixel rate:
                  budget = bpp x width x height / 8 Complementary header (ie.
                  boxes) is not included in the budget
                */
        budget_per_frame: null | VAPI.Primitives.Unsigned32;

        /**
                  VALIDATE It validates the given configuration. Set to '1'
                  to start the IP-core, after setting mode and images
                  parameters. This signal must be activated to validate any
                  change in configuration (width, height, ...). Set to '0' to
                  stop the IP-core. bit 1: (R) CFG_READY ‘1’ indicates
                  that the TICO-XS is ready to receive a new configuration,
                  when this bit is ‘0’ configuration registers shouldn't
                  be modified
                */
        vld: null | VAPI.RTPTransmitter.ValidateMode;

        /**
                  Number of images to play when the IP-core is in command
                  mode. (when PLAY_MODE register = 0)
                */
        number_of_images: null | VAPI.Primitives.Unsigned32;

        /**
                  Bit depth of the video content, mapped on the MSBs of the
                  port interface. The valid bit depths are 8, 10 and 12 bits
                  per component
                */
        video_depth: null | VAPI.RTPTransmitter.VideoDepth;

        /**
                  It allows to choose between two running modes: set to '1'
                  to run in play mode, in which the IP-core processes frames
                  continuously. or set to '0' to run in command mode, in
                  which the IP-core processes n frames, n defined by NBR
                */
        play_mode: null | boolean;

        /**
                  This register is used to program the image quality
                  optimization parameters (visual or PSNR). Each pre-computed
                  weights value must be written to this register sequentially
                  to ensure proper encoder behavior.
                */
        level_weights: null | Array<VAPI.Primitives.Unsigned32>;
        profile: null | VAPI.Primitives.Unsigned32;
      },
      _socket: VScript.VSocket,
    ): [
      null | number,
      null | number,
      null | VAPI.RTPTransmitter.ColorSampleMode,
      null | number,
      null | VAPI.RTPTransmitter.ValidateMode,
      null | number,
      null | VAPI.RTPTransmitter.VideoDepth,
      null | boolean,
      null | Array<number>,
      null | number,
    ] => [
      _x.width,
      _x.height,
      _x.mode,
      _x.budget_per_frame,
      _x.vld,
      _x.number_of_images,
      _x.video_depth,
      _x.play_mode,
      _x.level_weights,
      _x.profile,
    ],
    EncoderHWDataEncoderVC2: (
      _x: {
        interlace: boolean;
        enabled: boolean;
        is_uhd: boolean;
        target_bytes_per_slice: VAPI.Primitives.Unsigned32;
        last_slice: VAPI.Primitives.Unsigned32;
      },
      _socket: VScript.VSocket,
    ): [boolean, boolean, boolean, number, number] => [
      _x.interlace,
      _x.enabled,
      _x.is_uhd,
      _x.target_bytes_per_slice,
      _x.last_slice,
    ],
    FlowReference: (_x: FlowReference) => _x.raw.kwl,
    HDRINSMUX: (_x: HDRINSMUX) => _x.raw.kwl,
    HDRAudio: (_x: HDRAudio) => _x.raw.kwl,
    HDRGeneral: (_x: HDRGeneral) => _x.raw.kwl,
    HDRMipmap: (_x: HDRMipmap) => _x.raw.kwl,
    HDRVideo: (_x: HDRVideo) => _x.raw.kwl,
    HardwareStatus: (_x: HardwareStatus) => _x.raw.kwl,
    HeaderReference: (_x: HeaderReference) => _x.raw.kwl,
    LaneHeader: (_x: LaneHeader) => _x.raw.kwl,
    LaneStatistic: (
      _x: {
        /**
                                    maximum throughput, measured in
                                    bits/second
                                  */
        reserved_tdm_output_bandwidth: VAPI.Primitives.NetworkBandwidth;

        /**
                                    maximum throughput, measured in
                                    bits/second
                                  */
        max_tdm_output_bandwidth: VAPI.Primitives.NetworkBandwidth;

        /**
                                    maximum throughput, measured in
                                    bits/second
                                  */
        reserved_bus_bandwidth: VAPI.Primitives.NetworkBandwidth;

        /**
                                    maximum throughput, measured in
                                    bits/second
                                  */
        maxbus_bandwidth: VAPI.Primitives.NetworkBandwidth;
        fpga_lane_statistic: null | VAPI.AT1130.NetworkInterfaces.LaneStatistics;
      },
      _socket: VScript.VSocket,
    ): [number, number, number, number, null | string] => [
      _x.reserved_tdm_output_bandwidth,
      _x.max_tdm_output_bandwidth,
      _x.reserved_bus_bandwidth,
      _x.maxbus_bandwidth,
      _x.fpga_lane_statistic === null ? null : _x.fpga_lane_statistic.raw.kwl,
    ],
    MediaClock: (_x: MediaClock) => _x.raw.kwl,
    MediaClockControl: (
      _x:
        | {
            variant: "Timesource";
            value: VAPI.AT1130.RTPTransmitter.MediaClockControlTimesource;
          }
        | {
            variant: "Propagate";
            value: VAPI.AT1130.RTPTransmitter.MediaClockControlPropagate;
          },
      _socket: VScript.VSocket,
    ): [0, [null | string]] | [1, []] => {
      switch (_x.variant) {
        case "Timesource":
          return [
            0,
            VAPI.AT1130.RTPTransmitter.lower.MediaClockControlTimesource(
              _x.value,
              _socket,
            ),
          ];
        case "Propagate":
          return [
            1,
            VAPI.AT1130.RTPTransmitter.lower.MediaClockControlPropagate(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    MediaStreamer: (_x: MediaStreamer) => _x.raw.kwl,
    MediaStreamerVideo: (_x: MediaStreamerVideo) => _x.raw.kwl,
    MipMapStreamHardware: (_x: MipMapStreamHardware) => _x.raw.kwl,
    MipMapStreamer: (_x: MipMapStreamer) => _x.raw.kwl,
    MultiplexerScheduler: (_x: MultiplexerScheduler) => _x.raw.kwl,
    PortStatistic: (_x: PortStatistic) => _x.raw.kwl,
    MediaClockControlPropagate: (_x: {}, _socket: VScript.VSocket): [] => [],
    ReStreamer: (_x: ReStreamer) => _x.raw.kwl,
    RouterEncoder: (_x: RouterEncoder) => _x.raw.kwl,
    RouterOutput: (_x: RouterOutput) => _x.raw.kwl,
    ST2110Settings: (
      _x: {
        packing_mode: VAPI.RTPTransmitter.PackingMode;
        transmit_scheduler_uhd: boolean;
        add_st2110_40: boolean;
      },
      _socket: VScript.VSocket,
    ): [VAPI.RTPTransmitter.PackingMode, boolean, boolean] => [
      _x.packing_mode,
      _x.transmit_scheduler_uhd,
      _x.add_st2110_40,
    ],
    Session: (_x: Session) => _x.raw.kwl,
    MediaClockControlTimesource: (
      _x: { t_src: null | VAPI.AT1130.Time.Source },
      _socket: VScript.VSocket,
    ): [null | string] => [_x.t_src === null ? null : _x.t_src.raw.kwl],
    VideoConfigurationContainer: (_x: VideoConfigurationContainer) =>
      _x.raw.kwl,
    VideoFormat: (
      _x:
        | { variant: "ST2022_6"; value: VAPI.RTPTransmitter.ST20226Settings }
        | {
            variant: "ST2110_20";
            value: VAPI.AT1130.RTPTransmitter.ST2110Settings;
          }
        | { variant: "ST2042"; value: VAPI.RTPTransmitter.ST2042Settings }
        | { variant: "JPEG_XS"; value: VAPI.RTPTransmitter.JpegXsSettings },
      _socket: VScript.VSocket,
    ):
      | [0, []]
      | [1, [VAPI.RTPTransmitter.PackingMode, boolean, boolean]]
      | [2, [VAPI.Video.DiracCompression, boolean]]
      | [
          3,
          [
            [0, [number]] | [1, [number]],
            VAPI.RTPTransmitter.LVLMODE,
            boolean,
            boolean,
          ],
        ] => {
      switch (_x.variant) {
        case "ST2022_6":
          return [
            0,
            VAPI.RTPTransmitter.lower.ST20226Settings(_x.value, _socket),
          ];
        case "ST2110_20":
          return [
            1,
            VAPI.AT1130.RTPTransmitter.lower.ST2110Settings(_x.value, _socket),
          ];
        case "ST2042":
          return [
            2,
            VAPI.RTPTransmitter.lower.ST2042Settings(_x.value, _socket),
          ];
        case "JPEG_XS":
          return [
            3,
            VAPI.RTPTransmitter.lower.JpegXsSettings(_x.value, _socket),
          ];
      }
    },
    VideoStreamHardware: (_x: VideoStreamHardware) => _x.raw.kwl,
    VideoStreamer: (_x: VideoStreamer) => _x.raw.kwl,
    XbarEncoder: (_x: XbarEncoder) => _x.raw.kwl,
    HDRINSMUXFlowsAlternate: (_x: HDRINSMUXFlowsAlternate) => _x.raw.kwl,
    MultiplexerSchedulerFlowsAlternate: (
      _x: MultiplexerSchedulerFlowsAlternate,
    ) => _x.raw.kwl,
    AudioStreamHardwareAudioEncoder: (_x: AudioStreamHardwareAudioEncoder) =>
      _x.raw.kwl,
    VideoStreamHardwareEncoderMux: (_x: VideoStreamHardwareEncoderMux) =>
      _x.raw.kwl,
    AudioEncoderError: (_x: AudioEncoderError) => _x.raw.kwl,
    AudioEncoderFlows: (_x: AudioEncoderFlows) => _x.raw.kwl,
    HDRINSMUXFlows: (_x: HDRINSMUXFlows) => _x.raw.kwl,
    MultiplexerSchedulerFlows: (_x: MultiplexerSchedulerFlows) => _x.raw.kwl,
    RouterOutputHwCapability: (_x: RouterOutputHwCapability) => _x.raw.kwl,
    PortStatisticInterfaces: (_x: PortStatisticInterfaces) => _x.raw.kwl,
    HDRINSMUXFlowsMain: (_x: HDRINSMUXFlowsMain) => _x.raw.kwl,
    MultiplexerSchedulerFlowsMain: (_x: MultiplexerSchedulerFlowsMain) =>
      _x.raw.kwl,
    VideoStreamHardwareMuxScheduler: (_x: VideoStreamHardwareMuxScheduler) =>
      _x.raw.kwl,
    AudioEncoderRegData: (
      _x: {
        last_sample: VAPI.Primitives.Unsigned32;
        mode: VAPI.Primitives.Unsigned32;
        sequence_number: VAPI.Primitives.Unsigned32;
      },
      _socket: VScript.VSocket,
    ): [number, number, number] => [
      _x.last_sample,
      _x.mode,
      _x.sequence_number,
    ],
    HDRINSMUXRegData: (
      _x: {
        enable_port: Array<boolean>;
        is_2022_6: boolean;
        sequence_eol: VAPI.Primitives.Unsigned32;
        sample_2022_6: VAPI.Primitives.Unsigned32;
        frame_2022_6: VAPI.Primitives.Unsigned32;
        rate_2022_6: VAPI.Primitives.Unsigned32;
        frame_number_2022_6: VAPI.Primitives.Unsigned32;
        sequence_number: VAPI.Primitives.Unsigned32;
        scheduler_subslot_2110: VAPI.Primitives.Unsigned32;
        scheduler_slot_2110: VAPI.Primitives.Unsigned32;
        scheduler_enable_2110: boolean;
      },
      _socket: VScript.VSocket,
    ): [
      Array<boolean>,
      boolean,
      number,
      number,
      number,
      number,
      number,
      number,
      number,
      number,
      boolean,
    ] => [
      _x.enable_port,
      _x.is_2022_6,
      _x.sequence_eol,
      _x.sample_2022_6,
      _x.frame_2022_6,
      _x.rate_2022_6,
      _x.frame_number_2022_6,
      _x.sequence_number,
      _x.scheduler_subslot_2110,
      _x.scheduler_slot_2110,
      _x.scheduler_enable_2110,
    ],
    MultiplexerSchedulerRegData: (
      _x: { enable_port: Array<boolean> },
      _socket: VScript.VSocket,
    ): [Array<boolean>] => [_x.enable_port],
    MipMapStreamHardwareRouterEncoder: (
      _x: MipMapStreamHardwareRouterEncoder,
    ) => _x.raw.kwl,
    VideoStreamHardwareRouterEncoder: (_x: VideoStreamHardwareRouterEncoder) =>
      _x.raw.kwl,
    VideoStreamHardwareXbarEncoder: (_x: VideoStreamHardwareXbarEncoder) =>
      _x.raw.kwl,
  } as const;
  export class All
    implements VScript.Referenceable<"RTPTransmitter::Data::All">
  {
    readonly type_identifier = "RTPTransmitter::Data::All" as const;
    get runtime_constants() {
      return {
        num_mipmaptransmitters: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_mipmaptransmitters",
        ) as number,
        num_transmitter_video_lane: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_transmitter_video_lane",
        ) as number,
        has_2042_uhd: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::has_2042_uhd",
        ) as boolean,
        num_hdr_flows: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_hdr_flows",
        ) as number,
        num_xbar_encoder: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_xbar_encoder",
        ) as number,
        num_ports: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_ports",
        ) as number,
        num_audio_group_control: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_audio_group_control",
        ) as number,
        max_st2110_20_uhd_transmitters:
          this.raw.backing_store.get_runtime_constant(
            "RTPTransmitter::max_st2110_20_uhd_transmitters",
          ) as number,
        max_2042: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::max_2042",
        ) as number,
        has_2042: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::has_2042",
        ) as boolean,
        num_encoder_mux: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_encoder_mux",
        ) as number,
        num_videotransmitters: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_videotransmitters",
        ) as number,
        num_audiotransmitters: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_audiotransmitters",
        ) as number,
        max_2042_uhd: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::max_2042_uhd",
        ) as number,
        num_jpegxs: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_jpegxs",
        ) as number,
        num_transmitter_mipmap_lane:
          this.raw.backing_store.get_runtime_constant(
            "RTPTransmitter::num_transmitter_mipmap_lane",
          ) as number,
        num_transmitter_audio_lane: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_transmitter_audio_lane",
        ) as number,
        num_hdr_flows_port: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_hdr_flows_port",
        ) as number,
        num_transmitters: this.raw.backing_store.get_runtime_constant(
          "RTPTransmitter::num_transmitters",
        ) as number,
        num_passthroughtransmitters:
          this.raw.backing_store.get_runtime_constant(
            "RTPTransmitter::num_passthroughtransmitters",
          ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get license_information() {
      return VAPI.RTPTransmitter.lift.AllLicenseInformation(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          0,
          "license_information",
        ),
      );
    }
    get hardware_status() {
      return VAPI.AT1130.RTPTransmitter.lift.HardwareStatus(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "hardware_status",
        ),
      );
    }
    get settings() {
      return VAPI.RTPTransmitter.lift.AllSettings(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "settings"),
      );
    }
    get sessions() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::Session",
        VAPI.AT1130.RTPTransmitter.SessionAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          3,
          "sessions",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.RTPTransmitter.SessionAsNamedTableRow(raw),
      );
    }
    get video_transmitters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::VideoStreamer",
        VAPI.AT1130.RTPTransmitter.VideoStreamerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "video_transmitters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.RTPTransmitter.VideoStreamerAsNamedTableRow(raw),
      );
    }
    get audio_transmitters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::AudioStreamer",
        VAPI.AT1130.RTPTransmitter.AudioStreamerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          5,
          "audio_transmitters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.RTPTransmitter.AudioStreamerAsNamedTableRow(raw),
      );
    }
    get passthrough_transmitters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::ReStreamer",
        VAPI.AT1130.RTPTransmitter.ReStreamerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "passthrough_transmitters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.RTPTransmitter.ReStreamerAsNamedTableRow(raw),
      );
    }
    get mipmap_transmitters() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::MipMapStreamer",
        VAPI.AT1130.RTPTransmitter.MipMapStreamer
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          7,
          "mipmap_transmitters",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.MipMapStreamer(raw),
      );
    }
  }
  export class AudioEncoder
    implements VScript.Referenceable<"RTPTransmitter::Data::AudioEncoder">
  {
    readonly type_identifier = "RTPTransmitter::Data::AudioEncoder" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get reg_data(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number],
      VAPI.AT1130.RTPTransmitter.AudioEncoderRegData,
      VAPI.AT1130.RTPTransmitter.AudioEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number],
        VAPI.AT1130.RTPTransmitter.AudioEncoderRegData,
        VAPI.AT1130.RTPTransmitter.AudioEncoder
      >(this, "reg_data" as VScript.SysName, {
        lift: VAPI.AT1130.RTPTransmitter.lift.AudioEncoderRegData,
        lower: VAPI.AT1130.RTPTransmitter.lower.AudioEncoderRegData,
      });
    }
    get flows() {
      return VAPI.AT1130.RTPTransmitter.lift.AudioEncoderFlows(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "flows"),
      );
    }
    get error() {
      return VAPI.AT1130.RTPTransmitter.lift.AudioEncoderError(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "error"),
      );
    }
  }
  export class AudioFlowReference
    implements VScript.Referenceable<"RTPTransmitter::Data::AudioFlowReference">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::AudioFlowReference" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hdr_ref(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.HDRAudio,
      VAPI.AT1130.RTPTransmitter.AudioFlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.HDRAudio,
        VAPI.AT1130.RTPTransmitter.AudioFlowReference
      >(this, "hdr_ref" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.HDRAudio(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::HDRAudio"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get hdr_index(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.RTPTransmitter.AudioFlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.RTPTransmitter.AudioFlowReference
      >(this, "hdr_index" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get hdr_port(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.RTPTransmitter.AudioFlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.RTPTransmitter.AudioFlowReference
      >(this, "hdr_port" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class AudioStreamHardware
    implements
      VScript.Referenceable<"RTPTransmitter::Data::AudioStreamHardware">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::AudioStreamHardware" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get audio_encoder() {
      return VAPI.AT1130.RTPTransmitter.lift.AudioStreamHardwareAudioEncoder(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "audio_encoder"),
      );
    }
  }
  export class AudioStreamer
    implements VScript.Referenceable<"RTPTransmitter::Data::AudioStreamer">
  {
    readonly type_identifier = "RTPTransmitter::Data::AudioStreamer" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get generic() {
      return VAPI.AT1130.RTPTransmitter.lift.MediaStreamer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "generic"),
      );
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      [null | string, null | number | string],
      [null | string, null | number | string],
      VAPI.AT1130.Audio.TimedSource,
      VAPI.AT1130.Audio.TimedSource,
      VAPI.AT1130.RTPTransmitter.AudioStreamer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1130.Audio.TimedSource,
        VAPI.AT1130.Audio.TimedSource,
        VAPI.AT1130.RTPTransmitter.AudioStreamer
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VAPI.AT1130.Audio.lift.TimedSource,
          lower: VAPI.AT1130.Audio.lower.TimedSource,
        },
        {
          lift: VAPI.AT1130.Audio.lift.TimedSource,
          lower: VAPI.AT1130.Audio.lower.TimedSource,
        },
        null,
      );
    }
    get configuration() {
      return VAPI.RTPTransmitter.lift.AudioConfigurationContainer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "configuration"),
      );
    }
    get stream_name() {
      return VAPI.Definitions.lift.NAME(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "stream_name"),
      );
    }
    get connected_hardware() {
      return VAPI.AT1130.RTPTransmitter.lift.AudioStreamHardware(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "connected_hardware",
        ),
      );
    }
  }
  export class AudioStreamerAsNamedTableRow extends AudioStreamer {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export interface EncoderHWDataEncoderClassic {
    enabled: boolean;
    st2110: boolean;
    interlaced: boolean;

    /**
    false = start at line nr 0; true = start at line nr 1 (for 2nd half of
    UHD)
  */
    vstart: boolean;

    /**
    false = increment by 1; true = increment by 2 (for UHD)
  */
    vincrement: boolean;

    /**
    Last line number for field 0
  */
    vend0: VAPI.Primitives.Unsigned32;

    /**
    Last line number for field 1
  */
    vend1: VAPI.Primitives.Unsigned32;

    /**
    Delay in pixels from vend to the SMPTE 2059 alignment point - used for
    sampling RTP timestamp
  */
    ts_sample_delay: VAPI.Primitives.Unsigned32;

    /**
    Timestamp increment from field 0 to field 1
  */
    ts_increment: VAPI.Primitives.Unsigned32;
    h_active: VAPI.Primitives.Unsigned32;
    pixels_per_packet: VAPI.Primitives.Unsigned32;
  }
  export type EncoderHWData =
    | {
        variant: "EncoderClassic";
        value: VAPI.AT1130.RTPTransmitter.EncoderHWDataEncoderClassic;
      }
    | {
        variant: "EncoderVC2";
        value: VAPI.AT1130.RTPTransmitter.EncoderHWDataEncoderVC2;
      }
    | {
        variant: "EncoderJxsCodec";
        value: VAPI.AT1130.RTPTransmitter.EncoderHWDataEncoderJxsCodec;
      };
  export interface EncoderHWDataEncoderJxsCodec {
    /**
    Width of the input encoded image, in pixels. Must be a multiple of 2. Up
    to 4096 for UHD IP-core flavor
  */
    width: null | VAPI.Primitives.Unsigned32;

    /**
    Height of the input encoded image, in pixels. Must be a multiple of 2,
    and greater than or equal to 4
  */
    height: null | VAPI.Primitives.Unsigned32;

    /**
    Contains input mode configuration fields: bit 3-0: color and sub-sampling
    mode
  */
    mode: null | VAPI.RTPTransmitter.ColorSampleMode;

    /**
    Budget in bytes per compressed frame, which is allocated to the picture
    header and the compressed data. Note: To compute this value according to
    a bit per pixel rate: budget = bpp x width x height / 8 Complementary
    header (ie. boxes) is not included in the budget
  */
    budget_per_frame: null | VAPI.Primitives.Unsigned32;

    /**
    VALIDATE It validates the given configuration. Set to '1' to start the
    IP-core, after setting mode and images parameters. This signal must be
    activated to validate any change in configuration (width, height, ...).
    Set to '0' to stop the IP-core. bit 1: (R) CFG_READY ‘1’ indicates
    that the TICO-XS is ready to receive a new configuration, when this bit
    is ‘0’ configuration registers shouldn't be modified
  */
    vld: null | VAPI.RTPTransmitter.ValidateMode;

    /**
    Number of images to play when the IP-core is in command mode. (when
    PLAY_MODE register = 0)
  */
    number_of_images: null | VAPI.Primitives.Unsigned32;

    /**
    Bit depth of the video content, mapped on the MSBs of the port interface.
    The valid bit depths are 8, 10 and 12 bits per component
  */
    video_depth: null | VAPI.RTPTransmitter.VideoDepth;

    /**
    It allows to choose between two running modes: set to '1' to run in play
    mode, in which the IP-core processes frames continuously. or set to '0'
    to run in command mode, in which the IP-core processes n frames, n
    defined by NBR
  */
    play_mode: null | boolean;

    /**
    This register is used to program the image quality optimization
    parameters (visual or PSNR). Each pre-computed weights value must be
    written to this register sequentially to ensure proper encoder behavior.
  */
    level_weights: null | Array<VAPI.Primitives.Unsigned32>;
    profile: null | VAPI.Primitives.Unsigned32;
  }
  export interface EncoderHWDataEncoderVC2 {
    interlace: boolean;
    enabled: boolean;
    is_uhd: boolean;
    target_bytes_per_slice: VAPI.Primitives.Unsigned32;
    last_slice: VAPI.Primitives.Unsigned32;
  }
  export class FlowReference
    implements VScript.Referenceable<"RTPTransmitter::Data::FlowReference">
  {
    readonly type_identifier = "RTPTransmitter::Data::FlowReference" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hdr_ref(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.HDRVideo,
      VAPI.AT1130.RTPTransmitter.FlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.HDRVideo,
        VAPI.AT1130.RTPTransmitter.FlowReference
      >(this, "hdr_ref" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.HDRVideo(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::HDRVideo"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get hdr_index(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.RTPTransmitter.FlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.RTPTransmitter.FlowReference
      >(this, "hdr_index" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class HDRINSMUX
    implements VScript.Referenceable<"RTPTransmitter::Data::HDRINSMUX">
  {
    readonly type_identifier = "RTPTransmitter::Data::HDRINSMUX" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get flows() {
      return VAPI.AT1130.RTPTransmitter.lift.HDRINSMUXFlows(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "flows"),
      );
    }
    get reg_data(): VScript.rKeyword<
      VScript.VSocket,
      [
        Array<boolean>,
        boolean,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        number,
        boolean,
      ],
      VAPI.AT1130.RTPTransmitter.HDRINSMUXRegData,
      VAPI.AT1130.RTPTransmitter.HDRINSMUX
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          Array<boolean>,
          boolean,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          number,
          boolean,
        ],
        VAPI.AT1130.RTPTransmitter.HDRINSMUXRegData,
        VAPI.AT1130.RTPTransmitter.HDRINSMUX
      >(this, "reg_data" as VScript.SysName, {
        lift: VAPI.AT1130.RTPTransmitter.lift.HDRINSMUXRegData,
        lower: VAPI.AT1130.RTPTransmitter.lower.HDRINSMUXRegData,
      });
    }
  }
  export class HDRAudio
    implements VScript.Referenceable<"RTPTransmitter::Data::HDRAudio">
  {
    readonly type_identifier = "RTPTransmitter::Data::HDRAudio" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    maximum throughput, measured in bits/second
  */
    get reserved_port_bandwidth(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.NetworkBandwidth,
      VAPI.AT1130.RTPTransmitter.HDRAudio
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1130.RTPTransmitter.HDRAudio
      >(this, "reserved_port_bandwidth" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get related_references() {
      return VAPI.AT1130.RTPTransmitter.lift.HeaderReference(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "related_references",
        ),
      );
    }

    /**
    reference to encoder mux
  */
    get audio_encoder_hw(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.AudioEncoder,
      VAPI.AT1130.RTPTransmitter.HDRAudio
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.AudioEncoder,
        VAPI.AT1130.RTPTransmitter.HDRAudio
      >(this, "audio_encoder_hw" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.AudioEncoder(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::AudioEncoder"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class HDRGeneral
    implements VScript.Referenceable<"RTPTransmitter::Data::HDRGeneral">
  {
    readonly type_identifier = "RTPTransmitter::Data::HDRGeneral" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get audio() {
      return VAPI.AT1130.RTPTransmitter.lift.HDRAudio(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "audio"),
      );
    }
    get video() {
      return VAPI.AT1130.RTPTransmitter.lift.HDRVideo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "video"),
      );
    }
    get mipmap() {
      return VAPI.AT1130.RTPTransmitter.lift.HDRMipmap(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "mipmap"),
      );
    }
  }
  export class HDRMipmap
    implements VScript.Referenceable<"RTPTransmitter::Data::HDRMipmap">
  {
    readonly type_identifier = "RTPTransmitter::Data::HDRMipmap" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    maximum throughput, measured in bits/second
  */
    get reserved_port_bandwidth(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.NetworkBandwidth,
      VAPI.AT1130.RTPTransmitter.HDRMipmap
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1130.RTPTransmitter.HDRMipmap
      >(this, "reserved_port_bandwidth" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get related_references() {
      return VAPI.AT1130.RTPTransmitter.lift.HeaderReference(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "related_references",
        ),
      );
    }
    get mipmap_encoder_hw() {
      return VAPI.RTPTransmitter.lift.MipMapEncoder(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "mipmap_encoder_hw",
        ),
      );
    }
  }
  export class HDRVideo
    implements VScript.Referenceable<"RTPTransmitter::Data::HDRVideo">
  {
    readonly type_identifier = "RTPTransmitter::Data::HDRVideo" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    maximum throughput, measured in bits/second
  */
    get reserved_bandwidth(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.NetworkBandwidth,
      VAPI.AT1130.RTPTransmitter.HDRVideo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1130.RTPTransmitter.HDRVideo
      >(this, "reserved_bandwidth" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    maximum throughput, measured in bits/second
  */
    get reserved_port_bandwidth(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.NetworkBandwidth,
      VAPI.AT1130.RTPTransmitter.HDRVideo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1130.RTPTransmitter.HDRVideo
      >(this, "reserved_port_bandwidth" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get related_references() {
      return VAPI.AT1130.RTPTransmitter.lift.HeaderReference(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "related_references",
        ),
      );
    }

    /**
    reference to encoder mux
  */
    get router_encoder_hw(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.RouterEncoder,
      VAPI.AT1130.RTPTransmitter.HDRVideo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.RouterEncoder,
        VAPI.AT1130.RTPTransmitter.HDRVideo
      >(this, "router_encoder_hw" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.RouterEncoder(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::RouterEncoder"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class HardwareStatus
    implements VScript.Referenceable<"RTPTransmitter::Data::HardwareStatus">
  {
    readonly type_identifier = "RTPTransmitter::Data::HardwareStatus" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get ports() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::PortStatistic",
        VAPI.AT1130.RTPTransmitter.PortStatistic
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 0, "ports"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.PortStatistic(raw),
      );
    }
    get xbar_encoder() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::XbarEncoder",
        VAPI.AT1130.RTPTransmitter.XbarEncoder
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "xbar_encoder",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.XbarEncoder(raw),
      );
    }
    get encoder_mux() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::RouterOutput",
        VAPI.AT1130.RTPTransmitter.RouterOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "encoder_mux",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.RouterOutput(raw),
      );
    }
    get mux_scheduler() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::MultiplexerScheduler",
        VAPI.AT1130.RTPTransmitter.MultiplexerScheduler
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          3,
          "mux_scheduler",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.MultiplexerScheduler(raw),
      );
    }
    get audio_encoder() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::AudioEncoder",
        VAPI.AT1130.RTPTransmitter.AudioEncoder
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          4,
          "audio_encoder",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.AudioEncoder(raw),
      );
    }
    get mux_statistics() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "RTPTransmitter::Data::MuxStatistics",
        VAPI.RTPTransmitter.MuxStatistics
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          5,
          "mux_statistics",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.RTPTransmitter.lift.MuxStatistics(st),
      );
    }
    get audio_tx_group_control() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::AudioGroupControl",
        VAPI.RTPTransmitter.AudioGroupControl
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          6,
          "audio_tx_group_control",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.RTPTransmitter.lift.AudioGroupControl(raw),
      );
    }
  }
  export class HeaderReference
    implements VScript.Referenceable<"RTPTransmitter::Data::HeaderReference">
  {
    readonly type_identifier = "RTPTransmitter::Data::HeaderReference" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get tx_stream_counter(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VScript.RefinedIndexedNonmutatingReference<
        VScript.VSocket,
        "tx_streams",
        "NetworkInterfaces::Data::LaneStatistics",
        VScript.Referenceable<"NetworkInterfaces::Data::LaneStatistics"> &
          VAPI.AT1130.NetworkInterfaces.LaneStatistics,
        [number, number, number, number],
        VAPI.EthernetStats.Counter
      >,
      VAPI.AT1130.RTPTransmitter.HeaderReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VScript.RefinedIndexedNonmutatingReference<
          VScript.VSocket,
          "tx_streams",
          "NetworkInterfaces::Data::LaneStatistics",
          VScript.Referenceable<"NetworkInterfaces::Data::LaneStatistics"> &
            VAPI.AT1130.NetworkInterfaces.LaneStatistics,
          [number, number, number, number],
          VAPI.EthernetStats.Counter
        >,
        VAPI.AT1130.RTPTransmitter.HeaderReference
      >(this, "tx_stream_counter" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftRefinedIndexedNonmutatingReference<
            VScript.VSocket,
            "tx_streams",
            "NetworkInterfaces::Data::LaneStatistics",
            VScript.Referenceable<"NetworkInterfaces::Data::LaneStatistics"> &
              VAPI.AT1130.NetworkInterfaces.LaneStatistics,
            [number, number, number, number],
            VAPI.EthernetStats.Counter
          >(
            (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
              new VAPI.AT1130.NetworkInterfaces.LaneStatistics(
                VScript.VAPIHelpers.get_subtree(_socket, kwl),
              ),
            "tx_streams" as VScript.SysName,
            {
              lift: VAPI.EthernetStats.lift.Counter,
              lower: VAPI.EthernetStats.lower.Counter,
            },
          ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerRefinedIndexedReference<
            VScript.VSocket,
            "tx_streams",
            "NetworkInterfaces::Data::LaneStatistics",
            VScript.Referenceable<"NetworkInterfaces::Data::LaneStatistics"> &
              VAPI.AT1130.NetworkInterfaces.LaneStatistics,
            [number, number, number, number],
            VAPI.EthernetStats.Counter
          >(),
        ),
      });
    }
  }
  export class LaneHeader
    implements VScript.Referenceable<"RTPTransmitter::Data::LaneHeader">
  {
    readonly type_identifier = "RTPTransmitter::Data::LaneHeader" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get statistic(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number, null | string],
      VAPI.AT1130.RTPTransmitter.LaneStatistic,
      VAPI.AT1130.RTPTransmitter.LaneHeader
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number, null | string],
        VAPI.AT1130.RTPTransmitter.LaneStatistic,
        VAPI.AT1130.RTPTransmitter.LaneHeader
      >(this, "statistic" as VScript.SysName, {
        lift: VAPI.AT1130.RTPTransmitter.lift.LaneStatistic,
        lower: VAPI.AT1130.RTPTransmitter.lower.LaneStatistic,
      });
    }
    get video() {
      return VAPI.AT1130.RTPTransmitter.lift.RouterOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "video"),
      );
    }
  }
  export interface LaneStatistic {
    /**
    maximum throughput, measured in bits/second
  */
    reserved_tdm_output_bandwidth: VAPI.Primitives.NetworkBandwidth;

    /**
    maximum throughput, measured in bits/second
  */
    max_tdm_output_bandwidth: VAPI.Primitives.NetworkBandwidth;

    /**
    maximum throughput, measured in bits/second
  */
    reserved_bus_bandwidth: VAPI.Primitives.NetworkBandwidth;

    /**
    maximum throughput, measured in bits/second
  */
    maxbus_bandwidth: VAPI.Primitives.NetworkBandwidth;
    fpga_lane_statistic: null | VAPI.AT1130.NetworkInterfaces.LaneStatistics;
  }
  export class MediaClock
    implements VScript.Referenceable<"RTPTransmitter::Data::MediaClock">
  {
    readonly type_identifier = "RTPTransmitter::Data::MediaClock" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get clock_mode(): VScript.dKeyword<
      VScript.VSocket,
      [0, [null | string]] | [1, []],
      [0, [null | string]] | [1, []],
      VAPI.AT1130.RTPTransmitter.MediaClockControl,
      VAPI.AT1130.RTPTransmitter.MediaClockControl,
      VAPI.AT1130.RTPTransmitter.MediaClock
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [0, [null | string]] | [1, []],
        [0, [null | string]] | [1, []],
        VAPI.AT1130.RTPTransmitter.MediaClockControl,
        VAPI.AT1130.RTPTransmitter.MediaClockControl,
        VAPI.AT1130.RTPTransmitter.MediaClock
      >(
        this,
        "clock_mode" as VScript.SysName,
        {
          lift: VAPI.AT1130.RTPTransmitter.lift.MediaClockControl,
          lower: VAPI.AT1130.RTPTransmitter.lower.MediaClockControl,
        },
        {
          lift: VAPI.AT1130.RTPTransmitter.lift.MediaClockControl,
          lower: VAPI.AT1130.RTPTransmitter.lower.MediaClockControl,
        },
        null,
      );
    }
    get offset(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.RTPTransmitter.MediaClock
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.RTPTransmitter.MediaClock
      >(
        this,
        "offset" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get latch_control() {
      return VAPI.Definitions.lift.LatchControl(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "latch_control"),
      );
    }
    get latched_timestamp(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VScript.Duration,
      VAPI.AT1130.RTPTransmitter.MediaClock
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VScript.Duration,
        VAPI.AT1130.RTPTransmitter.MediaClock
      >(this, "latched_timestamp" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftNanoseconds,
        lower: VScript.VAPIHelpers.lowerNanoseconds,
      });
    }
    get hw_latched_timestamp(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.RTPTransmitter.MediaClock
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.RTPTransmitter.MediaClock
      >(this, "hw_latched_timestamp" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export type MediaClockControl =
    | {
        variant: "Timesource";
        value: VAPI.AT1130.RTPTransmitter.MediaClockControlTimesource;
      }
    | {
        variant: "Propagate";
        value: VAPI.AT1130.RTPTransmitter.MediaClockControlPropagate;
      };
  export class MediaStreamer
    implements VScript.Referenceable<"RTPTransmitter::Data::MediaStreamer">
  {
    readonly type_identifier = "RTPTransmitter::Data::MediaStreamer" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hosting_session(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.Session,
      | null
      | (VScript.Referenceable<"RTPTransmitter::Data::Session"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.RTPTransmitter.MediaStreamer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.Session,
        | null
        | (VScript.Referenceable<"RTPTransmitter::Data::Session"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.RTPTransmitter.MediaStreamer
      >(
        this,
        "hosting_session" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPTransmitter.Session(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPTransmitter::Data::Session"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPTransmitter.Session(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPTransmitter::Data::Session"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get mediaclock() {
      return VAPI.AT1130.RTPTransmitter.lift.MediaClock(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "mediaclock"),
      );
    }
    get ip_configuration() {
      return VAPI.RTPTransmitter.lift.MediaStreamerIpConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "ip_configuration",
        ),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPTransmitter.MediaStreamerIssues,
      VAPI.AT1130.RTPTransmitter.MediaStreamer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPTransmitter.MediaStreamerIssues,
        VAPI.AT1130.RTPTransmitter.MediaStreamer
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.RTPTransmitter.MediaStreamerIssues => ({
          missing_dst_ip: (x & 1) !== 0,
          missing_src_ip4: (x & 2) !== 0,
          missing_src_ip6: (x & 4) !== 0,
        }),
        lower: (
          x: VAPI.RTPTransmitter.MediaStreamerIssues,
          _: VScript.VSocket,
        ): number =>
          (x.missing_dst_ip ? 1 : 0) |
          (x.missing_src_ip4 ? 2 : 0) |
          (x.missing_src_ip6 ? 4 : 0),
      });
    }
  }
  export class MediaStreamerVideo
    implements VScript.Referenceable<"RTPTransmitter::Data::MediaStreamerVideo">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::MediaStreamerVideo" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hosting_session(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.Session,
      | null
      | (VScript.Referenceable<"RTPTransmitter::Data::Session"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.RTPTransmitter.MediaStreamerVideo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.Session,
        | null
        | (VScript.Referenceable<"RTPTransmitter::Data::Session"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.RTPTransmitter.MediaStreamerVideo
      >(
        this,
        "hosting_session" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPTransmitter.Session(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPTransmitter::Data::Session"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPTransmitter.Session(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPTransmitter::Data::Session"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get mediaclock() {
      return VAPI.AT1130.RTPTransmitter.lift.MediaClock(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "mediaclock"),
      );
    }
    get ip_configuration() {
      return VAPI.RTPTransmitter.lift.MediaStreamerVideoIpConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "ip_configuration",
        ),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPTransmitter.MediaStreamerVideoIssues,
      VAPI.AT1130.RTPTransmitter.MediaStreamerVideo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPTransmitter.MediaStreamerVideoIssues,
        VAPI.AT1130.RTPTransmitter.MediaStreamerVideo
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.RTPTransmitter.MediaStreamerVideoIssues => ({
          missing_dst_ip: (x & 1) !== 0,
          missing_input_dt_node: (x & 2) !== 0,
          missing_src_ip4: (x & 4) !== 0,
          missing_src_ip6: (x & 8) !== 0,
        }),
        lower: (
          x: VAPI.RTPTransmitter.MediaStreamerVideoIssues,
          _: VScript.VSocket,
        ): number =>
          (x.missing_dst_ip ? 1 : 0) |
          (x.missing_input_dt_node ? 2 : 0) |
          (x.missing_src_ip4 ? 4 : 0) |
          (x.missing_src_ip6 ? 8 : 0),
      });
    }
  }
  export class MipMapStreamHardware
    implements
      VScript.Referenceable<"RTPTransmitter::Data::MipMapStreamHardware">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::MipMapStreamHardware" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get router_encoder() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::MipMapStreamHardware::RouterEncoder",
        VAPI.AT1130.RTPTransmitter.MipMapStreamHardwareRouterEncoder
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "router_encoder",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.MipMapStreamHardwareRouterEncoder(
            raw,
          ),
      );
    }
  }
  export class MipMapStreamer
    implements VScript.Referenceable<"RTPTransmitter::Data::MipMapStreamer">
  {
    readonly type_identifier = "RTPTransmitter::Data::MipMapStreamer" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get ip_configuration() {
      return VAPI.RTPTransmitter.lift.MipMapStreamerIpConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          0,
          "ip_configuration",
        ),
      );
    }
    get stream_name() {
      return VAPI.Definitions.lift.NAME(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "stream_name"),
      );
    }
    get connected_hardware() {
      return VAPI.AT1130.RTPTransmitter.lift.MipMapStreamHardware(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "connected_hardware",
        ),
      );
    }
  }
  export class MultiplexerScheduler
    implements
      VScript.Referenceable<"RTPTransmitter::Data::MultiplexerScheduler">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::MultiplexerScheduler" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get flows() {
      return VAPI.AT1130.RTPTransmitter.lift.MultiplexerSchedulerFlows(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "flows"),
      );
    }
    get reg_data(): VScript.rKeyword<
      VScript.VSocket,
      [Array<boolean>],
      VAPI.AT1130.RTPTransmitter.MultiplexerSchedulerRegData,
      VAPI.AT1130.RTPTransmitter.MultiplexerScheduler
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [Array<boolean>],
        VAPI.AT1130.RTPTransmitter.MultiplexerSchedulerRegData,
        VAPI.AT1130.RTPTransmitter.MultiplexerScheduler
      >(this, "reg_data" as VScript.SysName, {
        lift: VAPI.AT1130.RTPTransmitter.lift.MultiplexerSchedulerRegData,
        lower: VAPI.AT1130.RTPTransmitter.lower.MultiplexerSchedulerRegData,
      });
    }
  }
  export class PortStatistic
    implements VScript.Referenceable<"RTPTransmitter::Data::PortStatistic">
  {
    readonly type_identifier = "RTPTransmitter::Data::PortStatistic" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    maximum throughput, measured in bits/second
  */
    get reserved_output_bandwidth(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.NetworkBandwidth,
      VAPI.AT1130.RTPTransmitter.PortStatistic
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1130.RTPTransmitter.PortStatistic
      >(this, "reserved_output_bandwidth" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    maximum throughput (per direction), measured in bits/second
  */
    get max_throughput(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.RTPTransmitter.PortStatistic
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.RTPTransmitter.PortStatistic
      >(this, "max_throughput" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get interfaces() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::PortStatistic::Interfaces",
        VAPI.AT1130.RTPTransmitter.PortStatisticInterfaces
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "interfaces",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.PortStatisticInterfaces(raw),
      );
    }
    get hdr_general() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::HDRGeneral",
        VAPI.AT1130.RTPTransmitter.HDRGeneral
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          3,
          "hdr_general",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.HDRGeneral(raw),
      );
    }
  }
  export interface MediaClockControlPropagate {}
  export class ReStreamer
    implements VScript.Referenceable<"RTPTransmitter::Data::ReStreamer">
  {
    readonly type_identifier = "RTPTransmitter::Data::ReStreamer" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get fill_it_up(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.RTPTransmitter.ReStreamer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.RTPTransmitter.ReStreamer
      >(this, "fill_it_up" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get generic() {
      return VAPI.AT1130.RTPTransmitter.lift.MediaStreamer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "generic"),
      );
    }
  }
  export class ReStreamerAsNamedTableRow extends ReStreamer {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class RouterEncoder
    implements VScript.Referenceable<"RTPTransmitter::Data::RouterEncoder">
  {
    readonly type_identifier = "RTPTransmitter::Data::RouterEncoder" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    maximum throughput, measured in bits/second
  */
    get reserved_bandwidth(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.NetworkBandwidth,
      VAPI.AT1130.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1130.RTPTransmitter.RouterEncoder
      >(this, "reserved_bandwidth" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    maximum throughput, measured in bits/second
  */
    get reserved_port_bandwidth(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.NetworkBandwidth,
      VAPI.AT1130.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1130.RTPTransmitter.RouterEncoder
      >(this, "reserved_port_bandwidth" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    reference to scheduler. The scheduler serializes the packets to ensure
    that the outgoing sequence numbers are in continuous ascending order.
  */
    get scheduler_hw(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.MultiplexerScheduler,
      VAPI.AT1130.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.MultiplexerScheduler,
        VAPI.AT1130.RTPTransmitter.RouterEncoder
      >(this, "scheduler_hw" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.MultiplexerScheduler(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::MultiplexerScheduler"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get meta_hdr_ins_mux() {
      return VAPI.AT1130.RTPTransmitter.lift.HDRINSMUX(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          3,
          "meta_hdr_ins_mux",
        ),
      );
    }
    get video_hdr_ins_mux() {
      return VAPI.AT1130.RTPTransmitter.lift.HDRINSMUX(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "video_hdr_ins_mux",
        ),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1130.RTPTransmitter.RouterEncoderIssues,
      VAPI.AT1130.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1130.RTPTransmitter.RouterEncoderIssues,
        VAPI.AT1130.RTPTransmitter.RouterEncoder
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1130.RTPTransmitter.RouterEncoderIssues => ({
          missing_video_multiplex_resource: (x & 1) !== 0,
        }),
        lower: (
          x: VAPI.AT1130.RTPTransmitter.RouterEncoderIssues,
          _: VScript.VSocket,
        ): number => (x.missing_video_multiplex_resource ? 1 : 0),
      });
    }
  }
  export class RouterOutput
    implements VScript.Referenceable<"RTPTransmitter::Data::RouterOutput">
  {
    readonly type_identifier = "RTPTransmitter::Data::RouterOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hw_capability() {
      return VAPI.AT1130.RTPTransmitter.lift.RouterOutputHwCapability(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "hw_capability"),
      );
    }
    get router_encoder_hw() {
      return VAPI.AT1130.RTPTransmitter.lift.RouterEncoder(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "router_encoder_hw",
        ),
      );
    }
  }
  export interface ST2110Settings {
    packing_mode: VAPI.RTPTransmitter.PackingMode;
    transmit_scheduler_uhd: boolean;
    add_st2110_40: boolean;
  }
  export class Session
    implements VScript.Referenceable<"RTPTransmitter::Data::Session">
  {
    readonly type_identifier = "RTPTransmitter::Data::Session" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get active(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.RTPTransmitter.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.RTPTransmitter.Session
      >(
        this,
        "active" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get reserve_resources(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.RTPTransmitter.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.RTPTransmitter.Session
      >(
        this,
        "reserve_resources" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get sdp_a(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.RTPTransmitter.Session
      >(this, "sdp_a" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get session_name() {
      return VAPI.Definitions.lift.NAME(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "session_name"),
      );
    }
    get video_transmitters(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.RTPTransmitter.VideoStreamer>,
      VAPI.AT1130.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.RTPTransmitter.VideoStreamer>,
        VAPI.AT1130.RTPTransmitter.Session
      >(this, "video_transmitters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPTransmitter.VideoStreamer(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPTransmitter::Data::VideoStreamer"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
    get audio_transmitters(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.RTPTransmitter.AudioStreamer>,
      VAPI.AT1130.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.RTPTransmitter.AudioStreamer>,
        VAPI.AT1130.RTPTransmitter.Session
      >(this, "audio_transmitters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPTransmitter.AudioStreamer(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPTransmitter::Data::AudioStreamer"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
    get passthrough_transmitters(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.RTPTransmitter.ReStreamer>,
      VAPI.AT1130.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.RTPTransmitter.ReStreamer>,
        VAPI.AT1130.RTPTransmitter.Session
      >(this, "passthrough_transmitters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPTransmitter.ReStreamer(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPTransmitter::Data::ReStreamer"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
    get mipmap_transmitters(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.RTPTransmitter.MipMapStreamer>,
      VAPI.AT1130.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.RTPTransmitter.MipMapStreamer>,
        VAPI.AT1130.RTPTransmitter.Session
      >(this, "mipmap_transmitters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.RTPTransmitter.MipMapStreamer(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"RTPTransmitter::Data::MipMapStreamer"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
    get interfaces(): VScript.dKeyword<
      VScript.VSocket,
      [null | string, null | string],
      [null | string, null | string],
      VAPI.RTPTransmitter.SessionInterfaces,
      VAPI.RTPTransmitter.SessionInterfaces,
      VAPI.AT1130.RTPTransmitter.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | string],
        [null | string, null | string],
        VAPI.RTPTransmitter.SessionInterfaces,
        VAPI.RTPTransmitter.SessionInterfaces,
        VAPI.AT1130.RTPTransmitter.Session
      >(
        this,
        "interfaces" as VScript.SysName,
        {
          lift: VAPI.RTPTransmitter.lift.SessionInterfaces,
          lower: VAPI.RTPTransmitter.lower.SessionInterfaces,
        },
        {
          lift: VAPI.RTPTransmitter.lift.SessionInterfaces,
          lower: VAPI.RTPTransmitter.lower.SessionInterfaces,
        },
        null,
      );
    }
  }
  export class SessionAsNamedTableRow extends Session {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export interface MediaClockControlTimesource {
    t_src: null | VAPI.AT1130.Time.Source;
  }
  export class VideoConfigurationContainer
    implements
      VScript.Referenceable<"RTPTransmitter::Data::VideoConfigurationContainer">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::VideoConfigurationContainer" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get transport_format(): VScript.dKeyword<
      VScript.VSocket,
      | [0, []]
      | [1, [VAPI.RTPTransmitter.PackingMode, boolean, boolean]]
      | [2, [VAPI.Video.DiracCompression, boolean]]
      | [
          3,
          [
            [0, [number]] | [1, [number]],
            VAPI.RTPTransmitter.LVLMODE,
            boolean,
            boolean,
          ],
        ],
      | [0, []]
      | [1, [VAPI.RTPTransmitter.PackingMode, boolean, boolean]]
      | [2, [VAPI.Video.DiracCompression, boolean]]
      | [
          3,
          [
            [0, [number]] | [1, [number]],
            VAPI.RTPTransmitter.LVLMODE,
            boolean,
            boolean,
          ],
        ],
      VAPI.AT1130.RTPTransmitter.VideoFormat,
      VAPI.AT1130.RTPTransmitter.VideoFormat,
      VAPI.AT1130.RTPTransmitter.VideoConfigurationContainer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        | [0, []]
        | [1, [VAPI.RTPTransmitter.PackingMode, boolean, boolean]]
        | [2, [VAPI.Video.DiracCompression, boolean]]
        | [
            3,
            [
              [0, [number]] | [1, [number]],
              VAPI.RTPTransmitter.LVLMODE,
              boolean,
              boolean,
            ],
          ],
        | [0, []]
        | [1, [VAPI.RTPTransmitter.PackingMode, boolean, boolean]]
        | [2, [VAPI.Video.DiracCompression, boolean]]
        | [
            3,
            [
              [0, [number]] | [1, [number]],
              VAPI.RTPTransmitter.LVLMODE,
              boolean,
              boolean,
            ],
          ],
        VAPI.AT1130.RTPTransmitter.VideoFormat,
        VAPI.AT1130.RTPTransmitter.VideoFormat,
        VAPI.AT1130.RTPTransmitter.VideoConfigurationContainer
      >(
        this,
        "transport_format" as VScript.SysName,
        {
          lift: VAPI.AT1130.RTPTransmitter.lift.VideoFormat,
          lower: VAPI.AT1130.RTPTransmitter.lower.VideoFormat,
        },
        {
          lift: VAPI.AT1130.RTPTransmitter.lift.VideoFormat,
          lower: VAPI.AT1130.RTPTransmitter.lower.VideoFormat,
        },
        null,
      );
    }
    get vanc() {
      return VAPI.AT1130.Definitions.lift.VancControl(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "vanc"),
      );
    }
    get embedded_audio(): VScript.dKeyword<
      VScript.VSocket,
      Array<VAPI.Definitions.TRSEmbedder>,
      VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
      Array<VAPI.Definitions.TRSEmbedder>,
      VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
      VAPI.AT1130.RTPTransmitter.VideoConfigurationContainer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        Array<VAPI.Definitions.TRSEmbedder>,
        VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
        Array<VAPI.Definitions.TRSEmbedder>,
        VScript.MaybeSparseArray<VAPI.Definitions.TRSEmbedder>,
        VAPI.AT1130.RTPTransmitter.VideoConfigurationContainer
      >(
        this,
        "embedded_audio" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              ((x: any /* FIXME */, _: VScript.VSocket) => x)(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      [null | string, null | number | string],
      [null | string, null | number | string],
      VAPI.AT1130.Audio.TimedSource,
      VAPI.AT1130.Audio.TimedSource,
      VAPI.AT1130.RTPTransmitter.VideoConfigurationContainer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1130.Audio.TimedSource,
        VAPI.AT1130.Audio.TimedSource,
        VAPI.AT1130.RTPTransmitter.VideoConfigurationContainer
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VAPI.AT1130.Audio.lift.TimedSource,
          lower: VAPI.AT1130.Audio.lower.TimedSource,
        },
        {
          lift: VAPI.AT1130.Audio.lift.TimedSource,
          lower: VAPI.AT1130.Audio.lower.TimedSource,
        },
        null,
      );
    }
  }
  export type VideoFormat =
    | { variant: "ST2022_6"; value: VAPI.RTPTransmitter.ST20226Settings }
    | { variant: "ST2110_20"; value: VAPI.AT1130.RTPTransmitter.ST2110Settings }
    | { variant: "ST2042"; value: VAPI.RTPTransmitter.ST2042Settings }
    | { variant: "JPEG_XS"; value: VAPI.RTPTransmitter.JpegXsSettings };
  export class VideoStreamHardware
    implements
      VScript.Referenceable<"RTPTransmitter::Data::VideoStreamHardware">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::VideoStreamHardware" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get xbar_encoder() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::VideoStreamHardware::XbarEncoder",
        VAPI.AT1130.RTPTransmitter.VideoStreamHardwareXbarEncoder
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "xbar_encoder",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.VideoStreamHardwareXbarEncoder(raw),
      );
    }
    get encoder_mux() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::VideoStreamHardware::EncoderMux",
        VAPI.AT1130.RTPTransmitter.VideoStreamHardwareEncoderMux
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "encoder_mux",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.VideoStreamHardwareEncoderMux(raw),
      );
    }
    get mux_scheduler() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::VideoStreamHardware::MuxScheduler",
        VAPI.AT1130.RTPTransmitter.VideoStreamHardwareMuxScheduler
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "mux_scheduler",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.VideoStreamHardwareMuxScheduler(raw),
      );
    }
    get router_encoder() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::VideoStreamHardware::RouterEncoder",
        VAPI.AT1130.RTPTransmitter.VideoStreamHardwareRouterEncoder
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          3,
          "router_encoder",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.RTPTransmitter.lift.VideoStreamHardwareRouterEncoder(raw),
      );
    }
  }
  export class VideoStreamer
    implements VScript.Referenceable<"RTPTransmitter::Data::VideoStreamer">
  {
    readonly type_identifier = "RTPTransmitter::Data::VideoStreamer" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get generic() {
      return VAPI.AT1130.RTPTransmitter.lift.MediaStreamerVideo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "generic"),
      );
    }
    get constraints() {
      return VAPI.RTPTransmitter.lift.Constraints(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "constraints"),
      );
    }
    get v_src(): VScript.dKeyword<
      VScript.VSocket,
      [null | string, null | number | string],
      [null | string, null | number | string],
      VAPI.AT1130.Video.TimedSource,
      VAPI.AT1130.Video.TimedSource,
      VAPI.AT1130.RTPTransmitter.VideoStreamer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1130.Video.TimedSource,
        VAPI.AT1130.Video.TimedSource,
        VAPI.AT1130.RTPTransmitter.VideoStreamer
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VAPI.AT1130.Video.lift.TimedSource,
          lower: VAPI.AT1130.Video.lower.TimedSource,
        },
        {
          lift: VAPI.AT1130.Video.lift.TimedSource,
          lower: VAPI.AT1130.Video.lower.TimedSource,
        },
        null,
      );
    }
    get configuration() {
      return VAPI.AT1130.RTPTransmitter.lift.VideoConfigurationContainer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "configuration"),
      );
    }
    get stream_name() {
      return VAPI.Definitions.lift.NAME(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "stream_name"),
      );
    }
    get connected_hardware() {
      return VAPI.AT1130.RTPTransmitter.lift.VideoStreamHardware(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          5,
          "connected_hardware",
        ),
      );
    }
  }
  export class VideoStreamerAsNamedTableRow extends VideoStreamer {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class XbarEncoder
    implements VScript.Referenceable<"RTPTransmitter::Data::XbarEncoder">
  {
    readonly type_identifier = "RTPTransmitter::Data::XbarEncoder" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get debug(): VScript.rKeyword<
      VScript.VSocket,
      | [
          0,
          [
            boolean,
            boolean,
            boolean,
            boolean,
            boolean,
            number,
            number,
            number,
            number,
            number,
            number,
          ],
        ]
      | [1, [boolean, boolean, boolean, number, number]]
      | [
          2,
          [
            null | number,
            null | number,
            null | VAPI.RTPTransmitter.ColorSampleMode,
            null | number,
            null | VAPI.RTPTransmitter.ValidateMode,
            null | number,
            null | VAPI.RTPTransmitter.VideoDepth,
            null | boolean,
            null | Array<number>,
            null | number,
          ],
        ],
      VAPI.AT1130.RTPTransmitter.EncoderHWData,
      VAPI.AT1130.RTPTransmitter.XbarEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | [
            0,
            [
              boolean,
              boolean,
              boolean,
              boolean,
              boolean,
              number,
              number,
              number,
              number,
              number,
              number,
            ],
          ]
        | [1, [boolean, boolean, boolean, number, number]]
        | [
            2,
            [
              null | number,
              null | number,
              null | VAPI.RTPTransmitter.ColorSampleMode,
              null | number,
              null | VAPI.RTPTransmitter.ValidateMode,
              null | number,
              null | VAPI.RTPTransmitter.VideoDepth,
              null | boolean,
              null | Array<number>,
              null | number,
            ],
          ],
        VAPI.AT1130.RTPTransmitter.EncoderHWData,
        VAPI.AT1130.RTPTransmitter.XbarEncoder
      >(this, "debug" as VScript.SysName, {
        lift: VAPI.AT1130.RTPTransmitter.lift.EncoderHWData,
        lower: VAPI.AT1130.RTPTransmitter.lower.EncoderHWData,
      });
    }
  }
  export class HDRINSMUXFlowsAlternate
    implements
      VScript.Referenceable<"RTPTransmitter::Data::HDRINSMUX::Flows::Alternate">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::HDRINSMUX::Flows::Alternate" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get primary() {
      return VAPI.AT1130.RTPTransmitter.lift.FlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "primary"),
      );
    }
    get secondary() {
      return VAPI.AT1130.RTPTransmitter.lift.FlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "secondary"),
      );
    }
  }
  export class MultiplexerSchedulerFlowsAlternate
    implements
      VScript.Referenceable<"RTPTransmitter::Data::MultiplexerScheduler::Flows::Alternate">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::MultiplexerScheduler::Flows::Alternate" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get primary() {
      return VAPI.AT1130.RTPTransmitter.lift.FlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "primary"),
      );
    }
    get secondary() {
      return VAPI.AT1130.RTPTransmitter.lift.FlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "secondary"),
      );
    }
  }
  export class AudioStreamHardwareAudioEncoder
    implements
      VScript.Referenceable<"RTPTransmitter::Data::AudioStreamHardware::AudioEncoder">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::AudioStreamHardware::AudioEncoder" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    reference to router encoder hardware
  */
    get wrapped_reference_encoder(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.AudioEncoder,
      VAPI.AT1130.RTPTransmitter.AudioStreamHardwareAudioEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.AudioEncoder,
        VAPI.AT1130.RTPTransmitter.AudioStreamHardwareAudioEncoder
      >(this, "wrapped_reference_encoder" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.AudioEncoder(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::AudioEncoder"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class VideoStreamHardwareEncoderMux
    implements
      VScript.Referenceable<"RTPTransmitter::Data::VideoStreamHardware::EncoderMux">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::VideoStreamHardware::EncoderMux" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    reference to xbar encoder hardware
  */
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.RouterEncoder,
      VAPI.AT1130.RTPTransmitter.VideoStreamHardwareEncoderMux
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.RouterEncoder,
        VAPI.AT1130.RTPTransmitter.VideoStreamHardwareEncoderMux
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.RouterEncoder(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::RouterEncoder"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class AudioEncoderError
    implements
      VScript.Referenceable<"RTPTransmitter::Data::AudioEncoder::Error">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::AudioEncoder::Error" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get queue_overflow(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.RTPTransmitter.AudioEncoderError
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.RTPTransmitter.AudioEncoderError
      >(this, "queue_overflow" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get queue_full(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.RTPTransmitter.AudioEncoderError
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.RTPTransmitter.AudioEncoderError
      >(this, "queue_full" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class AudioEncoderFlows
    implements
      VScript.Referenceable<"RTPTransmitter::Data::AudioEncoder::Flows">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::AudioEncoder::Flows" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get primary() {
      return VAPI.AT1130.RTPTransmitter.lift.AudioFlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "primary"),
      );
    }
    get secondary() {
      return VAPI.AT1130.RTPTransmitter.lift.AudioFlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "secondary"),
      );
    }
  }
  export class HDRINSMUXFlows
    implements VScript.Referenceable<"RTPTransmitter::Data::HDRINSMUX::Flows">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::HDRINSMUX::Flows" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get main() {
      return VAPI.AT1130.RTPTransmitter.lift.HDRINSMUXFlowsMain(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "main"),
      );
    }
    get alternate() {
      return VAPI.AT1130.RTPTransmitter.lift.HDRINSMUXFlowsAlternate(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "alternate"),
      );
    }
  }
  export class MultiplexerSchedulerFlows
    implements
      VScript.Referenceable<"RTPTransmitter::Data::MultiplexerScheduler::Flows">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::MultiplexerScheduler::Flows" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get main() {
      return VAPI.AT1130.RTPTransmitter.lift.MultiplexerSchedulerFlowsMain(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "main"),
      );
    }
    get alternate() {
      return VAPI.AT1130.RTPTransmitter.lift.MultiplexerSchedulerFlowsAlternate(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "alternate"),
      );
    }
  }
  export class RouterOutputHwCapability
    implements
      VScript.Referenceable<"RTPTransmitter::Data::RouterOutput::HwCapability">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::RouterOutput::HwCapability" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get num_encoder(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.RTPTransmitter.RouterOutputHwCapability
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.RTPTransmitter.RouterOutputHwCapability
      >(this, "num_encoder" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class PortStatisticInterfaces
    implements
      VScript.Referenceable<"RTPTransmitter::Data::PortStatistic::Interfaces">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::PortStatistic::Interfaces" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get interface(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.NetworkInterfaces.VirtualInterface,
      VAPI.AT1130.RTPTransmitter.PortStatisticInterfaces
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.NetworkInterfaces.VirtualInterface,
        VAPI.AT1130.RTPTransmitter.PortStatisticInterfaces
      >(this, "interface" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.NetworkInterfaces.VirtualInterface(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::VirtualInterface"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export type RouterEncoderIssues = {
    missing_video_multiplex_resource: boolean;
  };
  export class HDRINSMUXFlowsMain
    implements
      VScript.Referenceable<"RTPTransmitter::Data::HDRINSMUX::Flows::Main">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::HDRINSMUX::Flows::Main" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get primary() {
      return VAPI.AT1130.RTPTransmitter.lift.FlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "primary"),
      );
    }
    get secondary() {
      return VAPI.AT1130.RTPTransmitter.lift.FlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "secondary"),
      );
    }
  }
  export class MultiplexerSchedulerFlowsMain
    implements
      VScript.Referenceable<"RTPTransmitter::Data::MultiplexerScheduler::Flows::Main">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::MultiplexerScheduler::Flows::Main" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get primary() {
      return VAPI.AT1130.RTPTransmitter.lift.FlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "primary"),
      );
    }
    get secondary() {
      return VAPI.AT1130.RTPTransmitter.lift.FlowReference(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "secondary"),
      );
    }
  }
  export class VideoStreamHardwareMuxScheduler
    implements
      VScript.Referenceable<"RTPTransmitter::Data::VideoStreamHardware::MuxScheduler">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::VideoStreamHardware::MuxScheduler" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    reference to scheduler. The scheduler serializes the packets to ensure
    that the outgoing sequence numbers are in continuous ascending order.
  */
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.MultiplexerScheduler,
      VAPI.AT1130.RTPTransmitter.VideoStreamHardwareMuxScheduler
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.MultiplexerScheduler,
        VAPI.AT1130.RTPTransmitter.VideoStreamHardwareMuxScheduler
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.MultiplexerScheduler(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::MultiplexerScheduler"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export interface AudioEncoderRegData {
    last_sample: VAPI.Primitives.Unsigned32;
    mode: VAPI.Primitives.Unsigned32;
    sequence_number: VAPI.Primitives.Unsigned32;
  }
  export interface HDRINSMUXRegData {
    enable_port: Array<boolean>;
    is_2022_6: boolean;
    sequence_eol: VAPI.Primitives.Unsigned32;
    sample_2022_6: VAPI.Primitives.Unsigned32;
    frame_2022_6: VAPI.Primitives.Unsigned32;
    rate_2022_6: VAPI.Primitives.Unsigned32;
    frame_number_2022_6: VAPI.Primitives.Unsigned32;
    sequence_number: VAPI.Primitives.Unsigned32;
    scheduler_subslot_2110: VAPI.Primitives.Unsigned32;
    scheduler_slot_2110: VAPI.Primitives.Unsigned32;
    scheduler_enable_2110: boolean;
  }
  export interface MultiplexerSchedulerRegData {
    enable_port: Array<boolean>;
  }
  export class MipMapStreamHardwareRouterEncoder
    implements
      VScript.Referenceable<"RTPTransmitter::Data::MipMapStreamHardware::RouterEncoder">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::MipMapStreamHardware::RouterEncoder" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    reference to router encoder hardware
  */
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.HDRMipmap,
      VAPI.AT1130.RTPTransmitter.MipMapStreamHardwareRouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.HDRMipmap,
        VAPI.AT1130.RTPTransmitter.MipMapStreamHardwareRouterEncoder
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.HDRMipmap(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::HDRMipmap"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class VideoStreamHardwareRouterEncoder
    implements
      VScript.Referenceable<"RTPTransmitter::Data::VideoStreamHardware::RouterEncoder">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::VideoStreamHardware::RouterEncoder" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    reference to router encoder hardware
  */
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.HDRVideo,
      VAPI.AT1130.RTPTransmitter.VideoStreamHardwareRouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.HDRVideo,
        VAPI.AT1130.RTPTransmitter.VideoStreamHardwareRouterEncoder
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.HDRVideo(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::HDRVideo"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class VideoStreamHardwareXbarEncoder
    implements
      VScript.Referenceable<"RTPTransmitter::Data::VideoStreamHardware::XbarEncoder">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::VideoStreamHardware::XbarEncoder" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    reference to xbar encoder hardware
  */
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.RTPTransmitter.XbarEncoder,
      VAPI.AT1130.RTPTransmitter.VideoStreamHardwareXbarEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.RTPTransmitter.XbarEncoder,
        VAPI.AT1130.RTPTransmitter.VideoStreamHardwareXbarEncoder
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.RTPTransmitter.XbarEncoder(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::XbarEncoder"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
}
export namespace RePlay {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
  } as const;
  export const lower = { All: (_x: All) => _x.raw.kwl } as const;
  export class All implements VScript.Referenceable<"RePlay::Data::All"> {
    readonly type_identifier = "RePlay::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video() {
      return VAPI.AT1130.VideoRePlay.lift.Video(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return VAPI.AT1130.AudioRePlay.lift.Audio(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "audio"),
      );
    }
  }
}
export namespace SampleRateConverter {
  export const lift = {
    AUDIOSRCSTATUS: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AUDIOSRCSTATUS(_raw),
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    INPUTSTATUS: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new INPUTSTATUS(_raw),
    RESOURCE: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new RESOURCE(_raw),
    RESOURCES: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new RESOURCES(_raw),
    SRC: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new SRC(_raw),
    SRCHardware: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SRCHardware(_raw),
    Time: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new Time(_raw),
    AUDIOSRCSTATUSHwSettings: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new AUDIOSRCSTATUSHwSettings(_raw),
    SRCSettings: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SRCSettings(_raw),
  } as const;
  export const lower = {
    AUDIOSRCSTATUS: (_x: AUDIOSRCSTATUS) => _x.raw.kwl,
    All: (_x: All) => _x.raw.kwl,
    INPUTSTATUS: (_x: INPUTSTATUS) => _x.raw.kwl,
    RESOURCE: (_x: RESOURCE) => _x.raw.kwl,
    RESOURCES: (_x: RESOURCES) => _x.raw.kwl,
    SRC: (_x: SRC) => _x.raw.kwl,
    SRCHardware: (_x: SRCHardware) => _x.raw.kwl,
    Time: (_x: Time) => _x.raw.kwl,
    AUDIOSRCSTATUSHwSettings: (_x: AUDIOSRCSTATUSHwSettings) => _x.raw.kwl,
    SRCSettings: (_x: SRCSettings) => _x.raw.kwl,
  } as const;
  export class AUDIOSRCSTATUS
    implements
      VScript.Referenceable<"SampleRateConverter::Data::AUDIOSRCSTATUS">
  {
    readonly type_identifier =
      "SampleRateConverter::Data::AUDIOSRCSTATUS" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hw_settings() {
      return VAPI.AT1130.SampleRateConverter.lift.AUDIOSRCSTATUSHwSettings(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "hw_settings"),
      );
    }
    get t_src(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.Time.Source,
      VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.Time.Source,
        VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUS
      >(this, "t_src" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.Time.Source(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"Time::Data::Source"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get hw_resource_mux() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "SampleRateConverter::Data::RESOURCE",
        VAPI.AT1130.SampleRateConverter.RESOURCE
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "hw_resource_mux",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.SampleRateConverter.lift.RESOURCE(raw),
      );
    }
  }
  export class All
    implements VScript.Referenceable<"SampleRateConverter::Data::All">
  {
    readonly type_identifier = "SampleRateConverter::Data::All" as const;
    get runtime_constants() {
      return {
        num_srcs: this.raw.backing_store.get_runtime_constant(
          "SampleRateConverter::num_srcs",
        ) as number,
        num_src_inputs: this.raw.backing_store.get_runtime_constant(
          "SampleRateConverter::num_src_inputs",
        ) as number,
        num_srcs_x24: this.raw.backing_store.get_runtime_constant(
          "SampleRateConverter::num_srcs_x24",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get instances() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "SampleRateConverter::Data::SRC",
        VAPI.AT1130.SampleRateConverter.SRCAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.SampleRateConverter.SRCAsNamedTableRow(raw),
      );
    }
    get hardware_resources() {
      return VAPI.AT1130.SampleRateConverter.lift.RESOURCES(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "hardware_resources",
        ),
      );
    }
  }
  export class INPUTSTATUS
    implements VScript.Referenceable<"SampleRateConverter::Data::INPUTSTATUS">
  {
    readonly type_identifier =
      "SampleRateConverter::Data::INPUTSTATUS" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hw_value(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.SampleRateConverter.INPUTSTATUS
      >(this, "hw_value" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    index of the selected input channel based on 64
  */
    get audio_src(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.SampleRateConverter.INPUTSTATUS
      >(this, "audio_src" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get sop_src(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.SampleRateConverter.INPUTSTATUS
      >(this, "sop_src" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get input_bus_selection(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.SampleRateConverter.INPUTSTATUS
      >(this, "input_bus_selection" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get mpx_bus(): VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.AT1130.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1130.SampleRateConverter.INPUTSTATUS
      >(this, "mpx_bus" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get enable(): VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.AT1130.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1130.SampleRateConverter.INPUTSTATUS
      >(this, "enable" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class RESOURCE
    implements VScript.Referenceable<"SampleRateConverter::Data::RESOURCE">
  {
    readonly type_identifier = "SampleRateConverter::Data::RESOURCE" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get mux() {
      return VAPI.AT1130.SampleRateConverter.lift.INPUTSTATUS(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "mux"),
      );
    }
    get read_status() {
      return VAPI.SampleRateConverter.lift.READSTATUS(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "read_status"),
      );
    }
    get audio_source_slices() {
      return VAPI.Audio.lift.SignalSourceSlice(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "audio_source_slices",
        ),
      );
    }
    get related_mux(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.SampleRateConverter.RESOURCE>,
      VAPI.AT1130.SampleRateConverter.RESOURCE
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.SampleRateConverter.RESOURCE>,
        VAPI.AT1130.SampleRateConverter.RESOURCE
      >(this, "related_mux" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.SampleRateConverter.RESOURCE(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"SampleRateConverter::Data::RESOURCE"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
  }
  export class RESOURCES
    implements VScript.Referenceable<"SampleRateConverter::Data::RESOURCES">
  {
    readonly type_identifier = "SampleRateConverter::Data::RESOURCES" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hw_resource_x24() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "SampleRateConverter::Data::AUDIOSRCSTATUS",
        VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUS
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "hw_resource_x24",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.SampleRateConverter.lift.AUDIOSRCSTATUS(raw),
      );
    }
  }
  export class SRC
    implements VScript.Referenceable<"SampleRateConverter::Data::SRC">
  {
    readonly type_identifier = "SampleRateConverter::Data::SRC" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get active(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.SampleRateConverter.SRC
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.SampleRateConverter.SRC
      >(
        this,
        "active" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get settings() {
      return VAPI.AT1130.SampleRateConverter.lift.SRCSettings(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "settings"),
      );
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.SampleRateConverter.SRC
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.SampleRateConverter.SRC
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Audio.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Audio::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "output"),
      );
    }
    get connected_hardware() {
      return VAPI.AT1130.SampleRateConverter.lift.SRCHardware(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "connected_hardware",
        ),
      );
    }
  }
  export class SRCAsNamedTableRow extends SRC {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class SRCHardware
    implements VScript.Referenceable<"SampleRateConverter::Data::SRCHardware">
  {
    readonly type_identifier =
      "SampleRateConverter::Data::SRCHardware" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hw(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUS,
      VAPI.AT1130.SampleRateConverter.SRCHardware
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUS,
        VAPI.AT1130.SampleRateConverter.SRCHardware
      >(this, "hw" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUS(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"SampleRateConverter::Data::AUDIOSRCSTATUS"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get hw_mux(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | string>,
      Array<null | VAPI.AT1130.SampleRateConverter.INPUTSTATUS>,
      VAPI.AT1130.SampleRateConverter.SRCHardware
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1130.SampleRateConverter.INPUTSTATUS>,
        VAPI.AT1130.SampleRateConverter.SRCHardware
      >(this, "hw_mux" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.SampleRateConverter.INPUTSTATUS(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"SampleRateConverter::Data::INPUTSTATUS"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        ),
      });
    }
  }
  export class Time
    implements VScript.Referenceable<"SampleRateConverter::Data::Time">
  {
    readonly type_identifier = "SampleRateConverter::Data::Time" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.SampleRateConverter.Time
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.SampleRateConverter.Time
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
  }
  export class AUDIOSRCSTATUSHwSettings
    implements
      VScript.Referenceable<"SampleRateConverter::Data::AUDIOSRCSTATUS::HwSettings">
  {
    readonly type_identifier =
      "SampleRateConverter::Data::AUDIOSRCSTATUS::HwSettings" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hw_value(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUSHwSettings
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUSHwSettings
      >(this, "hw_value" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    index of the selected genlock 1...3, 0 = disabled
  */
    get genlock_sel(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUSHwSettings
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUSHwSettings
      >(this, "genlock_sel" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    0 = no reset; 1 = reset (power up default)
  */
    get reset(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUSHwSettings
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.SampleRateConverter.AUDIOSRCSTATUSHwSettings
      >(this, "reset" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class SRCSettings
    implements VScript.Referenceable<"SampleRateConverter::Data::SRC::Settings">
  {
    readonly type_identifier =
      "SampleRateConverter::Data::SRC::Settings" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get channel_capacity(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.SampleRateConverter.SRCSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.SampleRateConverter.SRCSettings
      >(
        this,
        "channel_capacity" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.SampleRateConverter.SRCSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.SampleRateConverter.SRCSettings
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
  }
}
export namespace Splitter {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    SP: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new SP(_raw),
    SPOutputs: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SPOutputs(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    SP: (_x: SP) => _x.raw.kwl,
    SPOutputs: (_x: SPOutputs) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"Splitter::Data::All"> {
    readonly type_identifier = "Splitter::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get instances() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "Splitter::Data::SP",
        VAPI.AT1130.Splitter.SPAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.Splitter.SPAsNamedTableRow(raw),
      );
    }
  }
  export class SP implements VScript.Referenceable<"Splitter::Data::SP"> {
    readonly type_identifier = "Splitter::Data::SP" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get v_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.Splitter.SP
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.Splitter.SP
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get outputs() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "Splitter::Data::SP::Outputs",
        VAPI.AT1130.Splitter.SPOutputs
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 1, "outputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.Splitter.lift.SPOutputs(raw),
      );
    }
  }
  export class SPAsNamedTableRow extends SP {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class SPOutputs
    implements VScript.Referenceable<"Splitter::Data::SP::Outputs">
  {
    readonly type_identifier = "Splitter::Data::SP::Outputs" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get output() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "output"),
      );
    }
  }
}
export namespace System {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    InternalHW: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new InternalHW(_raw),
    MEMORY: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MEMORY(_raw),
    Partitions: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Partitions(_raw),
    Power: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Power(_raw),
    Temperature: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Temperature(_raw),
    PartitionsEmmc: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PartitionsEmmc(_raw),
    AllSysinfo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AllSysinfo(_raw),
    InternalHWXfi: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new InternalHWXfi(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    InternalHW: (_x: InternalHW) => _x.raw.kwl,
    MEMORY: (_x: MEMORY) => _x.raw.kwl,
    Partitions: (_x: Partitions) => _x.raw.kwl,
    Power: (_x: Power) => _x.raw.kwl,
    Temperature: (_x: Temperature) => _x.raw.kwl,
    PartitionsEmmc: (_x: PartitionsEmmc) => _x.raw.kwl,
    AllSysinfo: (_x: AllSysinfo) => _x.raw.kwl,
    InternalHWXfi: (_x: InternalHWXfi) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"System::Data::All"> {
    readonly type_identifier = "System::Data::All" as const;
    get runtime_constants() {
      return {
        is_udx: this.raw.backing_store.get_runtime_constant(
          "System::is_udx",
        ) as boolean,
        is_no_pcap: this.raw.backing_store.get_runtime_constant(
          "System::is_no_pcap",
        ) as boolean,
        is_multiviewer: this.raw.backing_store.get_runtime_constant(
          "System::is_multiviewer",
        ) as boolean,
        is_j2kdecoder: this.raw.backing_store.get_runtime_constant(
          "System::is_j2kdecoder",
        ) as boolean,
        has_replay: this.raw.backing_store.get_runtime_constant(
          "System::has_replay",
        ) as boolean,
        has_audio_mixer: this.raw.backing_store.get_runtime_constant(
          "System::has_audio_mixer",
        ) as boolean,
        has_color_correction: this.raw.backing_store.get_runtime_constant(
          "System::has_color_correction",
        ) as boolean,
        has_video_mixer: this.raw.backing_store.get_runtime_constant(
          "System::has_video_mixer",
        ) as boolean,
        has_audio_gain: this.raw.backing_store.get_runtime_constant(
          "System::has_audio_gain",
        ) as boolean,
        supports_metadata_extraction:
          this.raw.backing_store.get_runtime_constant(
            "System::supports_metadata_extraction",
          ) as boolean,
        is_pcap: this.raw.backing_store.get_runtime_constant(
          "System::is_pcap",
        ) as boolean,
        has_passthrough_transmitters:
          this.raw.backing_store.get_runtime_constant(
            "System::has_passthrough_transmitters",
          ) as boolean,
        is_jpegxs: this.raw.backing_store.get_runtime_constant(
          "System::is_jpegxs",
        ) as boolean,
        has_audio_engine: this.raw.backing_store.get_runtime_constant(
          "System::has_audio_engine",
        ) as boolean,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get temperature() {
      return VAPI.AT1130.System.lift.Temperature(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "temperature"),
      );
    }
    get power() {
      return VAPI.AT1130.System.lift.Power(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "power"),
      );
    }
    get fan_speed() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "System::Data::FanSpeed",
        VAPI.System.FanSpeed
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "fan_speed",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.System.lift.FanSpeed(raw),
      );
    }
    get barebox_version(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.System.All
      >(this, "barebox_version" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get barebox_state(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.System.All
      >(this, "barebox_state" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get booted_partition(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.System.All
      >(this, "booted_partition" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get partitions() {
      return VAPI.AT1130.System.lift.Partitions(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "partitions"),
      );
    }
    get watchdog_version(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, number],
      null | VAPI.System.Revision,
      VAPI.AT1130.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number],
        null | VAPI.System.Revision,
        VAPI.AT1130.System.All
      >(this, "watchdog_version" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.System.lift.Revision,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.System.lower.Revision,
        ),
      });
    }
    get sysinfo() {
      return VAPI.AT1130.System.lift.AllSysinfo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "sysinfo"),
      );
    }
    get usrinfo() {
      return VAPI.System.lift.AllUsrinfo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 9, "usrinfo"),
      );
    }
    get neighborhood_watch() {
      return VAPI.System.lift.NeighborhoodWatch(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          10,
          "neighborhood_watch",
        ),
      );
    }
    get psu() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "System::Data::PSU",
        VAPI.System.PSU
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 11, "psu"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.System.lift.PSU(raw),
      );
    }
    get qsfp() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "System::Data::QSFP",
        VAPI.System.QSFP
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 12, "qsfp"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.System.lift.QSFP(raw),
      );
    }
    get ecc() {
      return VAPI.System.lift.AllEcc(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 13, "ecc"),
      );
    }
    get unique_id(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.System.All
      >(this, "unique_id" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fpga() {
      return VAPI.System.lift.CompileInfo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 15, "fpga"),
      );
    }
    get device() {
      return VAPI.System.lift.Device(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 16, "device"),
      );
    }
    get io_board() {
      return VAPI.System.lift.AllIoBoard(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 17, "io_board"),
      );
    }
    get fan_board() {
      return VAPI.System.lift.Device(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 18, "fan_board"),
      );
    }
    get frame() {
      return VAPI.System.lift.Device(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 19, "frame"),
      );
    }
    get memory() {
      return VAPI.AT1130.System.lift.MEMORY(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 20, "memory"),
      );
    }
    get internal_hw() {
      return VAPI.AT1130.System.lift.InternalHW(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 21, "internal_hw"),
      );
    }

    /**
    FPGA debug bus at last reboot
  */
    get previous_dbg_bus(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.System.All
      >(this, "previous_dbg_bus" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Watchdog event log - contains boot reason and times
  */
    get watchdog_event_log(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.System.All
      >(this, "watchdog_event_log" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get board_location(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.System.BOARDPOS,
      VAPI.System.BOARDPOS,
      VAPI.AT1130.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.System.BOARDPOS,
        VAPI.System.BOARDPOS,
        VAPI.AT1130.System.All
      >(this, "board_location" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get frontpanel_led_brightness(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.System.LEDBRIGHTNESS,
      VAPI.System.LEDBRIGHTNESS,
      VAPI.System.LEDBRIGHTNESS,
      VAPI.System.LEDBRIGHTNESS,
      VAPI.AT1130.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.System.LEDBRIGHTNESS,
        VAPI.System.LEDBRIGHTNESS,
        VAPI.System.LEDBRIGHTNESS,
        VAPI.System.LEDBRIGHTNESS,
        VAPI.AT1130.System.All
      >(
        this,
        "frontpanel_led_brightness" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Blink the front panel LED in blue to help locating this blade
  */
    get frontpanel_blink_blue(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.System.All
      >(
        this,
        "frontpanel_blink_blue" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get slots() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "System::Data::SlotInformation",
        VAPI.System.SlotInformation
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 27, "slots"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.System.lift.SlotInformation(raw),
      );
    }
    get services() {
      return VAPI.System.lift.AllServices(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 28, "services"),
      );
    }

    /**
    Currently loaded FPGA
  */
    get selected_fpga(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.AT1130.System.FPGA,
      null | VAPI.AT1130.System.FPGA,
      VAPI.AT1130.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.AT1130.System.FPGA,
        null | VAPI.AT1130.System.FPGA,
        VAPI.AT1130.System.All
      >(this, "selected_fpga" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Change which FPGA to load on next reboot
  */
    get select_fpga(): VScript.dKeyword<
      VScript.VSocket,
      null | VAPI.AT1130.System.FPGASelection,
      null | VAPI.AT1130.System.FPGASelection,
      null | VAPI.AT1130.System.FPGASelection,
      null | VAPI.AT1130.System.FPGASelection,
      VAPI.AT1130.System.All
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | VAPI.AT1130.System.FPGASelection,
        null | VAPI.AT1130.System.FPGASelection,
        null | VAPI.AT1130.System.FPGASelection,
        null | VAPI.AT1130.System.FPGASelection,
        VAPI.AT1130.System.All
      >(
        this,
        "select_fpga" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    @brief Perform a reboot of the blade
    @desc Type in 'reboot' to reboot the current partition. Type in 'system0'
    or 'system1' to reboot to the respective partition.
  */
    get reboot(): VScript.rwKeyword<
      VScript.VSocket,
      string,
      string,
      string,
      string,
      VAPI.AT1130.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1130.System.All
      >(
        this,
        "reboot" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    @brief Perform a power cycle
    @desc Interrupt blade power for 3 seconds
  */
    get powercycle(): VScript.rwKeyword<
      VScript.VSocket,
      string,
      string,
      string,
      string,
      VAPI.AT1130.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1130.System.All
      >(
        this,
        "powercycle" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    @brief Reset NVRAM
    @desc Enter /reset/ to clear all settings and reboot
  */
    get reset(): VScript.rwKeyword<
      VScript.VSocket,
      string,
      string,
      string,
      string,
      VAPI.AT1130.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1130.System.All
      >(
        this,
        "reset" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get command_logging() {
      return VAPI.System.lift.AllCommandLogging(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          34,
          "command_logging",
        ),
      );
    }
    get nmos() {
      return VAPI.System.lift.AllNmos(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 35, "nmos"),
      );
    }
  }
  export type FPGA =
    | "AVP_100GbE"
    | "DMV_100GbE"
    | "JPEGXS_RX_100GbE"
    | "JPEGXS_TX_100GbE"
    | "PCAP_100GbE"
    | "AUDIO_100GbE";
  export type FPGASelection =
    | "AUDIO_100GbE"
    | "AVP_100GbE"
    | "JPEGXS_RX_100GbE"
    | "JPEGXS_TX_100GbE"
    | "PCAP_100GbE";
  export type FaultStatus = "LINK_UP" | "LOCAL_FAULT" | "REMOTE_FAULT";
  export class InternalHW
    implements VScript.Referenceable<"System::Data::InternalHW">
  {
    readonly type_identifier = "System::Data::InternalHW" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    Active PCIe lanes - should be 4
  */
    get pcie_lanes(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.InternalHW
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.InternalHW
      >(this, "pcie_lanes" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Active PCIe speed - should be GT_8_0
  */
    get pcie_speed(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.System.PCIESPEED,
      null | VAPI.System.PCIESPEED,
      VAPI.AT1130.System.InternalHW
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.System.PCIESPEED,
        null | VAPI.System.PCIESPEED,
        VAPI.AT1130.System.InternalHW
      >(this, "pcie_speed" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get xfi() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "System::Data::InternalHW::Xfi",
        VAPI.AT1130.System.InternalHWXfi
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 2, "xfi"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.System.lift.InternalHWXfi(st),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1130.System.InternalHWIssues,
      VAPI.AT1130.System.InternalHW
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1130.System.InternalHWIssues,
        VAPI.AT1130.System.InternalHW
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1130.System.InternalHWIssues => ({
          wrong_pcie_speed_or_lanecount: (x & 1) !== 0,
        }),
        lower: (
          x: VAPI.AT1130.System.InternalHWIssues,
          _: VScript.VSocket,
        ): number => (x.wrong_pcie_speed_or_lanecount ? 1 : 0),
      });
    }
  }
  export class MEMORY implements VScript.Referenceable<"System::Data::MEMORY"> {
    readonly type_identifier = "System::Data::MEMORY" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    if RAM calibration failed and rebooting does not fix the issue, please
    contact customer support
  */
    get ram_sodimm(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.System.RAMCALIBRATION,
      VAPI.System.RAMCALIBRATION,
      VAPI.AT1130.System.MEMORY
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.System.RAMCALIBRATION,
        VAPI.System.RAMCALIBRATION,
        VAPI.AT1130.System.MEMORY
      >(this, "ram_sodimm" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    /**
    J20
  */

    get spd_sodimm() {
      return VAPI.System.lift.SPD(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "spd_sodimm"),
      );
    }
  }
  export class Partitions
    implements VScript.Referenceable<"System::Data::Partitions">
  {
    readonly type_identifier = "System::Data::Partitions" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get booted(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.System.SWVersion,
      VAPI.AT1130.System.Partitions
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.System.SWVersion,
        VAPI.AT1130.System.Partitions
      >(this, "booted" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.System.SWVersion(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"System::Data::SWVersion"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get recovery() {
      return VAPI.System.lift.SWVersion(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "recovery"),
      );
    }
    get system0() {
      return VAPI.System.lift.SWVersion(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "system0"),
      );
    }
    get system1() {
      return VAPI.System.lift.SWVersion(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "system1"),
      );
    }
    get emmc() {
      return VAPI.AT1130.System.lift.PartitionsEmmc(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "emmc"),
      );
    }
  }
  export class Power implements VScript.Referenceable<"System::Data::Power"> {
    readonly type_identifier = "System::Data::Power" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    Power usage for P0V9_B
  */
    get p0v9_b(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Power
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Power
      >(this, "p0v9_b" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Power usage for P1V2 (HBM)
  */
    get p1v2_hbm(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Power
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Power
      >(this, "p1v2_hbm" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Power usage for P1V8
  */
    get p1v8(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Power
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Power
      >(this, "p1v8" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Power usage for P1V8
  */
    get p5v0(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Power
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Power
      >(this, "p5v0" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class Temperature
    implements VScript.Referenceable<"System::Data::Temperature">
  {
    readonly type_identifier = "System::Data::Temperature" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get fpga_ext_core(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fpga_ext_core" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fpga_ext_htile(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fpga_ext_htile" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fpga_ext_etile(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fpga_ext_etile" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fpga_int_core(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fpga_int_core" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fpga_int_htile(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fpga_int_htile" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fpga_int_etile(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fpga_int_etile" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fpga_int_hbm_top(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fpga_int_hbm_top" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fpga_int_hbm_bot(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fpga_int_hbm_bot" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get cpu(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "cpu" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get cpu_module(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "cpu_module" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Temperature of IO-Board
  */
    get ioboard(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "ioboard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Temperature of FPGA-SODIMM (J20)
  */
    get fpga_sodimm(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fpga_sodimm" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Air intake temperature (frontview right)
  */
    get fan1_in(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fan1_in" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Air intake temperature (frontview left)
  */
    get fan2_in(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "fan2_in" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Temperature of U15
  */
    get u15(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "u15" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Temperature of U18
  */
    get u18(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "u18" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Temperature of U21
  */
    get u21(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "u21" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Temperature of U23
  */
    get u23(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "u23" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Total minutes spent at overtemperature, where overtemperature is defined
    as follows:
    
    TBD
  */
    get accumulated_overtemperature_time(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "accumulated_overtemperature_time" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get current_fanspeed_profile(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.Temperature
      >(this, "current_fanspeed_profile" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1130.System.TemperatureIssues,
      VAPI.AT1130.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1130.System.TemperatureIssues,
        VAPI.AT1130.System.Temperature
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1130.System.TemperatureIssues => ({
          cpu_temperature_above_critical: (x & 1) !== 0,
          cpu_temperature_high: (x & 2) !== 0,
          fpga_ext_core_temperature_above_critical: (x & 4) !== 0,
          fpga_ext_core_temperature_high: (x & 8) !== 0,
          fpga_ext_etile_temperature_above_critical: (x & 16) !== 0,
          fpga_ext_etile_temperature_high: (x & 32) !== 0,
          fpga_ext_htile_temperature_above_critical: (x & 64) !== 0,
          fpga_ext_htile_temperature_high: (x & 128) !== 0,
          fpga_int_core_temperature_above_critical: (x & 256) !== 0,
          fpga_int_core_temperature_high: (x & 512) !== 0,
          fpga_int_etile_temperature_above_critical: (x & 1024) !== 0,
          fpga_int_etile_temperature_high: (x & 2048) !== 0,
          fpga_int_hbm_bot_temperature_above_critical: (x & 4096) !== 0,
          fpga_int_hbm_bot_temperature_high: (x & 8192) !== 0,
          fpga_int_hbm_top_temperature_above_critical: (x & 16384) !== 0,
          fpga_int_hbm_top_temperature_high: (x & 32768) !== 0,
          fpga_int_htile_temperature_above_critical: (x & 65536) !== 0,
          fpga_int_htile_temperature_high: (x & 131072) !== 0,
          fpga_sodimm_temperature_above_critical: (x & 262144) !== 0,
          fpga_sodimm_temperature_high: (x & 524288) !== 0,
          ioboard_temperature_above_critical: (x & 1048576) !== 0,
          ioboard_temperature_high: (x & 2097152) !== 0,
          missing_data: (x & 4194304) !== 0,
        }),
        lower: (
          x: VAPI.AT1130.System.TemperatureIssues,
          _: VScript.VSocket,
        ): number =>
          (x.cpu_temperature_above_critical ? 1 : 0) |
          (x.cpu_temperature_high ? 2 : 0) |
          (x.fpga_ext_core_temperature_above_critical ? 4 : 0) |
          (x.fpga_ext_core_temperature_high ? 8 : 0) |
          (x.fpga_ext_etile_temperature_above_critical ? 16 : 0) |
          (x.fpga_ext_etile_temperature_high ? 32 : 0) |
          (x.fpga_ext_htile_temperature_above_critical ? 64 : 0) |
          (x.fpga_ext_htile_temperature_high ? 128 : 0) |
          (x.fpga_int_core_temperature_above_critical ? 256 : 0) |
          (x.fpga_int_core_temperature_high ? 512 : 0) |
          (x.fpga_int_etile_temperature_above_critical ? 1024 : 0) |
          (x.fpga_int_etile_temperature_high ? 2048 : 0) |
          (x.fpga_int_hbm_bot_temperature_above_critical ? 4096 : 0) |
          (x.fpga_int_hbm_bot_temperature_high ? 8192 : 0) |
          (x.fpga_int_hbm_top_temperature_above_critical ? 16384 : 0) |
          (x.fpga_int_hbm_top_temperature_high ? 32768 : 0) |
          (x.fpga_int_htile_temperature_above_critical ? 65536 : 0) |
          (x.fpga_int_htile_temperature_high ? 131072 : 0) |
          (x.fpga_sodimm_temperature_above_critical ? 262144 : 0) |
          (x.fpga_sodimm_temperature_high ? 524288 : 0) |
          (x.ioboard_temperature_above_critical ? 1048576 : 0) |
          (x.ioboard_temperature_high ? 2097152 : 0) |
          (x.missing_data ? 4194304 : 0),
      });
    }
  }
  export class PartitionsEmmc
    implements VScript.Referenceable<"System::Data::Partitions::Emmc">
  {
    readonly type_identifier = "System::Data::Partitions::Emmc" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get firmware_version(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.System.PartitionsEmmc
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.System.PartitionsEmmc
      >(this, "firmware_version" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get life_time_estimation(): VScript.rKeyword<
      VScript.VSocket,
      null | Array<number>,
      null | Array<VAPI.Primitives.Unsigned8>,
      VAPI.AT1130.System.PartitionsEmmc
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | Array<number>,
        null | Array<VAPI.Primitives.Unsigned8>,
        VAPI.AT1130.System.PartitionsEmmc
      >(this, "life_time_estimation" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get pre_eol_information(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned8,
      VAPI.AT1130.System.PartitionsEmmc
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.Primitives.Unsigned8,
        VAPI.AT1130.System.PartitionsEmmc
      >(this, "pre_eol_information" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export type InternalHWIssues = { wrong_pcie_speed_or_lanecount: boolean };
  export type TemperatureIssues = {
    cpu_temperature_above_critical: boolean;
    cpu_temperature_high: boolean;
    fpga_ext_core_temperature_above_critical: boolean;
    fpga_ext_core_temperature_high: boolean;
    fpga_ext_etile_temperature_above_critical: boolean;
    fpga_ext_etile_temperature_high: boolean;
    fpga_ext_htile_temperature_above_critical: boolean;
    fpga_ext_htile_temperature_high: boolean;
    fpga_int_core_temperature_above_critical: boolean;
    fpga_int_core_temperature_high: boolean;
    fpga_int_etile_temperature_above_critical: boolean;
    fpga_int_etile_temperature_high: boolean;
    fpga_int_hbm_bot_temperature_above_critical: boolean;
    fpga_int_hbm_bot_temperature_high: boolean;
    fpga_int_hbm_top_temperature_above_critical: boolean;
    fpga_int_hbm_top_temperature_high: boolean;
    fpga_int_htile_temperature_above_critical: boolean;
    fpga_int_htile_temperature_high: boolean;
    fpga_sodimm_temperature_above_critical: boolean;
    fpga_sodimm_temperature_high: boolean;
    ioboard_temperature_above_critical: boolean;
    ioboard_temperature_high: boolean;
    missing_data: boolean;
  };
  export class AllSysinfo
    implements VScript.Referenceable<"System::Data::All::Sysinfo">
  {
    readonly type_identifier = "System::Data::All::Sysinfo" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

    /**
    System runtime since boot
  */
    get uptime(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VScript.Duration,
      VAPI.AT1130.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VScript.Duration,
        VAPI.AT1130.System.AllSysinfo
      >(this, "uptime" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftNanoseconds,
        lower: VScript.VAPIHelpers.lowerNanoseconds,
      });
    }

    /**
    Load average for 1, 5 and 15 minutes
  */
    get load_avg(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<number>,
      VAPI.AT1130.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<number>,
        VAPI.AT1130.System.AllSysinfo
      >(this, "load_avg" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Free memory
  */
    get freeram(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.System.AllSysinfo
      >(this, "freeram" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Number of running processes
  */
    get procs(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.System.AllSysinfo
      >(this, "procs" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Number of currently active CPU cores
  */
    get num_cores(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1130.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1130.System.AllSysinfo
      >(this, "num_cores" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get services() {
      return VAPI.ServicesList.lift.ServicesList(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "services"),
      );
    }
  }
  export class InternalHWXfi
    implements VScript.Referenceable<"System::Data::InternalHW::Xfi">
  {
    readonly type_identifier = "System::Data::InternalHW::Xfi" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get link_up(): VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.AT1130.System.InternalHWXfi
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1130.System.InternalHWXfi
      >(this, "link_up" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fault_status(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.AT1130.System.FaultStatus,
      null | VAPI.AT1130.System.FaultStatus,
      VAPI.AT1130.System.InternalHWXfi
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.AT1130.System.FaultStatus,
        null | VAPI.AT1130.System.FaultStatus,
        VAPI.AT1130.System.InternalHWXfi
      >(this, "fault_status" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get crc_errors(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.SaturatingCounter32,
      VAPI.AT1130.System.InternalHWXfi
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.SaturatingCounter32,
        VAPI.AT1130.System.InternalHWXfi
      >(this, "crc_errors" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get oversize_errors(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.SaturatingCounter32,
      VAPI.AT1130.System.InternalHWXfi
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.SaturatingCounter32,
        VAPI.AT1130.System.InternalHWXfi
      >(this, "oversize_errors" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get runt_errors(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.SaturatingCounter32,
      VAPI.AT1130.System.InternalHWXfi
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.SaturatingCounter32,
        VAPI.AT1130.System.InternalHWXfi
      >(this, "runt_errors" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export const Enums = {
    FaultStatus: ["LINK_UP", "LOCAL_FAULT", "REMOTE_FAULT"] as FaultStatus[],
    FPGASelection: [
      "AUDIO_100GbE",
      "AVP_100GbE",
      "JPEGXS_RX_100GbE",
      "JPEGXS_TX_100GbE",
      "PCAP_100GbE",
    ] as FPGASelection[],
    FPGA: [
      "AVP_100GbE",
      "DMV_100GbE",
      "JPEGXS_RX_100GbE",
      "JPEGXS_TX_100GbE",
      "PCAP_100GbE",
      "AUDIO_100GbE",
    ] as FPGA[],
  } as const;
}
export namespace SystemClock {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
  } as const;
  export const lower = { All: (_x: All) => _x.raw.kwl } as const;
  export class All implements VScript.Referenceable<"SystemClock::Data::All"> {
    readonly type_identifier = "SystemClock::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get t_src(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.SystemClock.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.SystemClock.All
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }

    /**
    Determines the time standard the SystemClock will be set to.
    
    * `UTC` (Universal Time, Coordinated) is the standard for wall clock
    time. It is the standard that all timezones are based on. UTC has leap
    seconds to account for differences in the Earth's rotational speed. *When
    in doubt, always use `UTC`*
    
    * `TAI` (International Atomic Time) is the time standard used by PTP. It
    is a linear time standard that does not have leap seconds. TAI is
    currently ahead of UTC by 37 seconds.
  */
    get time_standard(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.Time.Standard,
      VAPI.Time.Standard,
      VAPI.Time.Standard,
      VAPI.Time.Standard,
      VAPI.AT1130.SystemClock.All
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.AT1130.SystemClock.All
      >(
        this,
        "time_standard" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.SystemClock.AllIssues,
      VAPI.AT1130.SystemClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.SystemClock.AllIssues,
        VAPI.AT1130.SystemClock.All
      >(this, "issues" as VScript.SysName, {
        lift: (x: number, _: VScript.VSocket): VAPI.SystemClock.AllIssues => ({
          inaccurate_input: (x & 1) !== 0,
          missing_offset: (x & 2) !== 0,
          missing_utc_offset: (x & 4) !== 0,
          out_of_bounds: (x & 8) !== 0,
          unable_to_read_system_time: (x & 16) !== 0,
          unable_to_set_system_time: (x & 32) !== 0,
        }),
        lower: (x: VAPI.SystemClock.AllIssues, _: VScript.VSocket): number =>
          (x.inaccurate_input ? 1 : 0) |
          (x.missing_offset ? 2 : 0) |
          (x.missing_utc_offset ? 4 : 0) |
          (x.out_of_bounds ? 8 : 0) |
          (x.unable_to_read_system_time ? 16 : 0) |
          (x.unable_to_set_system_time ? 32 : 0),
      });
    }
    get system_time_updates(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1130.SystemClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1130.SystemClock.All
      >(this, "system_time_updates" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get system_time(): VScript.rKeyword<
      VScript.VSocket,
      null | number | string,
      null | VAPI.Primitives.Timestamp,
      VAPI.AT1130.SystemClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number | string,
        null | VAPI.Primitives.Timestamp,
        VAPI.AT1130.SystemClock.All
      >(this, "system_time" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftTimestamp,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerTimestamp,
        ),
      });
    }

    /**
    use this to override `output.characteristics.offset_type`; may be useful
    to, e.g., redistribute BlackBurst-derived local time as (absolute) PTP
    time
  */
    get offset_type_override(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.Time.OffsetType,
      null | VAPI.Time.OffsetType,
      null | VAPI.Time.OffsetType,
      null | VAPI.Time.OffsetType,
      VAPI.AT1130.SystemClock.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.Time.OffsetType,
        null | VAPI.Time.OffsetType,
        null | VAPI.Time.OffsetType,
        null | VAPI.Time.OffsetType,
        VAPI.AT1130.SystemClock.All
      >(
        this,
        "offset_type_override" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "ptp_traits"),
      );
    }
  }
}
export namespace Time {
  export const lift = {
    AnalogReference: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AnalogReference(_raw),
    Source: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Source(_raw),
  } as const;
  export const lower = {
    AnalogReference: (_x: AnalogReference) => _x.raw.kwl,
    Source: (_x: Source) => _x.raw.kwl,
  } as const;
  export class AnalogReference
    implements VScript.Referenceable<"Time::Data::AnalogReference">
  {
    readonly type_identifier = "Time::Data::AnalogReference" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "ptp_traits"),
      );
    }
  }
  export class Source implements VScript.Referenceable<"Time::Data::Source"> {
    readonly type_identifier = "Time::Data::Source" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.Time.Source
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get characteristics(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          null | VAPI.Time.OffsetType,
          null | VAPI.Time.GrainRate,
          VAPI.Time.ReferenceFrame,
          number,
        ],
      null | VAPI.Time.SourceCharacteristics,
      VAPI.AT1130.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            null | VAPI.Time.OffsetType,
            null | VAPI.Time.GrainRate,
            VAPI.Time.ReferenceFrame,
            number,
          ],
        null | VAPI.Time.SourceCharacteristics,
        VAPI.AT1130.Time.Source
      >(this, "characteristics" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lift.SourceCharacteristics,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lower.SourceCharacteristics,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Time.SourceIssues,
      VAPI.AT1130.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Time.SourceIssues,
        VAPI.AT1130.Time.Source
      >(this, "issues" as VScript.SysName, {
        lift: (x: number, _: VScript.VSocket): VAPI.Time.SourceIssues => ({
          cycle_detected: (x & 1) !== 0,
        }),
        lower: (x: VAPI.Time.SourceIssues, _: VScript.VSocket): number =>
          x.cycle_detected ? 1 : 0,
      });
    }
    get drift(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, number, number, number],
      null | VAPI.Time.TimestampedDrift,
      VAPI.AT1130.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number, number],
        null | VAPI.Time.TimestampedDrift,
        VAPI.AT1130.Time.Source
      >(this, "drift" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lift.TimestampedDrift,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lower.TimestampedDrift,
        ),
      });
    }
    get offset(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, number, number, number],
      null | VAPI.Time.TimestampedOffset,
      VAPI.AT1130.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number, number],
        null | VAPI.Time.TimestampedOffset,
        VAPI.AT1130.Time.Source
      >(this, "offset" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lift.TimestampedOffset,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lower.TimestampedOffset,
        ),
      });
    }
    get time_code(): VScript.rKeyword<
      VScript.VSocket,
      | null
      | [
          null | VScript.TimecodePayload,
          null | VScript.TimecodePayload,
          null | VScript.TimecodePayload,
          number,
          number,
        ],
      null | VAPI.Time.TimestampedTimecode,
      VAPI.AT1130.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            null | VScript.TimecodePayload,
            null | VScript.TimecodePayload,
            null | VScript.TimecodePayload,
            number,
            number,
          ],
        null | VAPI.Time.TimestampedTimecode,
        VAPI.AT1130.Time.Source
      >(this, "time_code" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lift.TimestampedTimecode,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.Time.lower.TimestampedTimecode,
        ),
      });
    }
    get ptp_traits(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.PTP.Traits,
      VAPI.AT1130.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.PTP.Traits,
        VAPI.AT1130.Time.Source
      >(this, "ptp_traits" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.PTP.Traits(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"PTP::Data::Traits"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
    get genlock(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.Genlock.AT1130GenlockBackend,
      VAPI.AT1130.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.Genlock.AT1130GenlockBackend,
        VAPI.AT1130.Time.Source
      >(this, "genlock" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.Genlock.AT1130GenlockBackend(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"Genlock::Data::AT1130GenlockBackend"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
}
export namespace TimeFlows {
  export const lift = {
    Aligner: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Aligner(_raw),
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    Combinator: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Combinator(_raw),
    Detonator: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Detonator(_raw),
    DriftConverter: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new DriftConverter(_raw),
    Impostor: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Impostor(_raw),
    Selector: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Selector(_raw),
    Shifter: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Shifter(_raw),
    Stretcher: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Stretcher(_raw),
  } as const;
  export const lower = {
    Aligner: (_x: Aligner) => _x.raw.kwl,
    All: (_x: All) => _x.raw.kwl,
    Combinator: (_x: Combinator) => _x.raw.kwl,
    Detonator: (_x: Detonator) => _x.raw.kwl,
    DriftConverter: (_x: DriftConverter) => _x.raw.kwl,
    Impostor: (_x: Impostor) => _x.raw.kwl,
    Selector: (_x: Selector) => _x.raw.kwl,
    Shifter: (_x: Shifter) => _x.raw.kwl,
    Stretcher: (_x: Stretcher) => _x.raw.kwl,
  } as const;
  export class Aligner
    implements VScript.Referenceable<"TimeFlows::Data::Aligner">
  {
    readonly type_identifier = "TimeFlows::Data::Aligner" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get t_src_absolute(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.TimeFlows.Aligner
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.TimeFlows.Aligner
      >(
        this,
        "t_src_absolute" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get t_src_grain_accurate(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.TimeFlows.Aligner
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.TimeFlows.Aligner
      >(
        this,
        "t_src_grain_accurate" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get warning_threshold(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.TimeFlows.Aligner
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.TimeFlows.Aligner
      >(
        this,
        "warning_threshold" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get holdover_grains(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.TimeFlows.Aligner
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.TimeFlows.Aligner
      >(
        this,
        "holdover_grains" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "ptp_traits"),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.TimeFlows.AlignerIssues,
      VAPI.AT1130.TimeFlows.Aligner
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.TimeFlows.AlignerIssues,
        VAPI.AT1130.TimeFlows.Aligner
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.TimeFlows.AlignerIssues => ({
          above_warning_threshold: (x & 1) !== 0,
          holdover_due_to_frequency_change: (x & 2) !== 0,
          holdover_due_to_input_jump: (x & 4) !== 0,
        }),
        lower: (x: VAPI.TimeFlows.AlignerIssues, _: VScript.VSocket): number =>
          (x.above_warning_threshold ? 1 : 0) |
          (x.holdover_due_to_frequency_change ? 2 : 0) |
          (x.holdover_due_to_input_jump ? 4 : 0),
      });
    }
  }
  export class AlignerAsNamedTableRow extends Aligner {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class All implements VScript.Referenceable<"TimeFlows::Data::All"> {
    readonly type_identifier = "TimeFlows::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get aligners() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Aligner",
        VAPI.AT1130.TimeFlows.AlignerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "aligners",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.TimeFlows.AlignerAsNamedTableRow(raw),
      );
    }
    get combinators() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Combinator",
        VAPI.AT1130.TimeFlows.CombinatorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "combinators",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.TimeFlows.CombinatorAsNamedTableRow(raw),
      );
    }
    get detonators() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Detonator",
        VAPI.AT1130.TimeFlows.DetonatorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "detonators",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.TimeFlows.DetonatorAsNamedTableRow(raw),
      );
    }
    get drift_converters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::DriftConverter",
        VAPI.AT1130.TimeFlows.DriftConverterAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          3,
          "drift_converters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.TimeFlows.DriftConverterAsNamedTableRow(raw),
      );
    }
    get impostors() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Impostor",
        VAPI.AT1130.TimeFlows.ImpostorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "impostors",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.TimeFlows.ImpostorAsNamedTableRow(raw),
      );
    }
    get selectors() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Selector",
        VAPI.AT1130.TimeFlows.SelectorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          5,
          "selectors",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.TimeFlows.SelectorAsNamedTableRow(raw),
      );
    }
    get shifters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Shifter",
        VAPI.AT1130.TimeFlows.ShifterAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "shifters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.TimeFlows.ShifterAsNamedTableRow(raw),
      );
    }
    /**
    stretchers shift their input source's measured drift by a user-defined
    amount (note that this demotes `Absolute` and `GrainAccurate` time
    sources to class `FrequencyOnly`). Stretchers are probably useless in a
    production setting, but can be helpful in simulating failure scenarios.
  */

    get stretchers() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Stretcher",
        VAPI.AT1130.TimeFlows.StretcherAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          7,
          "stretchers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.TimeFlows.StretcherAsNamedTableRow(raw),
      );
    }
  }
  export class Combinator
    implements VScript.Referenceable<"TimeFlows::Data::Combinator">
  {
    readonly type_identifier = "TimeFlows::Data::Combinator" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get required_offset_type(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.TimeFlows.CombinatorType,
      null | VAPI.TimeFlows.CombinatorType,
      null | VAPI.TimeFlows.CombinatorType,
      null | VAPI.TimeFlows.CombinatorType,
      VAPI.AT1130.TimeFlows.Combinator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.TimeFlows.CombinatorType,
        null | VAPI.TimeFlows.CombinatorType,
        null | VAPI.TimeFlows.CombinatorType,
        null | VAPI.TimeFlows.CombinatorType,
        VAPI.AT1130.TimeFlows.Combinator
      >(
        this,
        "required_offset_type" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get required_ptp_source_type(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.TimeFlows.PTPSourceTypeFilter,
      null | VAPI.TimeFlows.PTPSourceTypeFilter,
      null | VAPI.TimeFlows.PTPSourceTypeFilter,
      null | VAPI.TimeFlows.PTPSourceTypeFilter,
      VAPI.AT1130.TimeFlows.Combinator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.TimeFlows.PTPSourceTypeFilter,
        null | VAPI.TimeFlows.PTPSourceTypeFilter,
        null | VAPI.TimeFlows.PTPSourceTypeFilter,
        null | VAPI.TimeFlows.PTPSourceTypeFilter,
        VAPI.AT1130.TimeFlows.Combinator
      >(
        this,
        "required_ptp_source_type" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get drift_reference(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.Time.ReferenceFrame,
      VAPI.Time.ReferenceFrame,
      VAPI.Time.ReferenceFrame,
      VAPI.Time.ReferenceFrame,
      VAPI.AT1130.TimeFlows.Combinator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.AT1130.TimeFlows.Combinator
      >(
        this,
        "drift_reference" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get min_drift_tolerance(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.TimeFlows.Combinator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.TimeFlows.Combinator
      >(
        this,
        "min_drift_tolerance" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get min_offset_tolerance(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.TimeFlows.Combinator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.TimeFlows.Combinator
      >(
        this,
        "min_offset_tolerance" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftSeconds,
          lower: VScript.VAPIHelpers.lowerSeconds,
        },
        {
          lift: VScript.VAPIHelpers.liftSeconds,
          lower: VScript.VAPIHelpers.lowerSeconds,
        },
        null,
      );
    }
    get quorum(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.TimeFlows.Combinator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.TimeFlows.Combinator
      >(
        this,
        "quorum" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get session_length(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.TimeFlows.Combinator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.TimeFlows.Combinator
      >(
        this,
        "session_length" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get selected(): VScript.rKeyword<
      VScript.VSocket,
      Array<boolean>,
      Array<boolean>,
      VAPI.AT1130.TimeFlows.Combinator
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<boolean>,
        Array<boolean>,
        VAPI.AT1130.TimeFlows.Combinator
      >(this, "selected" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VAPI.AT1130.Time.Source>,
      VScript.MaybeSparseArray<
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>)
      >,
      VAPI.AT1130.TimeFlows.Combinator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VAPI.AT1130.Time.Source>,
        VScript.MaybeSparseArray<
          | null
          | (VScript.Referenceable<"Time::Data::Source"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>)
        >,
        VAPI.AT1130.TimeFlows.Combinator
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              (raw_kwl: string, _socket: VScript.VSocket) =>
                new VAPI.AT1130.Time.Source(
                  VScript.VAPIHelpers.get_subtree(
                    _socket,
                    raw_kwl as VScript.KWLName<"full">,
                  ),
                ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                (
                  x: VScript.Referenceable<"Time::Data::Source"> &
                    VScript.StronglyTypedSubtree<VScript.VSocket>,
                  _: VScript.VSocket,
                ) => x.raw.kwl,
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              (raw_kwl: string, _socket: VScript.VSocket) =>
                new VAPI.AT1130.Time.Source(
                  VScript.VAPIHelpers.get_subtree(
                    _socket,
                    raw_kwl as VScript.KWLName<"full">,
                  ),
                ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                (
                  x: VScript.Referenceable<"Time::Data::Source"> &
                    VScript.StronglyTypedSubtree<VScript.VSocket>,
                  _: VScript.VSocket,
                ) => x.raw.kwl,
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 9, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 10, "ptp_traits"),
      );
    }
  }
  export class CombinatorAsNamedTableRow extends Combinator {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Detonator
    implements VScript.Referenceable<"TimeFlows::Data::Detonator">
  {
    readonly type_identifier = "TimeFlows::Data::Detonator" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get max_drift_blast(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.TimeFlows.Detonator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.TimeFlows.Detonator
      >(
        this,
        "max_drift_blast" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get max_offset_blast(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.TimeFlows.Detonator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.TimeFlows.Detonator
      >(
        this,
        "max_offset_blast" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftSeconds,
          lower: VScript.VAPIHelpers.lowerSeconds,
        },
        {
          lift: VScript.VAPIHelpers.liftSeconds,
          lower: VScript.VAPIHelpers.lowerSeconds,
        },
        null,
      );
    }

    /**
    Discharge
  */
    get discharge(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.TimeFlows.Detonator
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.TimeFlows.Detonator
      >(
        this,
        "discharge" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Realign
  */
    get realign(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.TimeFlows.Detonator
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.TimeFlows.Detonator
      >(
        this,
        "realign" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get friction(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.TimeFlows.Detonator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.TimeFlows.Detonator
      >(
        this,
        "friction" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get stiffness(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.TimeFlows.Detonator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.TimeFlows.Detonator
      >(
        this,
        "stiffness" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.TimeFlows.Detonator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.TimeFlows.Detonator
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "ptp_traits"),
      );
    }
  }
  export class DetonatorAsNamedTableRow extends Detonator {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class DriftConverter
    implements VScript.Referenceable<"TimeFlows::Data::DriftConverter">
  {
    readonly type_identifier = "TimeFlows::Data::DriftConverter" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get drift_reference(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.Time.ReferenceFrame,
      VAPI.Time.ReferenceFrame,
      VAPI.Time.ReferenceFrame,
      VAPI.Time.ReferenceFrame,
      VAPI.AT1130.TimeFlows.DriftConverter
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.AT1130.TimeFlows.DriftConverter
      >(
        this,
        "drift_reference" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    ideally, all inputs to a clock combinator should use the same reference
    frame as the clock combinator itself. If this is not the case,
    mismatching inputs will be discarded by default. By setting
    `on_reference_frame_mismatch` to `Convert`, inputs can also be converted
    to the combinator's own reference frame. Note, however, that this
    generally incurs a loss in precision
  */
    get on_drift_reference_mismatch(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
      VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
      VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
      VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
      VAPI.AT1130.TimeFlows.DriftConverter
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
        VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
        VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
        VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
        VAPI.AT1130.TimeFlows.DriftConverter
      >(
        this,
        "on_drift_reference_mismatch" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.TimeFlows.DriftConverter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.TimeFlows.DriftConverter
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "ptp_traits"),
      );
    }
  }
  export class DriftConverterAsNamedTableRow extends DriftConverter {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Impostor
    implements VScript.Referenceable<"TimeFlows::Data::Impostor">
  {
    readonly type_identifier = "TimeFlows::Data::Impostor" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.TimeFlows.Impostor
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.TimeFlows.Impostor
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }

    /**
    Insert specified `grain_rate`, or upgrade input to absolute time source
    if null
  */
    get grain_rate(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.Time.GrainRate,
      null | VAPI.Time.GrainRate,
      null | VAPI.Time.GrainRate,
      null | VAPI.Time.GrainRate,
      VAPI.AT1130.TimeFlows.Impostor
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.Time.GrainRate,
        null | VAPI.Time.GrainRate,
        null | VAPI.Time.GrainRate,
        null | VAPI.Time.GrainRate,
        VAPI.AT1130.TimeFlows.Impostor
      >(
        this,
        "grain_rate" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "output"),
      );
    }
  }
  export class ImpostorAsNamedTableRow extends Impostor {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Selector
    implements VScript.Referenceable<"TimeFlows::Data::Selector">
  {
    readonly type_identifier = "TimeFlows::Data::Selector" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get selected(): VScript.rKeyword<
      VScript.VSocket,
      Array<boolean>,
      Array<boolean>,
      VAPI.AT1130.TimeFlows.Selector
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<boolean>,
        Array<boolean>,
        VAPI.AT1130.TimeFlows.Selector
      >(this, "selected" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      Array<null | string>,
      VScript.MaybeSparseArray<null | string>,
      Array<null | VAPI.AT1130.Time.Source>,
      VScript.MaybeSparseArray<
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>)
      >,
      VAPI.AT1130.TimeFlows.Selector
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VAPI.AT1130.Time.Source>,
        VScript.MaybeSparseArray<
          | null
          | (VScript.Referenceable<"Time::Data::Source"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>)
        >,
        VAPI.AT1130.TimeFlows.Selector
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              (raw_kwl: string, _socket: VScript.VSocket) =>
                new VAPI.AT1130.Time.Source(
                  VScript.VAPIHelpers.get_subtree(
                    _socket,
                    raw_kwl as VScript.KWLName<"full">,
                  ),
                ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                (
                  x: VScript.Referenceable<"Time::Data::Source"> &
                    VScript.StronglyTypedSubtree<VScript.VSocket>,
                  _: VScript.VSocket,
                ) => x.raw.kwl,
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              (raw_kwl: string, _socket: VScript.VSocket) =>
                new VAPI.AT1130.Time.Source(
                  VScript.VAPIHelpers.get_subtree(
                    _socket,
                    raw_kwl as VScript.KWLName<"full">,
                  ),
                ),
            ),
          ),
          lower: (elems, socket) =>
            VScript.VAPIHelpers.mapMaybeSparseArray(elems, (el) =>
              VScript.VAPIHelpers.liftOrLowerNullable(
                (
                  x: VScript.Referenceable<"Time::Data::Source"> &
                    VScript.StronglyTypedSubtree<VScript.VSocket>,
                  _: VScript.VSocket,
                ) => x.raw.kwl,
              )(el, socket),
            ) as any /* FIXME: we're currently casting to any because we don't distinguish between read payloads, as sent by the backend, and lowered write payloads */,
        },
        null,
      );
    }
    get required_offset_type(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.Time.OffsetType,
      null | VAPI.Time.OffsetType,
      null | VAPI.Time.OffsetType,
      null | VAPI.Time.OffsetType,
      VAPI.AT1130.TimeFlows.Selector
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.Time.OffsetType,
        null | VAPI.Time.OffsetType,
        null | VAPI.Time.OffsetType,
        null | VAPI.Time.OffsetType,
        VAPI.AT1130.TimeFlows.Selector
      >(
        this,
        "required_offset_type" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get required_drift_reference(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.Time.ReferenceFrame,
      null | VAPI.Time.ReferenceFrame,
      null | VAPI.Time.ReferenceFrame,
      null | VAPI.Time.ReferenceFrame,
      VAPI.AT1130.TimeFlows.Selector
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.Time.ReferenceFrame,
        null | VAPI.Time.ReferenceFrame,
        null | VAPI.Time.ReferenceFrame,
        null | VAPI.Time.ReferenceFrame,
        VAPI.AT1130.TimeFlows.Selector
      >(
        this,
        "required_drift_reference" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get required_ptp_source_type(): VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.TimeFlows.PTPSourceTypeFilter,
      null | VAPI.TimeFlows.PTPSourceTypeFilter,
      null | VAPI.TimeFlows.PTPSourceTypeFilter,
      null | VAPI.TimeFlows.PTPSourceTypeFilter,
      VAPI.AT1130.TimeFlows.Selector
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | VAPI.TimeFlows.PTPSourceTypeFilter,
        null | VAPI.TimeFlows.PTPSourceTypeFilter,
        null | VAPI.TimeFlows.PTPSourceTypeFilter,
        null | VAPI.TimeFlows.PTPSourceTypeFilter,
        VAPI.AT1130.TimeFlows.Selector
      >(
        this,
        "required_ptp_source_type" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "ptp_traits"),
      );
    }
  }
  export class SelectorAsNamedTableRow extends Selector {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Shifter
    implements VScript.Referenceable<"TimeFlows::Data::Shifter">
  {
    readonly type_identifier = "TimeFlows::Data::Shifter" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get shift(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.TimeFlows.Shifter
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.TimeFlows.Shifter
      >(
        this,
        "shift" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.TimeFlows.Shifter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.TimeFlows.Shifter
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "ptp_traits"),
      );
    }
  }
  export class ShifterAsNamedTableRow extends Shifter {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Stretcher
    implements VScript.Referenceable<"TimeFlows::Data::Stretcher">
  {
    readonly type_identifier = "TimeFlows::Data::Stretcher" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get frequency_shift(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.TimeFlows.Stretcher
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.TimeFlows.Stretcher
      >(
        this,
        "frequency_shift" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.TimeFlows.Stretcher
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.TimeFlows.Stretcher
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "output"),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "ptp_traits"),
      );
    }
  }
  export class StretcherAsNamedTableRow extends Stretcher {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
}
export namespace UDX {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    UDXOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new UDXOutput(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    UDXOutput: (_x: UDXOutput) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"UDX::Data::All"> {
    readonly type_identifier = "UDX::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get outputs() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "UDX::Data::UDXOutput",
        VAPI.AT1130.UDX.UDXOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 0, "outputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.UDX.lift.UDXOutput(raw),
      );
    }
    get statistics() {
      return VAPI.UDX.lift.UDXStatistics(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "statistics"),
      );
    }
  }
  export class UDXOutput
    implements VScript.Referenceable<"UDX::Data::UDXOutput">
  {
    readonly type_identifier = "UDX::Data::UDXOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video_source(): VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.UDX.UDXOutput
      >(
        this,
        "video_source" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get video_standard(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.UDX.UDXVideoStandard,
      VAPI.UDX.UDXVideoStandard,
      VAPI.UDX.UDXVideoStandard,
      VAPI.UDX.UDXVideoStandard,
      VAPI.AT1130.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.UDX.UDXVideoStandard,
        VAPI.UDX.UDXVideoStandard,
        VAPI.UDX.UDXVideoStandard,
        VAPI.UDX.UDXVideoStandard,
        VAPI.AT1130.UDX.UDXOutput
      >(
        this,
        "video_standard" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get aspect_ratio(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.UDX.UDXASPECTRATIO,
      VAPI.UDX.UDXASPECTRATIO,
      VAPI.UDX.UDXASPECTRATIO,
      VAPI.UDX.UDXASPECTRATIO,
      VAPI.AT1130.UDX.UDXOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.UDX.UDXASPECTRATIO,
        VAPI.UDX.UDXASPECTRATIO,
        VAPI.UDX.UDXASPECTRATIO,
        VAPI.UDX.UDXASPECTRATIO,
        VAPI.AT1130.UDX.UDXOutput
      >(
        this,
        "aspect_ratio" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get sd_active_pixels(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.UDX.UDXSDACTIVEWIDTH,
      VAPI.UDX.UDXSDACTIVEWIDTH,
      VAPI.UDX.UDXSDACTIVEWIDTH,
      VAPI.UDX.UDXSDACTIVEWIDTH,
      VAPI.AT1130.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.UDX.UDXSDACTIVEWIDTH,
        VAPI.UDX.UDXSDACTIVEWIDTH,
        VAPI.UDX.UDXSDACTIVEWIDTH,
        VAPI.UDX.UDXSDACTIVEWIDTH,
        VAPI.AT1130.UDX.UDXOutput
      >(
        this,
        "sd_active_pixels" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get video_full_range(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.UDX.UDXOutput
      >(
        this,
        "video_full_range" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get on_video_source_lost(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.UDX.UDXSOURCESHOWMODE,
      VAPI.UDX.UDXSOURCESHOWMODE,
      VAPI.UDX.UDXSOURCESHOWMODE,
      VAPI.UDX.UDXSOURCESHOWMODE,
      VAPI.AT1130.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.UDX.UDXSOURCESHOWMODE,
        VAPI.UDX.UDXSOURCESHOWMODE,
        VAPI.UDX.UDXSOURCESHOWMODE,
        VAPI.UDX.UDXSOURCESHOWMODE,
        VAPI.AT1130.UDX.UDXOutput
      >(
        this,
        "on_video_source_lost" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get crop() {
      return VAPI.UDX.lift.UDXVideoCrop(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "crop"),
      );
    }
    get transform() {
      return VAPI.UDX.lift.UDXTransform(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "transform"),
      );
    }
    get filter() {
      return VAPI.UDX.lift.UDXFilter(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "filter"),
      );
    }
    get signal() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 9, "signal"),
      );
    }
    get metadata_inserter() {
      return VAPI.AT1130.MetadataProcessor.lift.MetadataInserter(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          10,
          "metadata_inserter",
        ),
      );
    }
  }
}
export namespace UDXMetadataRequests {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
  } as const;
  export const lower = { All: (_x: All) => _x.raw.kwl } as const;
  export class All
    implements VScript.Referenceable<"UDXMetadataRequests::Data::All">
  {
    readonly type_identifier = "UDXMetadataRequests::Data::All" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get requests() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "MetadataProcessor::Data::Request",
        VAPI.AT1130.MetadataProcessor.Request
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "requests",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.MetadataProcessor.lift.Request(raw),
      );
    }
  }
}
export namespace Video {
  export const lift = {
    Essence: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Essence(_raw),
    TimedSource: (
      _raw: [null | string, null | number | string],
      _socket: VScript.VSocket,
    ): TimedSource => {
      return {
        source:
          _raw[0] === null
            ? null
            : new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        switch_time:
          _raw[1] === null
            ? null
            : VScript.VAPIHelpers.liftTimestamp(_raw[1], _socket),
      };
    },
  } as const;
  export const lower = {
    Essence: (_x: Essence) => _x.raw.kwl,
    TimedSource: (
      _x: {
        source: null | VAPI.AT1130.Video.Essence;
        switch_time: null | VAPI.Primitives.Timestamp;
      },
      _socket: VScript.VSocket,
    ): [null | string, null | number | string] => [
      _x.source === null ? null : _x.source.raw.kwl,
      _x.switch_time === null
        ? null
        : VScript.VAPIHelpers.lowerTimestamp(_x.switch_time, _socket),
    ],
  } as const;
  export class Essence
    implements VScript.Referenceable<"Video::Data::Essence">
  {
    readonly type_identifier = "Video::Data::Essence" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get brief(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1130.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1130.Video.Essence
      >(this, "brief" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.Video.Essence
      >(this, "standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get pixel_format(): VScript.rKeyword<
      VScript.VSocket,
      [
        null | VAPI.Video.ColorSpace,
        VAPI.Video.BitDepth,
        null | VAPI.Video.TransferCharacteristics,
        VAPI.Video.LuminanceAndColorDifferenceSignal,
      ],
      VAPI.Video.PixelFormat,
      VAPI.AT1130.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          null | VAPI.Video.ColorSpace,
          VAPI.Video.BitDepth,
          null | VAPI.Video.TransferCharacteristics,
          VAPI.Video.LuminanceAndColorDifferenceSignal,
        ],
        VAPI.Video.PixelFormat,
        VAPI.AT1130.Video.Essence
      >(this, "pixel_format" as VScript.SysName, {
        lift: VAPI.Video.lift.PixelFormat,
        lower: VAPI.Video.lower.PixelFormat,
      });
    }
    get substream(): VScript.rKeyword<
      VScript.VSocket,
      [VAPI.Video.SubStream, boolean],
      VAPI.Video.EssenceSubstream,
      VAPI.AT1130.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [VAPI.Video.SubStream, boolean],
        VAPI.Video.EssenceSubstream,
        VAPI.AT1130.Video.Essence
      >(this, "substream" as VScript.SysName, {
        lift: VAPI.Video.lift.EssenceSubstream,
        lower: VAPI.Video.lower.EssenceSubstream,
      });
    }
    get frozen(): VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.AT1130.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1130.Video.Essence
      >(this, "frozen" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get black(): VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.AT1130.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1130.Video.Essence
      >(this, "black" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get dt_node(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1130.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1130.Video.Essence
      >(this, "dt_node" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (x: any /* FIXME */, _: VScript.VSocket) => x,
        ),
      });
    }
    /**
    some signal sources, such as RTP audio/video streams, include a
    well-defined offset to the PTP epoch (as seen by the sender). During
    processing, these 'media clocks' may shift (e.g., as signals pass through
    delay elements) or broaden into finite intervals (e.g., as audio channels
    at different offsets to the PTP epoch are combined into a single audio
    essence). Using the `media_clock` keyword, such changes are tracked
    explicitly and forwarded to audio/video transmitters.
  */

    get media_clock() {
      return VAPI.AT1130.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "media_clock"),
      );
    }
    get afd(): VScript.rKeyword<
      VScript.VSocket,
      null | [VAPI.Video.AspectRatio, number, number, number, number, number],
      null | VAPI.Video.AFD,
      VAPI.AT1130.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [VAPI.Video.AspectRatio, number, number, number, number, number],
        null | VAPI.Video.AFD,
        VAPI.AT1130.Video.Essence
      >(this, "afd" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(VAPI.Video.lift.AFD),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(VAPI.Video.lower.AFD),
      });
    }
    get cc(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.Video.ClosedCaption,
      VAPI.AT1130.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.Video.ClosedCaption,
        VAPI.AT1130.Video.Essence
      >(this, "cc" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.Video.ClosedCaption(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"Video::Data::ClosedCaption"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export interface TimedSource {
    source: null | VAPI.AT1130.Video.Essence;
    switch_time: null | VAPI.Primitives.Timestamp;
  }
}
export namespace VideoMixer {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    BSLK: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new BSLK(_raw),
    BSLKLumaKeyer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new BSLKLumaKeyer(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    BSLK: (_x: BSLK) => _x.raw.kwl,
    BSLKLumaKeyer: (_x: BSLKLumaKeyer) => _x.raw.kwl,
  } as const;
  export class All implements VScript.Referenceable<"VideoMixer::Data::All"> {
    readonly type_identifier = "VideoMixer::Data::All" as const;
    get runtime_constants() {
      return {
        num_instances: this.raw.backing_store.get_runtime_constant(
          "VideoMixer::num_instances",
        ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get instances() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "VideoMixer::Data::BSLK",
        VAPI.AT1130.VideoMixer.BSLKAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.VideoMixer.BSLKAsNamedTableRow(raw),
      );
    }
  }
  export class BSLK implements VScript.Referenceable<"VideoMixer::Data::BSLK"> {
    readonly type_identifier = "VideoMixer::Data::BSLK" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.VideoMixer.BSLKIssues,
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.VideoMixer.BSLKIssues,
        VAPI.AT1130.VideoMixer.BSLK
      >(this, "issues" as VScript.SysName, {
        lift: (x: number, _: VScript.VSocket): VAPI.VideoMixer.BSLKIssues => ({
          luma_keyer_v_src_out_of_range: (x & 1) !== 0,
          mismatching_standards: (x & 2) !== 0,
          missing_input: (x & 4) !== 0,
          no_background: (x & 8) !== 0,
          no_hw_resources: (x & 16) !== 0,
          uhd_resources_required: (x & 32) !== 0,
          v_src0_out_of_range: (x & 64) !== 0,
          v_src1_out_of_range: (x & 128) !== 0,
        }),
        lower: (x: VAPI.VideoMixer.BSLKIssues, _: VScript.VSocket): number =>
          (x.luma_keyer_v_src_out_of_range ? 1 : 0) |
          (x.mismatching_standards ? 2 : 0) |
          (x.missing_input ? 4 : 0) |
          (x.no_background ? 8 : 0) |
          (x.no_hw_resources ? 16 : 0) |
          (x.uhd_resources_required ? 32 : 0) |
          (x.v_src0_out_of_range ? 64 : 0) |
          (x.v_src1_out_of_range ? 128 : 0),
      });
    }
    get v_src0(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoMixer.BSLK
      >(
        this,
        "v_src0" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get v_src1(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoMixer.BSLK
      >(
        this,
        "v_src1" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoMixer.BSLK
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get phase_target(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.VideoMixer.BSLK
      >(
        this,
        "phase_target" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get in_phase(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | number>,
      Array<null | VScript.Duration>,
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | number>,
        Array<null | VScript.Duration>,
        VAPI.AT1130.VideoMixer.BSLK
      >(this, "in_phase" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.liftNanoseconds,
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            VScript.VAPIHelpers.lowerNanoseconds,
          ),
        ),
      });
    }
    get phase_rst_counter(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter16,
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1130.VideoMixer.BSLK
      >(this, "phase_rst_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get output() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "output"),
      );
    }
    get reserve_uhd_resources(): VScript.dKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.VideoMixer.BSLK
      >(
        this,
        "reserve_uhd_resources" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get hw_resources(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1130.VideoMixer.BSLK
      >(this, "hw_resources" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get mode(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.VideoMixer.BSLKMode,
      VAPI.VideoMixer.BSLKMode,
      VAPI.VideoMixer.BSLKMode,
      VAPI.VideoMixer.BSLKMode,
      VAPI.AT1130.VideoMixer.BSLK
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.VideoMixer.BSLKMode,
        VAPI.VideoMixer.BSLKMode,
        VAPI.VideoMixer.BSLKMode,
        VAPI.VideoMixer.BSLKMode,
        VAPI.AT1130.VideoMixer.BSLK
      >(
        this,
        "mode" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get luma_keyer() {
      return VAPI.AT1130.VideoMixer.lift.BSLKLumaKeyer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 11, "luma_keyer"),
      );
    }
    get mixer() {
      return VAPI.VideoMixer.lift.BSLKMixer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 12, "mixer"),
      );
    }
  }
  export class BSLKAsNamedTableRow extends BSLK {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class BSLKLumaKeyer
    implements VScript.Referenceable<"VideoMixer::Data::BSLK::LumaKeyer">
  {
    readonly type_identifier = "VideoMixer::Data::BSLK::LumaKeyer" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get v_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoMixer.BSLKLumaKeyer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoMixer.BSLKLumaKeyer
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }

    /**
    Luminance level at and below which everything is transparent
  */
    get clip(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.VideoMixer.BSLKLumaKeyer
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.VideoMixer.BSLKLumaKeyer
      >(
        this,
        "clip" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }

    /**
    Luminance range above clip to reach full opacity
  */
    get gain(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.VideoMixer.BSLKLumaKeyer
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.VideoMixer.BSLKLumaKeyer
      >(
        this,
        "gain" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get opacity() {
      return VAPI.VideoMixer.lift.AutoFader(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "opacity"),
      );
    }

    /**
    Invert the transparent / opaque ends of the output range
  */
    get invert(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.VideoMixer.BSLKLumaKeyer
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.VideoMixer.BSLKLumaKeyer
      >(
        this,
        "invert" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
}
export namespace VideoPlayer {
  export const lift = {
    Player: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Player(_raw),
    PlayerOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PlayerOutput(_raw),
    RelationAudio: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new RelationAudio(_raw),
    RelationVideo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new RelationVideo(_raw),
    Relations: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Relations(_raw),
    Time: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new Time(_raw),
    RelationAudioFollowers: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new RelationAudioFollowers(_raw),
    RelationVideoFollowers: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new RelationVideoFollowers(_raw),
  } as const;
  export const lower = {
    Player: (_x: Player) => _x.raw.kwl,
    PlayerOutput: (_x: PlayerOutput) => _x.raw.kwl,
    RelationAudio: (_x: RelationAudio) => _x.raw.kwl,
    RelationVideo: (_x: RelationVideo) => _x.raw.kwl,
    Relations: (_x: Relations) => _x.raw.kwl,
    Time: (_x: Time) => _x.raw.kwl,
    RelationAudioFollowers: (_x: RelationAudioFollowers) => _x.raw.kwl,
    RelationVideoFollowers: (_x: RelationVideoFollowers) => _x.raw.kwl,
  } as const;
  export class Player
    implements VScript.Referenceable<"VideoPlayer::Data::Player">
  {
    readonly type_identifier = "VideoPlayer::Data::Player" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.VideoPlayer.PlayerIssues,
      VAPI.AT1130.VideoPlayer.Player
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.VideoPlayer.PlayerIssues,
        VAPI.AT1130.VideoPlayer.Player
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.VideoPlayer.PlayerIssues => ({
          load_failed_bad_header: (x & 1) !== 0,
          load_failed_no_header: (x & 2) !== 0,
          load_failed_read_error: (x & 4) !== 0,
          load_pending: (x & 8) !== 0,
          missing_latched_standard: (x & 16) !== 0,
          missing_timesource: (x & 32) !== 0,
          out_of_memory: (x & 64) !== 0,
          out_of_readers: (x & 128) !== 0,
          out_of_writers: (x & 256) !== 0,
          upload_error: (x & 512) !== 0,
        }),
        lower: (x: VAPI.VideoPlayer.PlayerIssues, _: VScript.VSocket): number =>
          (x.load_failed_bad_header ? 1 : 0) |
          (x.load_failed_no_header ? 2 : 0) |
          (x.load_failed_read_error ? 4 : 0) |
          (x.load_pending ? 8 : 0) |
          (x.missing_latched_standard ? 16 : 0) |
          (x.missing_timesource ? 32 : 0) |
          (x.out_of_memory ? 64 : 0) |
          (x.out_of_readers ? 128 : 0) |
          (x.out_of_writers ? 256 : 0) |
          (x.upload_error ? 512 : 0),
      });
    }
    get upload() {
      return VAPI.VideoPlayer.lift.Upload(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "upload"),
      );
    }
    get memory_usage(): VScript.rKeyword<
      VScript.VSocket,
      [
        number,
        number,
        [null | number, null | number],
        null | VAPI.Video.Standard,
      ],
      VAPI.VideoPlayer.MemoryCapacity,
      VAPI.AT1130.VideoPlayer.Player
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          number,
          number,
          [null | number, null | number],
          null | VAPI.Video.Standard,
        ],
        VAPI.VideoPlayer.MemoryCapacity,
        VAPI.AT1130.VideoPlayer.Player
      >(this, "memory_usage" as VScript.SysName, {
        lift: VAPI.VideoPlayer.lift.MemoryCapacity,
        lower: VAPI.VideoPlayer.lower.MemoryCapacity,
      });
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      [
        null | ([0, [number]] | [1, [number]]),
        [
          boolean,
          [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]],
        ],
      ],
      [
        null | ([0, [number]] | [1, [number]]),
        [
          boolean,
          [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]],
        ],
      ],
      VAPI.VideoPlayer.Capabilities,
      VAPI.VideoPlayer.Capabilities,
      VAPI.AT1130.VideoPlayer.Player
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [
          null | ([0, [number]] | [1, [number]]),
          [
            boolean,
            [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]],
          ],
        ],
        [
          null | ([0, [number]] | [1, [number]]),
          [
            boolean,
            [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]],
          ],
        ],
        VAPI.VideoPlayer.Capabilities,
        VAPI.VideoPlayer.Capabilities,
        VAPI.AT1130.VideoPlayer.Player
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VAPI.VideoPlayer.lift.Capabilities,
          lower: VAPI.VideoPlayer.lower.Capabilities,
        },
        {
          lift: VAPI.VideoPlayer.lift.Capabilities,
          lower: VAPI.VideoPlayer.lower.Capabilities,
        },
        null,
      );
    }
    get gang() {
      return VAPI.AT1130.VideoPlayer.lift.Relations(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "gang"),
      );
    }

    /**
    Restart writer and reader
  */
    get restart(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.VideoPlayer.Player
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.VideoPlayer.Player
      >(
        this,
        "restart" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get output() {
      return VAPI.AT1130.VideoPlayer.lift.PlayerOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output"),
      );
    }
  }
  export class PlayerAsNamedTableRow extends Player {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class PlayerOutput
    implements VScript.Referenceable<"VideoPlayer::Data::PlayerOutput">
  {
    readonly type_identifier = "VideoPlayer::Data::PlayerOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get time() {
      return VAPI.AT1130.VideoPlayer.lift.Time(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "time"),
      );
    }
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.VideoPlayer.PlayerOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.VideoPlayer.PlayerOutput
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get control() {
      return VAPI.VideoPlayer.lift.Control(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "control"),
      );
    }
    get deembedded_audio() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "VideoPlayer::Data::GroupSelections",
        VAPI.VideoPlayer.GroupSelections
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          3,
          "deembedded_audio",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.VideoPlayer.lift.GroupSelections(st),
      );
    }
    get reader() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "VideoPlayer::Data::Reader",
        VAPI.VideoPlayer.Reader
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 4, "reader"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.VideoPlayer.lift.Reader(raw),
      );
    }
    get video() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "video"),
      );
    }
    get audio() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "audio"),
      );
    }
  }
  export class RelationAudio
    implements VScript.Referenceable<"VideoPlayer::Data::RelationAudio">
  {
    readonly type_identifier = "VideoPlayer::Data::RelationAudio" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get leader(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.AudioRePlay.Player,
      | null
      | (VScript.Referenceable<"AudioRePlay::Data::Player"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoPlayer.RelationAudio
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.AudioRePlay.Player,
        | null
        | (VScript.Referenceable<"AudioRePlay::Data::Player"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoPlayer.RelationAudio
      >(
        this,
        "leader" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.AudioRePlay.Player(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioRePlay::Data::Player"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.AudioRePlay.Player(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"AudioRePlay::Data::Player"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get followers() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "VideoPlayer::Data::RelationAudio::Followers",
        VAPI.AT1130.VideoPlayer.RelationAudioFollowers
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "followers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.VideoPlayer.lift.RelationAudioFollowers(raw),
      );
    }
  }
  export class RelationVideo
    implements VScript.Referenceable<"VideoPlayer::Data::RelationVideo">
  {
    readonly type_identifier = "VideoPlayer::Data::RelationVideo" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get leader(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.VideoPlayer.Player,
      | null
      | (VScript.Referenceable<"VideoPlayer::Data::Player"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoPlayer.RelationVideo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.VideoPlayer.Player,
        | null
        | (VScript.Referenceable<"VideoPlayer::Data::Player"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoPlayer.RelationVideo
      >(
        this,
        "leader" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.VideoPlayer.Player(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"VideoPlayer::Data::Player"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.VideoPlayer.Player(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"VideoPlayer::Data::Player"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get followers() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "VideoPlayer::Data::RelationVideo::Followers",
        VAPI.AT1130.VideoPlayer.RelationVideoFollowers
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "followers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.VideoPlayer.lift.RelationVideoFollowers(raw),
      );
    }
  }
  export class Relations
    implements VScript.Referenceable<"VideoPlayer::Data::Relations">
  {
    readonly type_identifier = "VideoPlayer::Data::Relations" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get video() {
      return VAPI.AT1130.VideoPlayer.lift.RelationVideo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return VAPI.AT1130.VideoPlayer.lift.RelationAudio(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "audio"),
      );
    }
  }
  export class Time
    implements VScript.Referenceable<"VideoPlayer::Data::Time">
  {
    readonly type_identifier = "VideoPlayer::Data::Time" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoPlayer.Time
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoPlayer.Time
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get phaser_range(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.VideoPlayer.Time
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.VideoPlayer.Time
      >(
        this,
        "phaser_range" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get restart_phaser(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.VideoPlayer.Time
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.VideoPlayer.Time
      >(
        this,
        "restart_phaser" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
  export class RelationAudioFollowers
    implements
      VScript.Referenceable<"VideoPlayer::Data::RelationAudio::Followers">
  {
    readonly type_identifier =
      "VideoPlayer::Data::RelationAudio::Followers" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.AudioRePlay.Player,
      VAPI.AT1130.VideoPlayer.RelationAudioFollowers
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.AudioRePlay.Player,
        VAPI.AT1130.VideoPlayer.RelationAudioFollowers
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.AudioRePlay.Player(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"AudioRePlay::Data::Player"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  export class RelationVideoFollowers
    implements
      VScript.Referenceable<"VideoPlayer::Data::RelationVideo::Followers">
  {
    readonly type_identifier =
      "VideoPlayer::Data::RelationVideo::Followers" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1130.VideoPlayer.Player,
      VAPI.AT1130.VideoPlayer.RelationVideoFollowers
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1130.VideoPlayer.Player,
        VAPI.AT1130.VideoPlayer.RelationVideoFollowers
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1130.VideoPlayer.Player(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"VideoPlayer::Data::Player"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
}
export namespace VideoRePlay {
  export const lift = {
    Delay: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Delay(_raw),
    DelayOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new DelayOutput(_raw),
    Time: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new Time(_raw),
    Video: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new Video(_raw),
    DelayInputs: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new DelayInputs(_raw),
  } as const;
  export const lower = {
    Delay: (_x: Delay) => _x.raw.kwl,
    DelayOutput: (_x: DelayOutput) => _x.raw.kwl,
    Time: (_x: Time) => _x.raw.kwl,
    Video: (_x: Video) => _x.raw.kwl,
    DelayInputs: (_x: DelayInputs) => _x.raw.kwl,
  } as const;
  export class Delay
    implements VScript.Referenceable<"VideoRePlay::Data::Delay">
  {
    readonly type_identifier = "VideoRePlay::Data::Delay" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.VideoRePlay.DelayIssues,
      VAPI.AT1130.VideoRePlay.Delay
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.VideoRePlay.DelayIssues,
        VAPI.AT1130.VideoRePlay.Delay
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.VideoRePlay.DelayIssues => ({
          missing_input_standard: (x & 1) !== 0,
          missing_latched_standard: (x & 2) !== 0,
          missing_timesource: (x & 4) !== 0,
          out_of_memory: (x & 8) !== 0,
          out_of_readers: (x & 16) !== 0,
          out_of_writers: (x & 32) !== 0,
        }),
        lower: (x: VAPI.VideoRePlay.DelayIssues, _: VScript.VSocket): number =>
          (x.missing_input_standard ? 1 : 0) |
          (x.missing_latched_standard ? 2 : 0) |
          (x.missing_timesource ? 4 : 0) |
          (x.out_of_memory ? 8 : 0) |
          (x.out_of_readers ? 16 : 0) |
          (x.out_of_writers ? 32 : 0),
      });
    }
    get memory_usage(): VScript.rKeyword<
      VScript.VSocket,
      [
        number,
        number,
        [null | number, null | number],
        [null | number, null | number],
        null | VAPI.Video.Standard,
      ],
      VAPI.VideoRePlay.MemoryCapacity,
      VAPI.AT1130.VideoRePlay.Delay
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          number,
          number,
          [null | number, null | number],
          [null | number, null | number],
          null | VAPI.Video.Standard,
        ],
        VAPI.VideoRePlay.MemoryCapacity,
        VAPI.AT1130.VideoRePlay.Delay
      >(this, "memory_usage" as VScript.SysName, {
        lift: VAPI.VideoRePlay.lift.MemoryCapacity,
        lower: VAPI.VideoRePlay.lower.MemoryCapacity,
      });
    }
    get capabilities(): VScript.dKeyword<
      VScript.VSocket,
      [
        null | ([0, [number]] | [1, [number]]),
        VAPI.VideoRePlay.DelayMode,
        (
          | [
              0,
              [
                boolean,
                [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]],
              ],
            ]
          | [1, [VAPI.Video.SquareDivisionStandard]]
        ),
      ],
      [
        null | ([0, [number]] | [1, [number]]),
        VAPI.VideoRePlay.DelayMode,
        (
          | [
              0,
              [
                boolean,
                [0, [VAPI.Video.Standard]] | [1, [VAPI.Definitions.Bandwidth]],
              ],
            ]
          | [1, [VAPI.Video.SquareDivisionStandard]]
        ),
      ],
      VAPI.VideoRePlay.Capabilities,
      VAPI.VideoRePlay.Capabilities,
      VAPI.AT1130.VideoRePlay.Delay
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [
          null | ([0, [number]] | [1, [number]]),
          VAPI.VideoRePlay.DelayMode,
          (
            | [
                0,
                [
                  boolean,
                  (
                    | [0, [VAPI.Video.Standard]]
                    | [1, [VAPI.Definitions.Bandwidth]]
                  ),
                ],
              ]
            | [1, [VAPI.Video.SquareDivisionStandard]]
          ),
        ],
        [
          null | ([0, [number]] | [1, [number]]),
          VAPI.VideoRePlay.DelayMode,
          (
            | [
                0,
                [
                  boolean,
                  (
                    | [0, [VAPI.Video.Standard]]
                    | [1, [VAPI.Definitions.Bandwidth]]
                  ),
                ],
              ]
            | [1, [VAPI.Video.SquareDivisionStandard]]
          ),
        ],
        VAPI.VideoRePlay.Capabilities,
        VAPI.VideoRePlay.Capabilities,
        VAPI.AT1130.VideoRePlay.Delay
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VAPI.VideoRePlay.lift.Capabilities,
          lower: VAPI.VideoRePlay.lower.Capabilities,
        },
        {
          lift: VAPI.VideoRePlay.lift.Capabilities,
          lower: VAPI.VideoRePlay.lower.Capabilities,
        },
        null,
      );
    }

    /**
    Restart writer and reader
  */
    get restart(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1130.VideoRePlay.Delay
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1130.VideoRePlay.Delay
      >(
        this,
        "restart" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get dma() {
      return VAPI.VideoRePlay.lift.DMA(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "dma"),
      );
    }
    get inputs() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "VideoRePlay::Data::Delay::Inputs",
        VAPI.AT1130.VideoRePlay.DelayInputs
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 5, "inputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.VideoRePlay.lift.DelayInputs(raw),
      );
    }
    get outputs() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "VideoRePlay::Data::DelayOutput",
        VAPI.AT1130.VideoRePlay.DelayOutputAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "outputs",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.VideoRePlay.DelayOutputAsNamedTableRow(raw),
      );
    }
    async stop_and_download(pars?: {
      frame_index?: number /* will download entire clip if this is left unspecified */;
    }) {
      const url = this.url(pars);
      await this.dma.http.setup_handler.write("Stop");
      const rsp = await fetch(url);
      if (!rsp.ok)
        throw new Error(`Unable to download ${url}: ${rsp.statusText}`);
      return rsp.arrayBuffer();
    }
    url(pars?: {
      frame_index?: number /* will download entire clip if this is left unspecified */;
    }) {
      const vm = this.raw.backing_store;
      const store =
        pars?.frame_index !== undefined
          ? `frame&frame_index=${pars.frame_index}`
          : "clip_single_file";
      return `${vm.protocol === "ws" ? "http" : "https"}://${
        this.raw.backing_store.ip
      }/replay/video?action=read&handler=${VScript.enforce_nonnull(
        VScript.path_index(this.raw.kwl),
      )}&store=${store}`;
    }
  }
  export class DelayAsNamedTableRow extends Delay {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class DelayOutput
    implements VScript.Referenceable<"VideoRePlay::Data::DelayOutput">
  {
    readonly type_identifier = "VideoRePlay::Data::DelayOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoRePlay.DelayOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoRePlay.DelayOutput
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get time() {
      return VAPI.AT1130.VideoRePlay.lift.Time(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "time"),
      );
    }
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.VideoRePlay.DelayOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.VideoRePlay.DelayOutput
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get delay() {
      return VAPI.VideoRePlay.lift.Buffer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "delay"),
      );
    }
    get deembedded_audio() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "VideoRePlay::Data::GroupSelections",
        VAPI.VideoRePlay.GroupSelections
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          4,
          "deembedded_audio",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.VideoRePlay.lift.GroupSelections(st),
      );
    }
    get reader() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "VideoRePlay::Data::Reader",
        VAPI.VideoRePlay.Reader
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 5, "reader"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.VideoRePlay.lift.Reader(raw),
      );
    }
    get video() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "video"),
      );
    }
    get audio() {
      return VAPI.AT1130.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "audio"),
      );
    }
  }
  export class DelayOutputAsNamedTableRow extends DelayOutput {
    readonly index: number;
    constructor(
      readonly raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>,
    ) {
      super(raw);
      this.index = raw.index;
    }
    async rename(name: string, opts?: VScript.CommonWriteOptions) {
      await this.raw.rename(name, opts);
    }
    async row_name(opts?: VScript.CommonCommandOptions) {
      return await this.raw.row_name(opts);
    }
    async delete(opts?: VScript.CommonWriteOptions) {
      await this.raw.delete(opts);
    }
  }
  export class Time
    implements VScript.Referenceable<"VideoRePlay::Data::Time">
  {
    readonly type_identifier = "VideoRePlay::Data::Time" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get phaser_range(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1130.VideoRePlay.Time
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1130.VideoRePlay.Time
      >(
        this,
        "phaser_range" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        {
          lift: VScript.VAPIHelpers.liftNanoseconds,
          lower: VScript.VAPIHelpers.lowerNanoseconds,
        },
        null,
      );
    }
    get restart_phaser(): VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.AT1130.VideoRePlay.Time
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1130.VideoRePlay.Time
      >(
        this,
        "restart_phaser" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
  }
  export class Video
    implements VScript.Referenceable<"VideoRePlay::Data::Video">
  {
    readonly type_identifier = "VideoRePlay::Data::Video" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get info() {
      return VAPI.DataRePlay.lift.MemoryInfo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "info"),
      );
    }
    get players() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "VideoPlayer::Data::Player",
        VAPI.AT1130.VideoPlayer.PlayerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "players",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.VideoPlayer.PlayerAsNamedTableRow(raw),
      );
    }
    get delays() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "VideoRePlay::Data::Delay",
        VAPI.AT1130.VideoRePlay.DelayAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "delays",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1130.VideoRePlay.DelayAsNamedTableRow(raw),
      );
    }
    get statistic() {
      return VAPI.DataRePlay.lift.Statistic(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "statistic"),
      );
    }
    get ecc() {
      return VAPI.Memory.lift.ECCMuxStatistics(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "ecc"),
      );
    }
    get audio_source_slices() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          5,
          "audio_source_slices",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
  }
  export class DelayInputs
    implements VScript.Referenceable<"VideoRePlay::Data::Delay::Inputs">
  {
    readonly type_identifier = "VideoRePlay::Data::Delay::Inputs" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1130.VideoRePlay.DelayInputs
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1130.VideoRePlay.DelayInputs
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get latest_running_standard(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.Video.Standard,
      null | VAPI.Video.Standard,
      VAPI.AT1130.VideoRePlay.DelayInputs
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1130.VideoRePlay.DelayInputs
      >(this, "latest_running_standard" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get v_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoRePlay.DelayInputs
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoRePlay.DelayInputs
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Video.Essence(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Video::Data::Essence"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        null,
      );
    }
    get writer() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "VideoRePlay::Data::Writer",
        VAPI.VideoRePlay.Writer
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 3, "writer"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.VideoRePlay.lift.Writer(raw),
      );
    }
  }
}
export namespace VideoSignalGenerator {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    VSG: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new VSG(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    VSG: (_x: VSG) => _x.raw.kwl,
  } as const;
  export class All
    implements VScript.Referenceable<"VideoSignalGenerator::Data::All">
  {
    readonly type_identifier = "VideoSignalGenerator::Data::All" as const;
    get runtime_constants() {
      return {
        num_video_signal_generators:
          this.raw.backing_store.get_runtime_constant(
            "VideoSignalGenerator::num_video_signal_generators",
          ) as number,
      } as const;
    }
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get instances() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "VideoSignalGenerator::Data::VSG",
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1130.VideoSignalGenerator.lift.VSG(st),
      );
    }
  }
  export class VSG
    implements VScript.Referenceable<"VideoSignalGenerator::Data::VSG">
  {
    readonly type_identifier = "VideoSignalGenerator::Data::VSG" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get t_src(): VScript.dKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.AT1130.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1130.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1130.Time.Source(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            (
              x: VScript.Referenceable<"Time::Data::Source"> &
                VScript.StronglyTypedSubtree<VScript.VSocket>,
              _: VScript.VSocket,
            ) => x.raw.kwl,
          ),
        },
        (
          parent: VAPI.AT1130.VideoSignalGenerator.VSG,
          command: null | VAPI.AT1130.Time.Source,
        ) => (
          void parent,
          void command,
          {
            criterion: "status",
            validator: (status: null | VAPI.AT1130.Time.Source) =>
              command === null || VScript.same(command, status),
          }
        ),
      );
    }
    get output() {
      return VAPI.AT1130.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "output"),
      );
    }
    get standard(): VScript.dKeyword<
      VScript.VSocket,
      VAPI.Video.Standard,
      VAPI.Video.Standard,
      VAPI.Video.Standard,
      VAPI.Video.Standard,
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Video.Standard,
        VAPI.Video.Standard,
        VAPI.Video.Standard,
        VAPI.Video.Standard,
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(
        this,
        "standard" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get pattern(): VScript.rwKeyword<
      VScript.VSocket,
      VAPI.VideoSignalGenerator.TestPatternSelect,
      VAPI.VideoSignalGenerator.TestPatternSelect,
      VAPI.VideoSignalGenerator.TestPatternSelect,
      VAPI.VideoSignalGenerator.TestPatternSelect,
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.VideoSignalGenerator.TestPatternSelect,
        VAPI.VideoSignalGenerator.TestPatternSelect,
        VAPI.VideoSignalGenerator.TestPatternSelect,
        VAPI.VideoSignalGenerator.TestPatternSelect,
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(
        this,
        "pattern" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get cnt0_full(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(
        this,
        "cnt0_full" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get cnt1_full(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(
        this,
        "cnt1_full" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get cnt0_horz(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(
        this,
        "cnt0_horz" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get cnt1_horz(): VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(
        this,
        "cnt1_horz" as VScript.SysName,
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        {
          lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
          lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
        },
        null,
      );
    }
    get phase(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(this, "phase" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftNanoseconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerNanoseconds,
        ),
      });
    }
    get phase_rst_counter(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter32,
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter32,
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(this, "phase_rst_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.VideoSignalGenerator.VSGIssues,
      VAPI.AT1130.VideoSignalGenerator.VSG
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.VideoSignalGenerator.VSGIssues,
        VAPI.AT1130.VideoSignalGenerator.VSG
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.VideoSignalGenerator.VSGIssues => ({
          genlock_not_locked: (x & 1) !== 0,
          missing_t_src: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.VideoSignalGenerator.VSGIssues,
          _: VScript.VSocket,
        ): number => (x.genlock_not_locked ? 1 : 0) | (x.missing_t_src ? 2 : 0),
      });
    }
  }
}
export class Root {
  readonly audio_engine?: VAPI.AT1130.AudioEngine.All;

  readonly audio_gain?: VAPI.AT1130.AudioGain.All;

  readonly audio_mixer?: VAPI.AT1130.AudioMixer.All;

  readonly audio_shuffler?: VAPI.AT1130.AudioShuffler.All;

  readonly audio_signal_generator?: VAPI.AT1130.AudioSignalGenerator.All;

  readonly clos_x_bar?: VAPI.ClosXBar.All;

  readonly cluster?: VAPI.AT1130.Cluster.All;

  readonly color_correction?: VAPI.AT1130.ColorCorrection.All;

  readonly genlock?: VAPI.AT1130.Genlock.All;

  readonly i_o_module?: VAPI.AT1130.IOModule.All;

  readonly j2_k_decoder?: VAPI.AT1130.J2KDecoder.All;

  readonly master_clock: VAPI.AT1130.MasterClock.All;

  readonly metadata_processor?: VAPI.AT1130.MetadataProcessor.All;

  readonly monitoring?: VAPI.AT1130.Monitoring.All;

  readonly multiviewer?: VAPI.Multiviewer.All;

  readonly multiviewer_i_o?: VAPI.AT1130.MultiviewerIO.All;

  readonly network_interfaces: VAPI.AT1130.NetworkInterfaces.All;

  readonly p_cap?: VAPI.AT1130.PCap.All;

  readonly p_t_p_clock: VAPI.AT1130.PTPClock.All;

  readonly p_t_p_flows: VAPI.AT1130.PTPFlows.All;

  readonly r_t_p_metadata_channel?: VAPI.RTPMetadataChannel.All;

  readonly r_t_p_receiver?: VAPI.AT1130.RTPReceiver.All;

  readonly r_t_p_transmitter?: VAPI.AT1130.RTPTransmitter.All;

  readonly re_play?: VAPI.AT1130.RePlay.All;

  readonly sample_rate_converter?: VAPI.AT1130.SampleRateConverter.All;

  readonly software_update: VAPI.SoftwareUpdate.All;

  readonly splitter?: VAPI.AT1130.Splitter.All;

  readonly system: VAPI.AT1130.System.All;

  readonly system_clock: VAPI.AT1130.SystemClock.All;

  readonly time_flows: VAPI.AT1130.TimeFlows.All;

  readonly u_d_x?: VAPI.AT1130.UDX.All;

  readonly u_d_x_metadata_requests?: VAPI.AT1130.UDXMetadataRequests.All;

  readonly video_mixer?: VAPI.AT1130.VideoMixer.All;

  readonly video_signal_generator?: VAPI.AT1130.VideoSignalGenerator.All;

  constructor(readonly raw: VScript.VSocket) {
    const maybe_audio_engine = VScript.VAPIHelpers.component_checked(
      this.raw,
      "audio_engine",
    );
    if (maybe_audio_engine)
      this.audio_engine = new VAPI.AT1130.AudioEngine.All(maybe_audio_engine);
    const maybe_audio_gain = VScript.VAPIHelpers.component_checked(
      this.raw,
      "audio_gain",
    );
    if (maybe_audio_gain)
      this.audio_gain = new VAPI.AT1130.AudioGain.All(maybe_audio_gain);
    const maybe_audio_mixer = VScript.VAPIHelpers.component_checked(
      this.raw,
      "audio_mixer",
    );
    if (maybe_audio_mixer)
      this.audio_mixer = new VAPI.AT1130.AudioMixer.All(maybe_audio_mixer);
    const maybe_audio_shuffler = VScript.VAPIHelpers.component_checked(
      this.raw,
      "audio_shuffler",
    );
    if (maybe_audio_shuffler)
      this.audio_shuffler = new VAPI.AT1130.AudioShuffler.All(
        maybe_audio_shuffler,
      );
    const maybe_audio_signal_generator = VScript.VAPIHelpers.component_checked(
      this.raw,
      "audio_signal_generator",
    );
    if (maybe_audio_signal_generator)
      this.audio_signal_generator = new VAPI.AT1130.AudioSignalGenerator.All(
        maybe_audio_signal_generator,
      );
    const maybe_clos_x_bar = VScript.VAPIHelpers.component_checked(
      this.raw,
      "clos_x_bar",
    );
    if (maybe_clos_x_bar)
      this.clos_x_bar = new VAPI.ClosXBar.All(maybe_clos_x_bar);
    const maybe_cluster = VScript.VAPIHelpers.component_checked(
      this.raw,
      "cluster",
    );
    if (maybe_cluster)
      this.cluster = new VAPI.AT1130.Cluster.All(maybe_cluster);
    const maybe_color_correction = VScript.VAPIHelpers.component_checked(
      this.raw,
      "color_correction",
    );
    if (maybe_color_correction)
      this.color_correction = new VAPI.AT1130.ColorCorrection.All(
        maybe_color_correction,
      );
    const maybe_genlock = VScript.VAPIHelpers.component_checked(
      this.raw,
      "genlock",
    );
    if (maybe_genlock)
      this.genlock = new VAPI.AT1130.Genlock.All(maybe_genlock);
    const maybe_i_o_module = VScript.VAPIHelpers.component_checked(
      this.raw,
      "i_o_module",
    );
    if (maybe_i_o_module)
      this.i_o_module = new VAPI.AT1130.IOModule.All(maybe_i_o_module);
    const maybe_j2_k_decoder = VScript.VAPIHelpers.component_checked(
      this.raw,
      "j2_k_decoder",
    );
    if (maybe_j2_k_decoder)
      this.j2_k_decoder = new VAPI.AT1130.J2KDecoder.All(maybe_j2_k_decoder);
    this.master_clock = new VAPI.AT1130.MasterClock.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "master_clock"),
      ),
    );
    const maybe_metadata_processor = VScript.VAPIHelpers.component_checked(
      this.raw,
      "metadata_processor",
    );
    if (maybe_metadata_processor)
      this.metadata_processor = new VAPI.AT1130.MetadataProcessor.All(
        maybe_metadata_processor,
      );
    const maybe_monitoring = VScript.VAPIHelpers.component_checked(
      this.raw,
      "monitoring",
    );
    if (maybe_monitoring)
      this.monitoring = new VAPI.AT1130.Monitoring.All(maybe_monitoring);
    const maybe_multiviewer = VScript.VAPIHelpers.component_checked(
      this.raw,
      "multiviewer",
    );
    if (maybe_multiviewer)
      this.multiviewer = new VAPI.Multiviewer.All(maybe_multiviewer);
    const maybe_multiviewer_i_o = VScript.VAPIHelpers.component_checked(
      this.raw,
      "multiviewer_i_o",
    );
    if (maybe_multiviewer_i_o)
      this.multiviewer_i_o = new VAPI.AT1130.MultiviewerIO.All(
        maybe_multiviewer_i_o,
      );
    this.network_interfaces = new VAPI.AT1130.NetworkInterfaces.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "network_interfaces"),
      ),
    );
    const maybe_p_cap = VScript.VAPIHelpers.component_checked(
      this.raw,
      "p_cap",
    );
    if (maybe_p_cap) this.p_cap = new VAPI.AT1130.PCap.All(maybe_p_cap);
    this.p_t_p_clock = new VAPI.AT1130.PTPClock.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "p_t_p_clock"),
      ),
    );
    this.p_t_p_flows = new VAPI.AT1130.PTPFlows.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "p_t_p_flows"),
      ),
    );
    const maybe_r_t_p_metadata_channel = VScript.VAPIHelpers.component_checked(
      this.raw,
      "r_t_p_metadata_channel",
    );
    if (maybe_r_t_p_metadata_channel)
      this.r_t_p_metadata_channel = new VAPI.RTPMetadataChannel.All(
        maybe_r_t_p_metadata_channel,
      );
    const maybe_r_t_p_receiver = VScript.VAPIHelpers.component_checked(
      this.raw,
      "r_t_p_receiver",
    );
    if (maybe_r_t_p_receiver)
      this.r_t_p_receiver = new VAPI.AT1130.RTPReceiver.All(
        maybe_r_t_p_receiver,
      );
    const maybe_r_t_p_transmitter = VScript.VAPIHelpers.component_checked(
      this.raw,
      "r_t_p_transmitter",
    );
    if (maybe_r_t_p_transmitter)
      this.r_t_p_transmitter = new VAPI.AT1130.RTPTransmitter.All(
        maybe_r_t_p_transmitter,
      );
    const maybe_re_play = VScript.VAPIHelpers.component_checked(
      this.raw,
      "re_play",
    );
    if (maybe_re_play) this.re_play = new VAPI.AT1130.RePlay.All(maybe_re_play);
    const maybe_sample_rate_converter = VScript.VAPIHelpers.component_checked(
      this.raw,
      "sample_rate_converter",
    );
    if (maybe_sample_rate_converter)
      this.sample_rate_converter = new VAPI.AT1130.SampleRateConverter.All(
        maybe_sample_rate_converter,
      );
    this.software_update = new VAPI.SoftwareUpdate.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "software_update"),
      ),
    );
    const maybe_splitter = VScript.VAPIHelpers.component_checked(
      this.raw,
      "splitter",
    );
    if (maybe_splitter)
      this.splitter = new VAPI.AT1130.Splitter.All(maybe_splitter);
    this.system = new VAPI.AT1130.System.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "system"),
      ),
    );
    this.system_clock = new VAPI.AT1130.SystemClock.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "system_clock"),
      ),
    );
    this.time_flows = new VAPI.AT1130.TimeFlows.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "time_flows"),
      ),
    );
    const maybe_u_d_x = VScript.VAPIHelpers.component_checked(
      this.raw,
      "u_d_x",
    );
    if (maybe_u_d_x) this.u_d_x = new VAPI.AT1130.UDX.All(maybe_u_d_x);
    const maybe_u_d_x_metadata_requests = VScript.VAPIHelpers.component_checked(
      this.raw,
      "u_d_x_metadata_requests",
    );
    if (maybe_u_d_x_metadata_requests)
      this.u_d_x_metadata_requests = new VAPI.AT1130.UDXMetadataRequests.All(
        maybe_u_d_x_metadata_requests,
      );
    const maybe_video_mixer = VScript.VAPIHelpers.component_checked(
      this.raw,
      "video_mixer",
    );
    if (maybe_video_mixer)
      this.video_mixer = new VAPI.AT1130.VideoMixer.All(maybe_video_mixer);
    const maybe_video_signal_generator = VScript.VAPIHelpers.component_checked(
      this.raw,
      "video_signal_generator",
    );
    if (maybe_video_signal_generator)
      this.video_signal_generator = new VAPI.AT1130.VideoSignalGenerator.All(
        maybe_video_signal_generator,
      );
  }
  static adopt(socket: VScript.VSocket): Root {
    return new Root(socket);
  }
  async close(): Promise<void> {
    await this.raw.close();
  }
}
