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";
export const lift = {
  CurrentBridgeConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentBridgeConfiguration(_raw),
  CurrentPortConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentPortConfiguration(_raw),
  CurrentSyslogConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentSyslogConfiguration(_raw),
  CurrentSyslogServer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new CurrentSyslogServer(_raw),
  CurrentVirtualEthernetConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentVirtualEthernetConfiguration(_raw),
  CurrentVirtualInterfaceConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentVirtualInterfaceConfiguration(_raw),
  DesiredBridgeConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredBridgeConfiguration(_raw),
  DesiredPortConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredPortConfiguration(_raw),
  DesiredSyslogConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredSyslogConfiguration(_raw),
  DesiredSyslogServer: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new DesiredSyslogServer(_raw),
  DesiredVirtualEthernetConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredVirtualEthernetConfiguration(_raw),
  DesiredVirtualInterfaceConfiguration: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredVirtualInterfaceConfiguration(_raw),
  ErrorWindow: (
    _raw: [number, number],
    _socket: VScript.VSocket,
  ): ErrorWindow => {
    return {
      window: VScript.VAPIHelpers.liftNanoseconds(_raw[0], _socket),
      threshold: _raw[1],
    };
  },
  EyeDiagram: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new EyeDiagram(_raw),
  Health: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new Health(_raw),
  HostnameConfiguration: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new HostnameConfiguration(_raw),
  LLDPNeighbor: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new LLDPNeighbor(_raw),
  VirtualInterface: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new VirtualInterface(_raw),
  CurrentBridgeConfigurationDevices: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentBridgeConfigurationDevices(_raw),
  DesiredBridgeConfigurationDevices: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredBridgeConfigurationDevices(_raw),
  CurrentVirtualInterfaceConfigurationIpAddresses: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentVirtualInterfaceConfigurationIpAddresses(_raw),
  DesiredVirtualInterfaceConfigurationIpAddresses: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredVirtualInterfaceConfigurationIpAddresses(_raw),
  MaskedIpAddress: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new MaskedIpAddress(_raw),
  CurrentVirtualInterfaceConfigurationRoutes: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentVirtualInterfaceConfigurationRoutes(_raw),
  DesiredVirtualInterfaceConfigurationRoutes: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredVirtualInterfaceConfigurationRoutes(_raw),
  CurrentVirtualEthernetConfigurationVeths: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentVirtualEthernetConfigurationVeths(_raw),
  DesiredVirtualEthernetConfigurationVeths: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredVirtualEthernetConfigurationVeths(_raw),
  CurrentPortConfigurationVlans: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new CurrentPortConfigurationVlans(_raw),
  DesiredPortConfigurationVlans: (
    _raw: VScript.DataViews.Subtree<VScript.VSocket>,
  ) => new DesiredPortConfigurationVlans(_raw),
} as const;
export const lower = {
  CurrentBridgeConfiguration: (_x: CurrentBridgeConfiguration) => _x.raw.kwl,
  CurrentPortConfiguration: (_x: CurrentPortConfiguration) => _x.raw.kwl,
  CurrentSyslogConfiguration: (_x: CurrentSyslogConfiguration) => _x.raw.kwl,
  CurrentSyslogServer: (_x: CurrentSyslogServer) => _x.raw.kwl,
  CurrentVirtualEthernetConfiguration: (
    _x: CurrentVirtualEthernetConfiguration,
  ) => _x.raw.kwl,
  CurrentVirtualInterfaceConfiguration: (
    _x: CurrentVirtualInterfaceConfiguration,
  ) => _x.raw.kwl,
  DesiredBridgeConfiguration: (_x: DesiredBridgeConfiguration) => _x.raw.kwl,
  DesiredPortConfiguration: (_x: DesiredPortConfiguration) => _x.raw.kwl,
  DesiredSyslogConfiguration: (_x: DesiredSyslogConfiguration) => _x.raw.kwl,
  DesiredSyslogServer: (_x: DesiredSyslogServer) => _x.raw.kwl,
  DesiredVirtualEthernetConfiguration: (
    _x: DesiredVirtualEthernetConfiguration,
  ) => _x.raw.kwl,
  DesiredVirtualInterfaceConfiguration: (
    _x: DesiredVirtualInterfaceConfiguration,
  ) => _x.raw.kwl,
  ErrorWindow: (
    _x: {
      /**
                                Window size over which errors are checked
                              */
      window: VScript.Duration;

      /**
                                Number of errors in the window before the
                                condition is met
                              */
      threshold: number;
    },
    _socket: VScript.VSocket,
  ): [number, number] => [
    VScript.VAPIHelpers.lowerNanoseconds(_x.window, _socket),
    _x.threshold,
  ],
  EyeDiagram: (_x: EyeDiagram) => _x.raw.kwl,
  Health: (_x: Health) => _x.raw.kwl,
  HostnameConfiguration: (_x: HostnameConfiguration) => _x.raw.kwl,
  LLDPNeighbor: (_x: LLDPNeighbor) => _x.raw.kwl,
  VirtualInterface: (_x: VirtualInterface) => _x.raw.kwl,
  CurrentBridgeConfigurationDevices: (_x: CurrentBridgeConfigurationDevices) =>
    _x.raw.kwl,
  DesiredBridgeConfigurationDevices: (_x: DesiredBridgeConfigurationDevices) =>
    _x.raw.kwl,
  CurrentVirtualInterfaceConfigurationIpAddresses: (
    _x: CurrentVirtualInterfaceConfigurationIpAddresses,
  ) => _x.raw.kwl,
  DesiredVirtualInterfaceConfigurationIpAddresses: (
    _x: DesiredVirtualInterfaceConfigurationIpAddresses,
  ) => _x.raw.kwl,
  MaskedIpAddress: (_x: MaskedIpAddress) => _x.raw.kwl,
  CurrentVirtualInterfaceConfigurationRoutes: (
    _x: CurrentVirtualInterfaceConfigurationRoutes,
  ) => _x.raw.kwl,
  DesiredVirtualInterfaceConfigurationRoutes: (
    _x: DesiredVirtualInterfaceConfigurationRoutes,
  ) => _x.raw.kwl,
  CurrentVirtualEthernetConfigurationVeths: (
    _x: CurrentVirtualEthernetConfigurationVeths,
  ) => _x.raw.kwl,
  DesiredVirtualEthernetConfigurationVeths: (
    _x: DesiredVirtualEthernetConfigurationVeths,
  ) => _x.raw.kwl,
  CurrentPortConfigurationVlans: (_x: CurrentPortConfigurationVlans) =>
    _x.raw.kwl,
  DesiredPortConfigurationVlans: (_x: DesiredPortConfigurationVlans) =>
    _x.raw.kwl,
} as const;
export class CurrentBridgeConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentBridgeConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentBridgeConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get brief(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.CurrentBridgeConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.CurrentBridgeConfiguration
    >(this, "brief" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stp(): VScript.rKeyword<
    VScript.VSocket,
    null | boolean,
    null | boolean,
    VAPI.NetworkInterfaces.CurrentBridgeConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.NetworkInterfaces.CurrentBridgeConfiguration
    >(this, "stp" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get settings() {
    return VAPI.NetworkInterfaces.lift.CurrentVirtualInterfaceConfiguration(
      VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "settings"),
    );
  }
  get devices() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::CurrentBridgeConfiguration::Devices",
      VAPI.NetworkInterfaces.CurrentBridgeConfigurationDevices
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 3, "devices"),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.CurrentBridgeConfigurationDevices(raw),
    );
  }
}
export class CurrentPortConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentPortConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentPortConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get base() {
    return VAPI.NetworkInterfaces.lift.CurrentVirtualInterfaceConfiguration(
      VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "base"),
    );
  }
  get vlans() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::CurrentPortConfiguration::Vlans",
      VAPI.NetworkInterfaces.CurrentPortConfigurationVlans
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 1, "vlans"),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.CurrentPortConfigurationVlans(raw),
    );
  }
  get bridges() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::CurrentBridgeConfiguration",
      VAPI.NetworkInterfaces.CurrentBridgeConfiguration
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "bridges"),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.CurrentBridgeConfiguration(raw),
    );
  }
  get unknown_commands(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.CurrentPortConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.CurrentPortConfiguration
    >(this, "unknown_commands" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export class CurrentSyslogConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentSyslogConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentSyslogConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get syslog_servers() {
    return new VScript.StronglyTypedArray<
      VScript.VSocket,
      "NetworkInterfaces::Data::CurrentSyslogServer",
      VAPI.NetworkInterfaces.CurrentSyslogServer
    >(
      VScript.VAPIHelpers.subtree_array_child_checked(
        this.raw,
        0,
        "syslog_servers",
      ),
      (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.CurrentSyslogServer(st),
    );
  }
}
export class CurrentSyslogServer
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentSyslogServer">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentSyslogServer" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get address(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.CurrentSyslogServer
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.CurrentSyslogServer
    >(this, "address" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get protocol(): VScript.rKeyword<
    VScript.VSocket,
    null | VAPI.NetworkInterfaces.Protocol,
    null | VAPI.NetworkInterfaces.Protocol,
    VAPI.NetworkInterfaces.CurrentSyslogServer
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.NetworkInterfaces.Protocol,
      null | VAPI.NetworkInterfaces.Protocol,
      VAPI.NetworkInterfaces.CurrentSyslogServer
    >(this, "protocol" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get rebind_interval(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.NetworkInterfaces.CurrentSyslogServer
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.CurrentSyslogServer
    >(this, "rebind_interval" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get keep_alive(): VScript.rKeyword<
    VScript.VSocket,
    null | boolean,
    null | boolean,
    VAPI.NetworkInterfaces.CurrentSyslogServer
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.NetworkInterfaces.CurrentSyslogServer
    >(this, "keep_alive" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export class CurrentVirtualEthernetConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentVirtualEthernetConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentVirtualEthernetConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get veths() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::CurrentVirtualEthernetConfiguration::Veths",
      VAPI.NetworkInterfaces.CurrentVirtualEthernetConfigurationVeths
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 0, "veths"),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.CurrentVirtualEthernetConfigurationVeths(
          raw,
        ),
    );
  }
}
export class CurrentVirtualInterfaceConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentVirtualInterfaceConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentVirtualInterfaceConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get brief(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration
    >(this, "brief" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get ip_addresses() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::CurrentVirtualInterfaceConfiguration::IpAddresses",
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationIpAddresses
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(
        this.raw,
        1,
        "ip_addresses",
      ),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.CurrentVirtualInterfaceConfigurationIpAddresses(
          raw,
        ),
    );
  }
  get routes() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::CurrentVirtualInterfaceConfiguration::Routes",
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationRoutes
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "routes"),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.CurrentVirtualInterfaceConfigurationRoutes(
          raw,
        ),
    );
  }
  get dhcp(): VScript.rKeyword<
    VScript.VSocket,
    boolean,
    boolean,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration
    >(this, "dhcp" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }

  /**
    BusyBox NTP server using current system time as source
  */
  get ntpd(): VScript.rKeyword<
    VScript.VSocket,
    boolean,
    boolean,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration
    >(this, "ntpd" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get reverse_path_filter(): VScript.rKeyword<
    VScript.VSocket,
    null | VAPI.NetworkInterfaces.ReversePathFilter,
    null | VAPI.NetworkInterfaces.ReversePathFilter,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | VAPI.NetworkInterfaces.ReversePathFilter,
      null | VAPI.NetworkInterfaces.ReversePathFilter,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration
    >(this, "reverse_path_filter" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export class DesiredBridgeConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredBridgeConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get brief(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.DesiredBridgeConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.DesiredBridgeConfiguration
    >(this, "brief" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }

  /**
    Enable spanning tree protocol on this bridge
  */
  get stp(): VScript.rwKeyword<
    VScript.VSocket,
    null | boolean,
    null | boolean,
    null | boolean,
    null | boolean,
    VAPI.NetworkInterfaces.DesiredBridgeConfiguration
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      null | boolean,
      null | boolean,
      VAPI.NetworkInterfaces.DesiredBridgeConfiguration
    >(
      this,
      "stp" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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.NetworkInterfaces.lift.DesiredVirtualInterfaceConfiguration(
      VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "settings"),
    );
  }

  /**
    Delete
  */
  get delete_bridge(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredBridgeConfiguration
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredBridgeConfiguration
    >(
      this,
      "delete_bridge" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get devices() {
    return new VScript.StronglyTypedArray<
      VScript.VSocket,
      "NetworkInterfaces::Data::DesiredBridgeConfiguration::Devices",
      VAPI.NetworkInterfaces.DesiredBridgeConfigurationDevices
    >(
      VScript.VAPIHelpers.subtree_array_child_checked(this.raw, 4, "devices"),
      (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.DesiredBridgeConfigurationDevices(st),
    );
  }
}
export class DesiredPortConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredPortConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredPortConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get base() {
    return VAPI.NetworkInterfaces.lift.DesiredVirtualInterfaceConfiguration(
      VScript.VAPIHelpers.subtree_child_checked(this.raw, 0, "base"),
    );
  }

  /**
    Add VLAN
  */
  get add_vlan(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredPortConfiguration
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredPortConfiguration
    >(
      this,
      "add_vlan" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get vlans() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::DesiredPortConfiguration::Vlans",
      VAPI.NetworkInterfaces.DesiredPortConfigurationVlans
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 2, "vlans"),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.DesiredPortConfigurationVlans(raw),
    );
  }

  /**
    Add Bridge
  */
  get add_bridge(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredPortConfiguration
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredPortConfiguration
    >(
      this,
      "add_bridge" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get bridges() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::DesiredBridgeConfiguration",
      VAPI.NetworkInterfaces.DesiredBridgeConfiguration
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 4, "bridges"),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.DesiredBridgeConfiguration(raw),
    );
  }
}
export class DesiredSyslogConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredSyslogConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredSyslogConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get syslog_servers() {
    return new VScript.StronglyTypedArray<
      VScript.VSocket,
      "NetworkInterfaces::Data::DesiredSyslogServer",
      VAPI.NetworkInterfaces.DesiredSyslogServer
    >(
      VScript.VAPIHelpers.subtree_array_child_checked(
        this.raw,
        0,
        "syslog_servers",
      ),
      (st: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.DesiredSyslogServer(st),
    );
  }
}
export class DesiredSyslogServer
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredSyslogServer">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredSyslogServer" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get address(): VScript.rwKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.DesiredSyslogServer
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.DesiredSyslogServer
    >(
      this,
      "address" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 protocol(): VScript.rwKeyword<
    VScript.VSocket,
    VAPI.NetworkInterfaces.Protocol,
    VAPI.NetworkInterfaces.Protocol,
    VAPI.NetworkInterfaces.Protocol,
    VAPI.NetworkInterfaces.Protocol,
    VAPI.NetworkInterfaces.DesiredSyslogServer
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      VAPI.NetworkInterfaces.Protocol,
      VAPI.NetworkInterfaces.Protocol,
      VAPI.NetworkInterfaces.Protocol,
      VAPI.NetworkInterfaces.Protocol,
      VAPI.NetworkInterfaces.DesiredSyslogServer
    >(
      this,
      "protocol" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 rebind_interval(): VScript.rwKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    null | number,
    null | number,
    VAPI.NetworkInterfaces.DesiredSyslogServer
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.DesiredSyslogServer
    >(
      this,
      "rebind_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 keep_alive(): VScript.rwKeyword<
    VScript.VSocket,
    boolean,
    boolean,
    boolean,
    boolean,
    VAPI.NetworkInterfaces.DesiredSyslogServer
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.NetworkInterfaces.DesiredSyslogServer
    >(
      this,
      "keep_alive" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 DesiredVirtualEthernetConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredVirtualEthernetConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredVirtualEthernetConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

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

  /**
    Revert veth settings
  */
  get revert_veth_config(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredVirtualEthernetConfiguration
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredVirtualEthernetConfiguration
    >(
      this,
      "revert_veth_config" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    Add VETH
  */
  get add_veth(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredVirtualEthernetConfiguration
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredVirtualEthernetConfiguration
    >(
      this,
      "add_veth" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get veths() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::DesiredVirtualEthernetConfiguration::Veths",
      VAPI.NetworkInterfaces.DesiredVirtualEthernetConfigurationVeths
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 3, "veths"),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.DesiredVirtualEthernetConfigurationVeths(
          raw,
        ),
    );
  }
}
export class DesiredVirtualInterfaceConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get brief(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
    >(this, "brief" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }

  /**
    Add IP address
  */
  get add_ip_address(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
    >(
      this,
      "add_ip_address" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get ip_addresses() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration::IpAddresses",
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationIpAddresses
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(
        this.raw,
        2,
        "ip_addresses",
      ),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.DesiredVirtualInterfaceConfigurationIpAddresses(
          raw,
        ),
    );
  }

  /**
    Add route
  */
  get add_route(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
    >(
      this,
      "add_route" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get routes() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration::Routes",
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(this.raw, 4, "routes"),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.DesiredVirtualInterfaceConfigurationRoutes(
          raw,
        ),
    );
  }
  get dhcp(): VScript.rwKeyword<
    VScript.VSocket,
    boolean,
    boolean,
    boolean,
    boolean,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
    >(
      this,
      "dhcp" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    BusyBox NTP server using current system time as source
  */
  get ntpd(): VScript.rwKeyword<
    VScript.VSocket,
    boolean,
    boolean,
    boolean,
    boolean,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
    >(
      this,
      "ntpd" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 reverse_path_filter(): VScript.rwKeyword<
    VScript.VSocket,
    null | VAPI.NetworkInterfaces.ReversePathFilter,
    null | VAPI.NetworkInterfaces.ReversePathFilter,
    null | VAPI.NetworkInterfaces.ReversePathFilter,
    null | VAPI.NetworkInterfaces.ReversePathFilter,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | VAPI.NetworkInterfaces.ReversePathFilter,
      null | VAPI.NetworkInterfaces.ReversePathFilter,
      null | VAPI.NetworkInterfaces.ReversePathFilter,
      null | VAPI.NetworkInterfaces.ReversePathFilter,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration
    >(
      this,
      "reverse_path_filter" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 ErrorWindow {
  /**
    Window size over which errors are checked
  */
  window: VScript.Duration;

  /**
    Number of errors in the window before the condition is met
  */
  threshold: number;
}
export class EyeDiagram
  implements VScript.Referenceable<"NetworkInterfaces::Data::EyeDiagram">
{
  readonly type_identifier = "NetworkInterfaces::Data::EyeDiagram" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

  /**
    Generate eye diagram
  */
  get generate(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.EyeDiagram
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.EyeDiagram
    >(
      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.NetworkInterfaces.EyeDiagram
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.EyeDiagram
    >(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.NetworkInterfaces.EyeDiagram
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.EyeDiagram
    >(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.NetworkInterfaces.EyeDiagram
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.EyeDiagram
    >(
      this,
      "measure_ui" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get ui(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.NetworkInterfaces.EyeDiagram
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.EyeDiagram
    >(this, "ui" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export type FaultStatus = "LINK_UP" | "LOCAL_FAULT" | "REMOTE_FAULT";
export class Health
  implements VScript.Referenceable<"NetworkInterfaces::Data::Health">
{
  readonly type_identifier = "NetworkInterfaces::Data::Health" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get unreliable(): VScript.rKeyword<
    VScript.VSocket,
    null | boolean,
    null | boolean,
    VAPI.NetworkInterfaces.Health
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | boolean,
      null | boolean,
      VAPI.NetworkInterfaces.Health
    >(this, "unreliable" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }

  /**
    Include aggregate_traffic_statistics.rx_error and
    aggregate_traffic_statistics.rx_crc_error in addition to the BIP error
    counters (which are only available in 40GbE)
  */
  get include_rx_errors(): VScript.rwKeyword<
    VScript.VSocket,
    boolean,
    boolean,
    boolean,
    boolean,
    VAPI.NetworkInterfaces.Health
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      boolean,
      boolean,
      VAPI.NetworkInterfaces.Health
    >(
      this,
      "include_rx_errors" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 set_unreliable(): VScript.dKeyword<
    VScript.VSocket,
    [number, number],
    [number, number],
    VAPI.NetworkInterfaces.ErrorWindow,
    VAPI.NetworkInterfaces.ErrorWindow,
    VAPI.NetworkInterfaces.Health
  > {
    return new VScript.dKeyword<
      VScript.VSocket,
      [number, number],
      [number, number],
      VAPI.NetworkInterfaces.ErrorWindow,
      VAPI.NetworkInterfaces.ErrorWindow,
      VAPI.NetworkInterfaces.Health
    >(
      this,
      "set_unreliable" as VScript.SysName,
      {
        lift: VAPI.NetworkInterfaces.lift.ErrorWindow,
        lower: VAPI.NetworkInterfaces.lower.ErrorWindow,
      },
      {
        lift: VAPI.NetworkInterfaces.lift.ErrorWindow,
        lower: VAPI.NetworkInterfaces.lower.ErrorWindow,
      },
      null,
    );
  }
  get clear_unreliable(): VScript.dKeyword<
    VScript.VSocket,
    [number, number],
    [number, number],
    VAPI.NetworkInterfaces.ErrorWindow,
    VAPI.NetworkInterfaces.ErrorWindow,
    VAPI.NetworkInterfaces.Health
  > {
    return new VScript.dKeyword<
      VScript.VSocket,
      [number, number],
      [number, number],
      VAPI.NetworkInterfaces.ErrorWindow,
      VAPI.NetworkInterfaces.ErrorWindow,
      VAPI.NetworkInterfaces.Health
    >(
      this,
      "clear_unreliable" as VScript.SysName,
      {
        lift: VAPI.NetworkInterfaces.lift.ErrorWindow,
        lower: VAPI.NetworkInterfaces.lower.ErrorWindow,
      },
      {
        lift: VAPI.NetworkInterfaces.lift.ErrorWindow,
        lower: VAPI.NetworkInterfaces.lower.ErrorWindow,
      },
      null,
    );
  }
}
export class HostnameConfiguration
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::HostnameConfiguration">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::HostnameConfiguration" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

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

  /**
    Revert hostname settings
  */
  get revert_hostname_config(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.HostnameConfiguration
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.HostnameConfiguration
    >(
      this,
      "revert_hostname_config" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get current_configuration(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.HostnameConfiguration
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.HostnameConfiguration
    >(this, "current_configuration" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }

  /**
    A valid hostname may only contain the following characters: 0-9, a-z,
    A-Z, - and .
  */
  get desired_configuration(): VScript.rwKeyword<
    VScript.VSocket,
    string,
    string,
    string,
    string,
    VAPI.NetworkInterfaces.HostnameConfiguration
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      string,
      string,
      string,
      string,
      VAPI.NetworkInterfaces.HostnameConfiguration
    >(
      this,
      "desired_configuration" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 LLDPNeighbor
  implements VScript.Referenceable<"NetworkInterfaces::Data::LLDPNeighbor">
{
  readonly type_identifier = "NetworkInterfaces::Data::LLDPNeighbor" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

  /**
    System runtime since boot
  */
  get last_changed(): VScript.rKeyword<
    VScript.VSocket,
    number,
    VScript.Duration,
    VAPI.NetworkInterfaces.LLDPNeighbor
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      number,
      VScript.Duration,
      VAPI.NetworkInterfaces.LLDPNeighbor
    >(this, "last_changed" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftNanoseconds,
      lower: VScript.VAPIHelpers.lowerNanoseconds,
    });
  }
  get rid(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Signed64,
    VAPI.NetworkInterfaces.LLDPNeighbor
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Signed64,
      VAPI.NetworkInterfaces.LLDPNeighbor
    >(this, "rid" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get system_name(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.LLDPNeighbor
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.LLDPNeighbor
    >(this, "system_name" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get system_description(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.LLDPNeighbor
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.LLDPNeighbor
    >(this, "system_description" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get chassis_id(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.LLDPNeighbor
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.LLDPNeighbor
    >(this, "chassis_id" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get interface_name(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.LLDPNeighbor
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.LLDPNeighbor
    >(this, "interface_name" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get vlan_id(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.VlanID,
    VAPI.NetworkInterfaces.LLDPNeighbor
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.VlanID,
      VAPI.NetworkInterfaces.LLDPNeighbor
    >(this, "vlan_id" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get mgmt_addr_v4(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.LLDPNeighbor
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.LLDPNeighbor
    >(this, "mgmt_addr_v4" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get mgmt_addr_v6(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.LLDPNeighbor
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.LLDPNeighbor
    >(this, "mgmt_addr_v6" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
/**
  MAC address, stored in big-endian order.
*/
export type MacAddress = Array<VAPI.Primitives.Unsigned8>;
export type Protocol = "UDP" | "TCP";
export type ReversePathFilter = "Disabled" | "Loose" | "Strict";
export class VirtualInterface
  implements VScript.Referenceable<"NetworkInterfaces::Data::VirtualInterface">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::VirtualInterface" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get brief(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.VirtualInterface
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.VirtualInterface
    >(this, "brief" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get linux_ifc_index(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.NetworkInterfaces.VirtualInterface
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.VirtualInterface
    >(this, "linux_ifc_index" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }

  /**
    NOTE: the empty string is interpreted as <null>
  */
  get ifname(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.VirtualInterface
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.VirtualInterface
    >(this, "ifname" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get ip_addresses() {
    return new VScript.StronglyTypedTable<
      VScript.VSocket,
      "NetworkInterfaces::Data::MaskedIpAddress",
      VAPI.NetworkInterfaces.MaskedIpAddress
    >(
      VScript.VAPIHelpers.subtree_table_child_checked(
        this.raw,
        3,
        "ip_addresses",
      ),
      (raw: VScript.DataViews.Subtree<VScript.VSocket>, _: VScript.VSocket) =>
        VAPI.NetworkInterfaces.lift.MaskedIpAddress(raw),
    );
  }
  get vlan_id(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.VlanID,
    VAPI.NetworkInterfaces.VirtualInterface
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.VlanID,
      VAPI.NetworkInterfaces.VirtualInterface
    >(this, "vlan_id" 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.NetworkInterfaces.VirtualInterface
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.NetworkInterfaces.VirtualInterface
    >(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.NetworkInterfaces.VirtualInterface
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.NetworkInterfaces.VirtualInterface
    >(this, "supports_rtp" 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.NetworkInterfaces.VirtualInterface
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      boolean,
      boolean,
      VAPI.NetworkInterfaces.VirtualInterface
    >(this, "active" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export class CurrentBridgeConfigurationDevices
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentBridgeConfiguration::Devices">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentBridgeConfiguration::Devices" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get wrapped_reference(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration,
    VAPI.NetworkInterfaces.CurrentBridgeConfigurationDevices
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration,
      VAPI.NetworkInterfaces.CurrentBridgeConfigurationDevices
    >(this, "wrapped_reference" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        (raw_kwl: string, _socket: VScript.VSocket) =>
          new VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfiguration(
            VScript.VAPIHelpers.get_subtree(
              _socket,
              raw_kwl as VScript.KWLName<"full">,
            ),
          ),
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        (
          x: VScript.Referenceable<"NetworkInterfaces::Data::CurrentVirtualInterfaceConfiguration"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>,
          _: VScript.VSocket,
        ) => x.raw.kwl,
      ),
    });
  }
}
export class DesiredBridgeConfigurationDevices
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration::Devices">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredBridgeConfiguration::Devices" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get wrapped_reference(): VScript.rwKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    null | VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration,
    | null
    | (VScript.Referenceable<"NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration"> &
        VScript.StronglyTypedSubtree<VScript.VSocket>),
    VAPI.NetworkInterfaces.DesiredBridgeConfigurationDevices
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration,
      | null
      | (VScript.Referenceable<"NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.NetworkInterfaces.DesiredBridgeConfigurationDevices
    >(
      this,
      "wrapped_reference" as VScript.SysName,
      {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      },
      {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      },
      null,
    );
  }
}
export class CurrentVirtualInterfaceConfigurationIpAddresses
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentVirtualInterfaceConfiguration::IpAddresses">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentVirtualInterfaceConfiguration::IpAddresses" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get ip_address(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationIpAddresses
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationIpAddresses
    >(this, "ip_address" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get prefix(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationIpAddresses
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationIpAddresses
    >(this, "prefix" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export class DesiredVirtualInterfaceConfigurationIpAddresses
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration::IpAddresses">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration::IpAddresses" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get ip_address(): VScript.rwKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationIpAddresses
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationIpAddresses
    >(
      this,
      "ip_address" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 prefix(): VScript.rwKeyword<
    VScript.VSocket,
    number,
    number,
    number,
    number,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationIpAddresses
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      number,
      number,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationIpAddresses
    >(
      this,
      "prefix" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    Delete
  */
  get delete_ip_address(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationIpAddresses
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationIpAddresses
    >(
      this,
      "delete_ip_address" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
}
export class MaskedIpAddress
  implements VScript.Referenceable<"NetworkInterfaces::Data::MaskedIpAddress">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::MaskedIpAddress" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get ip_address(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.MaskedIpAddress
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.MaskedIpAddress
    >(this, "ip_address" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get netmask(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.MaskedIpAddress
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.MaskedIpAddress
    >(this, "netmask" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export class CurrentVirtualInterfaceConfigurationRoutes
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentVirtualInterfaceConfiguration::Routes">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentVirtualInterfaceConfiguration::Routes" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

  /**
    Destination address or subnet for this route. Blank for the default
    route.
  */
  get dst(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationRoutes
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationRoutes
    >(this, "dst" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get dst_prefix(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationRoutes
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationRoutes
    >(this, "dst_prefix" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get via(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationRoutes
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationRoutes
    >(this, "via" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get weight(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationRoutes
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.CurrentVirtualInterfaceConfigurationRoutes
    >(this, "weight" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
}
export class DesiredVirtualInterfaceConfigurationRoutes
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration::Routes">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredVirtualInterfaceConfiguration::Routes" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}

  /**
    Destination address or subnet for this route. Leave blank for the default
    route.
  */
  get dst(): VScript.rwKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
    >(
      this,
      "dst" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 dst_prefix(): VScript.rwKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    null | number,
    null | number,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
    >(
      this,
      "dst_prefix" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 via(): VScript.rwKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    null | string,
    null | string,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | string,
      null | string,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
    >(
      this,
      "via" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.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 weight(): VScript.rwKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    null | number,
    null | number,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | number,
      null | number,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
    >(
      this,
      "weight" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    Delete
  */
  get delete_route(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredVirtualInterfaceConfigurationRoutes
    >(
      this,
      "delete_route" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
}
export class CurrentVirtualEthernetConfigurationVeths
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentVirtualEthernetConfiguration::Veths">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentVirtualEthernetConfiguration::Veths" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get brief(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.CurrentVirtualEthernetConfigurationVeths
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.CurrentVirtualEthernetConfigurationVeths
    >(this, "brief" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get endpoint0(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | VAPI.NetworkInterfaces.CurrentBridgeConfiguration,
    VAPI.NetworkInterfaces.CurrentVirtualEthernetConfigurationVeths
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.NetworkInterfaces.CurrentBridgeConfiguration,
      VAPI.NetworkInterfaces.CurrentVirtualEthernetConfigurationVeths
    >(this, "endpoint0" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        (raw_kwl: string, _socket: VScript.VSocket) =>
          new VAPI.NetworkInterfaces.CurrentBridgeConfiguration(
            VScript.VAPIHelpers.get_subtree(
              _socket,
              raw_kwl as VScript.KWLName<"full">,
            ),
          ),
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        (
          x: VScript.Referenceable<"NetworkInterfaces::Data::CurrentBridgeConfiguration"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>,
          _: VScript.VSocket,
        ) => x.raw.kwl,
      ),
    });
  }
  get endpoint1(): VScript.rKeyword<
    VScript.VSocket,
    null | string,
    null | VAPI.NetworkInterfaces.CurrentBridgeConfiguration,
    VAPI.NetworkInterfaces.CurrentVirtualEthernetConfigurationVeths
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | string,
      null | VAPI.NetworkInterfaces.CurrentBridgeConfiguration,
      VAPI.NetworkInterfaces.CurrentVirtualEthernetConfigurationVeths
    >(this, "endpoint1" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        (raw_kwl: string, _socket: VScript.VSocket) =>
          new VAPI.NetworkInterfaces.CurrentBridgeConfiguration(
            VScript.VAPIHelpers.get_subtree(
              _socket,
              raw_kwl as VScript.KWLName<"full">,
            ),
          ),
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        (
          x: VScript.Referenceable<"NetworkInterfaces::Data::CurrentBridgeConfiguration"> &
            VScript.StronglyTypedSubtree<VScript.VSocket>,
          _: VScript.VSocket,
        ) => x.raw.kwl,
      ),
    });
  }
}
export class DesiredVirtualEthernetConfigurationVeths
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredVirtualEthernetConfiguration::Veths">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredVirtualEthernetConfiguration::Veths" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get brief(): VScript.rKeyword<
    VScript.VSocket,
    string,
    string,
    VAPI.NetworkInterfaces.DesiredVirtualEthernetConfigurationVeths
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      string,
      string,
      VAPI.NetworkInterfaces.DesiredVirtualEthernetConfigurationVeths
    >(this, "brief" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }

  /**
    Delete this VETH
  */
  get delete_veth(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredVirtualEthernetConfigurationVeths
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredVirtualEthernetConfigurationVeths
    >(
      this,
      "delete_veth" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get endpoint0(): VScript.rwKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    null | VAPI.NetworkInterfaces.DesiredBridgeConfiguration,
    | null
    | (VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration"> &
        VScript.StronglyTypedSubtree<VScript.VSocket>),
    VAPI.NetworkInterfaces.DesiredVirtualEthernetConfigurationVeths
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.NetworkInterfaces.DesiredBridgeConfiguration,
      | null
      | (VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.NetworkInterfaces.DesiredVirtualEthernetConfigurationVeths
    >(
      this,
      "endpoint0" as VScript.SysName,
      {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.NetworkInterfaces.DesiredBridgeConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      },
      {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.NetworkInterfaces.DesiredBridgeConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      },
      null,
    );
  }
  get endpoint1(): VScript.rwKeyword<
    VScript.VSocket,
    null | string,
    null | string,
    null | VAPI.NetworkInterfaces.DesiredBridgeConfiguration,
    | null
    | (VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration"> &
        VScript.StronglyTypedSubtree<VScript.VSocket>),
    VAPI.NetworkInterfaces.DesiredVirtualEthernetConfigurationVeths
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | string,
      null | string,
      null | VAPI.NetworkInterfaces.DesiredBridgeConfiguration,
      | null
      | (VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration"> &
          VScript.StronglyTypedSubtree<VScript.VSocket>),
      VAPI.NetworkInterfaces.DesiredVirtualEthernetConfigurationVeths
    >(
      this,
      "endpoint1" as VScript.SysName,
      {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.NetworkInterfaces.DesiredBridgeConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      },
      {
        lift: VScript.VAPIHelpers.liftOrLowerNullable(
          (raw_kwl: string, _socket: VScript.VSocket) =>
            new VAPI.NetworkInterfaces.DesiredBridgeConfiguration(
              VScript.VAPIHelpers.get_subtree(
                _socket,
                raw_kwl as VScript.KWLName<"full">,
              ),
            ),
        ),
        lower: VScript.VAPIHelpers.liftOrLowerNullable(
          (
            x: VScript.Referenceable<"NetworkInterfaces::Data::DesiredBridgeConfiguration"> &
              VScript.StronglyTypedSubtree<VScript.VSocket>,
            _: VScript.VSocket,
          ) => x.raw.kwl,
        ),
      },
      null,
    );
  }
}
export class CurrentPortConfigurationVlans
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::CurrentPortConfiguration::Vlans">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::CurrentPortConfiguration::Vlans" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get vlan_id(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.VlanID,
    VAPI.NetworkInterfaces.CurrentPortConfigurationVlans
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.VlanID,
      VAPI.NetworkInterfaces.CurrentPortConfigurationVlans
    >(this, "vlan_id" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get settings() {
    return VAPI.NetworkInterfaces.lift.CurrentVirtualInterfaceConfiguration(
      VScript.VAPIHelpers.subtree_child_checked(this.raw, 1, "settings"),
    );
  }
}
export class DesiredPortConfigurationVlans
  implements
    VScript.Referenceable<"NetworkInterfaces::Data::DesiredPortConfiguration::Vlans">
{
  readonly type_identifier =
    "NetworkInterfaces::Data::DesiredPortConfiguration::Vlans" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get vlan_id(): VScript.rwKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    null | VAPI.Primitives.VlanID,
    null | VAPI.Primitives.VlanID,
    VAPI.NetworkInterfaces.DesiredPortConfigurationVlans
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      null | VAPI.Primitives.VlanID,
      null | VAPI.Primitives.VlanID,
      VAPI.NetworkInterfaces.DesiredPortConfigurationVlans
    >(
      this,
      "vlan_id" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }

  /**
    Delete
  */
  get delete_vlan(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.NetworkInterfaces.DesiredPortConfigurationVlans
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.NetworkInterfaces.DesiredPortConfigurationVlans
    >(
      this,
      "delete_vlan" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
  get settings() {
    return VAPI.NetworkInterfaces.lift.DesiredVirtualInterfaceConfiguration(
      VScript.VAPIHelpers.subtree_child_checked(this.raw, 2, "settings"),
    );
  }
}
export const Enums = {
  ReversePathFilter: ["Disabled", "Loose", "Strict"] as ReversePathFilter[],
  Protocol: ["UDP", "TCP"] as Protocol[],
  FaultStatus: ["LINK_UP", "LOCAL_FAULT", "REMOTE_FAULT"] as FaultStatus[],
} as const;
