// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v2.11.5
//   protoc               v7.34.1
// source: ScannerSubscription.proto

/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";

export const protobufPackage = "protobuf";

export interface ScannerSubscription {
  numberOfRows?: number | undefined;
  instrument?: string | undefined;
  locationCode?: string | undefined;
  scanCode?: string | undefined;
  abovePrice?: number | undefined;
  belowPrice?: number | undefined;
  aboveVolume?: number | undefined;
  marketCapAbove?: number | undefined;
  marketCapBelow?: number | undefined;
  moodyRatingAbove?: string | undefined;
  moodyRatingBelow?: string | undefined;
  spRatingAbove?: string | undefined;
  spRatingBelow?: string | undefined;
  maturityDateAbove?: string | undefined;
  maturityDateBelow?: string | undefined;
  couponRateAbove?: number | undefined;
  couponRateBelow?: number | undefined;
  excludeConvertible?: boolean | undefined;
  averageOptionVolumeAbove?: number | undefined;
  scannerSettingPairs?: string | undefined;
  stockTypeFilter?: string | undefined;
  scannerSubscriptionFilterOptions: { [key: string]: string };
  scannerSubscriptionOptions: { [key: string]: string };
}

export interface ScannerSubscription_ScannerSubscriptionFilterOptionsEntry {
  key: string;
  value: string;
}

export interface ScannerSubscription_ScannerSubscriptionOptionsEntry {
  key: string;
  value: string;
}

function createBaseScannerSubscription(): ScannerSubscription {
  return {
    numberOfRows: undefined,
    instrument: undefined,
    locationCode: undefined,
    scanCode: undefined,
    abovePrice: undefined,
    belowPrice: undefined,
    aboveVolume: undefined,
    marketCapAbove: undefined,
    marketCapBelow: undefined,
    moodyRatingAbove: undefined,
    moodyRatingBelow: undefined,
    spRatingAbove: undefined,
    spRatingBelow: undefined,
    maturityDateAbove: undefined,
    maturityDateBelow: undefined,
    couponRateAbove: undefined,
    couponRateBelow: undefined,
    excludeConvertible: undefined,
    averageOptionVolumeAbove: undefined,
    scannerSettingPairs: undefined,
    stockTypeFilter: undefined,
    scannerSubscriptionFilterOptions: {},
    scannerSubscriptionOptions: {},
  };
}

export const ScannerSubscription: MessageFns<ScannerSubscription> = {
  encode(message: ScannerSubscription, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
    if (message.numberOfRows !== undefined) {
      writer.uint32(8).int32(message.numberOfRows);
    }
    if (message.instrument !== undefined) {
      writer.uint32(18).string(message.instrument);
    }
    if (message.locationCode !== undefined) {
      writer.uint32(26).string(message.locationCode);
    }
    if (message.scanCode !== undefined) {
      writer.uint32(34).string(message.scanCode);
    }
    if (message.abovePrice !== undefined) {
      writer.uint32(41).double(message.abovePrice);
    }
    if (message.belowPrice !== undefined) {
      writer.uint32(49).double(message.belowPrice);
    }
    if (message.aboveVolume !== undefined) {
      writer.uint32(56).int64(message.aboveVolume);
    }
    if (message.marketCapAbove !== undefined) {
      writer.uint32(65).double(message.marketCapAbove);
    }
    if (message.marketCapBelow !== undefined) {
      writer.uint32(73).double(message.marketCapBelow);
    }
    if (message.moodyRatingAbove !== undefined) {
      writer.uint32(82).string(message.moodyRatingAbove);
    }
    if (message.moodyRatingBelow !== undefined) {
      writer.uint32(90).string(message.moodyRatingBelow);
    }
    if (message.spRatingAbove !== undefined) {
      writer.uint32(98).string(message.spRatingAbove);
    }
    if (message.spRatingBelow !== undefined) {
      writer.uint32(106).string(message.spRatingBelow);
    }
    if (message.maturityDateAbove !== undefined) {
      writer.uint32(114).string(message.maturityDateAbove);
    }
    if (message.maturityDateBelow !== undefined) {
      writer.uint32(122).string(message.maturityDateBelow);
    }
    if (message.couponRateAbove !== undefined) {
      writer.uint32(129).double(message.couponRateAbove);
    }
    if (message.couponRateBelow !== undefined) {
      writer.uint32(137).double(message.couponRateBelow);
    }
    if (message.excludeConvertible !== undefined) {
      writer.uint32(144).bool(message.excludeConvertible);
    }
    if (message.averageOptionVolumeAbove !== undefined) {
      writer.uint32(152).int64(message.averageOptionVolumeAbove);
    }
    if (message.scannerSettingPairs !== undefined) {
      writer.uint32(162).string(message.scannerSettingPairs);
    }
    if (message.stockTypeFilter !== undefined) {
      writer.uint32(170).string(message.stockTypeFilter);
    }
    globalThis.Object.entries(message.scannerSubscriptionFilterOptions).forEach(([key, value]: [string, string]) => {
      ScannerSubscription_ScannerSubscriptionFilterOptionsEntry.encode(
        { key: key as any, value },
        writer.uint32(178).fork(),
      ).join();
    });
    globalThis.Object.entries(message.scannerSubscriptionOptions).forEach(([key, value]: [string, string]) => {
      ScannerSubscription_ScannerSubscriptionOptionsEntry.encode({ key: key as any, value }, writer.uint32(186).fork())
        .join();
    });
    return writer;
  },

  decode(input: BinaryReader | Uint8Array, length?: number): ScannerSubscription {
    const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
    const end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseScannerSubscription();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1: {
          if (tag !== 8) {
            break;
          }

          message.numberOfRows = reader.int32();
          continue;
        }
        case 2: {
          if (tag !== 18) {
            break;
          }

          message.instrument = reader.string();
          continue;
        }
        case 3: {
          if (tag !== 26) {
            break;
          }

          message.locationCode = reader.string();
          continue;
        }
        case 4: {
          if (tag !== 34) {
            break;
          }

          message.scanCode = reader.string();
          continue;
        }
        case 5: {
          if (tag !== 41) {
            break;
          }

          message.abovePrice = reader.double();
          continue;
        }
        case 6: {
          if (tag !== 49) {
            break;
          }

          message.belowPrice = reader.double();
          continue;
        }
        case 7: {
          if (tag !== 56) {
            break;
          }

          message.aboveVolume = longToNumber(reader.int64());
          continue;
        }
        case 8: {
          if (tag !== 65) {
            break;
          }

          message.marketCapAbove = reader.double();
          continue;
        }
        case 9: {
          if (tag !== 73) {
            break;
          }

          message.marketCapBelow = reader.double();
          continue;
        }
        case 10: {
          if (tag !== 82) {
            break;
          }

          message.moodyRatingAbove = reader.string();
          continue;
        }
        case 11: {
          if (tag !== 90) {
            break;
          }

          message.moodyRatingBelow = reader.string();
          continue;
        }
        case 12: {
          if (tag !== 98) {
            break;
          }

          message.spRatingAbove = reader.string();
          continue;
        }
        case 13: {
          if (tag !== 106) {
            break;
          }

          message.spRatingBelow = reader.string();
          continue;
        }
        case 14: {
          if (tag !== 114) {
            break;
          }

          message.maturityDateAbove = reader.string();
          continue;
        }
        case 15: {
          if (tag !== 122) {
            break;
          }

          message.maturityDateBelow = reader.string();
          continue;
        }
        case 16: {
          if (tag !== 129) {
            break;
          }

          message.couponRateAbove = reader.double();
          continue;
        }
        case 17: {
          if (tag !== 137) {
            break;
          }

          message.couponRateBelow = reader.double();
          continue;
        }
        case 18: {
          if (tag !== 144) {
            break;
          }

          message.excludeConvertible = reader.bool();
          continue;
        }
        case 19: {
          if (tag !== 152) {
            break;
          }

          message.averageOptionVolumeAbove = longToNumber(reader.int64());
          continue;
        }
        case 20: {
          if (tag !== 162) {
            break;
          }

          message.scannerSettingPairs = reader.string();
          continue;
        }
        case 21: {
          if (tag !== 170) {
            break;
          }

          message.stockTypeFilter = reader.string();
          continue;
        }
        case 22: {
          if (tag !== 178) {
            break;
          }

          const entry22 = ScannerSubscription_ScannerSubscriptionFilterOptionsEntry.decode(reader, reader.uint32());
          if (entry22.value !== undefined) {
            message.scannerSubscriptionFilterOptions[entry22.key] = entry22.value;
          }
          continue;
        }
        case 23: {
          if (tag !== 186) {
            break;
          }

          const entry23 = ScannerSubscription_ScannerSubscriptionOptionsEntry.decode(reader, reader.uint32());
          if (entry23.value !== undefined) {
            message.scannerSubscriptionOptions[entry23.key] = entry23.value;
          }
          continue;
        }
      }
      if ((tag & 7) === 4 || tag === 0) {
        break;
      }
      reader.skip(tag & 7);
    }
    return message;
  },

  fromJSON(object: any): ScannerSubscription {
    return {
      numberOfRows: isSet(object.numberOfRows) ? globalThis.Number(object.numberOfRows) : undefined,
      instrument: isSet(object.instrument) ? globalThis.String(object.instrument) : undefined,
      locationCode: isSet(object.locationCode) ? globalThis.String(object.locationCode) : undefined,
      scanCode: isSet(object.scanCode) ? globalThis.String(object.scanCode) : undefined,
      abovePrice: isSet(object.abovePrice) ? globalThis.Number(object.abovePrice) : undefined,
      belowPrice: isSet(object.belowPrice) ? globalThis.Number(object.belowPrice) : undefined,
      aboveVolume: isSet(object.aboveVolume) ? globalThis.Number(object.aboveVolume) : undefined,
      marketCapAbove: isSet(object.marketCapAbove) ? globalThis.Number(object.marketCapAbove) : undefined,
      marketCapBelow: isSet(object.marketCapBelow) ? globalThis.Number(object.marketCapBelow) : undefined,
      moodyRatingAbove: isSet(object.moodyRatingAbove) ? globalThis.String(object.moodyRatingAbove) : undefined,
      moodyRatingBelow: isSet(object.moodyRatingBelow) ? globalThis.String(object.moodyRatingBelow) : undefined,
      spRatingAbove: isSet(object.spRatingAbove) ? globalThis.String(object.spRatingAbove) : undefined,
      spRatingBelow: isSet(object.spRatingBelow) ? globalThis.String(object.spRatingBelow) : undefined,
      maturityDateAbove: isSet(object.maturityDateAbove) ? globalThis.String(object.maturityDateAbove) : undefined,
      maturityDateBelow: isSet(object.maturityDateBelow) ? globalThis.String(object.maturityDateBelow) : undefined,
      couponRateAbove: isSet(object.couponRateAbove) ? globalThis.Number(object.couponRateAbove) : undefined,
      couponRateBelow: isSet(object.couponRateBelow) ? globalThis.Number(object.couponRateBelow) : undefined,
      excludeConvertible: isSet(object.excludeConvertible) ? globalThis.Boolean(object.excludeConvertible) : undefined,
      averageOptionVolumeAbove: isSet(object.averageOptionVolumeAbove)
        ? globalThis.Number(object.averageOptionVolumeAbove)
        : undefined,
      scannerSettingPairs: isSet(object.scannerSettingPairs)
        ? globalThis.String(object.scannerSettingPairs)
        : undefined,
      stockTypeFilter: isSet(object.stockTypeFilter) ? globalThis.String(object.stockTypeFilter) : undefined,
      scannerSubscriptionFilterOptions: isObject(object.scannerSubscriptionFilterOptions)
        ? (globalThis.Object.entries(object.scannerSubscriptionFilterOptions) as [string, any][]).reduce(
          (acc: { [key: string]: string }, [key, value]: [string, any]) => {
            acc[key] = globalThis.String(value);
            return acc;
          },
          {},
        )
        : {},
      scannerSubscriptionOptions: isObject(object.scannerSubscriptionOptions)
        ? (globalThis.Object.entries(object.scannerSubscriptionOptions) as [string, any][]).reduce(
          (acc: { [key: string]: string }, [key, value]: [string, any]) => {
            acc[key] = globalThis.String(value);
            return acc;
          },
          {},
        )
        : {},
    };
  },

  toJSON(message: ScannerSubscription): unknown {
    const obj: any = {};
    if (message.numberOfRows !== undefined) {
      obj.numberOfRows = Math.round(message.numberOfRows);
    }
    if (message.instrument !== undefined) {
      obj.instrument = message.instrument;
    }
    if (message.locationCode !== undefined) {
      obj.locationCode = message.locationCode;
    }
    if (message.scanCode !== undefined) {
      obj.scanCode = message.scanCode;
    }
    if (message.abovePrice !== undefined) {
      obj.abovePrice = message.abovePrice;
    }
    if (message.belowPrice !== undefined) {
      obj.belowPrice = message.belowPrice;
    }
    if (message.aboveVolume !== undefined) {
      obj.aboveVolume = Math.round(message.aboveVolume);
    }
    if (message.marketCapAbove !== undefined) {
      obj.marketCapAbove = message.marketCapAbove;
    }
    if (message.marketCapBelow !== undefined) {
      obj.marketCapBelow = message.marketCapBelow;
    }
    if (message.moodyRatingAbove !== undefined) {
      obj.moodyRatingAbove = message.moodyRatingAbove;
    }
    if (message.moodyRatingBelow !== undefined) {
      obj.moodyRatingBelow = message.moodyRatingBelow;
    }
    if (message.spRatingAbove !== undefined) {
      obj.spRatingAbove = message.spRatingAbove;
    }
    if (message.spRatingBelow !== undefined) {
      obj.spRatingBelow = message.spRatingBelow;
    }
    if (message.maturityDateAbove !== undefined) {
      obj.maturityDateAbove = message.maturityDateAbove;
    }
    if (message.maturityDateBelow !== undefined) {
      obj.maturityDateBelow = message.maturityDateBelow;
    }
    if (message.couponRateAbove !== undefined) {
      obj.couponRateAbove = message.couponRateAbove;
    }
    if (message.couponRateBelow !== undefined) {
      obj.couponRateBelow = message.couponRateBelow;
    }
    if (message.excludeConvertible !== undefined) {
      obj.excludeConvertible = message.excludeConvertible;
    }
    if (message.averageOptionVolumeAbove !== undefined) {
      obj.averageOptionVolumeAbove = Math.round(message.averageOptionVolumeAbove);
    }
    if (message.scannerSettingPairs !== undefined) {
      obj.scannerSettingPairs = message.scannerSettingPairs;
    }
    if (message.stockTypeFilter !== undefined) {
      obj.stockTypeFilter = message.stockTypeFilter;
    }
    if (message.scannerSubscriptionFilterOptions) {
      const entries = globalThis.Object.entries(message.scannerSubscriptionFilterOptions) as [string, string][];
      if (entries.length > 0) {
        obj.scannerSubscriptionFilterOptions = {};
        entries.forEach(([k, v]) => {
          obj.scannerSubscriptionFilterOptions[k] = v;
        });
      }
    }
    if (message.scannerSubscriptionOptions) {
      const entries = globalThis.Object.entries(message.scannerSubscriptionOptions) as [string, string][];
      if (entries.length > 0) {
        obj.scannerSubscriptionOptions = {};
        entries.forEach(([k, v]) => {
          obj.scannerSubscriptionOptions[k] = v;
        });
      }
    }
    return obj;
  },

  create(base?: DeepPartial<ScannerSubscription>): ScannerSubscription {
    return ScannerSubscription.fromPartial(base ?? {});
  },
  fromPartial(object: DeepPartial<ScannerSubscription>): ScannerSubscription {
    const message = createBaseScannerSubscription();
    message.numberOfRows = object.numberOfRows ?? undefined;
    message.instrument = object.instrument ?? undefined;
    message.locationCode = object.locationCode ?? undefined;
    message.scanCode = object.scanCode ?? undefined;
    message.abovePrice = object.abovePrice ?? undefined;
    message.belowPrice = object.belowPrice ?? undefined;
    message.aboveVolume = object.aboveVolume ?? undefined;
    message.marketCapAbove = object.marketCapAbove ?? undefined;
    message.marketCapBelow = object.marketCapBelow ?? undefined;
    message.moodyRatingAbove = object.moodyRatingAbove ?? undefined;
    message.moodyRatingBelow = object.moodyRatingBelow ?? undefined;
    message.spRatingAbove = object.spRatingAbove ?? undefined;
    message.spRatingBelow = object.spRatingBelow ?? undefined;
    message.maturityDateAbove = object.maturityDateAbove ?? undefined;
    message.maturityDateBelow = object.maturityDateBelow ?? undefined;
    message.couponRateAbove = object.couponRateAbove ?? undefined;
    message.couponRateBelow = object.couponRateBelow ?? undefined;
    message.excludeConvertible = object.excludeConvertible ?? undefined;
    message.averageOptionVolumeAbove = object.averageOptionVolumeAbove ?? undefined;
    message.scannerSettingPairs = object.scannerSettingPairs ?? undefined;
    message.stockTypeFilter = object.stockTypeFilter ?? undefined;
    message.scannerSubscriptionFilterOptions =
      (globalThis.Object.entries(object.scannerSubscriptionFilterOptions ?? {}) as [string, string][]).reduce(
        (acc: { [key: string]: string }, [key, value]: [string, string]) => {
          if (value !== undefined) {
            acc[key] = globalThis.String(value);
          }
          return acc;
        },
        {},
      );
    message.scannerSubscriptionOptions =
      (globalThis.Object.entries(object.scannerSubscriptionOptions ?? {}) as [string, string][]).reduce(
        (acc: { [key: string]: string }, [key, value]: [string, string]) => {
          if (value !== undefined) {
            acc[key] = globalThis.String(value);
          }
          return acc;
        },
        {},
      );
    return message;
  },
};

function createBaseScannerSubscription_ScannerSubscriptionFilterOptionsEntry(): ScannerSubscription_ScannerSubscriptionFilterOptionsEntry {
  return { key: "", value: "" };
}

export const ScannerSubscription_ScannerSubscriptionFilterOptionsEntry: MessageFns<
  ScannerSubscription_ScannerSubscriptionFilterOptionsEntry
> = {
  encode(
    message: ScannerSubscription_ScannerSubscriptionFilterOptionsEntry,
    writer: BinaryWriter = new BinaryWriter(),
  ): BinaryWriter {
    if (message.key !== "") {
      writer.uint32(10).string(message.key);
    }
    if (message.value !== "") {
      writer.uint32(18).string(message.value);
    }
    return writer;
  },

  decode(input: BinaryReader | Uint8Array, length?: number): ScannerSubscription_ScannerSubscriptionFilterOptionsEntry {
    const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
    const end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseScannerSubscription_ScannerSubscriptionFilterOptionsEntry();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1: {
          if (tag !== 10) {
            break;
          }

          message.key = reader.string();
          continue;
        }
        case 2: {
          if (tag !== 18) {
            break;
          }

          message.value = reader.string();
          continue;
        }
      }
      if ((tag & 7) === 4 || tag === 0) {
        break;
      }
      reader.skip(tag & 7);
    }
    return message;
  },

  fromJSON(object: any): ScannerSubscription_ScannerSubscriptionFilterOptionsEntry {
    return {
      key: isSet(object.key) ? globalThis.String(object.key) : "",
      value: isSet(object.value) ? globalThis.String(object.value) : "",
    };
  },

  toJSON(message: ScannerSubscription_ScannerSubscriptionFilterOptionsEntry): unknown {
    const obj: any = {};
    if (message.key !== "") {
      obj.key = message.key;
    }
    if (message.value !== "") {
      obj.value = message.value;
    }
    return obj;
  },

  create(
    base?: DeepPartial<ScannerSubscription_ScannerSubscriptionFilterOptionsEntry>,
  ): ScannerSubscription_ScannerSubscriptionFilterOptionsEntry {
    return ScannerSubscription_ScannerSubscriptionFilterOptionsEntry.fromPartial(base ?? {});
  },
  fromPartial(
    object: DeepPartial<ScannerSubscription_ScannerSubscriptionFilterOptionsEntry>,
  ): ScannerSubscription_ScannerSubscriptionFilterOptionsEntry {
    const message = createBaseScannerSubscription_ScannerSubscriptionFilterOptionsEntry();
    message.key = object.key ?? "";
    message.value = object.value ?? "";
    return message;
  },
};

function createBaseScannerSubscription_ScannerSubscriptionOptionsEntry(): ScannerSubscription_ScannerSubscriptionOptionsEntry {
  return { key: "", value: "" };
}

export const ScannerSubscription_ScannerSubscriptionOptionsEntry: MessageFns<
  ScannerSubscription_ScannerSubscriptionOptionsEntry
> = {
  encode(
    message: ScannerSubscription_ScannerSubscriptionOptionsEntry,
    writer: BinaryWriter = new BinaryWriter(),
  ): BinaryWriter {
    if (message.key !== "") {
      writer.uint32(10).string(message.key);
    }
    if (message.value !== "") {
      writer.uint32(18).string(message.value);
    }
    return writer;
  },

  decode(input: BinaryReader | Uint8Array, length?: number): ScannerSubscription_ScannerSubscriptionOptionsEntry {
    const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
    const end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseScannerSubscription_ScannerSubscriptionOptionsEntry();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1: {
          if (tag !== 10) {
            break;
          }

          message.key = reader.string();
          continue;
        }
        case 2: {
          if (tag !== 18) {
            break;
          }

          message.value = reader.string();
          continue;
        }
      }
      if ((tag & 7) === 4 || tag === 0) {
        break;
      }
      reader.skip(tag & 7);
    }
    return message;
  },

  fromJSON(object: any): ScannerSubscription_ScannerSubscriptionOptionsEntry {
    return {
      key: isSet(object.key) ? globalThis.String(object.key) : "",
      value: isSet(object.value) ? globalThis.String(object.value) : "",
    };
  },

  toJSON(message: ScannerSubscription_ScannerSubscriptionOptionsEntry): unknown {
    const obj: any = {};
    if (message.key !== "") {
      obj.key = message.key;
    }
    if (message.value !== "") {
      obj.value = message.value;
    }
    return obj;
  },

  create(
    base?: DeepPartial<ScannerSubscription_ScannerSubscriptionOptionsEntry>,
  ): ScannerSubscription_ScannerSubscriptionOptionsEntry {
    return ScannerSubscription_ScannerSubscriptionOptionsEntry.fromPartial(base ?? {});
  },
  fromPartial(
    object: DeepPartial<ScannerSubscription_ScannerSubscriptionOptionsEntry>,
  ): ScannerSubscription_ScannerSubscriptionOptionsEntry {
    const message = createBaseScannerSubscription_ScannerSubscriptionOptionsEntry();
    message.key = object.key ?? "";
    message.value = object.value ?? "";
    return message;
  },
};

type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;

export type DeepPartial<T> = T extends Builtin ? T
  : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
  : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
  : Partial<T>;

function longToNumber(int64: { toString(): string }): number {
  const num = globalThis.Number(int64.toString());
  if (num > globalThis.Number.MAX_SAFE_INTEGER) {
    throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
  }
  if (num < globalThis.Number.MIN_SAFE_INTEGER) {
    throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
  }
  return num;
}

function isObject(value: any): boolean {
  return typeof value === "object" && value !== null;
}

function isSet(value: any): boolean {
  return value !== null && value !== undefined;
}

export interface MessageFns<T> {
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
  decode(input: BinaryReader | Uint8Array, length?: number): T;
  fromJSON(object: any): T;
  toJSON(message: T): unknown;
  create(base?: DeepPartial<T>): T;
  fromPartial(object: DeepPartial<T>): T;
}
