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 {
  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.AT1101.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.AT1101.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.AT1101.Audio.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.Audio.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "media_clock"),
      );
    }
  }
  export interface TimedSource {
    source: null | VAPI.AT1101.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 groups() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Group",
        VAPI.AudioEngine.GroupAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "groups",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AudioEngine.GroupAsNamedTableRow(raw),
      );
    }
    get nminus1() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::NMinus1",
        VAPI.AT1101.AudioEngine.NMinus1AsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "nminus1",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioEngine.NMinus1AsNamedTableRow(raw),
      );
    }
    get mono() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::MonoMix",
        VAPI.AT1101.AudioEngine.MonoMixAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "mono",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioEngine.MonoMixAsNamedTableRow(raw),
      );
    }
    get stereo() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::StereoMix",
        VAPI.AT1101.AudioEngine.StereoMixAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          3,
          "stereo",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioEngine.StereoMixAsNamedTableRow(raw),
      );
    }
    get filter() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Filter",
        VAPI.AT1101.AudioEngine.FilterAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "filter",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioEngine.FilterAsNamedTableRow(raw),
      );
    }
    get delay() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Delay",
        VAPI.AT1101.AudioEngine.DelayAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          5,
          "delay",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioEngine.DelayAsNamedTableRow(raw),
      );
    }
    get truepeak() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::TruePeak",
        VAPI.AT1101.AudioEngine.TruePeakAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "truepeak",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioEngine.TruePeakAsNamedTableRow(raw),
      );
    }
    get loudness() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Loudness",
        VAPI.AT1101.AudioEngine.LoudnessAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          7,
          "loudness",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioEngine.LoudnessAsNamedTableRow(raw),
      );
    }
    get compressor() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::Compressor",
        VAPI.AT1101.AudioEngine.CompressorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          8,
          "compressor",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioEngine.CompressorAsNamedTableRow(raw),
      );
    }
    get downmix() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::DownMix",
        VAPI.AT1101.AudioEngine.DownMixAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          9,
          "downmix",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioEngine.DownMixAsNamedTableRow(raw),
      );
    }
    get midside() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioEngine::Data::MidSide",
        VAPI.AT1101.AudioEngine.MidSideAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          10,
          "midside",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.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.AT1101.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,
          12,
          "audio_source_slices",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(st),
      );
    }
  }
  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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.Compressor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.Compressor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.CompressorIssues,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.Compressor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number, number, null | number]>,
        Array<VAPI.AudioEngine.CompressorCurvePoint>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.Compressor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Audio.PeakMeter,
        VAPI.AT1101.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.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 12, "output"),
      );
    }
  }
  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.AT1101.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.AT1101.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.AT1101.AudioEngine.Delay
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, number],
        null | [number, number],
        null | VAPI.AudioEngine.DelayCapabilities,
        null | VAPI.AudioEngine.DelayCapabilities,
        VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.Delay
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1101.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.AT1101.AudioEngine.Delay
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.DelayIssues,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output"),
      );
    }
  }
  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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.DownMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1101.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.AT1101.AudioEngine.DownMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1101.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.AT1101.AudioEngine.DownMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.DownMixIssues,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "output"),
      );
    }
  }
  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.AT1101.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.AT1101.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.AT1101.AudioEngine.Filter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, number],
        null | [number, number],
        null | VAPI.AudioEngine.FilterCapabilities,
        null | VAPI.AudioEngine.FilterCapabilities,
        VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.Filter
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1101.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.AT1101.AudioEngine.Filter
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.FilterIssues,
        VAPI.AT1101.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.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output"),
      );
    }
  }
  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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.Loudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1101.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.AT1101.AudioEngine.Loudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.LoudnessIssues,
        VAPI.AT1101.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.AT1101.AudioEngine.Loudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | number, null | number, null | number, number],
        VAPI.AudioEngine.LoudnessMeasurement,
        VAPI.AT1101.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.AT1101.AudioEngine.Loudness
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.AudioEngine.Loudness
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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",
        ),
      );
    }
  }
  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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.MidSide
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1101.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.AT1101.AudioEngine.MidSide
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1101.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.AT1101.AudioEngine.MidSide
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.MidSideIssues,
        VAPI.AT1101.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.AT1101.AudioEngine.MidSide
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        [number, number, number],
        [number, number, number],
        VAPI.AudioEngine.MidSideParams,
        VAPI.AudioEngine.MidSideParams,
        VAPI.AT1101.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.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "output"),
      );
    }
  }
  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.AT1101.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.AT1101.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.AT1101.AudioEngine.MonoMix
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, boolean],
        null | [number, boolean],
        null | VAPI.AudioEngine.MonoMixCapabilities,
        null | VAPI.AudioEngine.MonoMixCapabilities,
        VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.MonoMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1101.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.AT1101.AudioEngine.MonoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1101.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.AT1101.AudioEngine.MonoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.MonoMixIssues,
        VAPI.AT1101.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.AT1101.AudioEngine.MonoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.NMinus1
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number],
        null | [number],
        null | VAPI.AudioEngine.NMinus1Capabilities,
        null | VAPI.AudioEngine.NMinus1Capabilities,
        VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.NMinus1
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1101.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.AT1101.AudioEngine.NMinus1
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1101.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.AT1101.AudioEngine.NMinus1
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.NMinus1Issues,
        VAPI.AT1101.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.AT1101.Audio.Essence
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 7, "output"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.StereoMix
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, boolean],
        null | [number, boolean],
        null | VAPI.AudioEngine.StereoMixCapabilities,
        null | VAPI.AudioEngine.StereoMixCapabilities,
        VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>
      >,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
            | null
            | [
                null | string,
                number,
                boolean,
                [number, number, number, number, number],
              ],
            null | VAPI.Audio.Channel
          >>
        >,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.StereoMix
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<Array<boolean>>,
        VScript.MaybeSparseArray<Array<boolean>>,
        Array<Array<boolean>>,
        VScript.MaybeSparseArray<Array<boolean>>,
        VAPI.AT1101.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.AT1101.AudioEngine.StereoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<Array<[number]>>,
        Array<Array<VAPI.AudioEngine.HWInputAssignment>>,
        VAPI.AT1101.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.AT1101.AudioEngine.StereoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.StereoMixIssues,
        VAPI.AT1101.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.AT1101.AudioEngine.StereoMix
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<Array<number>>,
        Array<Array<VAPI.Audio.PeakMeter>>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 9, "output"),
      );
    }
  }
  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.AT1101.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.AT1101.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.AT1101.AudioEngine.TruePeak
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number],
        null | [number],
        null | VAPI.AudioEngine.TruePeakCapabilities,
        null | VAPI.AudioEngine.TruePeakCapabilities,
        VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioEngine.TruePeak
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[number]>,
        Array<VAPI.AudioEngine.HWInputAssignment>,
        VAPI.AT1101.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.AT1101.AudioEngine.TruePeak
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioEngine.TruePeakIssues,
        VAPI.AT1101.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.AT1101.AudioEngine.TruePeak
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1101.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.AT1101.AudioEngine.TruePeak
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1101.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.AT1101.AudioEngine.TruePeak
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | VScript.Duration,
        null | VScript.Duration,
        VAPI.AT1101.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.AT1101.AudioEngine.TruePeak
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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",
        ),
      );
    }
  }
  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.AT1101.AudioGain.LevelsAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.AudioGain.Levels
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.AudioGain.Levels
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.AudioGain.Levels
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<number>,
        VScript.MaybeSparseArray<number>,
        Array<number>,
        VScript.MaybeSparseArray<number>,
        VAPI.AT1101.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.AT1101.AudioGain.Levels
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1101.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.AT1101.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.AT1101.AudioMixer.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.AudioMixer.MonosAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "mono_mixes",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioMixer.MonosAsNamedTableRow(raw),
      );
    }
    get stereo_mixes() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::Stereos",
        VAPI.AT1101.AudioMixer.StereosAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "stereo_mixes",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioMixer.StereosAsNamedTableRow(raw),
      );
    }
    get down_mixes() {
      return VAPI.AT1101.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.AT1101.AudioMixer.ChannelMono
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.AudioMixer.ChannelMono
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.AudioMixer.ChannelMono
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.AudioMixer.ChannelMono
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.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.AT1101.AudioMixer.ChannelSelection
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.AudioMixer.ChannelSelection
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.AudioMixer.ChannelSelection
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.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.AT1101.AudioMixer.ChannelStereo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.AudioMixer.ChannelStereo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.AudioMixer.ChannelStereo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.AudioMixer.ChannelStereo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.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.AT1101.AudioMixer.Mode51AsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "mode_5_1",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioMixer.Mode51AsNamedTableRow(raw),
      );
    }
    get mode_7_1() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::Mode71",
        VAPI.AT1101.AudioMixer.Mode71AsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "mode_7_1",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "front_left"),
      );
    }
    get front_right() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "front_right"),
      );
    }
    get center() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "center"),
      );
    }
    get lfe() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "lfe"),
      );
    }
    get rear_surround_left() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "rear_surround_left",
        ),
      );
    }
    get rear_surround_right() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          5,
          "rear_surround_right",
        ),
      );
    }
    get output() {
      return VAPI.AT1101.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.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "front_left"),
      );
    }
    get front_right() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "front_right"),
      );
    }
    get center() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "center"),
      );
    }
    get surround_left() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "surround_left"),
      );
    }
    get surround_right() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "surround_right",
        ),
      );
    }
    get lfe() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "lfe"),
      );
    }
    get rear_surround_left() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          6,
          "rear_surround_left",
        ),
      );
    }
    get rear_surround_right() {
      return VAPI.AT1101.AudioMixer.lift.ChannelSelection(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          7,
          "rear_surround_right",
        ),
      );
    }
    get output() {
      return VAPI.AT1101.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.AT1101.AudioMixer.ChannelSelectionAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "channels",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioMixer.ChannelSelectionAsNamedTableRow(raw),
      );
    }
    get output() {
      return VAPI.AT1101.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.AT1101.AudioMixer.Source
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.AudioMixer.Source
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.AudioMixer.Source
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.AudioMixer.SourceStereo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.AudioMixer.SourceStereo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.AudioMixer.SourceStereo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.AudioMixer.SourceStereo
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.AudioMixer.ChannelMonoAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "mono_channels",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioMixer.ChannelMonoAsNamedTableRow(raw),
      );
    }
    get stereo_pairs() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioMixer::Data::ChannelStereo",
        VAPI.AT1101.AudioMixer.ChannelStereoAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "stereo_pairs",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioMixer.ChannelStereoAsNamedTableRow(raw),
      );
    }
    get output() {
      return VAPI.AT1101.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.AT1101.AudioMixer.StereosOutput
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.AudioMixer.StereosOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.AudioMixer.StereosOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.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.AT1101.AudioRePlay.PlayerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "players",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.AudioRePlay.PlayerAsNamedTableRow(raw),
      );
    }
    get delays() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "AudioRePlay::Data::Delay",
        VAPI.AT1101.AudioRePlay.DelayAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "delays",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioRePlay.Buffer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.AudioRePlay.Buffer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.AudioRePlay.Buffer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.AudioRePlay.Buffer
      >(
        this,
        "measurement_reference" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.AudioRePlay.Buffer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number, number, number],
        null | VAPI.AudioRePlay.BufferCurrentDelay,
        VAPI.AT1101.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.AT1101.AudioRePlay.Delay
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioRePlay.DelayIssues,
        VAPI.AT1101.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.AT1101.AudioRePlay.Delay
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.AudioRePlay.Delay
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.AudioRePlay.lift.DelayInputs(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "inputs"),
      );
    }
    get outputs() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioRePlay::Data::DelayOutput",
        VAPI.AT1101.AudioRePlay.DelayOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 6, "outputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.AudioRePlay.DelayOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.AudioRePlay.DelayOutput
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get delay() {
      return VAPI.AT1101.AudioRePlay.lift.Buffer(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "delay"),
      );
    }
    get afv() {
      return VAPI.AudioRePlay.lift.AFVRef(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "afv"),
      );
    }
    get dolby_e() {
      return VAPI.AudioRePlay.lift.DolbyERef(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "dolby_e"),
      );
    }
    get reader() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioRePlay::Data::Reader",
        VAPI.AudioRePlay.Reader
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 4, "reader"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AudioRePlay.lift.Reader(raw),
      );
    }
    get audio() {
      return VAPI.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "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.AT1101.AudioRePlay.Player
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AudioRePlay.PlayerIssues,
        VAPI.AT1101.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.AT1101.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.AT1101.AudioRePlay.Player
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.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.AT1101.AudioRePlay.PlayerOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.AudioRePlay.PlayerOutput
      >(this, "active" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get control() {
      return VAPI.AudioRePlay.lift.Control(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "control"),
      );
    }
    get reader() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "AudioRePlay::Data::Reader",
        VAPI.AudioRePlay.Reader
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "reader"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AudioRePlay.lift.Reader(raw),
      );
    }
    get audio() {
      return VAPI.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "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.AT1101.AudioRePlay.Player,
      | null
      | (VScript.Referenceable<"AudioRePlay::Data::Player"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.AudioRePlay.RelationAudio
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.AudioRePlay.Player,
        | null
        | (VScript.Referenceable<"AudioRePlay::Data::Player"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.AudioRePlay.RelationAudio
      >(
        this,
        "leader" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.AudioRePlay.RelationAudioFollowers
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "followers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.VideoPlayer.Player,
      | null
      | (VScript.Referenceable<"VideoPlayer::Data::Player"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.AudioRePlay.RelationVideo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.VideoPlayer.Player,
        | null
        | (VScript.Referenceable<"VideoPlayer::Data::Player"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.AudioRePlay.RelationVideo
      >(
        this,
        "leader" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.AudioRePlay.RelationVideoFollowers
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "followers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.AudioRePlay.lift.RelationVideo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.AudioRePlay.Time
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.AudioRePlay.Time
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.AudioRePlay.Player,
      VAPI.AT1101.AudioRePlay.RelationAudioFollowers
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.AudioRePlay.Player,
        VAPI.AT1101.AudioRePlay.RelationAudioFollowers
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.VideoPlayer.Player,
      VAPI.AT1101.AudioRePlay.RelationVideoFollowers
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.VideoPlayer.Player,
        VAPI.AT1101.AudioRePlay.RelationVideoFollowers
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.AudioRePlay.DelayInputs
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.AudioRePlay.DelayInputs
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.AudioRePlay.DelayInputs
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.AudioShuffler.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | VScript.Duration,
        null | VScript.Duration,
        VAPI.AT1101.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.AT1101.AudioShuffler.ShufflerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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 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.AT1101.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.AT1101.Audio.Essence,
        | null
        | [
            null | string,
            number,
            boolean,
            [number, number, number, number, number],
          ],
        null | VAPI.Audio.Channel
      >>,
      VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
          | null
          | [
              null | string,
              number,
              boolean,
              [number, number, number, number, number],
            ],
          null | VAPI.Audio.Channel
        >>,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.AudioShuffler.Shuffler
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | VScript.Duration,
        null | VScript.Duration,
        VAPI.AT1101.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.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "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),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    OUT: (_x: OUT) => _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 signal_aggregate() {
      return VAPI.AT1101.AudioSignalGenerator.lift.OUT(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          0,
          "signal_aggregate",
        ),
      );
    }
    get signal_silence() {
      return VAPI.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "signal_silence",
        ),
      );
    }
    get signal_400hz() {
      return VAPI.AT1101.AudioSignalGenerator.lift.OUT(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "signal_400hz"),
      );
    }
    get signal_440hz() {
      return VAPI.AT1101.AudioSignalGenerator.lift.OUT(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "signal_440hz"),
      );
    }
    get signal_1000hz() {
      return VAPI.AT1101.AudioSignalGenerator.lift.OUT(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "signal_1000hz"),
      );
    }
    get source_slice() {
      return VAPI.Audio.lift.SignalSourceSlice(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "source_slice"),
      );
    }
    get output_alsa() {
      return VAPI.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "output_alsa"),
      );
    }
    get source_slice_alsa() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::SignalSourceSlice",
        VAPI.Audio.SignalSourceSlice
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          7,
          "source_slice_alsa",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.Audio.lift.SignalSourceSlice(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.AT1101.AudioSignalGenerator.OUT
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Audio.Level,
        VAPI.Audio.Level,
        VAPI.Audio.Level,
        VAPI.Audio.Level,
        VAPI.AT1101.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.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "output"),
      );
    }
  }
}
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.AT1101.Cluster.lift.ClusterGlobal(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "global"),
      );
    }
    get local() {
      return VAPI.AT1101.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.AT1101.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.AT1101.Cluster.ClusterGlobalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.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.AT1101.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          4,
          "monitoring_objects",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntime,
      VAPI.AT1101.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.ClusterSources.ClusterAudioSourceRuntime,
        VAPI.AT1101.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntime
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [boolean, boolean, boolean, boolean, boolean, boolean],
        VAPI.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntimeAlarms,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime,
      VAPI.AT1101.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.ClusterSources.ClusterMetadataSourceRuntime,
        VAPI.AT1101.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntime
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [boolean, boolean, boolean, boolean],
        VAPI.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntimeAlarms,
        VAPI.AT1101.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.AT1101.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ClusterMonitoringObjects.SeverityLevel,
        VAPI.AT1101.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.AT1101.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 2, "video"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.ClusterMonitoringObjects.lift.ClusterVideoMonitoringObjectRuntime(
            st,
          ),
      );
    }
    get audio() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "ClusterMonitoringObjects::Data::ClusterAudioMonitoringObjectRuntime",
        VAPI.AT1101.ClusterMonitoringObjects.ClusterAudioMonitoringObjectRuntime
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 3, "audio"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.ClusterMonitoringObjects.lift.ClusterAudioMonitoringObjectRuntime(
            st,
          ),
      );
    }
    get metadata() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "ClusterMonitoringObjects::Data::ClusterMetadataMonitoringObjectRuntime",
        VAPI.AT1101.ClusterMonitoringObjects.ClusterMetadataMonitoringObjectRuntime
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          4,
          "metadata",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.ClusterMonitoringObjects.ClusterMonitoringObjectGlobalConfiguration,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime,
      VAPI.AT1101.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.ClusterSources.ClusterVideoSourceRuntime,
        VAPI.AT1101.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [boolean, boolean, boolean, boolean, boolean],
        VAPI.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntimeAlarms,
        VAPI.AT1101.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.AT1101.ClusterMonitoringObjects.ClusterVideoMonitoringObjectRuntime
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.ClusterMonitoringObjects.TUnsignedMax,
        VAPI.ClusterMonitoringObjects.TUnsignedMax,
        VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          0,
          "local_sources",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime,
      VAPI.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.ClusterSources.ClusterVideoSourceRuntime,
        VAPI.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.Ports,
        null | VAPI.ClusterSources.Ports,
        VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.Ports,
        null | VAPI.ClusterSources.Ports,
        VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.Ports,
        null | VAPI.ClusterSources.Ports,
        VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.Ports,
        null | VAPI.ClusterSources.Ports,
        VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntimeSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.ClusterProcessors.lift.ClusterProcessorsMipMapsRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "mipmaps"),
      );
    }
    get metadata() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterProcessors::Data::ClusterProcessorsMetadataRuntime",
        VAPI.AT1101.ClusterProcessors.ClusterProcessorsMetadataRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "metadata",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime,
      VAPI.AT1101.ClusterProcessors.ClusterProcessorsMetadataRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.ClusterSources.ClusterMetadataSourceRuntime,
        VAPI.AT1101.ClusterProcessors.ClusterProcessorsMetadataRuntime
      >(this, "source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.ClusterProcessors.ClusterProcessorMipMapsDualOutputRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 0, "outputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.SourceTransportFormat,
        null | VAPI.ClusterSources.SourceTransportFormat,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.ClusterSources.ClusterIPSourceConfiguration,
        VAPI.AT1101.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.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.ClusterSources.TUnsignedMax,
        VAPI.ClusterSources.TUnsignedMax,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.Audio.Essence,
      VAPI.AT1101.ClusterSources.ClusterAudioSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.Audio.Essence,
        VAPI.AT1101.ClusterSources.ClusterAudioSourceRuntimeLocal
      >(this, "audio_essence" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterAudioSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceLocalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.Time.Source,
      VAPI.AT1101.ClusterSources.ClusterMetadataSourceLocalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.Time.Source,
        VAPI.AT1101.ClusterSources.ClusterMetadataSourceLocalRuntime
      >(this, "time_source" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceLocalRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.Video.ClosedCaption,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ClusterSources.MetadataSourceID,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.SourceTransportFormat,
        null | VAPI.ClusterSources.SourceTransportFormat,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.ClusterSources.ClusterIPSourceConfiguration,
        VAPI.AT1101.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.AT1101.ClusterSources.lift.ClusterMetadataSourceLocalRuntime(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 8, "local"),
      );
    }
    get lifeness_count(): VScript.rKeyword<
      VScript.VSocket,
      number,
      number,
      VAPI.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterMetadataSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          null | VScript.TimecodePayload,
          null | VScript.TimecodePayload,
          null | VScript.TimecodePayload,
        ],
        VAPI.ClusterSources.TimestampedTimecode,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 0, "video"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.ClusterSources.lift.ClusterVideoSourceRuntime(raw),
      );
    }
    get audio() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterSources::Data::ClusterAudioSourceRuntime",
        VAPI.AT1101.ClusterSources.ClusterAudioSourceRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 1, "audio"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.ClusterSources.lift.ClusterAudioSourceRuntime(raw),
      );
    }
    get metadata() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "ClusterSources::Data::ClusterMetadataSourceRuntime",
        VAPI.AT1101.ClusterSources.ClusterMetadataSourceRuntime
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "metadata",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ClusterSources.VideoSourceID,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.ClusterSources.SourceTransportFormat,
        null | VAPI.ClusterSources.SourceTransportFormat,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.ClusterSources.ClusterIPSourceConfiguration,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.ClusterSources.TUnsignedMax,
        VAPI.ClusterSources.TUnsignedMax,
        VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.Video.Essence,
      VAPI.AT1101.ClusterSources.ClusterVideoSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        VAPI.AT1101.ClusterSources.ClusterVideoSourceRuntimeLocal
      >(this, "video_essence" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.ClusterSources.ClusterVideoSourceRuntimeLocal
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.ColorCorrection.CC1DAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "cc1d",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.ColorCorrection.CC1DAsNamedTableRow(raw),
      );
    }
    get cc3d() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "ColorCorrection::Data::CC3D",
        VAPI.AT1101.ColorCorrection.CC3DAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "cc3d",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.ColorCorrection.CC1D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.ColorCorrection.CC1D
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.ColorCorrection.CC1D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.ColorCorrection.CC1D
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.ColorCorrection.CC1D
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ColorCorrection.CC1DIssues,
        VAPI.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.ColorCorrection.CC3D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.ColorCorrection.CC3D
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.ColorCorrection.CC3D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.ColorCorrection.CC3D
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.ColorCorrection.ColorSchema,
        VAPI.AT1101.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.AT1101.ColorCorrection.CC3D
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1101.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.AT1101.ColorCorrection.CC3D
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.ColorCorrection.CC3DIssues,
        VAPI.AT1101.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.AT1101.Definitions.lift.TimecodeInserterFreerunEnable(
          _raw[0],
          _socket,
        ),
        initial_timecode:
          VAPI.AT1101.Definitions.lift.TimecodeInserterFreerunInitialTimecode(
            _raw[1],
            _socket,
          ),
      };
    },
    TimecodeInserterGenerator: (
      _raw: [[boolean, boolean], null | string],
      _socket: VScript.VSocket,
    ): TimecodeInserterGenerator => {
      return {
        enable: VAPI.AT1101.Definitions.lift.TimecodeInserterGeneratorEnable(
          _raw[0],
          _socket,
        ),
        t_src:
          _raw[1] === null
            ? null
            : new VAPI.AT1101.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.AT1101.Definitions.lift.TimecodeInserterPassthrough(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "Blank",
            value: VAPI.AT1101.Definitions.lift.TimecodeInserterBlank(
              _raw[1],
              _socket,
            ),
          };
        case 2:
          return {
            variant: "Freerun",
            value: VAPI.AT1101.Definitions.lift.TimecodeInserterFreerun(
              _raw[1],
              _socket,
            ),
          };
        case 3:
          return {
            variant: "Generator",
            value: VAPI.AT1101.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.AT1101.Definitions.TimecodeInserterFreerunEnable;
        initial_timecode: VAPI.AT1101.Definitions.TimecodeInserterFreerunInitialTimecode;
      },
      _socket: VScript.VSocket,
    ): [[boolean, boolean], [number, number, number, number]] => [
      VAPI.AT1101.Definitions.lower.TimecodeInserterFreerunEnable(
        _x.enable,
        _socket,
      ),
      VAPI.AT1101.Definitions.lower.TimecodeInserterFreerunInitialTimecode(
        _x.initial_timecode,
        _socket,
      ),
    ],
    TimecodeInserterGenerator: (
      _x: {
        enable: VAPI.AT1101.Definitions.TimecodeInserterGeneratorEnable;
        t_src: null | VAPI.AT1101.Time.Source;
      },
      _socket: VScript.VSocket,
    ): [[boolean, boolean], null | string] => [
      VAPI.AT1101.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.AT1101.Definitions.TimecodeInserterPassthrough;
          }
        | {
            variant: "Blank";
            value: VAPI.AT1101.Definitions.TimecodeInserterBlank;
          }
        | {
            variant: "Freerun";
            value: VAPI.AT1101.Definitions.TimecodeInserterFreerun;
          }
        | {
            variant: "Generator";
            value: VAPI.AT1101.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.AT1101.Definitions.lower.TimecodeInserterPassthrough(
              _x.value,
              _socket,
            ),
          ];
        case "Blank":
          return [
            1,
            VAPI.AT1101.Definitions.lower.TimecodeInserterBlank(
              _x.value,
              _socket,
            ),
          ];
        case "Freerun":
          return [
            2,
            VAPI.AT1101.Definitions.lower.TimecodeInserterFreerun(
              _x.value,
              _socket,
            ),
          ];
        case "Generator":
          return [
            3,
            VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Audio.TimedSource,
      VAPI.AT1101.Audio.TimedSource,
      VAPI.AT1101.Definitions.AudioControl
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1101.Audio.TimedSource,
        VAPI.AT1101.Audio.TimedSource,
        VAPI.AT1101.Definitions.AudioControl
      >(
        this,
        "source" as VScript.SysName,
        {
          lift: VAPI.AT1101.Audio.lift.TimedSource,
          lower: VAPI.AT1101.Audio.lower.TimedSource,
        },
        {
          lift: VAPI.AT1101.Audio.lift.TimedSource,
          lower: VAPI.AT1101.Audio.lower.TimedSource,
        },
        null,
      );
    }
  }
  export interface TimecodeInserterBlank {}
  export interface TimecodeInserterFreerun {
    enable: VAPI.AT1101.Definitions.TimecodeInserterFreerunEnable;
    initial_timecode: VAPI.AT1101.Definitions.TimecodeInserterFreerunInitialTimecode;
  }
  export interface TimecodeInserterGenerator {
    enable: VAPI.AT1101.Definitions.TimecodeInserterGeneratorEnable;
    t_src: null | VAPI.AT1101.Time.Source;
  }
  export interface TimecodeInserterPassthrough {}
  export type TimecodeInserter =
    | {
        variant: "Passthrough";
        value: VAPI.AT1101.Definitions.TimecodeInserterPassthrough;
      }
    | { variant: "Blank"; value: VAPI.AT1101.Definitions.TimecodeInserterBlank }
    | {
        variant: "Freerun";
        value: VAPI.AT1101.Definitions.TimecodeInserterFreerun;
      }
    | {
        variant: "Generator";
        value: VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Definitions.TimecodeInserter,
      VAPI.AT1101.Definitions.TimecodeInserter,
      VAPI.AT1101.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.AT1101.Definitions.TimecodeInserter,
        VAPI.AT1101.Definitions.TimecodeInserter,
        VAPI.AT1101.Definitions.VancControl
      >(
        this,
        "timecode_inserter" as VScript.SysName,
        {
          lift: VAPI.AT1101.Definitions.lift.TimecodeInserter,
          lower: VAPI.AT1101.Definitions.lower.TimecodeInserter,
        },
        {
          lift: VAPI.AT1101.Definitions.lift.TimecodeInserter,
          lower: VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Definitions.VancControl
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | VAPI.Primitives.Unsigned32,
        null | VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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>) {}
    get tx_cpu(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1101.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.EthernetStats.PortStatistics
      >(this, "tx_cpu" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get rx_unicast(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1101.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.EthernetStats.PortStatistics
      >(this, "rx_unicast" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get rx_broadcast(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1101.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.EthernetStats.PortStatistics
      >(this, "rx_broadcast" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get rx_multicast(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1101.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.EthernetStats.PortStatistics
      >(this, "rx_multicast" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get rx_crc_error(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1101.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.EthernetStats.PortStatistics
      >(this, "rx_crc_error" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get rx_wrong_vlan(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1101.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.EthernetStats.PortStatistics
      >(this, "rx_wrong_vlan" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get rx_error(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1101.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.EthernetStats.PortStatistics
      >(this, "rx_error" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get rx_too_long(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1101.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.EthernetStats.PortStatistics
      >(this, "rx_too_long" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get rx_too_short(): VScript.rKeyword<
      VScript.VSocket,
      [number, number, number, number],
      VAPI.EthernetStats.Counter,
      VAPI.AT1101.EthernetStats.PortStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.EthernetStats.PortStatistics
      >(this, "rx_too_short" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
  }
}
export namespace Genlock {
  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<"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 state(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.Servos.State,
      VAPI.Servos.State,
      VAPI.AT1101.Genlock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.Servos.State,
        VAPI.Servos.State,
        VAPI.AT1101.Genlock.All
      >(this, "state" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get analog_ref_mgmt() {
      return VAPI.AT1101.Time.lift.AnalogReference(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "analog_ref_mgmt",
        ),
      );
    }
    get output() {
      return VAPI.AT1101.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 namespace IOModule {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    TimingAsynchronous: (
      _raw: [],
      _socket: VScript.VSocket,
    ): TimingAsynchronous => {
      return {};
    },
    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),
    SDIInput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SDIInput(_raw),
    SDIOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new SDIOutput(_raw),
    TimingSynchronousOrSyntonous: (
      _raw: [],
      _socket: VScript.VSocket,
    ): TimingSynchronousOrSyntonous => {
      return {};
    },
    Timing: (_raw: [0, []] | [1, []], _socket: VScript.VSocket): Timing => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "SynchronousOrSyntonous",
            value: VAPI.AT1101.IOModule.lift.TimingSynchronousOrSyntonous(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "Asynchronous",
            value: VAPI.AT1101.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),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    TimingAsynchronous: (_x: {}, _socket: VScript.VSocket): [] => [],
    HwStatus: (_x: HwStatus) => _x.raw.kwl,
    MADIInput: (_x: MADIInput) => _x.raw.kwl,
    SDIPayload: (_x: SDIPayload) => _x.raw.kwl,
    SDIInput: (_x: SDIInput) => _x.raw.kwl,
    SDIOutput: (_x: SDIOutput) => _x.raw.kwl,
    TimingSynchronousOrSyntonous: (_x: {}, _socket: VScript.VSocket): [] => [],
    Timing: (
      _x:
        | {
            variant: "SynchronousOrSyntonous";
            value: VAPI.AT1101.IOModule.TimingSynchronousOrSyntonous;
          }
        | {
            variant: "Asynchronous";
            value: VAPI.AT1101.IOModule.TimingAsynchronous;
          },
      _socket: VScript.VSocket,
    ): [0, []] | [1, []] => {
      switch (_x.variant) {
        case "SynchronousOrSyntonous":
          return [
            0,
            VAPI.AT1101.IOModule.lower.TimingSynchronousOrSyntonous(
              _x.value,
              _socket,
            ),
          ];
        case "Asynchronous":
          return [
            1,
            VAPI.AT1101.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,
  } 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.AT1101.Time.Source
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "analog_ref",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.IOModule.Merger
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 4, "merger"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.IOModule.lift.Merger(raw),
      );
    }
    get output() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::Output",
        VAPI.AT1101.IOModule.Output
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 5, "output"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.IOModule.lift.Output(raw),
      );
    }
    get input() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::Input",
        VAPI.AT1101.IOModule.Input
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 6, "input"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.IOModule.lift.Input(raw),
      );
    }
    get sync_output() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "IOModule::Data::SyncOutput",
        VAPI.AT1101.IOModule.SyncOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          7,
          "sync_output",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.IOModule.lift.SyncOutput(raw),
      );
    }
  }
  export interface TimingAsynchronous {}
  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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, Array<number>],
        null | VAPI.Video.TimestampedSignature,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.IOModule.DecoderGroupPhyRxLockedStatus,
        null | VAPI.IOModule.DecoderGroupPhyRxLockedStatus,
        VAPI.AT1101.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_ready(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.IOModule.DecoderGroupPhyRxReady,
      null | VAPI.IOModule.DecoderGroupPhyRxReady,
      VAPI.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.IOModule.DecoderGroupPhyRxReady,
        null | VAPI.IOModule.DecoderGroupPhyRxReady,
        VAPI.AT1101.IOModule.HwStatus
      >(this, "phy_rx_ready" 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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.IOModule.DecoderGroupPhyRxCalibrateBusy,
        null | VAPI.IOModule.DecoderGroupPhyRxCalibrateBusy,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1101.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 phy_rx_ready_changed(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.CyclicCounter16,
      VAPI.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1101.IOModule.HwStatus
      >(this, "phy_rx_ready_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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.SubStream2SI,
        null | VAPI.Video.SubStream2SI,
        VAPI.AT1101.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.AT1101.IOModule.HwStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.SubStream,
        null | VAPI.Video.SubStream,
        VAPI.AT1101.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.AT1101.IOModule.lift.HwStatusEye(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 21, "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.AT1101.IOModule.MADIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.IOModule.MADIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.SaturatingCounter16,
        VAPI.AT1101.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.AT1101.IOModule.MADIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.SaturatingCounter16,
        VAPI.AT1101.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.AT1101.IOModule.MADIInput
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.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.AT1101.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return VAPI.AT1101.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.AT1101.IOModule.SDIPayload
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [VAPI.Video.AspectRatio, number, number, number, number, number],
        null | VAPI.Video.AFD,
        VAPI.AT1101.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 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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.IOModule.SDIInput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.IOModule.Audio12GMode,
        VAPI.IOModule.Audio12GMode,
        VAPI.IOModule.Audio12GMode,
        VAPI.IOModule.Audio12GMode,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.IOModule.SDIInput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.Video.CEA608Field,
        VAPI.Video.CEA608Field,
        VAPI.Video.CEA608Field,
        VAPI.Video.CEA608Field,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.IOModule.lift.HwStatus(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "hw_status"),
      );
    }
    get output() {
      return VAPI.AT1101.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.AT1101.IOModule.SDIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.Video.BNCInputFreq,
        VAPI.Video.BNCInputFreq,
        VAPI.AT1101.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.AT1101.IOModule.SDIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.IOModule.SDIInput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        Array<boolean>,
        VScript.MaybeSparseArray<boolean>,
        VAPI.AT1101.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.AT1101.IOModule.SDIInput
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          12,
          "metadata_extractor",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.MetadataProcessor.lift.MetadataExtractor(raw),
      );
    }
    /**
    This keyword is used for the DMV application only. It is used to set the
    video standard for the DMV.
  */

    get constraints() {
      return VAPI.IOModule.lift.Constraints(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 13, "constraints"),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1101.IOModule.SDIInputIssues,
      VAPI.AT1101.IOModule.SDIInput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1101.IOModule.SDIInputIssues,
        VAPI.AT1101.IOModule.SDIInput
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1101.IOModule.SDIInputIssues => ({
          mismatching_constraint_standard: (x & 1) !== 0,
        }),
        lower: (
          x: VAPI.AT1101.IOModule.SDIInputIssues,
          _: VScript.VSocket,
        ): number => (x.mismatching_constraint_standard ? 1 : 0),
      });
    }
  }
  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.AT1101.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.SubStream,
        null | VAPI.Video.SubStream,
        VAPI.AT1101.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.AT1101.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.IOModule.SDIOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.IOModule.SDIOutput
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.IOModule.SDIOutput,
          command: null | VAPI.AT1101.Time.Source,
        ) => (
          void parent,
          void command,
          {
            criterion: "status",
            validator: (status: null | VAPI.AT1101.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.AT1101.Video.TimedSource,
      VAPI.AT1101.Video.TimedSource,
      VAPI.AT1101.IOModule.SDIOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1101.Video.TimedSource,
        VAPI.AT1101.Video.TimedSource,
        VAPI.AT1101.IOModule.SDIOutput
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VAPI.AT1101.Video.lift.TimedSource,
          lower: VAPI.AT1101.Video.lower.TimedSource,
        },
        {
          lift: VAPI.AT1101.Video.lift.TimedSource,
          lower: VAPI.AT1101.Video.lower.TimedSource,
        },
        null,
      );
    }
    get phase_target(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1101.IOModule.SDIOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.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.AT1101.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1101.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.AT1101.IOModule.SDIOutputIssues,
      VAPI.AT1101.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1101.IOModule.SDIOutputIssues,
        VAPI.AT1101.IOModule.SDIOutput
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1101.IOModule.SDIOutputIssues => ({
          input_out_of_linephaser_range: (x & 1) !== 0,
          no_12g_support: (x & 2) !== 0,
          std_mismatch: (x & 4) !== 0,
        }),
        lower: (
          x: VAPI.AT1101.IOModule.SDIOutputIssues,
          _: VScript.VSocket,
        ): number =>
          (x.input_out_of_linephaser_range ? 1 : 0) |
          (x.no_12g_support ? 2 : 0) |
          (x.std_mismatch ? 4 : 0),
      });
    }
    get vanc_control() {
      return VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.IOModule.SDIOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number | string,
        null | VAPI.Primitives.Timestamp,
        VAPI.AT1101.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.AT1101.Video.Essence | VAPI.AT1101.Video.TimedSource | null,
      pars?: { timeout?: VScript.Duration },
    ) {
      const options =
        pars?.timeout !== undefined ? { timeout: pars.timeout } : {};
      if (x === null || x instanceof VAPI.AT1101.Video.Essence) {
        await this.v_src.command.write(
          {
            source: x as null | VAPI.AT1101.Video.Essence, // FIXME: do we really need this cast?
            switch_time: null,
          },
          options,
        );
      } else {
        await this.v_src.command.write(x, options);
      }
    }
  }
  export interface TimingSynchronousOrSyntonous {}
  export type Timing =
    | {
        variant: "SynchronousOrSyntonous";
        value: VAPI.AT1101.IOModule.TimingSynchronousOrSyntonous;
      }
    | {
        variant: "Asynchronous";
        value: VAPI.AT1101.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.AT1101.IOModule.HwStatusEye
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.IOModule.HwStatusEye
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.IOModule.HwStatusEye
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.IOModule.HwStatusEye
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.IOModule.HwStatusEye
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.IOModule.HwStatusEye
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.IOModule.HwStatusEye
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | number, null | number],
        VAPI.IOModule.EyeShape,
        VAPI.AT1101.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.AT1101.IOModule.Input
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.AT1101.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, []] | [1, []],
      [0, []] | [1, []],
      VAPI.AT1101.IOModule.Timing,
      VAPI.AT1101.IOModule.Timing,
      VAPI.AT1101.IOModule.Input
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [0, []] | [1, []],
        [0, []] | [1, []],
        VAPI.AT1101.IOModule.Timing,
        VAPI.AT1101.IOModule.Timing,
        VAPI.AT1101.IOModule.Input
      >(
        this,
        "audio_timing" as VScript.SysName,
        {
          lift: VAPI.AT1101.IOModule.lift.Timing,
          lower: VAPI.AT1101.IOModule.lower.Timing,
        },
        {
          lift: VAPI.AT1101.IOModule.lift.Timing,
          lower: VAPI.AT1101.IOModule.lower.Timing,
        },
        null,
      );
    }
    get sdi() {
      return VAPI.AT1101.IOModule.lift.SDIInput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "sdi"),
      );
    }
    get madi() {
      return VAPI.AT1101.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 SDIInputIssues = { mismatching_constraint_standard: boolean };
  export type SDIOutputIssues = {
    input_out_of_linephaser_range: boolean;
    no_12g_support: boolean;
    std_mismatch: 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.AT1101.IOModule.Merger
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.IOModule.MergerOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "output"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.IOModule.Output
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.IOModule.SDIMADIMode,
        VAPI.AT1101.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.AT1101.IOModule.Output
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter32,
        VAPI.AT1101.IOModule.Output
      >(this, "resync_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Output FIFO latency
  */
    get fifo_latency(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1101.IOModule.Output
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.IOModule.Output
      >(this, "fifo_latency" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftSeconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerSeconds,
        ),
      });
    }
    get sdi() {
      return VAPI.AT1101.IOModule.lift.SDIOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "sdi"),
      );
    }
    get madi() {
      return VAPI.IOModule.lift.MADIOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "madi"),
      );
    }
    get a_src(): VScript.dKeyword<
      VScript.VSocket,
      [null | string, null | number | string],
      [null | string, null | number | string],
      VAPI.AT1101.Audio.TimedSource,
      VAPI.AT1101.Audio.TimedSource,
      VAPI.AT1101.IOModule.Output
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1101.Audio.TimedSource,
        VAPI.AT1101.Audio.TimedSource,
        VAPI.AT1101.IOModule.Output
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VAPI.AT1101.Audio.lift.TimedSource,
          lower: VAPI.AT1101.Audio.lower.TimedSource,
        },
        {
          lift: VAPI.AT1101.Audio.lift.TimedSource,
          lower: VAPI.AT1101.Audio.lower.TimedSource,
        },
        null,
      );
    }
    get peak_meter(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Audio.PeakMeter>,
      VAPI.AT1101.IOModule.Output
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1101.IOModule.Output
      >(this, "peak_meter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  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.AT1101.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "Audio::Data::Essence",
        VAPI.AT1101.Audio.Essence
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 1, "audio"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.Audio.lift.Essence(st),
      );
    }
    get ptp_traits() {
      return VAPI.PTP.lift.Traits(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "ptp_traits"),
      );
    }
  }
  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.AT1101.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.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.IOModule.SyncOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.IOModule.SyncOutput
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.IOModule.SyncOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter32,
        VAPI.AT1101.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.AT1101.IOModule.SyncOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter32,
        VAPI.AT1101.IOModule.SyncOutput
      >(this, "resync_counter" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Output FIFO latency
  */
    get fifo_latency(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.AT1101.IOModule.SyncOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.IOModule.SyncOutput
      >(this, "fifo_latency" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.liftSeconds,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VScript.VAPIHelpers.lowerSeconds,
        ),
      });
    }
  }
}
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.AT1101.J2KDecoder.J2KDecoderChannelAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "decoders",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.J2KDecoder.J2KDecoderVideoRuntime
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.Video.Standard,
        VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.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.AT1101.MasterClock.GPSReceiver
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "gps_receivers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.MasterClock.lift.GPSReceiver(raw),
      );
    }
    get ltc_generators() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "MasterClock::Data::LTCGenerator",
        VAPI.AT1101.MasterClock.LTCGeneratorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "ltc_generators",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number],
        null | VAPI.MasterClock.GPSReceiverDate,
        VAPI.AT1101.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.AT1101.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number],
        null | VAPI.MasterClock.GPSReceiverTimeOfDay,
        VAPI.AT1101.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.AT1101.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.MasterClock.GPSReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.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.AT1101.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.MasterClock.Timezone,
        VAPI.MasterClock.Timezone,
        VAPI.MasterClock.Timezone,
        VAPI.MasterClock.Timezone,
        VAPI.AT1101.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.AT1101.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [number, number],
        [number, number],
        VAPI.MasterClock.TimezoneOffset,
        VAPI.MasterClock.TimezoneOffset,
        VAPI.AT1101.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.AT1101.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.MasterClock.TimecodeRate,
        VAPI.MasterClock.TimecodeRate,
        VAPI.MasterClock.TimecodeRate,
        VAPI.MasterClock.TimecodeRate,
        VAPI.AT1101.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.AT1101.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.AT1101.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.AT1101.MasterClock.LTCGenerator
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.MasterClock.LTCGenerator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.MasterClock.LTCGenerator
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.MetadataProcessor.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.MetadataProcessor.ChannelState,
        VAPI.MetadataProcessor.ChannelState,
        VAPI.AT1101.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.AT1101.MetadataProcessor.Response
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "responses",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.MetadataProcessor.MetadataExtractorExtractorType,
        null | VAPI.MetadataProcessor.MetadataExtractorExtractorType,
        VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1101.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.AT1101.Time.Source,
      VAPI.AT1101.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.Time.Source,
        VAPI.AT1101.MetadataProcessor.MetadataExtractor
      >(this, "media_clock" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.MetadataProcessor.RTPIndex,
        VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataInserter
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1101.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.AT1101.Time.Source,
      VAPI.AT1101.MetadataProcessor.MetadataInserter
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.Time.Source,
        VAPI.AT1101.MetadataProcessor.MetadataInserter
      >(this, "media_clock" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor,
      | null
      | (VScript.Referenceable<"MetadataProcessor::Data::MetadataExtractor"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.MetadataProcessor.MetadataInserter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.MetadataProcessor.MetadataExtractor,
        | null
        | (VScript.Referenceable<"MetadataProcessor::Data::MetadataExtractor"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.MetadataProcessor.MetadataInserter
      >(
        this,
        "src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor,
      VAPI.AT1101.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.MetadataProcessor.MetadataExtractor,
        VAPI.AT1101.MetadataProcessor.Request
      >(this, "src" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataInserter,
      VAPI.AT1101.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.MetadataProcessor.MetadataInserter,
        VAPI.AT1101.MetadataProcessor.Request
      >(this, "dst" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.MetadataProcessor.Request
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            VAPI.MetadataProcessor.OnChecksumError,
            null | number,
            null | number,
          ],
        null | VAPI.MetadataProcessor.FinePrint,
        VAPI.AT1101.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.AT1101.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor,
      VAPI.AT1101.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.MetadataProcessor.MetadataExtractor,
        VAPI.AT1101.MetadataProcessor.Response
      >(this, "src" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataInserter,
      VAPI.AT1101.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.MetadataProcessor.MetadataInserter,
        VAPI.AT1101.MetadataProcessor.Response
      >(this, "dst" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            VAPI.MetadataProcessor.OnChecksumError,
            null | number,
            null | number,
          ],
        null | VAPI.MetadataProcessor.FinePrint,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.MetadataProcessor.Response
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number, number],
        null | VAPI.Time.TimestampedOffset,
        VAPI.AT1101.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.AT1101.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.AT1101.Monitoring.AudioPhaseCorrelationAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          3,
          "correlation",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.Monitoring.AudioPhaseCorrelationAsNamedTableRow(raw),
      );
    }
    get loudness() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "Monitoring::Data::AudioLoudness",
        VAPI.AT1101.Monitoring.AudioLoudnessAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "loudness",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.Monitoring.AudioLoudness
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.Monitoring.AudioLoudness
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.Monitoring.AudioLoudness
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Monitoring.LoudnessMode,
        VAPI.Monitoring.LoudnessMode,
        VAPI.Monitoring.LoudnessMode,
        VAPI.Monitoring.LoudnessMode,
        VAPI.AT1101.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.AT1101.Monitoring.AudioLoudness
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1101.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.AT1101.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.Monitoring.AudioLoudness
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.Monitoring.AudioLoudness
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.Monitoring.AudioPhaseCorrelation
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.Monitoring.AudioPhaseCorrelation
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.Monitoring.AudioPhaseCorrelation
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.Monitoring.AudioPhaseCorrelation
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Audio.PeakMeter>,
        VAPI.AT1101.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.AT1101.Monitoring.AudioPhaseCorrelation
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<number>,
        VAPI.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.Monitoring.LiveView
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.Monitoring.LiveView
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.Monitoring.LiveView
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.Monitoring.LiveView
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, Array<number>],
        null | VAPI.Video.TimestampedSignature,
        VAPI.AT1101.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.AT1101.Video.Essence
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 2, "outputs"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.Video.lift.Essence(st),
      );
    }
  }
}
export namespace NetworkInterfaces {
  export const lift = {
    All: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new All(_raw),
    LaneStatistics: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new LaneStatistics(_raw),
    Port: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) => new Port(_raw),
  } as const;
  export const lower = {
    All: (_x: All) => _x.raw.kwl,
    LaneStatistics: (_x: LaneStatistics) => _x.raw.kwl,
    Port: (_x: Port) => _x.raw.kwl,
  } as const;
  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.AT1101.NetworkInterfaces.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.All
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 4, "ports"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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<"AT1101", "write">
        | LiteralNetworkConfig<"AT1101", "write">,
    ) {
      return await do_upload_config(this.raw.backing_store, nc);
    }
  }
  export type Lane =
    | "P1_0"
    | "P1_1"
    | "P1_2"
    | "P1_3"
    | "P2_0"
    | "P2_1"
    | "P2_2"
    | "P2_3";
  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.AT1101.NetworkInterfaces.Lane,
      null | VAPI.AT1101.NetworkInterfaces.Lane,
      VAPI.AT1101.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.AT1101.NetworkInterfaces.Lane,
        null | VAPI.AT1101.NetworkInterfaces.Lane,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.NetworkInterfaces.LaneStatistics
      >(this, "tx_all_streams" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get locked_to_data(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.NetworkInterfaces.LaneStatistics
      >(this, "locked_to_data" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get block_lock(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.NetworkInterfaces.LaneStatistics
      >(this, "block_lock" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get high_ber(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.NetworkInterfaces.LaneStatistics
      >(this, "high_ber" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get bip_errors(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned64,
      VAPI.AT1101.NetworkInterfaces.LaneStatistics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.Primitives.Unsigned64,
        VAPI.AT1101.NetworkInterfaces.LaneStatistics
      >(this, "bip_errors" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get eye() {
      return VAPI.NetworkInterfaces.lift.EyeDiagram(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 9, "eye"),
      );
    }
  }
  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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.Primitives.NetworkPortID,
      null | VAPI.AT1101.Primitives.NetworkPortID,
      VAPI.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.AT1101.Primitives.NetworkPortID,
        null | VAPI.AT1101.Primitives.NetworkPortID,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.PortMode,
      null | VAPI.AT1101.NetworkInterfaces.PortMode,
      null | VAPI.AT1101.NetworkInterfaces.PortMode,
      null | VAPI.AT1101.NetworkInterfaces.PortMode,
      VAPI.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | VAPI.AT1101.NetworkInterfaces.PortMode,
        null | VAPI.AT1101.NetworkInterfaces.PortMode,
        null | VAPI.AT1101.NetworkInterfaces.PortMode,
        null | VAPI.AT1101.NetworkInterfaces.PortMode,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.NetworkInterfaces.FaultStatus,
        null | VAPI.NetworkInterfaces.FaultStatus,
        VAPI.AT1101.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 link_up(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        VAPI.NetworkInterfaces.MacAddress,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.NetworkInterfaces.Port
      >(this, "supports_rtp" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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,
          14,
          "current_configuration",
        ),
      );
    }

    /**
    Save interface
  */
    get save_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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,
          17,
          "desired_configuration",
        ),
      );
    }

    /**
    Save syslog settings
  */
    get save_syslog_config(): VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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,
          20,
          "current_syslog_configuration",
        ),
      );
    }
    get desired_syslog_configuration() {
      return VAPI.NetworkInterfaces.lift.DesiredSyslogConfiguration(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          21,
          "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,
          22,
          "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.AT1101.NetworkInterfaces.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number | string,
        null | VAPI.Primitives.Timestamp,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.LaneStatistics
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          24,
          "fpga_lane_statistics",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.EthernetStats.lift.PortStatistics(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          25,
          "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,
          26,
          "lldp_neighbors",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.NetworkInterfaces.lift.LLDPNeighbor(raw),
      );
    }
  }
  export type PortMode = "eth1g" | "eth10g" | "eth40g";
  export const Enums = {
    PortMode: ["eth1g", "eth10g", "eth40g"] as PortMode[],
    Lane: [
      "P1_0",
      "P1_1",
      "P1_2",
      "P1_3",
      "P2_0",
      "P2_1",
      "P2_2",
      "P2_3",
    ] 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]]] | [1, []],
      _socket: VScript.VSocket,
    ): InternalState => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "Established",
            value: VAPI.AT1101.PCap.lift.Mode(_raw[1], _socket),
          };
        case 1:
          return {
            variant: "AwaitingReplayStartTime",
            value: VAPI.AT1101.PCap.lift.InternalStateAwaitingReplayStartTime(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    Mode: (
      _raw: [0, []] | [1, [number, number]],
      _socket: VScript.VSocket,
    ): Mode => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "Store",
            value: VAPI.AT1101.PCap.lift.ModeStore(_raw[1], _socket),
          };
        case 1:
          return {
            variant: "StoreAndForward",
            value: VAPI.AT1101.PCap.lift.ModeStoreAndForward(_raw[1], _socket),
          };
      }
    },
    ModeStore: (_raw: [], _socket: VScript.VSocket): ModeStore => {
      return {};
    },
    ModeStoreAndForward: (
      _raw: [number, number],
      _socket: VScript.VSocket,
    ): ModeStoreAndForward => {
      return {
        min_delay: VScript.VAPIHelpers.liftNanoseconds(_raw[0], _socket),
        packet_loss_rate: _raw[1],
      };
    },
  } 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.AT1101.PCap.Mode }
        | {
            variant: "AwaitingReplayStartTime";
            value: VAPI.AT1101.PCap.InternalStateAwaitingReplayStartTime;
          },
      _socket: VScript.VSocket,
    ): [0, [0, []] | [1, [number, number]]] | [1, []] => {
      switch (_x.variant) {
        case "Established":
          return [0, VAPI.AT1101.PCap.lower.Mode(_x.value, _socket)];
        case "AwaitingReplayStartTime":
          return [
            1,
            VAPI.AT1101.PCap.lower.InternalStateAwaitingReplayStartTime(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    Mode: (
      _x:
        | { variant: "Store"; value: VAPI.AT1101.PCap.ModeStore }
        | {
            variant: "StoreAndForward";
            value: VAPI.AT1101.PCap.ModeStoreAndForward;
          },
      _socket: VScript.VSocket,
    ): [0, []] | [1, [number, number]] => {
      switch (_x.variant) {
        case "Store":
          return [0, VAPI.AT1101.PCap.lower.ModeStore(_x.value, _socket)];
        case "StoreAndForward":
          return [
            1,
            VAPI.AT1101.PCap.lower.ModeStoreAndForward(_x.value, _socket),
          ];
      }
    },
    ModeStore: (_x: {}, _socket: VScript.VSocket): [] => [],
    ModeStoreAndForward: (
      _x: {
        min_delay: VAPI.PCap.Delay;

        /**
            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] => [
      VScript.VAPIHelpers.lowerNanoseconds(_x.min_delay, _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.AT1101.PCap.Instance
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.NetworkInterfaces.Port,
      VAPI.AT1101.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.NetworkInterfaces.Port,
        VAPI.AT1101.PCap.Instance
      >(this, "ingress" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.NetworkInterfaces.Port,
      VAPI.AT1101.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.NetworkInterfaces.Port,
        VAPI.AT1101.PCap.Instance
      >(this, "egress" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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]]),
      null | ([0, []] | [1, [number, number]]),
      null | VAPI.AT1101.PCap.Mode,
      null | VAPI.AT1101.PCap.Mode,
      VAPI.AT1101.PCap.Instance
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | ([0, []] | [1, [number, number]]),
        null | ([0, []] | [1, [number, number]]),
        null | VAPI.AT1101.PCap.Mode,
        null | VAPI.AT1101.PCap.Mode,
        VAPI.AT1101.PCap.Instance
      >(
        this,
        "mode" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.PCap.lift.Mode,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.PCap.lower.Mode,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.PCap.lift.Mode,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.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.AT1101.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number],
        VAPI.PCap.MemoryRange,
        VAPI.AT1101.PCap.Instance
      >(this, "cur_range" as VScript.SysName, {
        lift: VAPI.PCap.lift.MemoryRange,
        lower: VAPI.PCap.lower.MemoryRange,
      });
    }

    /**
    number of packets discarded because of FIFO overflow, or RX errors. Does
    not include packet losses introduced by a nonzero value of
    `packet_loss_rate`.
  */
    get packets_discarded(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.SaturatingCounter32,
      VAPI.AT1101.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.SaturatingCounter32,
        VAPI.AT1101.PCap.Instance
      >(this, "packets_discarded" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get pending_dma_transfers(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.PCap.InstancePendingDmaTransfers,
      VAPI.AT1101.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.PCap.InstancePendingDmaTransfers,
        VAPI.AT1101.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.AT1101.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.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 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.AT1101.PCap.InstanceIssues,
      VAPI.AT1101.PCap.Instance
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1101.PCap.InstanceIssues,
        VAPI.AT1101.PCap.Instance
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1101.PCap.InstanceIssues => ({
          pending_dma_requests: (x & 1) !== 0,
        }),
        lower: (
          x: VAPI.AT1101.PCap.InstanceIssues,
          _: VScript.VSocket,
        ): number => (x.pending_dma_requests ? 1 : 0),
      });
    }
  }
  export type InternalState =
    | { variant: "Established"; value: VAPI.AT1101.PCap.Mode }
    | {
        variant: "AwaitingReplayStartTime";
        value: VAPI.AT1101.PCap.InternalStateAwaitingReplayStartTime;
      };
  export type Mode =
    | { variant: "Store"; value: VAPI.AT1101.PCap.ModeStore }
    | {
        variant: "StoreAndForward";
        value: VAPI.AT1101.PCap.ModeStoreAndForward;
      };
  export interface ModeStore {}
  export interface ModeStoreAndForward {
    min_delay: VAPI.PCap.Delay;

    /**
    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 = { 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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.PTPClock.All
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.PTPClock.All
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.PTPClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.PTPClock.State,
        VAPI.PTPClock.State,
        VAPI.AT1101.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.AT1101.PTPClock.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.PTPClock.Mode,
        VAPI.PTPClock.Mode,
        VAPI.PTPClock.Mode,
        VAPI.PTPClock.Mode,
        VAPI.AT1101.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.AT1101.PTPClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.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.AT1101.PTPClock.All
      >(this, "micro_epochs" as VScript.SysName, {
        lift: VAPI.PTPClock.lift.MicroEpochs,
        lower: VAPI.PTPClock.lower.MicroEpochs,
      });
    }
    get output() {
      return VAPI.AT1101.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.AT1101.PTPClock.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.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.AT1101.NetworkInterfaces.Lane;
      },
      _socket: VScript.VSocket,
    ): [null | number, VAPI.AT1101.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.AT1101.PTPFlows.Agent
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.PTPFlows.AgentMode,
        VAPI.PTPFlows.AgentMode,
        VAPI.PTPFlows.AgentMode,
        VAPI.PTPFlows.AgentMode,
        VAPI.AT1101.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.AT1101.PTPFlows.Agent
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.PTPFlows.AgentState,
        VAPI.PTPFlows.AgentState,
        VAPI.AT1101.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.AT1101.PTPFlows.Agent
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTP.Domain,
        VAPI.PTP.Domain,
        VAPI.AT1101.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.AT1101.PTPFlows.Port,
      | null
      | (VScript.Referenceable<"PTPFlows::Data::Port"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.PTPFlows.Agent
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.PTPFlows.Port,
        | null
        | (VScript.Referenceable<"PTPFlows::Data::Port"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.PTPFlows.Agent
      >(
        this,
        "hosting_port" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.NetworkInterfaces.Lane],
      null | VAPI.AT1101.PTPFlows.AgentLatchedVifc,
      VAPI.AT1101.PTPFlows.Agent
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [null | number, VAPI.AT1101.NetworkInterfaces.Lane],
        null | VAPI.AT1101.PTPFlows.AgentLatchedVifc,
        VAPI.AT1101.PTPFlows.Agent
      >(this, "latched_vifc" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.PTPFlows.lift.AgentLatchedVifc,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.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.AT1101.PTPFlows.Master,
      VAPI.AT1101.PTPFlows.Agent
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.PTPFlows.Master,
        VAPI.AT1101.PTPFlows.Agent
      >(this, "best_foreign_master" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.PTPFlows.AgentAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "agents",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.PTPFlows.AgentAsNamedTableRow(raw),
      );
    }
    get ports() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "PTPFlows::Data::Port",
        VAPI.AT1101.PTPFlows.Port
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "ports"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.PTPFlows.lift.Port(raw),
      );
    }
    get visible_masters() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "PTPFlows::Data::Master",
        VAPI.AT1101.PTPFlows.Master
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          3,
          "visible_masters",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.PTPFlows.Master
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.PTPFlows.Master
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        VAPI.AT1101.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.AT1101.PTPFlows.MasterVisibleVia
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "visible_via",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.PTPFlows.MasterSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTPFlows.MasterSettingsLog2AnnounceInterval,
        VAPI.PTPFlows.MasterSettingsLog2AnnounceInterval,
        VAPI.AT1101.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.AT1101.PTPFlows.MasterSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTPFlows.MasterSettingsLog2SyncInterval,
        VAPI.PTPFlows.MasterSettingsLog2SyncInterval,
        VAPI.AT1101.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.AT1101.PTPFlows.MasterSettings
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.PTPFlows.MasterSettingsDelayDecimationFactor,
        VAPI.AT1101.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.AT1101.PTPFlows.MasterSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.PTPFlows.Routing,
        VAPI.PTPFlows.Routing,
        VAPI.PTPFlows.Routing,
        VAPI.PTPFlows.Routing,
        VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.PTPFlows.MasterSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.PTPFlows.MasterSettings
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.NetworkInterfaces.VirtualInterface,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Lane,
      null | VAPI.AT1101.NetworkInterfaces.Lane,
      VAPI.AT1101.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.AT1101.NetworkInterfaces.Lane,
        null | VAPI.AT1101.NetworkInterfaces.Lane,
        VAPI.AT1101.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.AT1101.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [Array<number>, number],
        VAPI.PTP.PortIdentity,
        VAPI.AT1101.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.AT1101.PTPFlows.PortBestMasters
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          5,
          "best_masters",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.PTPFlows.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.PTPFlows.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTPFlows.DiffServCodePoint,
        VAPI.PTPFlows.DiffServCodePoint,
        VAPI.AT1101.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.AT1101.PTPFlows.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.PTPFlows.Port
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.PTPFlows.DiffServCodePoint,
        VAPI.PTPFlows.DiffServCodePoint,
        VAPI.AT1101.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.AT1101.PTPFlows.PortIssues,
      VAPI.AT1101.PTPFlows.Port
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1101.PTPFlows.PortIssues,
        VAPI.AT1101.PTPFlows.Port
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1101.PTPFlows.PortIssues => ({
          unresolved_dscp_request: (x & 1) !== 0,
          unresolved_ttl_request: (x & 2) !== 0,
        }),
        lower: (
          x: VAPI.AT1101.PTPFlows.PortIssues,
          _: VScript.VSocket,
        ): number =>
          (x.unresolved_dscp_request ? 1 : 0) |
          (x.unresolved_ttl_request ? 2 : 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.AT1101.PTPFlows.Master,
      VAPI.AT1101.PTPFlows.PortBestMasters
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.PTPFlows.Master,
        VAPI.AT1101.PTPFlows.PortBestMasters
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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 = {
    unresolved_dscp_request: boolean;
    unresolved_ttl_request: 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.AT1101.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.AT1101.PTPFlows.Port,
      VAPI.AT1101.PTPFlows.MasterVisibleVia
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.PTPFlows.Port,
        VAPI.AT1101.PTPFlows.MasterVisibleVia
      >(this, "port" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.PTPFlows.MasterVisibleVia
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.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"
    | "PORT1"
    | "PORT1_0"
    | "PORT1_1"
    | "PORT1_2"
    | "PORT1_3"
    | "PORT2"
    | "PORT2_0"
    | "PORT2_1"
    | "PORT2_2"
    | "PORT2_3";
  export const Enums = {
    NetworkPortID: [
      "FRONT_MANAGEMENT",
      "REAR_MANAGEMENT",
      "PORT1",
      "PORT1_0",
      "PORT1_1",
      "PORT1_2",
      "PORT1_3",
      "PORT2",
      "PORT2_0",
      "PORT2_1",
      "PORT2_2",
      "PORT2_3",
    ] 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.AT1101.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.AT1101.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],
      _socket: VScript.VSocket,
    ): AudioBackend => {
      return {
        group: _raw[0],
        instance: _raw[1],
        servo:
          _raw[2] === null
            ? null
            : new VAPI.AT1101.RTPReceiver.AudioServo(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[2] as VScript.KWLName<"full">,
                ),
              ),
        slices: _raw[3],
        channel: _raw[4],
      };
    },
    AudioCapabilities: (
      _raw: [number, boolean, [0, []] | [1, []]],
      _socket: VScript.VSocket,
    ): AudioCapabilities => {
      return {
        channel_capacity: _raw[0],
        supports_clean_switching: _raw[1],
        read_speed: VAPI.AT1101.RTPReceiver.lift.ReadSpeed(_raw[2], _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.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPReceiver.lift.MetadataBackend(_raw[3], _socket),
      };
    },
    ReadSpeedLockToGenlock: (
      _raw: [],
      _socket: VScript.VSocket,
    ): ReadSpeedLockToGenlock => {
      return {};
    },
    MediaReceiver: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MediaReceiver(_raw),
    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.AT1101.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, []] | [1, []],
      _socket: VScript.VSocket,
    ): ReadSpeed => {
      switch (_raw[0]) {
        case 0:
          return {
            variant: "LockToGenlock",
            value: VAPI.AT1101.RTPReceiver.lift.ReadSpeedLockToGenlock(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "Adaptive",
            value: VAPI.AT1101.RTPReceiver.lift.ReadSpeedAdaptive(
              _raw[1],
              _socket,
            ),
          };
      }
    },
    ReserveAudioBackend: (
      _raw: [number, number, Array<null | number>, number, null | number],
      _socket: VScript.VSocket,
    ): ReserveAudioBackend => {
      return {
        group: _raw[0],
        instance: _raw[1],
        slices: _raw[2],
        channel: _raw[3],
        fence: _raw[4],
      };
    },
    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.AT1101.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.AT1101.RTPReceiver.lift.TimingTargetIngressPlusX(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "EgressPlusX",
            value: VAPI.AT1101.RTPReceiver.lift.TimingTargetEgressPlusX(
              _raw[1],
              _socket,
            ),
          };
        case 2:
          return {
            variant: "TimeSource",
            value: VAPI.AT1101.RTPReceiver.lift.TimingTargetTimeSource(
              _raw[1],
              _socket,
            ),
          };
        case 3:
          return {
            variant: "BufferMidpoint",
            value: VAPI.AT1101.RTPReceiver.lift.TimingTargetBufferMidpoint(
              _raw[1],
              _socket,
            ),
          };
        case 4:
          return {
            variant: "ForeignReadDelay",
            value: VAPI.AT1101.RTPReceiver.lift.TimingTargetForeignReadDelay(
              _raw[1],
              _socket,
            ),
          };
        case 5:
          return {
            variant: "ForeignMediaClock",
            value: VAPI.AT1101.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.AT1101.RTPReceiver.lift.NativeVideoBackend(_raw[0], _socket),
        jpeg_xs:
          _raw[1] === null
            ? null
            : VAPI.AT1101.RTPReceiver.lift.JpegXsVideoBackend(_raw[1], _socket),
        servo:
          _raw[2] === null
            ? null
            : new VAPI.AT1101.RTPReceiver.VideoServo(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[2] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    VideoCapabilities: (
      _raw: [
        boolean,
        boolean,
        null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt211020Caliber,
        null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt20422Caliber,
        null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
        boolean,
        boolean,
        [0, []] | [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.AT1101.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),
    AllDiagnostics: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AllDiagnostics(_raw),
    PassthroughReceiverFlowPartitions: (
      _raw: [null | string, null | string],
      _socket: VScript.VSocket,
    ): PassthroughReceiverFlowPartitions => {
      return {
        sdp_a:
          _raw[0] === null
            ? null
            : new VAPI.AT1101.RTPReceiver.PassthroughFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        sdp_b:
          _raw[1] === null
            ? null
            : new VAPI.AT1101.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.AT1101.RTPReceiver.AudioFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        sdp_b:
          _raw[1] === null
            ? null
            : new VAPI.AT1101.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.AT1101.RTPReceiver.VideoFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[0] as VScript.KWLName<"full">,
                ),
              ),
        sdp_b:
          _raw[1] === null
            ? null
            : new VAPI.AT1101.RTPReceiver.VideoFlowPartition(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  _raw[1] as VScript.KWLName<"full">,
                ),
              ),
      };
    },
    AllDiagnosticsIgmpPerformanceMetricsIgmpLatency: (
      _raw: [
        null | VAPI.AT1101.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),
    AllDiagnosticsRtpInput: (
      _raw: [Array<number>, number, number, number, number, number],
      _socket: VScript.VSocket,
    ): AllDiagnosticsRtpInput => {
      return {
        input_oom: _raw[0],
        queue_full: _raw[1],
        lowest_memfree: _raw[2],
        memfree: _raw[3],
        highest_fifo_usedw: _raw[4],
        fifo_usedw: _raw[5],
      };
    },
    AllSettings: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AllSettings(_raw),
    PacketStreamStreamParameters: (
      _raw: [
        number,
        null | string,
        null | string,
        null | string,
        VAPI.RTPReceiver.PacketStreamType,
        number,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPReceiver.AudioServo;
        slices: Array<null | VAPI.RTPReceiver.LocalSliceIndex>;
        channel: VAPI.AT1101.RTPReceiver.RAMChannel;
      },
      _socket: VScript.VSocket,
    ): [number, number, null | string, Array<null | number>, number] => [
      _x.group,
      _x.instance,
      _x.servo === null ? null : _x.servo.raw.kwl,
      _x.slices,
      _x.channel,
    ],
    AudioCapabilities: (
      _x: {
        channel_capacity: VAPI.RTPReceiver.ChannelCapacity;
        supports_clean_switching: boolean;
        read_speed: VAPI.AT1101.RTPReceiver.ReadSpeed;
      },
      _socket: VScript.VSocket,
    ): [number, boolean, [0, []] | [1, []]] => [
      _x.channel_capacity,
      _x.supports_clean_switching,
      VAPI.AT1101.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.AT1101.RTPReceiver.RAMChannel;
        pseudo_channel: VAPI.AT1101.RTPReceiver.RAMPseudoChannel;
        blockcount: VAPI.RTPReceiver.BlockCount;
      },
      _socket: VScript.VSocket,
    ): [number, number, number] => [
      _x.channel,
      _x.pseudo_channel,
      _x.blockcount,
    ],
    BufferSizes: (
      _x: {
        for_audio: VAPI.AT1101.RTPReceiver.BufferSize;
        for_2022_6: VAPI.AT1101.RTPReceiver.BufferSize;
        for_2110_20_uhd_singlelink: VAPI.AT1101.RTPReceiver.BufferSize;
        for_2110_20_other: VAPI.AT1101.RTPReceiver.BufferSize;
        for_2042_2: VAPI.AT1101.RTPReceiver.BufferSize;
        for_jpeg_xs: VAPI.AT1101.RTPReceiver.BufferSize;
        for_passthrough: VAPI.AT1101.RTPReceiver.BufferSize;
      },
      _socket: VScript.VSocket,
    ): [
      VAPI.AT1101.RTPReceiver.BufferSize,
      VAPI.AT1101.RTPReceiver.BufferSize,
      VAPI.AT1101.RTPReceiver.BufferSize,
      VAPI.AT1101.RTPReceiver.BufferSize,
      VAPI.AT1101.RTPReceiver.BufferSize,
      VAPI.AT1101.RTPReceiver.BufferSize,
      VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPReceiver.RAMChannel;
        metadata: null | VAPI.AT1101.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.AT1101.RTPReceiver.lower.MetadataBackend(_x.metadata, _socket),
    ],
    ReadSpeedLockToGenlock: (_x: {}, _socket: VScript.VSocket): [] => [],
    MediaReceiver: (_x: MediaReceiver) => _x.raw.kwl,
    MetadataBackend: (
      _x: {
        group: VAPI.AT1101.RTPReceiver.MetadataBackendGroup;
        instance: VAPI.AT1101.RTPReceiver.MetadataBackendInstance;
        stats_id: VAPI.RTPReceiver.StatsID;
        read_id: VAPI.RTPReceiver.MMUReadIndex;
        channel: VAPI.AT1101.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.AT1101.RTPReceiver.RAMChannel;
        metadata: null | VAPI.AT1101.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.AT1101.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.AT1101.RTPReceiver.ReadSpeedLockToGenlock;
          }
        | {
            variant: "Adaptive";
            value: VAPI.AT1101.RTPReceiver.ReadSpeedAdaptive;
          },
      _socket: VScript.VSocket,
    ): [0, []] | [1, []] => {
      switch (_x.variant) {
        case "LockToGenlock":
          return [
            0,
            VAPI.AT1101.RTPReceiver.lower.ReadSpeedLockToGenlock(
              _x.value,
              _socket,
            ),
          ];
        case "Adaptive":
          return [
            1,
            VAPI.AT1101.RTPReceiver.lower.ReadSpeedAdaptive(_x.value, _socket),
          ];
      }
    },
    ReserveAudioBackend: (
      _x: {
        group: VAPI.RTPReceiver.AudioBlockIndex;
        instance: VAPI.RTPReceiver.AudioInstanceIndex;
        slices: Array<null | VAPI.RTPReceiver.LocalSliceIndex>;
        channel: VAPI.AT1101.RTPReceiver.RAMChannel;
        fence: null | VAPI.Time.FreeRunningCounter;
      },
      _socket: VScript.VSocket,
    ): [number, number, Array<null | number>, number, null | number] => [
      _x.group,
      _x.instance,
      _x.slices,
      _x.channel,
      _x.fence,
    ],
    Session: (_x: Session) => _x.raw.kwl,
    TimingTargetTimeSource: (
      _x: { t_src: null | VAPI.AT1101.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.AT1101.RTPReceiver.TimingTargetIngressPlusX;
          }
        | {
            variant: "EgressPlusX";
            value: VAPI.AT1101.RTPReceiver.TimingTargetEgressPlusX;
          }
        | {
            variant: "TimeSource";
            value: VAPI.AT1101.RTPReceiver.TimingTargetTimeSource;
          }
        | {
            variant: "BufferMidpoint";
            value: VAPI.AT1101.RTPReceiver.TimingTargetBufferMidpoint;
          }
        | {
            variant: "ForeignReadDelay";
            value: VAPI.AT1101.RTPReceiver.TimingTargetForeignReadDelay;
          }
        | {
            variant: "ForeignMediaClock";
            value: VAPI.AT1101.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.AT1101.RTPReceiver.lower.TimingTargetIngressPlusX(
              _x.value,
              _socket,
            ),
          ];
        case "EgressPlusX":
          return [
            1,
            VAPI.AT1101.RTPReceiver.lower.TimingTargetEgressPlusX(
              _x.value,
              _socket,
            ),
          ];
        case "TimeSource":
          return [
            2,
            VAPI.AT1101.RTPReceiver.lower.TimingTargetTimeSource(
              _x.value,
              _socket,
            ),
          ];
        case "BufferMidpoint":
          return [
            3,
            VAPI.AT1101.RTPReceiver.lower.TimingTargetBufferMidpoint(
              _x.value,
              _socket,
            ),
          ];
        case "ForeignReadDelay":
          return [
            4,
            VAPI.AT1101.RTPReceiver.lower.TimingTargetForeignReadDelay(
              _x.value,
              _socket,
            ),
          ];
        case "ForeignMediaClock":
          return [
            5,
            VAPI.AT1101.RTPReceiver.lower.TimingTargetForeignMediaClock(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    VideoBackend: (
      _x: {
        native: null | VAPI.AT1101.RTPReceiver.NativeVideoBackend;
        jpeg_xs: null | VAPI.AT1101.RTPReceiver.JpegXsVideoBackend;
        servo: null | VAPI.AT1101.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.AT1101.RTPReceiver.lower.NativeVideoBackend(_x.native, _socket),
      _x.jpeg_xs === null
        ? null
        : VAPI.AT1101.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.AT1101.RTPReceiver.VideoCapabilitiesSt211020Caliber;
        st2042_2_caliber: null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt20422Caliber;
        jpeg_xs_caliber: null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesJpegXsCaliber;
        supports_2110_40: boolean;
        supports_clean_switching: boolean;
        read_speed: VAPI.AT1101.RTPReceiver.ReadSpeed;
      },
      _socket: VScript.VSocket,
    ): [
      boolean,
      boolean,
      null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt211020Caliber,
      null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt20422Caliber,
      null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
      boolean,
      boolean,
      [0, []] | [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.AT1101.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,
    AllDiagnostics: (_x: AllDiagnostics) => _x.raw.kwl,
    PassthroughReceiverFlowPartitions: (
      _x: {
        sdp_a: null | VAPI.AT1101.RTPReceiver.PassthroughFlowPartition;
        sdp_b: null | VAPI.AT1101.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.AT1101.RTPReceiver.AudioFlowPartition;
        sdp_b: null | VAPI.AT1101.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.AT1101.RTPReceiver.VideoFlowPartition;
        sdp_b: null | VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPReceiver.RAMChannel;
        blocks: Array<null | VAPI.AT1101.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,
    AllDiagnosticsRtpInput: (
      _x: {
        input_oom: Array<VAPI.Primitives.SaturatingCounter32>;
        queue_full: VAPI.Primitives.SaturatingCounter32;
        lowest_memfree: number;
        memfree: number;
        highest_fifo_usedw: number;
        fifo_usedw: number;
      },
      _socket: VScript.VSocket,
    ): [Array<number>, number, number, number, number, number] => [
      _x.input_oom,
      _x.queue_full,
      _x.lowest_memfree,
      _x.memfree,
      _x.highest_fifo_usedw,
      _x.fifo_usedw,
    ],
    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.AT1101.RTPReceiver.RAMPseudoChannel;
        irq_rate: VAPI.AT1101.RTPReceiver.PacketStreamStreamParametersIrqRate;
      },
      _socket: VScript.VSocket,
    ): [
      number,
      null | string,
      null | string,
      null | string,
      VAPI.RTPReceiver.PacketStreamType,
      number,
      VAPI.AT1101.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.AT1101.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,
        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,
        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.AT1101.RTPReceiver.lift.AllDiagnostics(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "diagnostics"),
      );
    }
    get settings() {
      return VAPI.AT1101.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.AT1101.RTPReceiver.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.CapabilityRequestID,
        VAPI.AT1101.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.AT1101.RTPReceiver.SessionAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "sessions",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.RTPReceiver.SessionAsNamedTableRow(raw),
      );
    }
    get audio_receivers() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPReceiver::Data::AudioReceiver",
        VAPI.AT1101.RTPReceiver.AudioReceiverAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          5,
          "audio_receivers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.RTPReceiver.AudioReceiverAsNamedTableRow(raw),
      );
    }
    get passthrough_receivers() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPReceiver::Data::PassthroughReceiver",
        VAPI.AT1101.RTPReceiver.PassthroughReceiverAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "passthrough_receivers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.RTPReceiver.PassthroughReceiverAsNamedTableRow(raw),
      );
    }
    get video_receivers() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPReceiver::Data::VideoReceiver",
        VAPI.AT1101.RTPReceiver.VideoReceiverAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          7,
          "video_receivers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.RTPReceiver.VideoReceiverAsNamedTableRow(raw),
      );
    }
    get anc_burst_receivers() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPReceiver::Data::AncBurstReceiver",
        VAPI.AT1101.RTPReceiver.AncBurstReceiverAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          8,
          "anc_burst_receivers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.RTPReceiver.PacketStream
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          11,
          "packet_streams",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPReceiver.lift.PacketStream(raw),
      );
    }
    get network_sources() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPReceiver::Data::NetworkSource",
        VAPI.AT1101.RTPReceiver.NetworkSource
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          12,
          "network_sources",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPReceiver.lift.NetworkSource(raw),
      );
    }
    get audio_flow_partitions() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPReceiver::Data::AudioFlowPartition",
        VAPI.AT1101.RTPReceiver.AudioFlowPartition
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          13,
          "audio_flow_partitions",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPReceiver.lift.AudioFlowPartition(raw),
      );
    }
    get passthrough_flow_partitions() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPReceiver::Data::PassthroughFlowPartition",
        VAPI.AT1101.RTPReceiver.PassthroughFlowPartition
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          14,
          "passthrough_flow_partitions",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPReceiver.lift.PassthroughFlowPartition(raw),
      );
    }
    get video_flow_partitions() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPReceiver::Data::VideoFlowPartition",
        VAPI.AT1101.RTPReceiver.VideoFlowPartition
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          15,
          "video_flow_partitions",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.RTPReceiver.AudioServo
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          17,
          "audio_servos",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPReceiver.lift.AudioServo(st),
      );
    }
    get video_servos() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "RTPReceiver::Data::VideoServo",
        VAPI.AT1101.RTPReceiver.VideoServo
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          18,
          "video_servos",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPReceiver.lift.VideoServo(st),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.AllIssues,
      VAPI.AT1101.RTPReceiver.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.AllIssues,
        VAPI.AT1101.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.AT1101.RTPReceiver.lift.MediaReceiver(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "generic"),
      );
    }
    get media_clock() {
      return VAPI.AT1101.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.AT1101.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.AT1101.RTPReceiver.AudioServo;
    slices: Array<null | VAPI.RTPReceiver.LocalSliceIndex>;
    channel: VAPI.AT1101.RTPReceiver.RAMChannel;
  }
  export interface AudioCapabilities {
    channel_capacity: VAPI.RTPReceiver.ChannelCapacity;
    supports_clean_switching: boolean;
    read_speed: VAPI.AT1101.RTPReceiver.ReadSpeed;
  }
  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.AT1101.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PartitionID,
        VAPI.AT1101.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.AT1101.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Audio.Format,
        null | VAPI.Audio.Format,
        VAPI.AT1101.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.AT1101.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Audio.Frequency,
        null | VAPI.Audio.Frequency,
        VAPI.AT1101.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.AT1101.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.RTPReceiver.AffineNetworkSource>,
      VAPI.AT1101.RTPReceiver.AudioFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number]>,
        Array<VAPI.AT1101.RTPReceiver.AffineNetworkSource>,
        VAPI.AT1101.RTPReceiver.AudioFlowPartition
      >(this, "sources" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1101.RTPReceiver.lift.AffineNetworkSource,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1101.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.AT1101.RTPReceiver.lift.MediaReceiver(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "generic"),
      );
    }
    get media_specific() {
      return VAPI.AT1101.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.AT1101.RTPReceiver.AudioServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.RTPReceiver.AudioServo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.RTPReceiver.AudioServo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.RTPReceiver.AudioServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.AudioServoPrioritize,
        VAPI.RTPReceiver.AudioServoPrioritize,
        VAPI.AT1101.RTPReceiver.AudioServo
      >(this, "prioritize" 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.AT1101.RTPReceiver.AudioServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1101.RTPReceiver.AudioServo
      >(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 sop_dt_node(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1101.RTPReceiver.AudioServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1101.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.AT1101.RTPReceiver.RAMChannel;
    pseudo_channel: VAPI.AT1101.RTPReceiver.RAMPseudoChannel;
    blockcount: VAPI.RTPReceiver.BlockCount;
  }
  export type BufferSize =
    | "UpTo4KiPackets"
    | "UpTo8KiPackets"
    | "UpTo16KiPackets"
    | "UpTo32KiPackets"
    | "UpTo64KiPackets";
  export interface BufferSizes {
    for_audio: VAPI.AT1101.RTPReceiver.BufferSize;
    for_2022_6: VAPI.AT1101.RTPReceiver.BufferSize;
    for_2110_20_uhd_singlelink: VAPI.AT1101.RTPReceiver.BufferSize;
    for_2110_20_other: VAPI.AT1101.RTPReceiver.BufferSize;
    for_2042_2: VAPI.AT1101.RTPReceiver.BufferSize;
    for_jpeg_xs: VAPI.AT1101.RTPReceiver.BufferSize;
    for_passthrough: VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver;
    extra_delay: VScript.Duration;
    on_backpressure: VAPI.RTPReceiver.BackpressurePolicy;
  }
  export interface TimingTargetForeignReadDelay {
    foreign_receiver: null | VAPI.AT1101.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.AT1101.RTPReceiver.RAMChannel;
    metadata: null | VAPI.AT1101.RTPReceiver.MetadataBackend;
  }
  export interface ReadSpeedLockToGenlock {}
  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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.Track,
        VAPI.RTPReceiver.Track,
        VAPI.AT1101.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.AT1101.RTPReceiver.Session,
      | null
      | (VScript.Referenceable<"RTPReceiver::Data::Session"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.RTPReceiver.Session,
        | null
        | (VScript.Referenceable<"RTPReceiver::Data::Session"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.RTPReceiver.MediaReceiver
      >(
        this,
        "hosting_session" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.RTPReceiver.IngressTrackState,
          VAPI.RTPReceiver.IngressTrackState,
        ],
        VAPI.RTPReceiver.Ingress,
        VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [Array<null | [boolean, null | number]>],
        VAPI.RTPReceiver.Egress,
        VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [boolean, [boolean, boolean]],
        VAPI.RTPReceiver.Expectations,
        VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.MediaReceiverIssues,
        VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | number, null | number],
        VAPI.RTPReceiver.CapabilityRequestIDs,
        VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPReceiver.lift.Timing(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 16, "timing"),
      );
    }
    get packet_streams() {
      return VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.RTPReceiver.MediaReceiverRequiredRedundancyLevel,
        VAPI.AT1101.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.AT1101.RTPReceiver.MediaReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
        VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
        VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
        VAPI.RTPReceiver.MediaReceiverInitiateReadoutOn,
        VAPI.AT1101.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 MetadataBackend {
    group: VAPI.AT1101.RTPReceiver.MetadataBackendGroup;
    instance: VAPI.AT1101.RTPReceiver.MetadataBackendInstance;
    stats_id: VAPI.RTPReceiver.StatsID;
    read_id: VAPI.RTPReceiver.MMUReadIndex;
    channel: VAPI.AT1101.RTPReceiver.RAMChannel;
  }
  export interface NativeVideoBackend {
    group: VAPI.RTPReceiver.NativeVideoBlockIndex;
    instances: Array<null | VAPI.RTPReceiver.NativeVideoDecoderInstance>;
    channel: VAPI.AT1101.RTPReceiver.RAMChannel;
    metadata: null | VAPI.AT1101.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.AT1101.RTPReceiver.PacketStream,
      VAPI.AT1101.RTPReceiver.NetworkSource
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.RTPReceiver.PacketStream,
        VAPI.AT1101.RTPReceiver.NetworkSource
      >(this, "packet_stream" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.RTPReceiver.PacketStreamStreamParametersIrqRate,
        ],
      null | VAPI.AT1101.RTPReceiver.PacketStreamStreamParameters,
      VAPI.AT1101.RTPReceiver.PacketStream
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | [
            number,
            null | string,
            null | string,
            null | string,
            VAPI.RTPReceiver.PacketStreamType,
            number,
            VAPI.AT1101.RTPReceiver.PacketStreamStreamParametersIrqRate,
          ],
        null | VAPI.AT1101.RTPReceiver.PacketStreamStreamParameters,
        VAPI.AT1101.RTPReceiver.PacketStream
      >(this, "stream_parameters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.RTPReceiver.lift.PacketStreamStreamParameters,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.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.AT1101.RTPReceiver.PacketStream
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.Primitives.Unsigned64,
        VAPI.AT1101.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.AT1101.RTPReceiver.PacketStream
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.RTPReceiver.PacketStream
      >(this, "traffic_stats" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }
    get media_clock() {
      return VAPI.AT1101.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.AT1101.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.PacketTracerMode,
        VAPI.RTPReceiver.PacketTracerMode,
        VAPI.RTPReceiver.PacketTracerMode,
        VAPI.RTPReceiver.PacketTracerMode,
        VAPI.AT1101.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.AT1101.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.PacketTracerPacketDetails,
        VAPI.RTPReceiver.PacketTracerPacketDetails,
        VAPI.RTPReceiver.PacketTracerPacketDetails,
        VAPI.RTPReceiver.PacketTracerPacketDetails,
        VAPI.AT1101.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.AT1101.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.Port,
      | null
      | (VScript.Referenceable<"NetworkInterfaces::Data::Port"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.RTPReceiver.PacketTracer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.NetworkInterfaces.Port,
        | null
        | (VScript.Referenceable<"NetworkInterfaces::Data::Port"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.RTPReceiver.PacketTracer
      >(
        this,
        "port" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.RTPReceiver.PacketTracer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PacketTracerIssues,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPReceiver.PacketTracer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.NumDownloads,
        VAPI.AT1101.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.AT1101.RTPReceiver.PassthroughEssence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.RTPReceiver.PassthroughEssence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.RTPReceiver.PacketStreamIndex,
        VAPI.AT1101.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.AT1101.RTPReceiver.PassthroughEssenceMemoryBlocks,
      VAPI.AT1101.RTPReceiver.PassthroughEssence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, Array<null | number>],
        null | VAPI.AT1101.RTPReceiver.PassthroughEssenceMemoryBlocks,
        VAPI.AT1101.RTPReceiver.PassthroughEssence
      >(this, "memory_blocks" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.RTPReceiver.lift.PassthroughEssenceMemoryBlocks,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.RTPReceiver.lower.PassthroughEssenceMemoryBlocks,
        ),
      });
    }
    get sdp(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1101.RTPReceiver.PassthroughEssence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.RTPReceiver.PassthroughFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PartitionID,
        VAPI.AT1101.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.AT1101.RTPReceiver.AffineNetworkSource>,
      VAPI.AT1101.RTPReceiver.PassthroughFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number]>,
        Array<VAPI.AT1101.RTPReceiver.AffineNetworkSource>,
        VAPI.AT1101.RTPReceiver.PassthroughFlowPartition
      >(this, "sources" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1101.RTPReceiver.lift.AffineNetworkSource,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPReceiver.Session,
      | null
      | (VScript.Referenceable<"RTPReceiver::Data::Session"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.RTPReceiver.Session,
        | null
        | (VScript.Referenceable<"RTPReceiver::Data::Session"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.RTPReceiver.PassthroughReceiver
      >(
        this,
        "hosting_session" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.RTPReceiver.IngressTrackState,
          VAPI.RTPReceiver.IngressTrackState,
        ],
        VAPI.RTPReceiver.Ingress,
        VAPI.AT1101.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.AT1101.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PassthroughReceiverIssues,
        VAPI.AT1101.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.AT1101.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.AT1101.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VAPI.RTPReceiver.BufferID,
        VAPI.AT1101.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.AT1101.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | number, null | number],
        VAPI.RTPReceiver.CapabilityRequestIDs,
        VAPI.AT1101.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.AT1101.RTPReceiver.PassthroughReceiverFlowPartitions,
      VAPI.AT1101.RTPReceiver.PassthroughReceiver
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | string, null | string],
        VAPI.AT1101.RTPReceiver.PassthroughReceiverFlowPartitions,
        VAPI.AT1101.RTPReceiver.PassthroughReceiver
      >(this, "flow_partitions" as VScript.SysName, {
        lift: VAPI.AT1101.RTPReceiver.lift.PassthroughReceiverFlowPartitions,
        lower: VAPI.AT1101.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.AT1101.RTPReceiver.ReadSpeedLockToGenlock;
      }
    | { variant: "Adaptive"; value: VAPI.AT1101.RTPReceiver.ReadSpeedAdaptive };
  export interface ReserveAudioBackend {
    group: VAPI.RTPReceiver.AudioBlockIndex;
    instance: VAPI.RTPReceiver.AudioInstanceIndex;
    slices: Array<null | VAPI.RTPReceiver.LocalSliceIndex>;
    channel: VAPI.AT1101.RTPReceiver.RAMChannel;
    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.AT1101.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPReceiver.VideoReceiver>,
      VAPI.AT1101.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.RTPReceiver.VideoReceiver>,
        VAPI.AT1101.RTPReceiver.Session
      >(this, "video_receivers" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.RTPReceiver.AudioReceiver>,
      VAPI.AT1101.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.RTPReceiver.AudioReceiver>,
        VAPI.AT1101.RTPReceiver.Session
      >(this, "audio_receivers" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.RTPReceiver.AncBurstReceiver>,
      VAPI.AT1101.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.RTPReceiver.AncBurstReceiver>,
        VAPI.AT1101.RTPReceiver.Session
      >(this, "anc_burst_receivers" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.RTPReceiver.PassthroughReceiver>,
      VAPI.AT1101.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.RTPReceiver.PassthroughReceiver>,
        VAPI.AT1101.RTPReceiver.Session
      >(this, "passthrough_receivers" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.RTPReceiver.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.RTPReceiver.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1101.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.AT1101.RTPReceiver.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1101.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.AT1101.RTPReceiver.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | string],
        [null | string, null | string],
        VAPI.RTPReceiver.SessionInterfaces,
        VAPI.RTPReceiver.SessionInterfaces,
        VAPI.AT1101.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.AT1101.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          VAPI.RTPReceiver.TrackSet,
          VAPI.RTPReceiver.TrackSet,
          VAPI.RTPReceiver.TrackSet,
          VAPI.RTPReceiver.TrackSet,
        ],
        VAPI.RTPReceiver.UsedSessionTracks,
        VAPI.AT1101.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.AT1101.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [VAPI.RTPReceiver.Track, number, number, Array<number>],
        null | VAPI.RTPReceiver.SessionLastAcceptedTrack,
        VAPI.AT1101.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.AT1101.RTPReceiver.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.SessionIssues,
        VAPI.AT1101.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.AT1101.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.AT1101.RTPReceiver.Timing
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPReceiver.Timing
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPReceiver.TimingTarget,
      VAPI.AT1101.RTPReceiver.TimingTarget,
      VAPI.AT1101.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.AT1101.RTPReceiver.TimingTarget,
        VAPI.AT1101.RTPReceiver.TimingTarget,
        VAPI.AT1101.RTPReceiver.Timing
      >(
        this,
        "target" as VScript.SysName,
        {
          lift: VAPI.AT1101.RTPReceiver.lift.TimingTarget,
          lower: VAPI.AT1101.RTPReceiver.lower.TimingTarget,
        },
        {
          lift: VAPI.AT1101.RTPReceiver.lift.TimingTarget,
          lower: VAPI.AT1101.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.AT1101.RTPReceiver.Timing
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPReceiver.Timing
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | number, null | number],
        [null | number, null | number],
        VAPI.RTPReceiver.TimingReadDelayBounds,
        VAPI.RTPReceiver.TimingReadDelayBounds,
        VAPI.AT1101.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.AT1101.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.AT1101.RTPReceiver.Timing
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPReceiver.Timing
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.RTPReceiver.TimingTargetIngressPlusX;
      }
    | {
        variant: "EgressPlusX";
        value: VAPI.AT1101.RTPReceiver.TimingTargetEgressPlusX;
      }
    | {
        variant: "TimeSource";
        value: VAPI.AT1101.RTPReceiver.TimingTargetTimeSource;
      }
    | {
        variant: "BufferMidpoint";
        value: VAPI.AT1101.RTPReceiver.TimingTargetBufferMidpoint;
      }
    | {
        variant: "ForeignReadDelay";
        value: VAPI.AT1101.RTPReceiver.TimingTargetForeignReadDelay;
      }
    | {
        variant: "ForeignMediaClock";
        value: VAPI.AT1101.RTPReceiver.TimingTargetForeignMediaClock;
      };
  export interface VideoBackend {
    native: null | VAPI.AT1101.RTPReceiver.NativeVideoBackend;
    jpeg_xs: null | VAPI.AT1101.RTPReceiver.JpegXsVideoBackend;
    servo: null | VAPI.AT1101.RTPReceiver.VideoServo;
  }
  export interface VideoCapabilities {
    supports_2022_6: boolean;
    supports_uhd_sample_interleaved: boolean;
    st2110_20_caliber: null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt211020Caliber;
    st2042_2_caliber: null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt20422Caliber;
    jpeg_xs_caliber: null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesJpegXsCaliber;
    supports_2110_40: boolean;
    supports_clean_switching: boolean;
    read_speed: VAPI.AT1101.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.AT1101.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.PartitionID,
        VAPI.AT1101.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.AT1101.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.TransportFormat,
        null | VAPI.Video.TransportFormat,
        VAPI.AT1101.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.AT1101.RTPReceiver.AffineNetworkSource>,
      VAPI.AT1101.RTPReceiver.VideoFlowPartition
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number]>,
        Array<VAPI.AT1101.RTPReceiver.AffineNetworkSource>,
        VAPI.AT1101.RTPReceiver.VideoFlowPartition
      >(this, "sources" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1101.RTPReceiver.lift.AffineNetworkSource,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1101.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.AT1101.RTPReceiver.lift.MediaReceiver(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "generic"),
      );
    }
    get media_specific() {
      return VAPI.AT1101.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.AT1101.RTPReceiver.VideoServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.RTPReceiver.VideoServo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.RTPReceiver.VideoServo
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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 dt_node(): VScript.rKeyword<
      VScript.VSocket,
      null | VScript.DeviceTreeNodePayload,
      null | VScript.DeviceTreeNodePayload,
      VAPI.AT1101.RTPReceiver.VideoServo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1101.RTPReceiver.VideoServo
      >(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,
        ),
      });
    }
  }
  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.AT1101.RTPReceiver.AllDiagnostics
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllDiagnostics
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number],
        VAPI.EthernetStats.Counter,
        VAPI.AT1101.RTPReceiver.AllDiagnostics
      >(this, "aggregate_traffic_stats" as VScript.SysName, {
        lift: VAPI.EthernetStats.lift.Counter,
        lower: VAPI.EthernetStats.lower.Counter,
      });
    }

    /**
    if RAM calibration failed and rebooting does not fix the issue, please
    contact customer support
  */
    get ram_calibration(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.AT1101.RTPReceiver.AllDiagnosticsRamCalibration,
      VAPI.AT1101.RTPReceiver.AllDiagnosticsRamCalibration,
      VAPI.AT1101.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.AT1101.RTPReceiver.AllDiagnosticsRamCalibration,
        VAPI.AT1101.RTPReceiver.AllDiagnosticsRamCalibration,
        VAPI.AT1101.RTPReceiver.AllDiagnostics
      >(this, "ram_calibration" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get memory_statistics() {
      return VAPI.Memory.lift.ECCMuxStatistics(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "memory_statistics",
        ),
      );
    }
    get rtp_input(): VScript.rKeyword<
      VScript.VSocket,
      Array<null | [Array<number>, number, number, number, number, number]>,
      Array<null | VAPI.AT1101.RTPReceiver.AllDiagnosticsRtpInput>,
      VAPI.AT1101.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | [Array<number>, number, number, number, number, number]>,
        Array<null | VAPI.AT1101.RTPReceiver.AllDiagnosticsRtpInput>,
        VAPI.AT1101.RTPReceiver.AllDiagnostics
      >(this, "rtp_input" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.RTPReceiver.lift.AllDiagnosticsRtpInput,
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.RTPReceiver.lower.AllDiagnosticsRtpInput,
          ),
        ),
      });
    }
    get mpacket_tracer() {
      return VAPI.RTPReceiver.lift.AllDiagnosticsMpacketTracer(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          6,
          "mpacket_tracer",
        ),
      );
    }
    get packet_tracers() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "RTPReceiver::Data::PacketTracer",
        VAPI.AT1101.RTPReceiver.PacketTracer
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          7,
          "packet_tracers",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPReceiver.lift.PacketTracer(st),
      );
    }
    get igmp_performance_metrics() {
      return VAPI.AT1101.RTPReceiver.lift.AllDiagnosticsIgmpPerformanceMetrics(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          8,
          "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.AT1101.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllDiagnostics
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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 PassthroughReceiverFlowPartitions {
    sdp_a: null | VAPI.AT1101.RTPReceiver.PassthroughFlowPartition;
    sdp_b: null | VAPI.AT1101.RTPReceiver.PassthroughFlowPartition;
  }
  export interface AudioReceiverMediaSpecificFlowPartitions {
    sdp_a: null | VAPI.AT1101.RTPReceiver.AudioFlowPartition;
    sdp_b: null | VAPI.AT1101.RTPReceiver.AudioFlowPartition;
  }
  export interface VideoReceiverMediaSpecificFlowPartitions {
    sdp_a: null | VAPI.AT1101.RTPReceiver.VideoFlowPartition;
    sdp_b: null | VAPI.AT1101.RTPReceiver.VideoFlowPartition;
  }
  export type MetadataBackendGroup = number;
  export interface AllDiagnosticsIgmpPerformanceMetricsIgmpLatency {
    port: null | VAPI.AT1101.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.AT1101.RTPReceiver.AllDiagnosticsIgmpPerformanceMetrics
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.Primitives.NetworkPortID,
        null | string,
        null | string,
        null | number,
        null | number,
        null | number,
        null | number,
      ],
      VAPI.AT1101.RTPReceiver.AllDiagnosticsIgmpPerformanceMetricsIgmpLatency,
      VAPI.AT1101.RTPReceiver.AllDiagnosticsIgmpPerformanceMetrics
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          null | VAPI.AT1101.Primitives.NetworkPortID,
          null | string,
          null | string,
          null | number,
          null | number,
          null | number,
          null | number,
        ],
        VAPI.AT1101.RTPReceiver.AllDiagnosticsIgmpPerformanceMetricsIgmpLatency,
        VAPI.AT1101.RTPReceiver.AllDiagnosticsIgmpPerformanceMetrics
      >(this, "igmp_latency" as VScript.SysName, {
        lift: VAPI.AT1101.RTPReceiver.lift
          .AllDiagnosticsIgmpPerformanceMetricsIgmpLatency,
        lower:
          VAPI.AT1101.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.AT1101.Time.lift.Source(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "ingress"),
      );
    }
    get egress() {
      return VAPI.AT1101.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, boolean, [0, []] | [1, []]],
      null | [number, boolean, [0, []] | [1, []]],
      null | VAPI.AT1101.RTPReceiver.AudioCapabilities,
      null | VAPI.AT1101.RTPReceiver.AudioCapabilities,
      VAPI.AT1101.RTPReceiver.AudioReceiverMediaSpecific
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | [number, boolean, [0, []] | [1, []]],
        null | [number, boolean, [0, []] | [1, []]],
        null | VAPI.AT1101.RTPReceiver.AudioCapabilities,
        null | VAPI.AT1101.RTPReceiver.AudioCapabilities,
        VAPI.AT1101.RTPReceiver.AudioReceiverMediaSpecific
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.RTPReceiver.lift.AudioCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.RTPReceiver.lower.AudioCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.RTPReceiver.lift.AudioCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.RTPReceiver.lower.AudioCapabilities,
          ),
        },
        null,
      );
    }
    get backend(): VScript.rKeyword<
      VScript.VSocket,
      null | [number, number, null | string, Array<null | number>, number],
      null | VAPI.AT1101.RTPReceiver.AudioBackend,
      VAPI.AT1101.RTPReceiver.AudioReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, null | string, Array<null | number>, number],
        null | VAPI.AT1101.RTPReceiver.AudioBackend,
        VAPI.AT1101.RTPReceiver.AudioReceiverMediaSpecific
      >(this, "backend" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.RTPReceiver.lift.AudioBackend,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.RTPReceiver.lower.AudioBackend,
        ),
      });
    }
    get flow_partitions(): VScript.rKeyword<
      VScript.VSocket,
      [null | string, null | string],
      VAPI.AT1101.RTPReceiver.AudioReceiverMediaSpecificFlowPartitions,
      VAPI.AT1101.RTPReceiver.AudioReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | string, null | string],
        VAPI.AT1101.RTPReceiver.AudioReceiverMediaSpecificFlowPartitions,
        VAPI.AT1101.RTPReceiver.AudioReceiverMediaSpecific
      >(this, "flow_partitions" as VScript.SysName, {
        lift: VAPI.AT1101.RTPReceiver.lift
          .AudioReceiverMediaSpecificFlowPartitions,
        lower:
          VAPI.AT1101.RTPReceiver.lower
            .AudioReceiverMediaSpecificFlowPartitions,
      });
    }
    get output() {
      return VAPI.AT1101.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.AT1101.RTPReceiver.VideoCapabilitiesSt211020Caliber,
          null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt20422Caliber,
          null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
          boolean,
          boolean,
          [0, []] | [1, []],
        ],
      | null
      | [
          boolean,
          boolean,
          null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt211020Caliber,
          null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt20422Caliber,
          null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
          boolean,
          boolean,
          [0, []] | [1, []],
        ],
      null | VAPI.AT1101.RTPReceiver.VideoCapabilities,
      null | VAPI.AT1101.RTPReceiver.VideoCapabilities,
      VAPI.AT1101.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        | null
        | [
            boolean,
            boolean,
            null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt211020Caliber,
            null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt20422Caliber,
            null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
            boolean,
            boolean,
            [0, []] | [1, []],
          ],
        | null
        | [
            boolean,
            boolean,
            null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt211020Caliber,
            null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesSt20422Caliber,
            null | VAPI.AT1101.RTPReceiver.VideoCapabilitiesJpegXsCaliber,
            boolean,
            boolean,
            [0, []] | [1, []],
          ],
        null | VAPI.AT1101.RTPReceiver.VideoCapabilities,
        null | VAPI.AT1101.RTPReceiver.VideoCapabilities,
        VAPI.AT1101.RTPReceiver.VideoReceiverMediaSpecific
      >(
        this,
        "capabilities" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.RTPReceiver.lift.VideoCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.RTPReceiver.lower.VideoCapabilities,
          ),
        },
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.RTPReceiver.lift.VideoCapabilities,
          ),
          lower: VScript.VAPIHelpers.liftOrLowerNullable(
            VAPI.AT1101.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.AT1101.RTPReceiver.VideoBackend,
      VAPI.AT1101.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.AT1101.RTPReceiver.VideoBackend,
        VAPI.AT1101.RTPReceiver.VideoReceiverMediaSpecific
      >(this, "backend" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.RTPReceiver.lift.VideoBackend,
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          VAPI.AT1101.RTPReceiver.lower.VideoBackend,
        ),
      });
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.RTPReceiver.VideoReceiverMediaSpecificIssues,
      VAPI.AT1101.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPReceiver.VideoReceiverMediaSpecificIssues,
        VAPI.AT1101.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.AT1101.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.RTPReceiver.VideoReceiverMediaSpecificFlowPartitions,
      VAPI.AT1101.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [null | string, null | string],
        VAPI.AT1101.RTPReceiver.VideoReceiverMediaSpecificFlowPartitions,
        VAPI.AT1101.RTPReceiver.VideoReceiverMediaSpecific
      >(this, "flow_partitions" as VScript.SysName, {
        lift: VAPI.AT1101.RTPReceiver.lift
          .VideoReceiverMediaSpecificFlowPartitions,
        lower:
          VAPI.AT1101.RTPReceiver.lower
            .VideoReceiverMediaSpecificFlowPartitions,
      });
    }
    get output() {
      return VAPI.AT1101.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.AT1101.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, Array<number>],
        null | VAPI.Video.TimestampedSignature,
        VAPI.AT1101.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.AT1101.MetadataProcessor.MetadataExtractor
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          12,
          "soft_metadata_extractor",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPReceiver.VideoReceiverMediaSpecific
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | null
        | ([0, []] | [1, [[0, []] | [1, []] | [2, [Array<number>]], number]]),
        null | VAPI.RTPReceiver.SingleVideoDecoderWorkingSet,
        VAPI.AT1101.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.AT1101.RTPReceiver.RAMChannel;
    blocks: Array<null | VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "video"),
      );
    }
    get start_of_frame() {
      return VAPI.AT1101.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.AT1101.Audio.Essence
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          4,
          "deembedded_audio",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.RTPReceiver.AssociatedStream>,
      VAPI.AT1101.RTPReceiver.MediaReceiverPacketStreams
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number, null | [number, number, number, number]]>,
        Array<VAPI.AT1101.RTPReceiver.AssociatedStream>,
        VAPI.AT1101.RTPReceiver.MediaReceiverPacketStreams
      >(this, "sdp_a" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1101.RTPReceiver.lift.AssociatedStream,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1101.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.AT1101.RTPReceiver.AssociatedStream>,
      VAPI.AT1101.RTPReceiver.MediaReceiverPacketStreams
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<[null | string, number, null | [number, number, number, number]]>,
        Array<VAPI.AT1101.RTPReceiver.AssociatedStream>,
        VAPI.AT1101.RTPReceiver.MediaReceiverPacketStreams
      >(this, "sdp_b" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VAPI.AT1101.RTPReceiver.lift.AssociatedStream,
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          VAPI.AT1101.RTPReceiver.lower.AssociatedStream,
        ),
      });
    }
  }
  /**
  if RAM calibration failed and rebooting does not fix the issue, please
  contact customer support
*/
  export type AllDiagnosticsRamCalibration =
    | "Successful"
    | "Unknown"
    | "Failed";
  export interface AllDiagnosticsRtpInput {
    input_oom: Array<VAPI.Primitives.SaturatingCounter32>;
    queue_full: VAPI.Primitives.SaturatingCounter32;
    lowest_memfree: number;
    memfree: number;
    highest_fifo_usedw: number;
    fifo_usedw: number;
  }
  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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.CleanSwitchingPolicy,
        VAPI.RTPReceiver.CleanSwitchingPolicy,
        VAPI.RTPReceiver.CleanSwitchingPolicy,
        VAPI.RTPReceiver.CleanSwitchingPolicy,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.Primitives.Unsigned16,
        VAPI.Primitives.Unsigned16,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned16,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.SDP.SDPFormat,
        VAPI.SDP.SDPFormat,
        VAPI.SDP.SDPFormat,
        VAPI.SDP.SDPFormat,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.AllSettingsSdpGeneration,
        VAPI.RTPReceiver.AllSettingsSdpGeneration,
        VAPI.RTPReceiver.AllSettingsSdpGeneration,
        VAPI.RTPReceiver.AllSettingsSdpGeneration,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.AllSettingsOnSdpCollision,
        VAPI.RTPReceiver.AllSettingsOnSdpCollision,
        VAPI.RTPReceiver.AllSettingsOnSdpCollision,
        VAPI.RTPReceiver.AllSettingsOnSdpCollision,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.ResourceExhaustionPolicy,
        VAPI.RTPReceiver.ResourceExhaustionPolicy,
        VAPI.RTPReceiver.ResourceExhaustionPolicy,
        VAPI.RTPReceiver.ResourceExhaustionPolicy,
        VAPI.AT1101.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.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.RTPReceiver.OnIsolatedSubstream,
        VAPI.RTPReceiver.OnIsolatedSubstream,
        VAPI.RTPReceiver.OnIsolatedSubstream,
        VAPI.RTPReceiver.OnIsolatedSubstream,
        VAPI.AT1101.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.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
      ],
      [
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
        VAPI.AT1101.RTPReceiver.BufferSize,
      ],
      VAPI.AT1101.RTPReceiver.BufferSizes,
      VAPI.AT1101.RTPReceiver.BufferSizes,
      VAPI.AT1101.RTPReceiver.AllSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
        ],
        [
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
          VAPI.AT1101.RTPReceiver.BufferSize,
        ],
        VAPI.AT1101.RTPReceiver.BufferSizes,
        VAPI.AT1101.RTPReceiver.BufferSizes,
        VAPI.AT1101.RTPReceiver.AllSettings
      >(
        this,
        "buffer_sizes" as VScript.SysName,
        {
          lift: VAPI.AT1101.RTPReceiver.lift.BufferSizes,
          lower: VAPI.AT1101.RTPReceiver.lower.BufferSizes,
        },
        {
          lift: VAPI.AT1101.RTPReceiver.lift.BufferSizes,
          lower: VAPI.AT1101.RTPReceiver.lower.BufferSizes,
        },
        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.AT1101.RTPReceiver.RAMPseudoChannel;
    irq_rate: VAPI.AT1101.RTPReceiver.PacketStreamStreamParametersIrqRate;
  }
  export const Enums = {
    BufferSize: [
      "UpTo4KiPackets",
      "UpTo8KiPackets",
      "UpTo16KiPackets",
      "UpTo32KiPackets",
      "UpTo64KiPackets",
    ] 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),
    AudioEncoderStatus: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioEncoderStatus(_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,
        boolean,
        number,
        number,
        number,
        number,
        number,
        number,
      ],
      _socket: VScript.VSocket,
    ): EncoderHWDataEncoderClassic => {
      return {
        tr: _raw[0],
        interlace: _raw[1],
        line_skip: _raw[2],
        bpm_mode: _raw[3],
        bits: _raw[4],
        enabled: _raw[5],
        out_ts_target: _raw[6],
        mpkt_wordcounter: _raw[7],
        vtotal: _raw[8],
        vstart: _raw[9],
        hactive: _raw[10],
        sts_select: _raw[11],
      };
    },
    EncoderHWData: (
      _raw:
        | [
            0,
            [
              boolean,
              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.AT1101.RTPTransmitter.lift.EncoderHWDataEncoderClassic(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "EncoderVC2",
            value: VAPI.AT1101.RTPTransmitter.lift.EncoderHWDataEncoderVC2(
              _raw[1],
              _socket,
            ),
          };
        case 2:
          return {
            variant: "EncoderJxsCodec",
            value: VAPI.AT1101.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),
    GroupOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new GroupOutput(_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.AT1101.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.AT1101.RTPTransmitter.lift.MediaClockControlTimesource(
              _raw[1],
              _socket,
            ),
          };
        case 1:
          return {
            variant: "Propagate",
            value: VAPI.AT1101.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),
    MipMapOutput: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MipMapOutput(_raw),
    MipMapStreamHardware: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MipMapStreamHardware(_raw),
    MipMapStreamer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new MipMapStreamer(_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],
      _socket: VScript.VSocket,
    ): ST2110Settings => {
      return {
        packing_mode: _raw[0],
        add_st2110_40: _raw[1],
      };
    },
    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.AT1101.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]]
        | [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.AT1101.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),
    AudioStreamHardwareAudioEncoder: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new AudioStreamHardwareAudioEncoder(_raw),
    AudioEncoderError: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AudioEncoderError(_raw),
    RouterEncoderError: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new RouterEncoderError(_raw),
    RouterOutputError: (
      _raw: [number, number],
      _socket: VScript.VSocket,
    ): RouterOutputError => {
      return {
        queue_overflow: _raw[0],
        queue_full: _raw[1],
      };
    },
    GroupOutputHwCapability: (
      _raw: [number],
      _socket: VScript.VSocket,
    ): GroupOutputHwCapability => {
      return {
        num_encoder: _raw[0],
      };
    },
    MipMapOutputHwCapability: (
      _raw: [number],
      _socket: VScript.VSocket,
    ): MipMapOutputHwCapability => {
      return {
        num_encoder: _raw[0],
      };
    },
    RouterOutputHwCapability: (
      _raw: [number],
      _socket: VScript.VSocket,
    ): RouterOutputHwCapability => {
      return {
        num_encoder: _raw[0],
      };
    },
    PortStatisticInterfaces: (
      _raw: VScript.DataViews.Subtree<VScript.VSocket>,
    ) => new PortStatisticInterfaces(_raw),
    PortStatisticLane: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new PortStatisticLane(_raw),
    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,
    AudioEncoderStatus: (_x: AudioEncoderStatus) => _x.raw.kwl,
    AudioFlowReference: (_x: AudioFlowReference) => _x.raw.kwl,
    AudioStreamHardware: (_x: AudioStreamHardware) => _x.raw.kwl,
    AudioStreamer: (_x: AudioStreamer) => _x.raw.kwl,
    EncoderHWDataEncoderClassic: (
      _x: {
        tr: boolean;
        interlace: boolean;
        line_skip: boolean;
        bpm_mode: boolean;

        /**
                    40  bit encoder
                  */
        bits: boolean;
        enabled: boolean;

        /**
                    Lines after end of active video to update the RTP
                    timestamp (TR-03 mode only)
                  */
        out_ts_target: VAPI.Primitives.Unsigned32;

        /**
                    Lines after end of active video to update the RTP
                    timestamp (TR-03 mode only)
                  */
        mpkt_wordcounter: VAPI.Primitives.Unsigned32;
        vtotal: VAPI.Primitives.Unsigned32;
        vstart: VAPI.Primitives.Unsigned32;
        hactive: VAPI.Primitives.Unsigned32;
        sts_select: VAPI.Primitives.Unsigned32;
      },
      _socket: VScript.VSocket,
    ): [
      boolean,
      boolean,
      boolean,
      boolean,
      boolean,
      boolean,
      number,
      number,
      number,
      number,
      number,
      number,
    ] => [
      _x.tr,
      _x.interlace,
      _x.line_skip,
      _x.bpm_mode,
      _x.bits,
      _x.enabled,
      _x.out_ts_target,
      _x.mpkt_wordcounter,
      _x.vtotal,
      _x.vstart,
      _x.hactive,
      _x.sts_select,
    ],
    EncoderHWData: (
      _x:
        | {
            variant: "EncoderClassic";
            value: VAPI.AT1101.RTPTransmitter.EncoderHWDataEncoderClassic;
          }
        | {
            variant: "EncoderVC2";
            value: VAPI.AT1101.RTPTransmitter.EncoderHWDataEncoderVC2;
          }
        | {
            variant: "EncoderJxsCodec";
            value: VAPI.AT1101.RTPTransmitter.EncoderHWDataEncoderJxsCodec;
          },
      _socket: VScript.VSocket,
    ):
      | [
          0,
          [
            boolean,
            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.AT1101.RTPTransmitter.lower.EncoderHWDataEncoderClassic(
              _x.value,
              _socket,
            ),
          ];
        case "EncoderVC2":
          return [
            1,
            VAPI.AT1101.RTPTransmitter.lower.EncoderHWDataEncoderVC2(
              _x.value,
              _socket,
            ),
          ];
        case "EncoderJxsCodec":
          return [
            2,
            VAPI.AT1101.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,
    GroupOutput: (_x: GroupOutput) => _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.AT1101.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.AT1101.RTPTransmitter.MediaClockControlTimesource;
          }
        | {
            variant: "Propagate";
            value: VAPI.AT1101.RTPTransmitter.MediaClockControlPropagate;
          },
      _socket: VScript.VSocket,
    ): [0, [null | string]] | [1, []] => {
      switch (_x.variant) {
        case "Timesource":
          return [
            0,
            VAPI.AT1101.RTPTransmitter.lower.MediaClockControlTimesource(
              _x.value,
              _socket,
            ),
          ];
        case "Propagate":
          return [
            1,
            VAPI.AT1101.RTPTransmitter.lower.MediaClockControlPropagate(
              _x.value,
              _socket,
            ),
          ];
      }
    },
    MediaStreamer: (_x: MediaStreamer) => _x.raw.kwl,
    MediaStreamerVideo: (_x: MediaStreamerVideo) => _x.raw.kwl,
    MipMapOutput: (_x: MipMapOutput) => _x.raw.kwl,
    MipMapStreamHardware: (_x: MipMapStreamHardware) => _x.raw.kwl,
    MipMapStreamer: (_x: MipMapStreamer) => _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;
        add_st2110_40: boolean;
      },
      _socket: VScript.VSocket,
    ): [VAPI.RTPTransmitter.PackingMode, boolean] => [
      _x.packing_mode,
      _x.add_st2110_40,
    ],
    Session: (_x: Session) => _x.raw.kwl,
    MediaClockControlTimesource: (
      _x: { t_src: null | VAPI.AT1101.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.AT1101.RTPTransmitter.ST2110Settings;
          }
        | { variant: "ST2042"; value: VAPI.RTPTransmitter.ST2042Settings }
        | { variant: "JPEG_XS"; value: VAPI.RTPTransmitter.JpegXsSettings },
      _socket: VScript.VSocket,
    ):
      | [0, []]
      | [1, [VAPI.RTPTransmitter.PackingMode, 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.AT1101.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,
    AudioStreamHardwareAudioEncoder: (_x: AudioStreamHardwareAudioEncoder) =>
      _x.raw.kwl,
    AudioEncoderError: (_x: AudioEncoderError) => _x.raw.kwl,
    RouterEncoderError: (_x: RouterEncoderError) => _x.raw.kwl,
    RouterOutputError: (
      _x: {
        queue_overflow: VAPI.Primitives.Unsigned32;
        queue_full: VAPI.Primitives.Unsigned32;
      },
      _socket: VScript.VSocket,
    ): [number, number] => [_x.queue_overflow, _x.queue_full],
    GroupOutputHwCapability: (
      _x: { num_encoder: VAPI.Primitives.Unsigned32 },
      _socket: VScript.VSocket,
    ): [number] => [_x.num_encoder],
    MipMapOutputHwCapability: (
      _x: { num_encoder: VAPI.Primitives.Unsigned32 },
      _socket: VScript.VSocket,
    ): [number] => [_x.num_encoder],
    RouterOutputHwCapability: (
      _x: { num_encoder: VAPI.Primitives.Unsigned32 },
      _socket: VScript.VSocket,
    ): [number] => [_x.num_encoder],
    PortStatisticInterfaces: (_x: PortStatisticInterfaces) => _x.raw.kwl,
    PortStatisticLane: (_x: PortStatisticLane) => _x.raw.kwl,
    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.AT1101.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.AT1101.RTPTransmitter.SessionAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          3,
          "sessions",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.RTPTransmitter.SessionAsNamedTableRow(raw),
      );
    }
    get video_transmitters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::VideoStreamer",
        VAPI.AT1101.RTPTransmitter.VideoStreamerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "video_transmitters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.RTPTransmitter.VideoStreamerAsNamedTableRow(raw),
      );
    }
    get audio_transmitters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::AudioStreamer",
        VAPI.AT1101.RTPTransmitter.AudioStreamerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          5,
          "audio_transmitters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.RTPTransmitter.AudioStreamerAsNamedTableRow(raw),
      );
    }
    get passthrough_transmitters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::ReStreamer",
        VAPI.AT1101.RTPTransmitter.ReStreamerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "passthrough_transmitters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.RTPTransmitter.ReStreamerAsNamedTableRow(raw),
      );
    }
    get mipmap_transmitters() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::MipMapStreamer",
        VAPI.AT1101.RTPTransmitter.MipMapStreamer
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          7,
          "mipmap_transmitters",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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 allocated_blocks(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.AudioEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.AudioEncoder
      >(this, "allocated_blocks" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get block_addr(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Primitives.Unsigned32>,
      VAPI.AT1101.RTPTransmitter.AudioEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Primitives.Unsigned32>,
        VAPI.AT1101.RTPTransmitter.AudioEncoder
      >(this, "block_addr" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get last_sample(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.AudioEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.AudioEncoder
      >(this, "last_sample" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get write_disabled(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.RTPTransmitter.AudioEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.RTPTransmitter.AudioEncoder
      >(this, "write_disabled" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get mode(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.AudioEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.AudioEncoder
      >(this, "mode" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get header_fifo_select(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.AudioEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.AudioEncoder
      >(this, "header_fifo_select" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get sequence_number(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.AudioEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.AudioEncoder
      >(this, "sequence_number" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get error() {
      return VAPI.AT1101.RTPTransmitter.lift.AudioEncoderError(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 7, "error"),
      );
    }
  }
  export class AudioEncoderStatus
    implements VScript.Referenceable<"RTPTransmitter::Data::AudioEncoderStatus">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::AudioEncoderStatus" 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.AT1101.RTPTransmitter.HDRAudio,
      VAPI.AT1101.RTPTransmitter.AudioEncoderStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.RTPTransmitter.HDRAudio,
        VAPI.AT1101.RTPTransmitter.AudioEncoderStatus
      >(this, "wrapped_reference_encoder" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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,
        ),
      });
    }

    /**
    reference to group control hardware
  */
    get wrapped_reference_group_control(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.RTPTransmitter.AudioGroupControl,
      VAPI.AT1101.RTPTransmitter.AudioEncoderStatus
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.RTPTransmitter.AudioGroupControl,
        VAPI.AT1101.RTPTransmitter.AudioEncoderStatus
      >(this, "wrapped_reference_group_control" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.RTPTransmitter.AudioGroupControl(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::AudioGroupControl"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  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.AT1101.RTPTransmitter.HDRAudio,
      VAPI.AT1101.RTPTransmitter.AudioFlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.RTPTransmitter.HDRAudio,
        VAPI.AT1101.RTPTransmitter.AudioFlowReference
      >(this, "hdr_ref" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.RTPTransmitter.AudioFlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.RTPTransmitter.AudioFlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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 possible_sps_source(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.RTPTransmitter.SPSMode,
      null | VAPI.RTPTransmitter.SPSMode,
      VAPI.AT1101.RTPTransmitter.AudioStreamHardware
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.RTPTransmitter.SPSMode,
        null | VAPI.RTPTransmitter.SPSMode,
        VAPI.AT1101.RTPTransmitter.AudioStreamHardware
      >(this, "possible_sps_source" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get group_control_status() {
      return VAPI.RTPTransmitter.lift.AudioGroupControlStatus(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "group_control_status",
        ),
      );
    }
    get audio_encoder() {
      return VAPI.AT1101.RTPTransmitter.lift.AudioStreamHardwareAudioEncoder(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "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.AT1101.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.AT1101.Audio.TimedSource,
      VAPI.AT1101.Audio.TimedSource,
      VAPI.AT1101.RTPTransmitter.AudioStreamer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1101.Audio.TimedSource,
        VAPI.AT1101.Audio.TimedSource,
        VAPI.AT1101.RTPTransmitter.AudioStreamer
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VAPI.AT1101.Audio.lift.TimedSource,
          lower: VAPI.AT1101.Audio.lower.TimedSource,
        },
        {
          lift: VAPI.AT1101.Audio.lift.TimedSource,
          lower: VAPI.AT1101.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.AT1101.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 {
    tr: boolean;
    interlace: boolean;
    line_skip: boolean;
    bpm_mode: boolean;

    /**
    40  bit encoder
  */
    bits: boolean;
    enabled: boolean;

    /**
    Lines after end of active video to update the RTP timestamp (TR-03 mode
    only)
  */
    out_ts_target: VAPI.Primitives.Unsigned32;

    /**
    Lines after end of active video to update the RTP timestamp (TR-03 mode
    only)
  */
    mpkt_wordcounter: VAPI.Primitives.Unsigned32;
    vtotal: VAPI.Primitives.Unsigned32;
    vstart: VAPI.Primitives.Unsigned32;
    hactive: VAPI.Primitives.Unsigned32;
    sts_select: VAPI.Primitives.Unsigned32;
  }
  export type EncoderHWData =
    | {
        variant: "EncoderClassic";
        value: VAPI.AT1101.RTPTransmitter.EncoderHWDataEncoderClassic;
      }
    | {
        variant: "EncoderVC2";
        value: VAPI.AT1101.RTPTransmitter.EncoderHWDataEncoderVC2;
      }
    | {
        variant: "EncoderJxsCodec";
        value: VAPI.AT1101.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.AT1101.RTPTransmitter.HDRVideo,
      VAPI.AT1101.RTPTransmitter.FlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.RTPTransmitter.HDRVideo,
        VAPI.AT1101.RTPTransmitter.FlowReference
      >(this, "hdr_ref" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.RTPTransmitter.FlowReference
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.RTPTransmitter.FlowReference
      >(this, "hdr_index" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class GroupOutput
    implements VScript.Referenceable<"RTPTransmitter::Data::GroupOutput">
  {
    readonly type_identifier = "RTPTransmitter::Data::GroupOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get traffic_shaper_interval(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Primitives.Unsigned32>,
      VAPI.AT1101.RTPTransmitter.GroupOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Primitives.Unsigned32>,
        VAPI.AT1101.RTPTransmitter.GroupOutput
      >(this, "traffic_shaper_interval" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get hw_capability(): VScript.rKeyword<
      VScript.VSocket,
      [number],
      VAPI.AT1101.RTPTransmitter.GroupOutputHwCapability,
      VAPI.AT1101.RTPTransmitter.GroupOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number],
        VAPI.AT1101.RTPTransmitter.GroupOutputHwCapability,
        VAPI.AT1101.RTPTransmitter.GroupOutput
      >(this, "hw_capability" as VScript.SysName, {
        lift: VAPI.AT1101.RTPTransmitter.lift.GroupOutputHwCapability,
        lower: VAPI.AT1101.RTPTransmitter.lower.GroupOutputHwCapability,
      });
    }
    get group_control_encoder_header() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::HDRAudio",
        VAPI.AT1101.RTPTransmitter.HDRAudio
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "group_control_encoder_header",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPTransmitter.lift.HDRAudio(raw),
      );
    }
  }
  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.AT1101.RTPTransmitter.HDRAudio
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1101.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.AT1101.RTPTransmitter.lift.HeaderReference(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "related_references",
        ),
      );
    }
    get audio_encoder_hw() {
      return VAPI.AT1101.RTPTransmitter.lift.AudioEncoder(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "audio_encoder_hw",
        ),
      );
    }
  }
  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.AT1101.RTPTransmitter.lift.HDRAudio(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "audio"),
      );
    }
    get video() {
      return VAPI.AT1101.RTPTransmitter.lift.HDRVideo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "video"),
      );
    }
    get mipmap() {
      return VAPI.AT1101.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.AT1101.RTPTransmitter.HDRMipmap
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1101.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.AT1101.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_tdm_output_bandwidth(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.NetworkBandwidth,
      VAPI.AT1101.RTPTransmitter.HDRVideo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1101.RTPTransmitter.HDRVideo
      >(this, "reserved_tdm_output_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_bandwidth(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.NetworkBandwidth,
      VAPI.AT1101.RTPTransmitter.HDRVideo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1101.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.AT1101.RTPTransmitter.HDRVideo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1101.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.AT1101.RTPTransmitter.lift.HeaderReference(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          3,
          "related_references",
        ),
      );
    }
    get router_encoder_hw() {
      return VAPI.AT1101.RTPTransmitter.lift.RouterEncoder(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          4,
          "router_encoder_hw",
        ),
      );
    }
  }
  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 lane() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "RTPTransmitter::Data::LaneHeader",
        VAPI.AT1101.RTPTransmitter.LaneHeader
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 0, "lane"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPTransmitter.lift.LaneHeader(st),
      );
    }
    get ports() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::PortStatistic",
        VAPI.AT1101.RTPTransmitter.PortStatistic
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 1, "ports"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPTransmitter.lift.PortStatistic(raw),
      );
    }
    get xbar_encoder() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::XbarEncoder",
        VAPI.AT1101.RTPTransmitter.XbarEncoder
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "xbar_encoder",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPTransmitter.lift.XbarEncoder(raw),
      );
    }
    get router_error() {
      return VAPI.RTPTransmitter.lift.RouterError(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "router_error"),
      );
    }
    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,
          4,
          "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.AT1101.NetworkInterfaces.LaneStatistics,
        [number, number, number, number],
        VAPI.EthernetStats.Counter
      >,
      VAPI.AT1101.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.AT1101.NetworkInterfaces.LaneStatistics,
          [number, number, number, number],
          VAPI.EthernetStats.Counter
        >,
        VAPI.AT1101.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.AT1101.NetworkInterfaces.LaneStatistics,
            [number, number, number, number],
            VAPI.EthernetStats.Counter
          >(
            (kwl: VScript.KWLName<"full">, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.RTPTransmitter.LaneStatistic,
      VAPI.AT1101.RTPTransmitter.LaneHeader
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number, number, number, null | string],
        VAPI.AT1101.RTPTransmitter.LaneStatistic,
        VAPI.AT1101.RTPTransmitter.LaneHeader
      >(this, "statistic" as VScript.SysName, {
        lift: VAPI.AT1101.RTPTransmitter.lift.LaneStatistic,
        lower: VAPI.AT1101.RTPTransmitter.lower.LaneStatistic,
      });
    }
    get video() {
      return VAPI.AT1101.RTPTransmitter.lift.RouterOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "video"),
      );
    }
    get audio() {
      return VAPI.AT1101.RTPTransmitter.lift.GroupOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "audio"),
      );
    }
    get mipmap() {
      return VAPI.AT1101.RTPTransmitter.lift.MipMapOutput(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "mipmap"),
      );
    }
  }
  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.AT1101.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.AT1101.RTPTransmitter.MediaClockControl,
      VAPI.AT1101.RTPTransmitter.MediaClockControl,
      VAPI.AT1101.RTPTransmitter.MediaClock
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [0, [null | string]] | [1, []],
        [0, [null | string]] | [1, []],
        VAPI.AT1101.RTPTransmitter.MediaClockControl,
        VAPI.AT1101.RTPTransmitter.MediaClockControl,
        VAPI.AT1101.RTPTransmitter.MediaClock
      >(
        this,
        "clock_mode" as VScript.SysName,
        {
          lift: VAPI.AT1101.RTPTransmitter.lift.MediaClockControl,
          lower: VAPI.AT1101.RTPTransmitter.lower.MediaClockControl,
        },
        {
          lift: VAPI.AT1101.RTPTransmitter.lift.MediaClockControl,
          lower: VAPI.AT1101.RTPTransmitter.lower.MediaClockControl,
        },
        null,
      );
    }
    get offset(): VScript.dKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.AT1101.RTPTransmitter.MediaClock
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPTransmitter.MediaClock
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.RTPTransmitter.MediaClock
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.RTPTransmitter.MediaClockControlTimesource;
      }
    | {
        variant: "Propagate";
        value: VAPI.AT1101.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.AT1101.RTPTransmitter.Session,
      | null
      | (VScript.Referenceable<"RTPTransmitter::Data::Session"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.RTPTransmitter.MediaStreamer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.RTPTransmitter.Session,
        | null
        | (VScript.Referenceable<"RTPTransmitter::Data::Session"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.RTPTransmitter.MediaStreamer
      >(
        this,
        "hosting_session" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPTransmitter.MediaStreamer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPTransmitter.MediaStreamerIssues,
        VAPI.AT1101.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.AT1101.RTPTransmitter.Session,
      | null
      | (VScript.Referenceable<"RTPTransmitter::Data::Session"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.RTPTransmitter.MediaStreamerVideo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.RTPTransmitter.Session,
        | null
        | (VScript.Referenceable<"RTPTransmitter::Data::Session"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.RTPTransmitter.MediaStreamerVideo
      >(
        this,
        "hosting_session" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.RTPTransmitter.MediaStreamerVideo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.RTPTransmitter.MediaStreamerVideoIssues,
        VAPI.AT1101.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 MipMapOutput
    implements VScript.Referenceable<"RTPTransmitter::Data::MipMapOutput">
  {
    readonly type_identifier = "RTPTransmitter::Data::MipMapOutput" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get hw_capability(): VScript.rKeyword<
      VScript.VSocket,
      [number],
      VAPI.AT1101.RTPTransmitter.MipMapOutputHwCapability,
      VAPI.AT1101.RTPTransmitter.MipMapOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number],
        VAPI.AT1101.RTPTransmitter.MipMapOutputHwCapability,
        VAPI.AT1101.RTPTransmitter.MipMapOutput
      >(this, "hw_capability" as VScript.SysName, {
        lift: VAPI.AT1101.RTPTransmitter.lift.MipMapOutputHwCapability,
        lower: VAPI.AT1101.RTPTransmitter.lower.MipMapOutputHwCapability,
      });
    }
    get mipmap_encoder_header() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::HDRMipmap",
        VAPI.AT1101.RTPTransmitter.HDRMipmap
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "mipmap_encoder_header",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPTransmitter.lift.HDRMipmap(raw),
      );
    }
  }
  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.AT1101.RTPTransmitter.MipMapStreamHardwareRouterEncoder
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "router_encoder",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.RTPTransmitter.lift.MipMapStreamHardware(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          2,
          "connected_hardware",
        ),
      );
    }
  }
  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.AT1101.RTPTransmitter.PortStatistic
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.NetworkBandwidth,
        VAPI.AT1101.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.AT1101.RTPTransmitter.PortStatistic
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.RTPTransmitter.PortStatisticInterfaces
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "interfaces",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPTransmitter.lift.PortStatisticInterfaces(raw),
      );
    }
    get lane() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::PortStatistic::Lane",
        VAPI.AT1101.RTPTransmitter.PortStatisticLane
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 3, "lane"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPTransmitter.lift.PortStatisticLane(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.AT1101.RTPTransmitter.ReStreamer
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.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>) {}
    get allocated_blocks(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.RouterEncoder
      >(this, "allocated_blocks" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get block_addr(): VScript.rKeyword<
      VScript.VSocket,
      Array<number>,
      Array<VAPI.Primitives.Unsigned32>,
      VAPI.AT1101.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<VAPI.Primitives.Unsigned32>,
        VAPI.AT1101.RTPTransmitter.RouterEncoder
      >(this, "block_addr" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get sequence_number(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.RouterEncoder
      >(this, "sequence_number" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get sequence_add_eol(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.RouterEncoder
      >(this, "sequence_add_eol" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get no_m_packet(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.RTPTransmitter.RouterEncoder
      >(this, "no_m_packet" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get timestamp_offset(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.RouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.RouterEncoder
      >(this, "timestamp_offset" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get error() {
      return VAPI.AT1101.RTPTransmitter.lift.RouterEncoderError(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "error"),
      );
    }
  }
  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 error(): VScript.rKeyword<
      VScript.VSocket,
      [number, number],
      VAPI.AT1101.RTPTransmitter.RouterOutputError,
      VAPI.AT1101.RTPTransmitter.RouterOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number, number],
        VAPI.AT1101.RTPTransmitter.RouterOutputError,
        VAPI.AT1101.RTPTransmitter.RouterOutput
      >(this, "error" as VScript.SysName, {
        lift: VAPI.AT1101.RTPTransmitter.lift.RouterOutputError,
        lower: VAPI.AT1101.RTPTransmitter.lower.RouterOutputError,
      });
    }
    get hw_capability(): VScript.rKeyword<
      VScript.VSocket,
      [number],
      VAPI.AT1101.RTPTransmitter.RouterOutputHwCapability,
      VAPI.AT1101.RTPTransmitter.RouterOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [number],
        VAPI.AT1101.RTPTransmitter.RouterOutputHwCapability,
        VAPI.AT1101.RTPTransmitter.RouterOutput
      >(this, "hw_capability" as VScript.SysName, {
        lift: VAPI.AT1101.RTPTransmitter.lift.RouterOutputHwCapability,
        lower: VAPI.AT1101.RTPTransmitter.lower.RouterOutputHwCapability,
      });
    }
    get router_encoder_header() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::HDRVideo",
        VAPI.AT1101.RTPTransmitter.HDRVideo
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          2,
          "router_encoder_header",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPTransmitter.lift.HDRVideo(raw),
      );
    }
  }
  export interface ST2110Settings {
    packing_mode: VAPI.RTPTransmitter.PackingMode;
    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.AT1101.RTPTransmitter.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.RTPTransmitter.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.RTPTransmitter.VideoStreamer>,
      VAPI.AT1101.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.RTPTransmitter.VideoStreamer>,
        VAPI.AT1101.RTPTransmitter.Session
      >(this, "video_transmitters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.RTPTransmitter.AudioStreamer>,
      VAPI.AT1101.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.RTPTransmitter.AudioStreamer>,
        VAPI.AT1101.RTPTransmitter.Session
      >(this, "audio_transmitters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.RTPTransmitter.ReStreamer>,
      VAPI.AT1101.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.RTPTransmitter.ReStreamer>,
        VAPI.AT1101.RTPTransmitter.Session
      >(this, "passthrough_transmitters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.RTPTransmitter.MipMapStreamer>,
      VAPI.AT1101.RTPTransmitter.Session
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.RTPTransmitter.MipMapStreamer>,
        VAPI.AT1101.RTPTransmitter.Session
      >(this, "mipmap_transmitters" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.RTPTransmitter.Session
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | string],
        [null | string, null | string],
        VAPI.RTPTransmitter.SessionInterfaces,
        VAPI.RTPTransmitter.SessionInterfaces,
        VAPI.AT1101.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.AT1101.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]]
      | [2, [VAPI.Video.DiracCompression, boolean]]
      | [
          3,
          [
            [0, [number]] | [1, [number]],
            VAPI.RTPTransmitter.LVLMODE,
            boolean,
            boolean,
          ],
        ],
      | [0, []]
      | [1, [VAPI.RTPTransmitter.PackingMode, boolean]]
      | [2, [VAPI.Video.DiracCompression, boolean]]
      | [
          3,
          [
            [0, [number]] | [1, [number]],
            VAPI.RTPTransmitter.LVLMODE,
            boolean,
            boolean,
          ],
        ],
      VAPI.AT1101.RTPTransmitter.VideoFormat,
      VAPI.AT1101.RTPTransmitter.VideoFormat,
      VAPI.AT1101.RTPTransmitter.VideoConfigurationContainer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        | [0, []]
        | [1, [VAPI.RTPTransmitter.PackingMode, boolean]]
        | [2, [VAPI.Video.DiracCompression, boolean]]
        | [
            3,
            [
              [0, [number]] | [1, [number]],
              VAPI.RTPTransmitter.LVLMODE,
              boolean,
              boolean,
            ],
          ],
        | [0, []]
        | [1, [VAPI.RTPTransmitter.PackingMode, boolean]]
        | [2, [VAPI.Video.DiracCompression, boolean]]
        | [
            3,
            [
              [0, [number]] | [1, [number]],
              VAPI.RTPTransmitter.LVLMODE,
              boolean,
              boolean,
            ],
          ],
        VAPI.AT1101.RTPTransmitter.VideoFormat,
        VAPI.AT1101.RTPTransmitter.VideoFormat,
        VAPI.AT1101.RTPTransmitter.VideoConfigurationContainer
      >(
        this,
        "transport_format" as VScript.SysName,
        {
          lift: VAPI.AT1101.RTPTransmitter.lift.VideoFormat,
          lower: VAPI.AT1101.RTPTransmitter.lower.VideoFormat,
        },
        {
          lift: VAPI.AT1101.RTPTransmitter.lift.VideoFormat,
          lower: VAPI.AT1101.RTPTransmitter.lower.VideoFormat,
        },
        null,
      );
    }
    get vanc() {
      return VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Audio.TimedSource,
      VAPI.AT1101.Audio.TimedSource,
      VAPI.AT1101.RTPTransmitter.VideoConfigurationContainer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1101.Audio.TimedSource,
        VAPI.AT1101.Audio.TimedSource,
        VAPI.AT1101.RTPTransmitter.VideoConfigurationContainer
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VAPI.AT1101.Audio.lift.TimedSource,
          lower: VAPI.AT1101.Audio.lower.TimedSource,
        },
        {
          lift: VAPI.AT1101.Audio.lift.TimedSource,
          lower: VAPI.AT1101.Audio.lower.TimedSource,
        },
        null,
      );
    }
  }
  export type VideoFormat =
    | { variant: "ST2022_6"; value: VAPI.RTPTransmitter.ST20226Settings }
    | { variant: "ST2110_20"; value: VAPI.AT1101.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.AT1101.RTPTransmitter.VideoStreamHardwareXbarEncoder
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "xbar_encoder",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.RTPTransmitter.lift.VideoStreamHardwareXbarEncoder(raw),
      );
    }
    get router_encoder() {
      return new VScript.StronglyTypedTable<
        VScript.VSocket,
        "RTPTransmitter::Data::VideoStreamHardware::RouterEncoder",
        VAPI.AT1101.RTPTransmitter.VideoStreamHardwareRouterEncoder
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "router_encoder",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.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.AT1101.Video.TimedSource,
      VAPI.AT1101.Video.TimedSource,
      VAPI.AT1101.RTPTransmitter.VideoStreamer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        [null | string, null | number | string],
        [null | string, null | number | string],
        VAPI.AT1101.Video.TimedSource,
        VAPI.AT1101.Video.TimedSource,
        VAPI.AT1101.RTPTransmitter.VideoStreamer
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VAPI.AT1101.Video.lift.TimedSource,
          lower: VAPI.AT1101.Video.lower.TimedSource,
        },
        {
          lift: VAPI.AT1101.Video.lift.TimedSource,
          lower: VAPI.AT1101.Video.lower.TimedSource,
        },
        null,
      );
    }
    get configuration() {
      return VAPI.AT1101.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.AT1101.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 st2110_40_capable(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.RTPTransmitter.XbarEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.RTPTransmitter.XbarEncoder
      >(this, "st2110_40_capable" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get st2110_40_in_use(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.RTPTransmitter.XbarEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.RTPTransmitter.XbarEncoder
      >(this, "st2110_40_in_use" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get debug(): VScript.rKeyword<
      VScript.VSocket,
      | [
          0,
          [
            boolean,
            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.AT1101.RTPTransmitter.EncoderHWData,
      VAPI.AT1101.RTPTransmitter.XbarEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        | [
            0,
            [
              boolean,
              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.AT1101.RTPTransmitter.EncoderHWData,
        VAPI.AT1101.RTPTransmitter.XbarEncoder
      >(this, "debug" as VScript.SysName, {
        lift: VAPI.AT1101.RTPTransmitter.lift.EncoderHWData,
        lower: VAPI.AT1101.RTPTransmitter.lower.EncoderHWData,
      });
    }
  }
  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>) {}
    get primary() {
      return VAPI.AT1101.RTPTransmitter.lift.AudioEncoderStatus(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "primary"),
      );
    }
    get secondary() {
      return VAPI.AT1101.RTPTransmitter.lift.AudioEncoderStatus(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "secondary"),
      );
    }
  }
  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.AT1101.RTPTransmitter.AudioEncoderError
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.RTPTransmitter.AudioEncoderError
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.AudioEncoderError
      >(this, "queue_full" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export class RouterEncoderError
    implements
      VScript.Referenceable<"RTPTransmitter::Data::RouterEncoder::Error">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::RouterEncoder::Error" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get queue_overflow(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned32,
      VAPI.AT1101.RTPTransmitter.RouterEncoderError
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.RouterEncoderError
      >(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.AT1101.RTPTransmitter.RouterEncoderError
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.RTPTransmitter.RouterEncoderError
      >(this, "queue_full" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
  }
  export interface RouterOutputError {
    queue_overflow: VAPI.Primitives.Unsigned32;
    queue_full: VAPI.Primitives.Unsigned32;
  }
  export interface GroupOutputHwCapability {
    num_encoder: VAPI.Primitives.Unsigned32;
  }
  export interface MipMapOutputHwCapability {
    num_encoder: VAPI.Primitives.Unsigned32;
  }
  export interface RouterOutputHwCapability {
    num_encoder: VAPI.Primitives.Unsigned32;
  }
  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.AT1101.RTPTransmitter.PortStatisticInterfaces
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.NetworkInterfaces.VirtualInterface,
        VAPI.AT1101.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 class PortStatisticLane
    implements
      VScript.Referenceable<"RTPTransmitter::Data::PortStatistic::Lane">
  {
    readonly type_identifier =
      "RTPTransmitter::Data::PortStatistic::Lane" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get wrapped_reference(): VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.AT1101.RTPTransmitter.LaneHeader,
      VAPI.AT1101.RTPTransmitter.PortStatisticLane
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.RTPTransmitter.LaneHeader,
        VAPI.AT1101.RTPTransmitter.PortStatisticLane
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.RTPTransmitter.LaneHeader(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"RTPTransmitter::Data::LaneHeader"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      });
    }
  }
  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.AT1101.RTPTransmitter.HDRMipmap,
      VAPI.AT1101.RTPTransmitter.MipMapStreamHardwareRouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.RTPTransmitter.HDRMipmap,
        VAPI.AT1101.RTPTransmitter.MipMapStreamHardwareRouterEncoder
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.RTPTransmitter.HDRVideo,
      VAPI.AT1101.RTPTransmitter.VideoStreamHardwareRouterEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.RTPTransmitter.HDRVideo,
        VAPI.AT1101.RTPTransmitter.VideoStreamHardwareRouterEncoder
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.RTPTransmitter.XbarEncoder,
      VAPI.AT1101.RTPTransmitter.VideoStreamHardwareXbarEncoder
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.RTPTransmitter.XbarEncoder,
        VAPI.AT1101.RTPTransmitter.VideoStreamHardwareXbarEncoder
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.VideoRePlay.lift.Video(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return VAPI.AT1101.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.AT1101.SampleRateConverter.lift.AUDIOSRCSTATUSHwSettings(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "hw_settings"),
      );
    }
    get hw_resource_mux() {
      return VAPI.AT1101.SampleRateConverter.lift.RESOURCE(
        VScript.VAPIHelpers.subtree_child_checked(
          this.raw,
          1,
          "hw_resource_mux",
        ),
      );
    }
  }
  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.AT1101.SampleRateConverter.SRCAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.SampleRateConverter.SRCAsNamedTableRow(raw),
      );
    }
    get hardware_resources() {
      return VAPI.AT1101.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.AT1101.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.SampleRateConverter.INPUTSTATUS
      >(this, "sop_src" 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.AT1101.SampleRateConverter.INPUTSTATUS
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1101.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.AT1101.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.AT1101.SampleRateConverter.RESOURCE>,
      VAPI.AT1101.SampleRateConverter.RESOURCE
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.SampleRateConverter.RESOURCE>,
        VAPI.AT1101.SampleRateConverter.RESOURCE
      >(this, "related_mux" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.SampleRateConverter.AUDIOSRCSTATUS
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "hw_resource_x24",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.SampleRateConverter.SRC
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.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.AT1101.Audio.Essence,
      | null
      | (VScript.Referenceable<"Audio::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.SampleRateConverter.SRC
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Audio.Essence,
        | null
        | (VScript.Referenceable<"Audio::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.SampleRateConverter.SRC
      >(
        this,
        "a_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.Audio.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "output"),
      );
    }
    get connected_hardware() {
      return VAPI.AT1101.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,
      Array<null | string>,
      Array<null | VAPI.AT1101.SampleRateConverter.AUDIOSRCSTATUS>,
      VAPI.AT1101.SampleRateConverter.SRCHardware
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.SampleRateConverter.AUDIOSRCSTATUS>,
        VAPI.AT1101.SampleRateConverter.SRCHardware
      >(this, "hw" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.SampleRateConverter.AUDIOSRCSTATUS(
                VScript.VAPIHelpers.get_subtree(
                  _socket,
                  raw_kwl as VScript.KWLName<"full">,
                ),
              ),
          ),
        ),
        lower: VScript.VAPIHelpers.lowerArray(
          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.AT1101.SampleRateConverter.INPUTSTATUS>,
      VAPI.AT1101.SampleRateConverter.SRCHardware
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | string>,
        Array<null | VAPI.AT1101.SampleRateConverter.INPUTSTATUS>,
        VAPI.AT1101.SampleRateConverter.SRCHardware
      >(this, "hw_mux" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftArray(
          VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.SampleRateConverter.Time
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.SampleRateConverter.Time
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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 pairs() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "SampleRateConverter::Data::PAIRCOM",
        VAPI.SampleRateConverter.PAIRCOM
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 0, "pairs"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.SampleRateConverter.lift.PAIRCOM(st),
      );
    }
  }
  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.AT1101.SampleRateConverter.SRCSettings
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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,
      );
    }
  }
}
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.AT1101.Splitter.SPAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.Splitter.SP
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.Splitter.SP
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.Splitter.SPOutputs
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 1, "outputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.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),
    InternalHWSgmii: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new InternalHWSgmii(_raw),
    AllSysinfo: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
      new AllSysinfo(_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,
    InternalHWSgmii: (_x: InternalHWSgmii) => _x.raw.kwl,
    AllSysinfo: (_x: AllSysinfo) => _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.AT1101.System.lift.Temperature(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "temperature"),
      );
    }
    get power() {
      return VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.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.AT1101.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number],
        null | VAPI.System.Revision,
        VAPI.AT1101.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.AT1101.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.AT1101.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.System.lift.MEMORY(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 20, "memory"),
      );
    }
    get internal_hw() {
      return VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.System.BOARDPOS,
        VAPI.System.BOARDPOS,
        VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.System.LEDBRIGHTNESS,
        VAPI.System.LEDBRIGHTNESS,
        VAPI.System.LEDBRIGHTNESS,
        VAPI.System.LEDBRIGHTNESS,
        VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.System.FPGA,
      null | VAPI.AT1101.System.FPGA,
      VAPI.AT1101.System.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.AT1101.System.FPGA,
        null | VAPI.AT1101.System.FPGA,
        VAPI.AT1101.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.AT1101.System.FPGASelection,
      null | VAPI.AT1101.System.FPGASelection,
      null | VAPI.AT1101.System.FPGASelection,
      null | VAPI.AT1101.System.FPGASelection,
      VAPI.AT1101.System.All
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | VAPI.AT1101.System.FPGASelection,
        null | VAPI.AT1101.System.FPGASelection,
        null | VAPI.AT1101.System.FPGASelection,
        null | VAPI.AT1101.System.FPGASelection,
        VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1101.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.AT1101.System.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        string,
        string,
        string,
        string,
        VAPI.AT1101.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"
    | "AVP_40GbE"
    | "DMV_40GbE"
    | "UDX_40GbE"
    | "J2KD"
    | "J2KD_40GbE"
    | "CC3D_40GbE"
    | "JPEGXS_40GbE"
    | "PCAP_40GbE";
  export type FPGASelection =
    | "AVP"
    | "AVP_40GbE"
    | "CC3D_40GbE"
    | "DMV_40GbE"
    | "JPEGXS_40GbE"
    | "PCAP_40GbE"
    | "UDX_40GbE";
  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.AT1101.System.InternalHW
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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_5_0
  */
    get pcie_speed(): VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.System.PCIESPEED,
      null | VAPI.System.PCIESPEED,
      VAPI.AT1101.System.InternalHW
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.System.PCIESPEED,
        null | VAPI.System.PCIESPEED,
        VAPI.AT1101.System.InternalHW
      >(this, "pcie_speed" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get sgmii() {
      return new VScript.StronglyTypedArray<
        VScript.VSocket,
        "System::Data::InternalHW::Sgmii",
        VAPI.AT1101.System.InternalHWSgmii
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 2, "sgmii"),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.System.lift.InternalHWSgmii(st),
      );
    }
    get issues(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.AT1101.System.InternalHWIssues,
      VAPI.AT1101.System.InternalHW
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1101.System.InternalHWIssues,
        VAPI.AT1101.System.InternalHW
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1101.System.InternalHWIssues => ({
          wrong_pcie_speed_or_lanecount: (x & 1) !== 0,
        }),
        lower: (
          x: VAPI.AT1101.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_sodimm1(): VScript.rKeyword<
      VScript.VSocket,
      VAPI.System.RAMCALIBRATION,
      VAPI.System.RAMCALIBRATION,
      VAPI.AT1101.System.MEMORY
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        VAPI.System.RAMCALIBRATION,
        VAPI.System.RAMCALIBRATION,
        VAPI.AT1101.System.MEMORY
      >(this, "ram_sodimm1" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

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

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

    get spd_sodimm1() {
      return VAPI.System.lift.SPD(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 3, "spd_sodimm1"),
      );
    }
    /**
    J111
  */

    get spd_sodimm2() {
      return VAPI.System.lift.SPD(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 4, "spd_sodimm2"),
      );
    }
    get spd_cpu() {
      return VAPI.System.lift.SPD(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "spd_cpu"),
      );
    }
  }
  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.AT1101.System.Partitions
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.System.SWVersion,
        VAPI.AT1101.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"),
      );
    }
  }
  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 P0V95
  */
    get p0v95(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Power
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Power
      >(this, "p0v95" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    Power usage for P1V1 and P1V2
  */
    get p1v1_1v2(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Power
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Power
      >(this, "p1v1_1v2" 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.AT1101.System.Power
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Power
      >(this, "p1v8" 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_int(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Temperature
      >(this, "fpga_int" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get fpga_ext(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Temperature
      >(this, "fpga_ext" 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.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Temperature
      >(this, "cpu" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get u21(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Temperature
      >(this, "u21" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get u22(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Temperature
      >(this, "u22" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

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

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

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

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

    /**
    Temperature of U44
  */
    get p1v8(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Temperature
      >(this, "p1v8" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get ioboard(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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 1 (J101)
  */
    get fpga_sodimm1(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Temperature
      >(this, "fpga_sodimm1" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

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

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

    /**
    Temperature of U2
  */
    get mgmt_phy(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.Temperature
      >(this, "mgmt_phy" 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:
    
    `CPU`: 100 °C
    
    `CPU_SODIMM`: 75 °C
    
    `MGMT_PHY`: 125 °C
    
    `FPGA_SODIMM1`: 75 °C
    
    `FPGA_SODIMM2`: 75 °C
    
    `FAN_CONTROLLER`: 70 °C
    
    `FPGA_EXT`: 100 °C
    
    `FPGA_INT`: 105 °C
    
    `P0V95_T1`: 125 °C
    
    `P0V95_T2`: 125 °C
    
    `P1V1_P1V2` 125 °C
    
    `P1V8`: 125 °C
    
    `U21`: 85 °C
    
    `U22`: 70 °C
  */
    get accumulated_overtemperature_time(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.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.AT1101.System.TemperatureIssues,
      VAPI.AT1101.System.Temperature
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1101.System.TemperatureIssues,
        VAPI.AT1101.System.Temperature
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1101.System.TemperatureIssues => ({
          cpu_sodimm_temperature_above_critical: (x & 1) !== 0,
          cpu_sodimm_temperature_high: (x & 2) !== 0,
          cpu_temperature_above_critical: (x & 4) !== 0,
          cpu_temperature_high: (x & 8) !== 0,
          fan_controller_temperature_above_critical: (x & 16) !== 0,
          fan_controller_temperature_high: (x & 32) !== 0,
          fpga_ext_temperature_above_critical: (x & 64) !== 0,
          fpga_ext_temperature_high: (x & 128) !== 0,
          fpga_int_temperature_above_critical: (x & 256) !== 0,
          fpga_int_temperature_high: (x & 512) !== 0,
          fpga_sodimm1_temperature_above_critical: (x & 1024) !== 0,
          fpga_sodimm1_temperature_high: (x & 2048) !== 0,
          fpga_sodimm2_temperature_above_critical: (x & 4096) !== 0,
          fpga_sodimm2_temperature_high: (x & 8192) !== 0,
          ioboard_temperature_above_critical: (x & 16384) !== 0,
          ioboard_temperature_high: (x & 32768) !== 0,
          mgmt_phy_temperature_above_critical: (x & 65536) !== 0,
          mgmt_phy_temperature_high: (x & 131072) !== 0,
          missing_data: (x & 262144) !== 0,
          p0v95_t1_temperature_above_critical: (x & 524288) !== 0,
          p0v95_t1_temperature_high: (x & 1048576) !== 0,
          p0v95_t2_temperature_above_critical: (x & 2097152) !== 0,
          p0v95_t2_temperature_high: (x & 4194304) !== 0,
          p1v1_p1v2_temperature_above_critical: (x & 8388608) !== 0,
          p1v1_p1v2_temperature_high: (x & 16777216) !== 0,
          p1v8_temperature_above_critical: (x & 33554432) !== 0,
          p1v8_temperature_high: (x & 67108864) !== 0,
          u21_temperature_above_critical: (x & 134217728) !== 0,
          u21_temperature_high: (x & 268435456) !== 0,
          u22_temperature_above_critical: (x & 536870912) !== 0,
          u22_temperature_high: (x & 1073741824) !== 0,
        }),
        lower: (
          x: VAPI.AT1101.System.TemperatureIssues,
          _: VScript.VSocket,
        ): number =>
          (x.cpu_sodimm_temperature_above_critical ? 1 : 0) |
          (x.cpu_sodimm_temperature_high ? 2 : 0) |
          (x.cpu_temperature_above_critical ? 4 : 0) |
          (x.cpu_temperature_high ? 8 : 0) |
          (x.fan_controller_temperature_above_critical ? 16 : 0) |
          (x.fan_controller_temperature_high ? 32 : 0) |
          (x.fpga_ext_temperature_above_critical ? 64 : 0) |
          (x.fpga_ext_temperature_high ? 128 : 0) |
          (x.fpga_int_temperature_above_critical ? 256 : 0) |
          (x.fpga_int_temperature_high ? 512 : 0) |
          (x.fpga_sodimm1_temperature_above_critical ? 1024 : 0) |
          (x.fpga_sodimm1_temperature_high ? 2048 : 0) |
          (x.fpga_sodimm2_temperature_above_critical ? 4096 : 0) |
          (x.fpga_sodimm2_temperature_high ? 8192 : 0) |
          (x.ioboard_temperature_above_critical ? 16384 : 0) |
          (x.ioboard_temperature_high ? 32768 : 0) |
          (x.mgmt_phy_temperature_above_critical ? 65536 : 0) |
          (x.mgmt_phy_temperature_high ? 131072 : 0) |
          (x.missing_data ? 262144 : 0) |
          (x.p0v95_t1_temperature_above_critical ? 524288 : 0) |
          (x.p0v95_t1_temperature_high ? 1048576 : 0) |
          (x.p0v95_t2_temperature_above_critical ? 2097152 : 0) |
          (x.p0v95_t2_temperature_high ? 4194304 : 0) |
          (x.p1v1_p1v2_temperature_above_critical ? 8388608 : 0) |
          (x.p1v1_p1v2_temperature_high ? 16777216 : 0) |
          (x.p1v8_temperature_above_critical ? 33554432 : 0) |
          (x.p1v8_temperature_high ? 67108864 : 0) |
          (x.u21_temperature_above_critical ? 134217728 : 0) |
          (x.u21_temperature_high ? 268435456 : 0) |
          (x.u22_temperature_above_critical ? 536870912 : 0) |
          (x.u22_temperature_high ? 1073741824 : 0),
      });
    }
  }
  export type InternalHWIssues = { wrong_pcie_speed_or_lanecount: boolean };
  export type TemperatureIssues = {
    cpu_sodimm_temperature_above_critical: boolean;
    cpu_sodimm_temperature_high: boolean;
    cpu_temperature_above_critical: boolean;
    cpu_temperature_high: boolean;
    fan_controller_temperature_above_critical: boolean;
    fan_controller_temperature_high: boolean;
    fpga_ext_temperature_above_critical: boolean;
    fpga_ext_temperature_high: boolean;
    fpga_int_temperature_above_critical: boolean;
    fpga_int_temperature_high: boolean;
    fpga_sodimm1_temperature_above_critical: boolean;
    fpga_sodimm1_temperature_high: boolean;
    fpga_sodimm2_temperature_above_critical: boolean;
    fpga_sodimm2_temperature_high: boolean;
    ioboard_temperature_above_critical: boolean;
    ioboard_temperature_high: boolean;
    mgmt_phy_temperature_above_critical: boolean;
    mgmt_phy_temperature_high: boolean;
    missing_data: boolean;
    p0v95_t1_temperature_above_critical: boolean;
    p0v95_t1_temperature_high: boolean;
    p0v95_t2_temperature_above_critical: boolean;
    p0v95_t2_temperature_high: boolean;
    p1v1_p1v2_temperature_above_critical: boolean;
    p1v1_p1v2_temperature_high: boolean;
    p1v8_temperature_above_critical: boolean;
    p1v8_temperature_high: boolean;
    u21_temperature_above_critical: boolean;
    u21_temperature_high: boolean;
    u22_temperature_above_critical: boolean;
    u22_temperature_high: boolean;
  };
  export type InternalHWSgmiiIssues = {
    crc_errors: boolean;
    link_down: boolean;
    pcs_errors: boolean;
  };
  export class InternalHWSgmii
    implements VScript.Referenceable<"System::Data::InternalHW::Sgmii">
  {
    readonly type_identifier = "System::Data::InternalHW::Sgmii" as const;
    constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
    get link_up(): VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.AT1101.System.InternalHWSgmii
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1101.System.InternalHWSgmii
      >(this, "link_up" 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.Unsigned64,
      VAPI.AT1101.System.InternalHWSgmii
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned64,
        VAPI.AT1101.System.InternalHWSgmii
      >(this, "crc_errors" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }
    get pcs_errors(): VScript.rKeyword<
      VScript.VSocket,
      number,
      VAPI.Primitives.Unsigned64,
      VAPI.AT1101.System.InternalHWSgmii
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned64,
        VAPI.AT1101.System.InternalHWSgmii
      >(this, "pcs_errors" 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.AT1101.System.InternalHWSgmiiIssues,
      VAPI.AT1101.System.InternalHWSgmii
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.AT1101.System.InternalHWSgmiiIssues,
        VAPI.AT1101.System.InternalHWSgmii
      >(this, "issues" as VScript.SysName, {
        lift: (
          x: number,
          _: VScript.VSocket,
        ): VAPI.AT1101.System.InternalHWSgmiiIssues => ({
          crc_errors: (x & 1) !== 0,
          link_down: (x & 2) !== 0,
          pcs_errors: (x & 4) !== 0,
        }),
        lower: (
          x: VAPI.AT1101.System.InternalHWSgmiiIssues,
          _: VScript.VSocket,
        ): number =>
          (x.crc_errors ? 1 : 0) |
          (x.link_down ? 2 : 0) |
          (x.pcs_errors ? 4 : 0),
      });
    }
  }
  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.AT1101.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<number>,
        Array<number>,
        VAPI.AT1101.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.AT1101.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.AllSysinfo
      >(this, "num_cores" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    CPU-SAR Register (Sample At Reset)
  */
    get cpu_sar(): VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.AT1101.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.System.AllSysinfo
      >(this, "cpu_sar" as VScript.SysName, {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      });
    }

    /**
    CPU-Frequency
  */
    get cpu_freq(): VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.AT1101.System.AllSysinfo
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | number,
        VAPI.AT1101.System.AllSysinfo
      >(this, "cpu_freq" 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, 7, "services"),
      );
    }
  }
  export const Enums = {
    FPGASelection: [
      "AVP",
      "AVP_40GbE",
      "CC3D_40GbE",
      "DMV_40GbE",
      "JPEGXS_40GbE",
      "PCAP_40GbE",
      "UDX_40GbE",
    ] as FPGASelection[],
    FPGA: [
      "AVP",
      "AVP_40GbE",
      "DMV_40GbE",
      "UDX_40GbE",
      "J2KD",
      "J2KD_40GbE",
      "CC3D_40GbE",
      "JPEGXS_40GbE",
      "PCAP_40GbE",
    ] 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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.SystemClock.All
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.SystemClock.All
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.SystemClock.All
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.Time.Standard,
        VAPI.AT1101.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.AT1101.SystemClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.SystemClock.AllIssues,
        VAPI.AT1101.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.AT1101.SystemClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        number,
        VAPI.AT1101.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.AT1101.SystemClock.All
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number | string,
        null | VAPI.Primitives.Timestamp,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Time.SourceIssues,
        VAPI.AT1101.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.AT1101.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number, number],
        null | VAPI.Time.TimestampedDrift,
        VAPI.AT1101.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.AT1101.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [number, number, number, number],
        null | VAPI.Time.TimestampedOffset,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Time.Source
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.PTP.Traits,
        VAPI.AT1101.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,
        ),
      });
    }
  }
}
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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.TimeFlows.Aligner
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.TimeFlows.Aligner
      >(
        this,
        "t_src_absolute" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.TimeFlows.Aligner
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.TimeFlows.Aligner
      >(
        this,
        "t_src_grain_accurate" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.TimeFlows.Aligner
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.TimeFlows.Aligner
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.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.AT1101.TimeFlows.Aligner
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.TimeFlows.AlignerIssues,
        VAPI.AT1101.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.AT1101.TimeFlows.AlignerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "aligners",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.TimeFlows.AlignerAsNamedTableRow(raw),
      );
    }
    get combinators() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Combinator",
        VAPI.AT1101.TimeFlows.CombinatorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "combinators",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.TimeFlows.CombinatorAsNamedTableRow(raw),
      );
    }
    get detonators() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Detonator",
        VAPI.AT1101.TimeFlows.DetonatorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "detonators",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.TimeFlows.DetonatorAsNamedTableRow(raw),
      );
    }
    get drift_converters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::DriftConverter",
        VAPI.AT1101.TimeFlows.DriftConverterAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          3,
          "drift_converters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.TimeFlows.DriftConverterAsNamedTableRow(raw),
      );
    }
    get impostors() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Impostor",
        VAPI.AT1101.TimeFlows.ImpostorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          4,
          "impostors",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.TimeFlows.ImpostorAsNamedTableRow(raw),
      );
    }
    get selectors() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Selector",
        VAPI.AT1101.TimeFlows.SelectorAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          5,
          "selectors",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.TimeFlows.SelectorAsNamedTableRow(raw),
      );
    }
    get shifters() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "TimeFlows::Data::Shifter",
        VAPI.AT1101.TimeFlows.ShifterAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "shifters",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.TimeFlows.StretcherAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          7,
          "stretchers",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.TimeFlows.Combinator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.AT1101.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.AT1101.TimeFlows.Combinator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.TimeFlows.Combinator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.TimeFlows.Combinator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.TimeFlows.Combinator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.TimeFlows.Combinator
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<boolean>,
        Array<boolean>,
        VAPI.AT1101.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.AT1101.Time.Source>,
      VScript.MaybeSparseArray<
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>)
      >,
      VAPI.AT1101.TimeFlows.Combinator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VAPI.AT1101.Time.Source>,
        VScript.MaybeSparseArray<
          | null
          | (VScript.Referenceable<"Time::Data::Source"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>)
        >,
        VAPI.AT1101.TimeFlows.Combinator
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              (raw_kwl: string, _socket: VScript.VSocket) =>
                new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.TimeFlows.Detonator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.TimeFlows.Detonator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.TimeFlows.Detonator
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.TimeFlows.Detonator
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.TimeFlows.Detonator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.TimeFlows.Detonator
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.TimeFlows.Detonator
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.TimeFlows.Detonator
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.TimeFlows.DriftConverter
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.Time.ReferenceFrame,
        VAPI.AT1101.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.AT1101.TimeFlows.DriftConverter
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
        VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
        VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
        VAPI.TimeFlows.ReferenceFrameMismatchPolicy,
        VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.TimeFlows.DriftConverter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.TimeFlows.DriftConverter
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.TimeFlows.Impostor
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.TimeFlows.Impostor
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.TimeFlows.Selector
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<boolean>,
        Array<boolean>,
        VAPI.AT1101.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.AT1101.Time.Source>,
      VScript.MaybeSparseArray<
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>)
      >,
      VAPI.AT1101.TimeFlows.Selector
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        Array<null | string>,
        VScript.MaybeSparseArray<null | string>,
        Array<null | VAPI.AT1101.Time.Source>,
        VScript.MaybeSparseArray<
          | null
          | (VScript.Referenceable<"Time::Data::Source"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>)
        >,
        VAPI.AT1101.TimeFlows.Selector
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftArray(
            VScript.VAPIHelpers.liftOrLowerNullable(
              (raw_kwl: string, _socket: VScript.VSocket) =>
                new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.TimeFlows.Shifter
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.TimeFlows.Shifter
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.TimeFlows.Shifter
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.TimeFlows.Stretcher
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.TimeFlows.Stretcher
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.TimeFlows.Stretcher
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.UDX.UDXOutput
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 0, "outputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.UDX.UDXOutput
      >(
        this,
        "video_source" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.UDX.UDXVideoStandard,
        VAPI.UDX.UDXVideoStandard,
        VAPI.UDX.UDXVideoStandard,
        VAPI.UDX.UDXVideoStandard,
        VAPI.AT1101.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.AT1101.UDX.UDXOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.UDX.UDXASPECTRATIO,
        VAPI.UDX.UDXASPECTRATIO,
        VAPI.UDX.UDXASPECTRATIO,
        VAPI.UDX.UDXASPECTRATIO,
        VAPI.AT1101.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.AT1101.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.UDX.UDXSDACTIVEWIDTH,
        VAPI.UDX.UDXSDACTIVEWIDTH,
        VAPI.UDX.UDXSDACTIVEWIDTH,
        VAPI.UDX.UDXSDACTIVEWIDTH,
        VAPI.AT1101.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.AT1101.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.UDX.UDXOutput
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.UDX.UDXSOURCESHOWMODE,
        VAPI.UDX.UDXSOURCESHOWMODE,
        VAPI.UDX.UDXSOURCESHOWMODE,
        VAPI.UDX.UDXSOURCESHOWMODE,
        VAPI.AT1101.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.AT1101.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 9, "signal"),
      );
    }
    get metadata_inserter() {
      return VAPI.AT1101.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.AT1101.MetadataProcessor.Request
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          0,
          "requests",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        string,
        string,
        VAPI.AT1101.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.AT1101.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [VAPI.Video.SubStream, boolean],
        VAPI.Video.EssenceSubstream,
        VAPI.AT1101.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.AT1101.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1101.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.AT1101.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | boolean,
        null | boolean,
        VAPI.AT1101.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.AT1101.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VScript.DeviceTreeNodePayload,
        null | VScript.DeviceTreeNodePayload,
        VAPI.AT1101.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.AT1101.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.AT1101.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | [VAPI.Video.AspectRatio, number, number, number, number, number],
        null | VAPI.Video.AFD,
        VAPI.AT1101.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.AT1101.Video.Essence
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.Video.ClosedCaption,
        VAPI.AT1101.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.AT1101.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.AT1101.VideoMixer.BSLKAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.VideoMixer.BSLK
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.VideoMixer.BSLKIssues,
        VAPI.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoMixer.BSLK
      >(
        this,
        "v_src0" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoMixer.BSLK
      >(
        this,
        "v_src1" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoMixer.BSLK
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.VideoMixer.BSLK
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        Array<null | number>,
        Array<null | VScript.Duration>,
        VAPI.AT1101.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.AT1101.VideoMixer.BSLK
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter16,
        VAPI.AT1101.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.AT1101.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.AT1101.VideoMixer.BSLK
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.VideoMixer.BSLK
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.Unsigned32,
        VAPI.AT1101.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.AT1101.VideoMixer.BSLK
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.VideoMixer.BSLKMode,
        VAPI.VideoMixer.BSLKMode,
        VAPI.VideoMixer.BSLKMode,
        VAPI.VideoMixer.BSLKMode,
        VAPI.AT1101.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.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoMixer.BSLKLumaKeyer
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoMixer.BSLKLumaKeyer
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.VideoMixer.BSLKLumaKeyer
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.VideoMixer.BSLKLumaKeyer
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.VideoMixer.BSLKLumaKeyer
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.VideoPlayer.Player
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.VideoPlayer.PlayerIssues,
        VAPI.AT1101.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.AT1101.VideoPlayer.Player
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        [
          number,
          number,
          [null | number, null | number],
          null | VAPI.Video.Standard,
        ],
        VAPI.VideoPlayer.MemoryCapacity,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.VideoPlayer.Player
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.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.AT1101.VideoPlayer.lift.Time(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "time"),
      );
    }
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.VideoPlayer.PlayerOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 5, "video"),
      );
    }
    get audio() {
      return VAPI.AT1101.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.AT1101.AudioRePlay.Player,
      | null
      | (VScript.Referenceable<"AudioRePlay::Data::Player"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoPlayer.RelationAudio
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.AudioRePlay.Player,
        | null
        | (VScript.Referenceable<"AudioRePlay::Data::Player"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoPlayer.RelationAudio
      >(
        this,
        "leader" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.VideoPlayer.RelationAudioFollowers
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "followers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.VideoPlayer.Player,
      | null
      | (VScript.Referenceable<"VideoPlayer::Data::Player"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoPlayer.RelationVideo
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.VideoPlayer.Player,
        | null
        | (VScript.Referenceable<"VideoPlayer::Data::Player"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoPlayer.RelationVideo
      >(
        this,
        "leader" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.VideoPlayer.RelationVideoFollowers
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(
          this.raw,
          1,
          "followers",
        ),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.VideoPlayer.lift.RelationVideo(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "video"),
      );
    }
    get audio() {
      return VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoPlayer.Time
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoPlayer.Time
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.VideoPlayer.Time
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.VideoPlayer.Time
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.AudioRePlay.Player,
      VAPI.AT1101.VideoPlayer.RelationAudioFollowers
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.AudioRePlay.Player,
        VAPI.AT1101.VideoPlayer.RelationAudioFollowers
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.VideoPlayer.Player,
      VAPI.AT1101.VideoPlayer.RelationVideoFollowers
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | string,
        null | VAPI.AT1101.VideoPlayer.Player,
        VAPI.AT1101.VideoPlayer.RelationVideoFollowers
      >(this, "wrapped_reference" as VScript.SysName, {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.AT1101.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.AT1101.VideoRePlay.Delay
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.VideoRePlay.DelayIssues,
        VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.VideoRePlay.Delay
    > {
      return new VScript.wKeyword<
        VScript.VSocket,
        VAPI.Primitives.Button,
        VAPI.Primitives.Button,
        VAPI.AT1101.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.AT1101.VideoRePlay.DelayInputs
      >(
        VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 5, "inputs"),
        (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.VideoRePlay.lift.DelayInputs(raw),
      );
    }
    get outputs() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "VideoRePlay::Data::DelayOutput",
        VAPI.AT1101.VideoRePlay.DelayOutputAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          6,
          "outputs",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoRePlay.DelayOutput
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoRePlay.DelayOutput
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.VideoRePlay.lift.Time(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "time"),
      );
    }
    get active(): VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.AT1101.VideoRePlay.DelayOutput
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.Video.lift.Essence(
        VScript.VAPIHelpers.subtree_child_checked(this.raw, 6, "video"),
      );
    }
    get audio() {
      return VAPI.AT1101.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.AT1101.VideoRePlay.Time
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        VScript.Duration,
        VScript.Duration,
        VAPI.AT1101.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.AT1101.VideoRePlay.Time
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        number,
        number,
        number,
        number,
        VAPI.AT1101.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.AT1101.VideoPlayer.PlayerAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          1,
          "players",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.VideoPlayer.PlayerAsNamedTableRow(raw),
      );
    }
    get delays() {
      return new VScript.StronglyTypedNamedTable<
        VScript.VSocket,
        "VideoRePlay::Data::Delay",
        VAPI.AT1101.VideoRePlay.DelayAsNamedTableRow
      >(
        VScript.VAPIHelpers.subtree_named_table_child_checked(
          this.raw,
          2,
          "delays",
        ),
        (raw: VScript.DataViews.SubtreeNamedTableRow<VScript.VSocket>) =>
          new VAPI.AT1101.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.AT1101.VideoRePlay.DelayInputs
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.VideoRePlay.DelayInputs
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | VAPI.Video.Standard,
        null | VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.Video.Essence,
      | null
      | (VScript.Referenceable<"Video::Data::Essence"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoRePlay.DelayInputs
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Video.Essence,
        | null
        | (VScript.Referenceable<"Video::Data::Essence"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoRePlay.DelayInputs
      >(
        this,
        "v_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.VideoSignalGenerator.VSG
      >(
        VScript.VAPIHelpers.subtree_array_child_checked(
          this.raw,
          0,
          "instances",
        ),
        (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
          VAPI.AT1101.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.AT1101.Time.Source,
      | null
      | (VScript.Referenceable<"Time::Data::Source"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        null | string,
        null | string,
        null | VAPI.AT1101.Time.Source,
        | null
        | (VScript.Referenceable<"Time::Data::Source"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>),
        VAPI.AT1101.VideoSignalGenerator.VSG
      >(
        this,
        "t_src" as VScript.SysName,
        {
          lift: VScript.VAPIHelpers.liftOrLowerNullable(
            (raw_kwl: string, _socket: VScript.VSocket) =>
              new VAPI.AT1101.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.AT1101.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.AT1101.VideoSignalGenerator.VSG,
          command: null | VAPI.AT1101.Time.Source,
        ) => (
          void parent,
          void command,
          {
            criterion: "status",
            validator: (status: null | VAPI.AT1101.Time.Source) =>
              command === null || VScript.same(command, status),
          }
        ),
      );
    }
    get output() {
      return VAPI.AT1101.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.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.dKeyword<
        VScript.VSocket,
        VAPI.Video.Standard,
        VAPI.Video.Standard,
        VAPI.Video.Standard,
        VAPI.Video.Standard,
        VAPI.AT1101.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.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        VAPI.VideoSignalGenerator.TestPatternSelect,
        VAPI.VideoSignalGenerator.TestPatternSelect,
        VAPI.VideoSignalGenerator.TestPatternSelect,
        VAPI.VideoSignalGenerator.TestPatternSelect,
        VAPI.AT1101.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.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.rwKeyword<
        VScript.VSocket,
        boolean,
        boolean,
        boolean,
        boolean,
        VAPI.AT1101.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.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        null | number,
        null | VScript.Duration,
        VAPI.AT1101.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.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.Primitives.CyclicCounter32,
        VAPI.AT1101.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.AT1101.VideoSignalGenerator.VSG
    > {
      return new VScript.rKeyword<
        VScript.VSocket,
        number,
        VAPI.VideoSignalGenerator.VSGIssues,
        VAPI.AT1101.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.AT1101.AudioEngine.All;

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

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

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

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

  readonly clos_x_bar?: VAPI.ClosXBar.All;

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

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

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

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

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

  readonly master_clock: VAPI.AT1101.MasterClock.All;

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

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

  readonly multiviewer?: VAPI.Multiviewer.All;

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

  readonly network_interfaces: VAPI.AT1101.NetworkInterfaces.All;

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

  readonly p_t_p_clock: VAPI.AT1101.PTPClock.All;

  readonly p_t_p_flows: VAPI.AT1101.PTPFlows.All;

  readonly r_t_p_metadata_channel?: VAPI.RTPMetadataChannel.All;

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

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

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

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

  readonly software_update: VAPI.SoftwareUpdate.All;

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

  readonly system: VAPI.AT1101.System.All;

  readonly system_clock: VAPI.AT1101.SystemClock.All;

  readonly time_flows: VAPI.AT1101.TimeFlows.All;

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

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

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

  readonly video_signal_generator?: VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.ColorCorrection.All(
        maybe_color_correction,
      );
    const maybe_genlock = VScript.VAPIHelpers.component_checked(
      this.raw,
      "genlock",
    );
    if (maybe_genlock)
      this.genlock = new VAPI.AT1101.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.AT1101.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.AT1101.J2KDecoder.All(maybe_j2_k_decoder);
    this.master_clock = new VAPI.AT1101.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.AT1101.MetadataProcessor.All(
        maybe_metadata_processor,
      );
    const maybe_monitoring = VScript.VAPIHelpers.component_checked(
      this.raw,
      "monitoring",
    );
    if (maybe_monitoring)
      this.monitoring = new VAPI.AT1101.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.AT1101.MultiviewerIO.All(
        maybe_multiviewer_i_o,
      );
    this.network_interfaces = new VAPI.AT1101.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.AT1101.PCap.All(maybe_p_cap);
    this.p_t_p_clock = new VAPI.AT1101.PTPClock.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "p_t_p_clock"),
      ),
    );
    this.p_t_p_flows = new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.Splitter.All(maybe_splitter);
    this.system = new VAPI.AT1101.System.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "system"),
      ),
    );
    this.system_clock = new VAPI.AT1101.SystemClock.All(
      VScript.enforce_nonnull(
        VScript.VAPIHelpers.component_checked(this.raw, "system_clock"),
      ),
    );
    this.time_flows = new VAPI.AT1101.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.AT1101.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.AT1101.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.AT1101.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.AT1101.VideoSignalGenerator.All(
        maybe_video_signal_generator,
      );
  }
  static adopt(socket: VScript.VSocket): Root {
    return new Root(socket);
  }
  async close(): Promise<void> {
    await this.raw.close();
  }
}
