/* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; import { VictronTopologyV1 } from "./VictronV1/VictronTopologyV1"; export const protobufPackage = ""; export interface Payload { VictronTopologyV1: VictronTopologyV1 | undefined; } function createBasePayload(): Payload { return { VictronTopologyV1: undefined }; } export const Payload = { encode( message: Payload, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.VictronTopologyV1 !== undefined) { VictronTopologyV1.encode( message.VictronTopologyV1, writer.uint32(10).fork() ).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Payload { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePayload(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.VictronTopologyV1 = VictronTopologyV1.decode( reader, reader.uint32() ); break; default: reader.skipType(tag & 7); break; } } return message; }, fromJSON(object: any): Payload { return { VictronTopologyV1: isSet(object.VictronTopologyV1) ? VictronTopologyV1.fromJSON(object.VictronTopologyV1) : undefined, }; }, toJSON(message: Payload): unknown { const obj: any = {}; message.VictronTopologyV1 !== undefined && (obj.VictronTopologyV1 = message.VictronTopologyV1 ? VictronTopologyV1.toJSON(message.VictronTopologyV1) : undefined); return obj; }, fromPartial, I>>(object: I): Payload { const message = createBasePayload(); message.VictronTopologyV1 = object.VictronTopologyV1 !== undefined && object.VictronTopologyV1 !== null ? VictronTopologyV1.fromPartial(object.VictronTopologyV1) : undefined; return message; }, }; type Builtin = | Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact } & Record< Exclude>, never >; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } function isSet(value: any): boolean { return value !== null && value !== undefined; }