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";
export const lift = {
  ECCMuxStatistics: (_raw: VScript.DataViews.Subtree<VScript.VSocket>) =>
    new ECCMuxStatistics(_raw),
} as const;
export const lower = {
  ECCMuxStatistics: (_x: ECCMuxStatistics) => _x.raw.kwl,
} as const;
export class ECCMuxStatistics
  implements VScript.Referenceable<"Memory::Data::ECCMuxStatistics">
{
  readonly type_identifier = "Memory::Data::ECCMuxStatistics" as const;
  constructor(readonly raw: VScript.DataViews.Subtree<VScript.VSocket>) {}
  get err_corrected_sum(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned64,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned64,
      VAPI.Memory.ECCMuxStatistics
    >(this, "err_corrected_sum" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get err_detected_sum(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned64,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned64,
      VAPI.Memory.ECCMuxStatistics
    >(this, "err_detected_sum" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get err_fatal_sum(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned64,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned64,
      VAPI.Memory.ECCMuxStatistics
    >(this, "err_fatal_sum" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stats_readreq(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_readreq" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stats_readdata(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_readdata" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stats_readwait(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VScript.Duration,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_readwait" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.liftSeconds,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.lowerSeconds,
      ),
    });
  }
  get stats_readwait_cmp(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_readwait_cmp" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stats_readwait_max(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VScript.Duration,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_readwait_max" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.liftSeconds,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.lowerSeconds,
      ),
    });
  }
  get stats_writedata(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_writedata" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stats_writewait(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VScript.Duration,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_writewait" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.liftSeconds,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.lowerSeconds,
      ),
    });
  }
  get stats_user_readreq(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Unsigned32,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Unsigned32,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_user_readreq" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stats_user_readwait(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VScript.Duration,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_user_readwait" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.liftSeconds,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.lowerSeconds,
      ),
    });
  }
  get stats_user_readwait_cmp(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | number,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | number,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_user_readwait_cmp" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }
  get stats_user_readwait_max(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VScript.Duration,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VScript.Duration,
      VAPI.Memory.ECCMuxStatistics
    >(this, "stats_user_readwait_max" as VScript.SysName, {
      lift: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.liftSeconds,
      ),
      lower: VScript.VAPIHelpers.liftOrLowerNullable(
        VScript.VAPIHelpers.lowerSeconds,
      ),
    });
  }
  get max_wait_duration(): VScript.rwKeyword<
    VScript.VSocket,
    number,
    number,
    VScript.Duration,
    VScript.Duration,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rwKeyword<
      VScript.VSocket,
      number,
      number,
      VScript.Duration,
      VScript.Duration,
      VAPI.Memory.ECCMuxStatistics
    >(
      this,
      "max_wait_duration" as VScript.SysName,
      {
        lift: VScript.VAPIHelpers.liftSeconds,
        lower: VScript.VAPIHelpers.lowerSeconds,
      },
      {
        lift: VScript.VAPIHelpers.liftSeconds,
        lower: VScript.VAPIHelpers.lowerSeconds,
      },
      null,
    );
  }
  get load(): VScript.rKeyword<
    VScript.VSocket,
    null | number,
    null | VAPI.Primitives.Normalized,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.rKeyword<
      VScript.VSocket,
      null | number,
      null | VAPI.Primitives.Normalized,
      VAPI.Memory.ECCMuxStatistics
    >(this, "load" as VScript.SysName, {
      lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
      lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
    });
  }

  /**
    Clear statistic counter
  */
  get clear(): VScript.wKeyword<
    VScript.VSocket,
    VAPI.Primitives.Button,
    VAPI.Primitives.Button,
    VAPI.Memory.ECCMuxStatistics
  > {
    return new VScript.wKeyword<
      VScript.VSocket,
      VAPI.Primitives.Button,
      VAPI.Primitives.Button,
      VAPI.Memory.ECCMuxStatistics
    >(
      this,
      "clear" as VScript.SysName,
      {
        lift: (x: any /* FIXME */, _: VScript.VSocket) => x,
        lower: (x: any /* FIXME */, _: VScript.VSocket) => x,
      },
      null,
    );
  }
}
