internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestStreamPayload_TimestampedElement): TestStreamPayload_TimestampedElement {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* bytes encoded_element */ 1:
                    message.encodedElement = reader.bytes();
                    break;
                case /* int64 timestamp */ 2:
                    message.timestamp = reader.int64().toBigInt();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: TestStreamPayload_TimestampedElement, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* bytes encoded_element = 1; */
        if (message.encodedElement.length)
            writer.tag(1, WireType.LengthDelimited).bytes(message.encodedElement);
        /* int64 timestamp = 2; */
        if (message.timestamp !== 0n)
            writer.tag(2, WireType.Varint).int64(message.timestamp);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<EventsRequest>): EventsRequest {
        const message = { outputIds: [] };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<EventsRequest>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EventsRequest): EventsRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated string output_ids */ 1:
                    message.outputIds.push(reader.string());
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: EventsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated string output_ids = 1; */
        for (let i = 0; i < message.outputIds.length; i++)
            writer.tag(1, WireType.LengthDelimited).string(message.outputIds[i]);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<WriteFilesPayload>): WriteFilesPayload {
        const message = { windowedWrites: false, runnerDeterminedSharding: false, sideInputs: {} };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<WriteFilesPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WriteFilesPayload): WriteFilesPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* org.apache.beam.model.pipeline.v1.FunctionSpec sink */ 1:
                    message.sink = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.sink);
                    break;
                case /* org.apache.beam.model.pipeline.v1.FunctionSpec format_function */ 2:
                    message.formatFunction = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.formatFunction);
                    break;
                case /* bool windowed_writes */ 3:
                    message.windowedWrites = reader.bool();
                    break;
                case /* bool runner_determined_sharding */ 4:
                    message.runnerDeterminedSharding = reader.bool();
                    break;
                case /* map<string, org.apache.beam.model.pipeline.v1.SideInput> side_inputs */ 5:
                    this.binaryReadMap5(message.sideInputs, reader, options);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


private binaryReadMap5(map: WriteFilesPayload["sideInputs"], reader: IBinaryReader, options: BinaryReadOptions): void {
        let len = reader.uint32(), end = reader.pos + len, key: keyof WriteFilesPayload["sideInputs"] | undefined, val: WriteFilesPayload["sideInputs"][any] | undefined;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case 1:
                    key = reader.string();
                    break;
                case 2:
                    val = SideInput.internalBinaryRead(reader, reader.uint32(), options);
                    break;
                default: throw new globalThis.Error("unknown map entry field for field org.apache.beam.model.pipeline.v1.WriteFilesPayload.side_inputs");
            }
        }
        map[key ?? ""] = val ?? SideInput.create();
    }


internalBinaryWrite(message: WriteFilesPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.FunctionSpec sink = 1; */
        if (message.sink)
            FunctionSpec.internalBinaryWrite(message.sink, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.FunctionSpec format_function = 2; */
        if (message.formatFunction)
            FunctionSpec.internalBinaryWrite(message.formatFunction, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* bool windowed_writes = 3; */
        if (message.windowedWrites !== false)
            writer.tag(3, WireType.Varint).bool(message.windowedWrites);
        /* bool runner_determined_sharding = 4; */
        if (message.runnerDeterminedSharding !== false)
            writer.tag(4, WireType.Varint).bool(message.runnerDeterminedSharding);
        /* map<string, org.apache.beam.model.pipeline.v1.SideInput> side_inputs = 5; */
        for (let k of Object.keys(message.sideInputs)) {
            writer.tag(5, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
            writer.tag(2, WireType.LengthDelimited).fork();
            SideInput.internalBinaryWrite(message.sideInputs[k], writer, options);
            writer.join().join();
        }
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<PubSubReadPayload>): PubSubReadPayload {
        const message = { topic: "", subscription: "", timestampAttribute: "", idAttribute: "", withAttributes: false, topicRuntimeOverridden: "", subscriptionRuntimeOverridden: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<PubSubReadPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PubSubReadPayload): PubSubReadPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string topic */ 1:
                    message.topic = reader.string();
                    break;
                case /* string subscription */ 2:
                    message.subscription = reader.string();
                    break;
                case /* string timestamp_attribute */ 3:
                    message.timestampAttribute = reader.string();
                    break;
                case /* string id_attribute */ 4:
                    message.idAttribute = reader.string();
                    break;
                case /* bool with_attributes */ 5:
                    message.withAttributes = reader.bool();
                    break;
                case /* string topic_runtime_overridden */ 6:
                    message.topicRuntimeOverridden = reader.string();
                    break;
                case /* string subscription_runtime_overridden */ 7:
                    message.subscriptionRuntimeOverridden = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: PubSubReadPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string topic = 1; */
        if (message.topic !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.topic);
        /* string subscription = 2; */
        if (message.subscription !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.subscription);
        /* string timestamp_attribute = 3; */
        if (message.timestampAttribute !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.timestampAttribute);
        /* string id_attribute = 4; */
        if (message.idAttribute !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.idAttribute);
        /* bool with_attributes = 5; */
        if (message.withAttributes !== false)
            writer.tag(5, WireType.Varint).bool(message.withAttributes);
        /* string topic_runtime_overridden = 6; */
        if (message.topicRuntimeOverridden !== "")
            writer.tag(6, WireType.LengthDelimited).string(message.topicRuntimeOverridden);
        /* string subscription_runtime_overridden = 7; */
        if (message.subscriptionRuntimeOverridden !== "")
            writer.tag(7, WireType.LengthDelimited).string(message.subscriptionRuntimeOverridden);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<PubSubWritePayload>): PubSubWritePayload {
        const message = { topic: "", timestampAttribute: "", idAttribute: "", topicRuntimeOverridden: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<PubSubWritePayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PubSubWritePayload): PubSubWritePayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string topic */ 1:
                    message.topic = reader.string();
                    break;
                case /* string timestamp_attribute */ 2:
                    message.timestampAttribute = reader.string();
                    break;
                case /* string id_attribute */ 3:
                    message.idAttribute = reader.string();
                    break;
                case /* string topic_runtime_overridden */ 4:
                    message.topicRuntimeOverridden = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: PubSubWritePayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string topic = 1; */
        if (message.topic !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.topic);
        /* string timestamp_attribute = 2; */
        if (message.timestampAttribute !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.timestampAttribute);
        /* string id_attribute = 3; */
        if (message.idAttribute !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.idAttribute);
        /* string topic_runtime_overridden = 4; */
        if (message.topicRuntimeOverridden !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.topicRuntimeOverridden);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<GroupIntoBatchesPayload>): GroupIntoBatchesPayload {
        const message = { batchSize: 0n, batchSizeBytes: 0n, maxBufferingDurationMillis: 0n };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<GroupIntoBatchesPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GroupIntoBatchesPayload): GroupIntoBatchesPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* int64 batch_size */ 1:
                    message.batchSize = reader.int64().toBigInt();
                    break;
                case /* int64 batch_size_bytes */ 3:
                    message.batchSizeBytes = reader.int64().toBigInt();
                    break;
                case /* int64 max_buffering_duration_millis */ 2:
                    message.maxBufferingDurationMillis = reader.int64().toBigInt();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: GroupIntoBatchesPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* int64 batch_size = 1; */
        if (message.batchSize !== 0n)
            writer.tag(1, WireType.Varint).int64(message.batchSize);
        /* int64 batch_size_bytes = 3; */
        if (message.batchSizeBytes !== 0n)
            writer.tag(3, WireType.Varint).int64(message.batchSizeBytes);
        /* int64 max_buffering_duration_millis = 2; */
        if (message.maxBufferingDurationMillis !== 0n)
            writer.tag(2, WireType.Varint).int64(message.maxBufferingDurationMillis);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Coder>): Coder {
        const message = { componentCoderIds: [] };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Coder>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Coder): Coder {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* org.apache.beam.model.pipeline.v1.FunctionSpec spec */ 1:
                    message.spec = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.spec);
                    break;
                case /* repeated string component_coder_ids */ 2:
                    message.componentCoderIds.push(reader.string());
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Coder, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.FunctionSpec spec = 1; */
        if (message.spec)
            FunctionSpec.internalBinaryWrite(message.spec, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated string component_coder_ids = 2; */
        for (let i = 0; i < message.componentCoderIds.length; i++)
            writer.tag(2, WireType.LengthDelimited).string(message.componentCoderIds[i]);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<StandardCoders>): StandardCoders {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<StandardCoders>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StandardCoders): StandardCoders {
        return target ?? this.create();
    }


internalBinaryWrite(message: StandardCoders, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<WindowingStrategy>): WindowingStrategy {
        const message = { mergeStatus: 0, windowCoderId: "", accumulationMode: 0, outputTime: 0, closingBehavior: 0, allowedLateness: 0n, onTimeBehavior: 0, assignsToOneWindow: false, environmentId: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<WindowingStrategy>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WindowingStrategy): WindowingStrategy {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* org.apache.beam.model.pipeline.v1.FunctionSpec window_fn */ 1:
                    message.windowFn = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.windowFn);
                    break;
                case /* org.apache.beam.model.pipeline.v1.MergeStatus.Enum merge_status */ 2:
                    message.mergeStatus = reader.int32();
                    break;
                case /* string window_coder_id */ 3:
                    message.windowCoderId = reader.string();
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger trigger */ 4:
                    message.trigger = Trigger.internalBinaryRead(reader, reader.uint32(), options, message.trigger);
                    break;
                case /* org.apache.beam.model.pipeline.v1.AccumulationMode.Enum accumulation_mode */ 5:
                    message.accumulationMode = reader.int32();
                    break;
                case /* org.apache.beam.model.pipeline.v1.OutputTime.Enum output_time */ 6:
                    message.outputTime = reader.int32();
                    break;
                case /* org.apache.beam.model.pipeline.v1.ClosingBehavior.Enum closing_behavior */ 7:
                    message.closingBehavior = reader.int32();
                    break;
                case /* int64 allowed_lateness */ 8:
                    message.allowedLateness = reader.int64().toBigInt();
                    break;
                case /* org.apache.beam.model.pipeline.v1.OnTimeBehavior.Enum on_time_behavior */ 9:
                    message.onTimeBehavior = reader.int32();
                    break;
                case /* bool assigns_to_one_window */ 10:
                    message.assignsToOneWindow = reader.bool();
                    break;
                case /* string environment_id */ 11:
                    message.environmentId = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: WindowingStrategy, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.FunctionSpec window_fn = 1; */
        if (message.windowFn)
            FunctionSpec.internalBinaryWrite(message.windowFn, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.MergeStatus.Enum merge_status = 2; */
        if (message.mergeStatus !== 0)
            writer.tag(2, WireType.Varint).int32(message.mergeStatus);
        /* string window_coder_id = 3; */
        if (message.windowCoderId !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.windowCoderId);
        /* org.apache.beam.model.pipeline.v1.Trigger trigger = 4; */
        if (message.trigger)
            Trigger.internalBinaryWrite(message.trigger, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.AccumulationMode.Enum accumulation_mode = 5; */
        if (message.accumulationMode !== 0)
            writer.tag(5, WireType.Varint).int32(message.accumulationMode);
        /* org.apache.beam.model.pipeline.v1.OutputTime.Enum output_time = 6; */
        if (message.outputTime !== 0)
            writer.tag(6, WireType.Varint).int32(message.outputTime);
        /* org.apache.beam.model.pipeline.v1.ClosingBehavior.Enum closing_behavior = 7; */
        if (message.closingBehavior !== 0)
            writer.tag(7, WireType.Varint).int32(message.closingBehavior);
        /* int64 allowed_lateness = 8; */
        if (message.allowedLateness !== 0n)
            writer.tag(8, WireType.Varint).int64(message.allowedLateness);
        /* org.apache.beam.model.pipeline.v1.OnTimeBehavior.Enum on_time_behavior = 9; */
        if (message.onTimeBehavior !== 0)
            writer.tag(9, WireType.Varint).int32(message.onTimeBehavior);
        /* bool assigns_to_one_window = 10; */
        if (message.assignsToOneWindow !== false)
            writer.tag(10, WireType.Varint).bool(message.assignsToOneWindow);
        /* string environment_id = 11; */
        if (message.environmentId !== "")
            writer.tag(11, WireType.LengthDelimited).string(message.environmentId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<MergeStatus>): MergeStatus {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<MergeStatus>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MergeStatus): MergeStatus {
        return target ?? this.create();
    }


internalBinaryWrite(message: MergeStatus, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<AccumulationMode>): AccumulationMode {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<AccumulationMode>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccumulationMode): AccumulationMode {
        return target ?? this.create();
    }


internalBinaryWrite(message: AccumulationMode, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<ClosingBehavior>): ClosingBehavior {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ClosingBehavior>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClosingBehavior): ClosingBehavior {
        return target ?? this.create();
    }


internalBinaryWrite(message: ClosingBehavior, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<OnTimeBehavior>): OnTimeBehavior {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<OnTimeBehavior>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OnTimeBehavior): OnTimeBehavior {
        return target ?? this.create();
    }


internalBinaryWrite(message: OnTimeBehavior, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<OutputTime>): OutputTime {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<OutputTime>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OutputTime): OutputTime {
        return target ?? this.create();
    }


internalBinaryWrite(message: OutputTime, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<TimeDomain>): TimeDomain {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<TimeDomain>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TimeDomain): TimeDomain {
        return target ?? this.create();
    }


internalBinaryWrite(message: TimeDomain, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger>): Trigger {
        const message = { trigger: { oneofKind: undefined } };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger): Trigger {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* org.apache.beam.model.pipeline.v1.Trigger.AfterAll after_all */ 1:
                    message.trigger = {
                        oneofKind: "afterAll",
                        afterAll: Trigger_AfterAll.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).afterAll)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.AfterAny after_any */ 2:
                    message.trigger = {
                        oneofKind: "afterAny",
                        afterAny: Trigger_AfterAny.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).afterAny)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.AfterEach after_each */ 3:
                    message.trigger = {
                        oneofKind: "afterEach",
                        afterEach: Trigger_AfterEach.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).afterEach)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.AfterEndOfWindow after_end_of_window */ 4:
                    message.trigger = {
                        oneofKind: "afterEndOfWindow",
                        afterEndOfWindow: Trigger_AfterEndOfWindow.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).afterEndOfWindow)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.AfterProcessingTime after_processing_time */ 5:
                    message.trigger = {
                        oneofKind: "afterProcessingTime",
                        afterProcessingTime: Trigger_AfterProcessingTime.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).afterProcessingTime)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.AfterSynchronizedProcessingTime after_synchronized_processing_time */ 6:
                    message.trigger = {
                        oneofKind: "afterSynchronizedProcessingTime",
                        afterSynchronizedProcessingTime: Trigger_AfterSynchronizedProcessingTime.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).afterSynchronizedProcessingTime)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.Always always */ 12:
                    message.trigger = {
                        oneofKind: "always",
                        always: Trigger_Always.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).always)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.Default default */ 7:
                    message.trigger = {
                        oneofKind: "default",
                        default: Trigger_Default.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).default)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.ElementCount element_count */ 8:
                    message.trigger = {
                        oneofKind: "elementCount",
                        elementCount: Trigger_ElementCount.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).elementCount)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.Never never */ 9:
                    message.trigger = {
                        oneofKind: "never",
                        never: Trigger_Never.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).never)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.OrFinally or_finally */ 10:
                    message.trigger = {
                        oneofKind: "orFinally",
                        orFinally: Trigger_OrFinally.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).orFinally)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger.Repeat repeat */ 11:
                    message.trigger = {
                        oneofKind: "repeat",
                        repeat: Trigger_Repeat.internalBinaryRead(reader, reader.uint32(), options, (message.trigger as any).repeat)
                    };
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Trigger, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.Trigger.AfterAll after_all = 1; */
        if (message.trigger.oneofKind === "afterAll")
            Trigger_AfterAll.internalBinaryWrite(message.trigger.afterAll, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.AfterAny after_any = 2; */
        if (message.trigger.oneofKind === "afterAny")
            Trigger_AfterAny.internalBinaryWrite(message.trigger.afterAny, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.AfterEach after_each = 3; */
        if (message.trigger.oneofKind === "afterEach")
            Trigger_AfterEach.internalBinaryWrite(message.trigger.afterEach, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.AfterEndOfWindow after_end_of_window = 4; */
        if (message.trigger.oneofKind === "afterEndOfWindow")
            Trigger_AfterEndOfWindow.internalBinaryWrite(message.trigger.afterEndOfWindow, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.AfterProcessingTime after_processing_time = 5; */
        if (message.trigger.oneofKind === "afterProcessingTime")
            Trigger_AfterProcessingTime.internalBinaryWrite(message.trigger.afterProcessingTime, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.AfterSynchronizedProcessingTime after_synchronized_processing_time = 6; */
        if (message.trigger.oneofKind === "afterSynchronizedProcessingTime")
            Trigger_AfterSynchronizedProcessingTime.internalBinaryWrite(message.trigger.afterSynchronizedProcessingTime, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.Always always = 12; */
        if (message.trigger.oneofKind === "always")
            Trigger_Always.internalBinaryWrite(message.trigger.always, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.Default default = 7; */
        if (message.trigger.oneofKind === "default")
            Trigger_Default.internalBinaryWrite(message.trigger.default, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.ElementCount element_count = 8; */
        if (message.trigger.oneofKind === "elementCount")
            Trigger_ElementCount.internalBinaryWrite(message.trigger.elementCount, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.Never never = 9; */
        if (message.trigger.oneofKind === "never")
            Trigger_Never.internalBinaryWrite(message.trigger.never, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.OrFinally or_finally = 10; */
        if (message.trigger.oneofKind === "orFinally")
            Trigger_OrFinally.internalBinaryWrite(message.trigger.orFinally, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger.Repeat repeat = 11; */
        if (message.trigger.oneofKind === "repeat")
            Trigger_Repeat.internalBinaryWrite(message.trigger.repeat, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_AfterAll>): Trigger_AfterAll {
        const message = { subtriggers: [] };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_AfterAll>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_AfterAll): Trigger_AfterAll {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated org.apache.beam.model.pipeline.v1.Trigger subtriggers */ 1:
                    message.subtriggers.push(Trigger.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Trigger_AfterAll, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated org.apache.beam.model.pipeline.v1.Trigger subtriggers = 1; */
        for (let i = 0; i < message.subtriggers.length; i++)
            Trigger.internalBinaryWrite(message.subtriggers[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_AfterAny>): Trigger_AfterAny {
        const message = { subtriggers: [] };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_AfterAny>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_AfterAny): Trigger_AfterAny {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated org.apache.beam.model.pipeline.v1.Trigger subtriggers */ 1:
                    message.subtriggers.push(Trigger.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Trigger_AfterAny, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated org.apache.beam.model.pipeline.v1.Trigger subtriggers = 1; */
        for (let i = 0; i < message.subtriggers.length; i++)
            Trigger.internalBinaryWrite(message.subtriggers[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_AfterEach>): Trigger_AfterEach {
        const message = { subtriggers: [] };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_AfterEach>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_AfterEach): Trigger_AfterEach {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated org.apache.beam.model.pipeline.v1.Trigger subtriggers */ 1:
                    message.subtriggers.push(Trigger.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Trigger_AfterEach, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated org.apache.beam.model.pipeline.v1.Trigger subtriggers = 1; */
        for (let i = 0; i < message.subtriggers.length; i++)
            Trigger.internalBinaryWrite(message.subtriggers[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_AfterEndOfWindow>): Trigger_AfterEndOfWindow {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_AfterEndOfWindow>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_AfterEndOfWindow): Trigger_AfterEndOfWindow {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* org.apache.beam.model.pipeline.v1.Trigger early_firings */ 1:
                    message.earlyFirings = Trigger.internalBinaryRead(reader, reader.uint32(), options, message.earlyFirings);
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger late_firings */ 2:
                    message.lateFirings = Trigger.internalBinaryRead(reader, reader.uint32(), options, message.lateFirings);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Trigger_AfterEndOfWindow, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.Trigger early_firings = 1; */
        if (message.earlyFirings)
            Trigger.internalBinaryWrite(message.earlyFirings, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger late_firings = 2; */
        if (message.lateFirings)
            Trigger.internalBinaryWrite(message.lateFirings, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_AfterProcessingTime>): Trigger_AfterProcessingTime {
        const message = { timestampTransforms: [] };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_AfterProcessingTime>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_AfterProcessingTime): Trigger_AfterProcessingTime {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated org.apache.beam.model.pipeline.v1.TimestampTransform timestamp_transforms */ 1:
                    message.timestampTransforms.push(TimestampTransform.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Trigger_AfterProcessingTime, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated org.apache.beam.model.pipeline.v1.TimestampTransform timestamp_transforms = 1; */
        for (let i = 0; i < message.timestampTransforms.length; i++)
            TimestampTransform.internalBinaryWrite(message.timestampTransforms[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_AfterSynchronizedProcessingTime>): Trigger_AfterSynchronizedProcessingTime {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_AfterSynchronizedProcessingTime>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_AfterSynchronizedProcessingTime): Trigger_AfterSynchronizedProcessingTime {
        return target ?? this.create();
    }


internalBinaryWrite(message: Trigger_AfterSynchronizedProcessingTime, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_Default>): Trigger_Default {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_Default>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_Default): Trigger_Default {
        return target ?? this.create();
    }


internalBinaryWrite(message: Trigger_Default, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_ElementCount>): Trigger_ElementCount {
        const message = { elementCount: 0 };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_ElementCount>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_ElementCount): Trigger_ElementCount {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* int32 element_count */ 1:
                    message.elementCount = reader.int32();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Trigger_ElementCount, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* int32 element_count = 1; */
        if (message.elementCount !== 0)
            writer.tag(1, WireType.Varint).int32(message.elementCount);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_Never>): Trigger_Never {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_Never>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_Never): Trigger_Never {
        return target ?? this.create();
    }


internalBinaryWrite(message: Trigger_Never, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_Always>): Trigger_Always {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_Always>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_Always): Trigger_Always {
        return target ?? this.create();
    }


internalBinaryWrite(message: Trigger_Always, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_OrFinally>): Trigger_OrFinally {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_OrFinally>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_OrFinally): Trigger_OrFinally {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* org.apache.beam.model.pipeline.v1.Trigger main */ 1:
                    message.main = Trigger.internalBinaryRead(reader, reader.uint32(), options, message.main);
                    break;
                case /* org.apache.beam.model.pipeline.v1.Trigger finally */ 2:
                    message.finally = Trigger.internalBinaryRead(reader, reader.uint32(), options, message.finally);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Trigger_OrFinally, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.Trigger main = 1; */
        if (message.main)
            Trigger.internalBinaryWrite(message.main, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.Trigger finally = 2; */
        if (message.finally)
            Trigger.internalBinaryWrite(message.finally, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Trigger_Repeat>): Trigger_Repeat {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Trigger_Repeat>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Trigger_Repeat): Trigger_Repeat {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* org.apache.beam.model.pipeline.v1.Trigger subtrigger */ 1:
                    message.subtrigger = Trigger.internalBinaryRead(reader, reader.uint32(), options, message.subtrigger);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: Trigger_Repeat, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.Trigger subtrigger = 1; */
        if (message.subtrigger)
            Trigger.internalBinaryWrite(message.subtrigger, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<TimestampTransform>): TimestampTransform {
        const message = { timestampTransform: { oneofKind: undefined } };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<TimestampTransform>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TimestampTransform): TimestampTransform {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* org.apache.beam.model.pipeline.v1.TimestampTransform.Delay delay */ 1:
                    message.timestampTransform = {
                        oneofKind: "delay",
                        delay: TimestampTransform_Delay.internalBinaryRead(reader, reader.uint32(), options, (message.timestampTransform as any).delay)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.TimestampTransform.AlignTo align_to */ 2:
                    message.timestampTransform = {
                        oneofKind: "alignTo",
                        alignTo: TimestampTransform_AlignTo.internalBinaryRead(reader, reader.uint32(), options, (message.timestampTransform as any).alignTo)
                    };
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: TimestampTransform, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.TimestampTransform.Delay delay = 1; */
        if (message.timestampTransform.oneofKind === "delay")
            TimestampTransform_Delay.internalBinaryWrite(message.timestampTransform.delay, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.TimestampTransform.AlignTo align_to = 2; */
        if (message.timestampTransform.oneofKind === "alignTo")
            TimestampTransform_AlignTo.internalBinaryWrite(message.timestampTransform.alignTo, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<TimestampTransform_Delay>): TimestampTransform_Delay {
        const message = { delayMillis: 0n };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<TimestampTransform_Delay>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TimestampTransform_Delay): TimestampTransform_Delay {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* int64 delay_millis */ 1:
                    message.delayMillis = reader.int64().toBigInt();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: TimestampTransform_Delay, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* int64 delay_millis = 1; */
        if (message.delayMillis !== 0n)
            writer.tag(1, WireType.Varint).int64(message.delayMillis);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<TimestampTransform_AlignTo>): TimestampTransform_AlignTo {
        const message = { period: 0n, offset: 0n };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<TimestampTransform_AlignTo>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TimestampTransform_AlignTo): TimestampTransform_AlignTo {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* int64 period */ 3:
                    message.period = reader.int64().toBigInt();
                    break;
                case /* int64 offset */ 4:
                    message.offset = reader.int64().toBigInt();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: TimestampTransform_AlignTo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* int64 period = 3; */
        if (message.period !== 0n)
            writer.tag(3, WireType.Varint).int64(message.period);
        /* int64 offset = 4; */
        if (message.offset !== 0n)
            writer.tag(4, WireType.Varint).int64(message.offset);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<SideInput>): SideInput {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<SideInput>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SideInput): SideInput {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* org.apache.beam.model.pipeline.v1.FunctionSpec access_pattern */ 1:
                    message.accessPattern = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.accessPattern);
                    break;
                case /* org.apache.beam.model.pipeline.v1.FunctionSpec view_fn */ 2:
                    message.viewFn = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.viewFn);
                    break;
                case /* org.apache.beam.model.pipeline.v1.FunctionSpec window_mapping_fn */ 3:
                    message.windowMappingFn = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.windowMappingFn);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: SideInput, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.FunctionSpec access_pattern = 1; */
        if (message.accessPattern)
            FunctionSpec.internalBinaryWrite(message.accessPattern, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.FunctionSpec view_fn = 2; */
        if (message.viewFn)
            FunctionSpec.internalBinaryWrite(message.viewFn, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.FunctionSpec window_mapping_fn = 3; */
        if (message.windowMappingFn)
            FunctionSpec.internalBinaryWrite(message.windowMappingFn, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<StandardArtifacts>): StandardArtifacts {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<StandardArtifacts>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StandardArtifacts): StandardArtifacts {
        return target ?? this.create();
    }


internalBinaryWrite(message: StandardArtifacts, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<ArtifactFilePayload>): ArtifactFilePayload {
        const message = { path: "", sha256: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ArtifactFilePayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ArtifactFilePayload): ArtifactFilePayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string path */ 1:
                    message.path = reader.string();
                    break;
                case /* string sha256 */ 2:
                    message.sha256 = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: ArtifactFilePayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string path = 1; */
        if (message.path !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.path);
        /* string sha256 = 2; */
        if (message.sha256 !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.sha256);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<ArtifactUrlPayload>): ArtifactUrlPayload {
        const message = { url: "", sha256: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ArtifactUrlPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ArtifactUrlPayload): ArtifactUrlPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string url */ 1:
                    message.url = reader.string();
                    break;
                case /* string sha256 */ 2:
                    message.sha256 = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: ArtifactUrlPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string url = 1; */
        if (message.url !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.url);
        /* string sha256 = 2; */
        if (message.sha256 !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.sha256);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<EmbeddedFilePayload>): EmbeddedFilePayload {
        const message = { data: new Uint8Array(0) };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<EmbeddedFilePayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EmbeddedFilePayload): EmbeddedFilePayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* bytes data */ 1:
                    message.data = reader.bytes();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: EmbeddedFilePayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* bytes data = 1; */
        if (message.data.length)
            writer.tag(1, WireType.LengthDelimited).bytes(message.data);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<PyPIPayload>): PyPIPayload {
        const message = { artifactId: "", version: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<PyPIPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PyPIPayload): PyPIPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string artifact_id */ 1:
                    message.artifactId = reader.string();
                    break;
                case /* string version */ 2:
                    message.version = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: PyPIPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string artifact_id = 1; */
        if (message.artifactId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.artifactId);
        /* string version = 2; */
        if (message.version !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.version);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<MavenPayload>): MavenPayload {
        const message = { artifact: "", repositoryUrl: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<MavenPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MavenPayload): MavenPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string artifact */ 1:
                    message.artifact = reader.string();
                    break;
                case /* string repository_url */ 2:
                    message.repositoryUrl = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: MavenPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string artifact = 1; */
        if (message.artifact !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.artifact);
        /* string repository_url = 2; */
        if (message.repositoryUrl !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.repositoryUrl);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<DeferredArtifactPayload>): DeferredArtifactPayload {
        const message = { key: "", data: new Uint8Array(0) };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<DeferredArtifactPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeferredArtifactPayload): DeferredArtifactPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string key */ 1:
                    message.key = reader.string();
                    break;
                case /* bytes data */ 2:
                    message.data = reader.bytes();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: DeferredArtifactPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string key = 1; */
        if (message.key !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.key);
        /* bytes data = 2; */
        if (message.data.length)
            writer.tag(2, WireType.LengthDelimited).bytes(message.data);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<ArtifactStagingToRolePayload>): ArtifactStagingToRolePayload {
        const message = { stagedName: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ArtifactStagingToRolePayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ArtifactStagingToRolePayload): ArtifactStagingToRolePayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string staged_name */ 1:
                    message.stagedName = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: ArtifactStagingToRolePayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string staged_name = 1; */
        if (message.stagedName !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.stagedName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<ArtifactInformation>): ArtifactInformation {
        const message = { typeUrn: "", typePayload: new Uint8Array(0), roleUrn: "", rolePayload: new Uint8Array(0) };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ArtifactInformation>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ArtifactInformation): ArtifactInformation {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string type_urn */ 1:
                    message.typeUrn = reader.string();
                    break;
                case /* bytes type_payload */ 2:
                    message.typePayload = reader.bytes();
                    break;
                case /* string role_urn */ 3:
                    message.roleUrn = reader.string();
                    break;
                case /* bytes role_payload */ 4:
                    message.rolePayload = reader.bytes();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: ArtifactInformation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string type_urn = 1; */
        if (message.typeUrn !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.typeUrn);
        /* bytes type_payload = 2; */
        if (message.typePayload.length)
            writer.tag(2, WireType.LengthDelimited).bytes(message.typePayload);
        /* string role_urn = 3; */
        if (message.roleUrn !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.roleUrn);
        /* bytes role_payload = 4; */
        if (message.rolePayload.length)
            writer.tag(4, WireType.LengthDelimited).bytes(message.rolePayload);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<Environment>): Environment {
        const message = { urn: "", payload: new Uint8Array(0), displayData: [], capabilities: [], dependencies: [], resourceHints: {} };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Environment>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Environment): Environment {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string urn */ 2:
                    message.urn = reader.string();
                    break;
                case /* bytes payload */ 3:
                    message.payload = reader.bytes();
                    break;
                case /* repeated org.apache.beam.model.pipeline.v1.DisplayData display_data */ 4:
                    message.displayData.push(DisplayData.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated string capabilities */ 5:
                    message.capabilities.push(reader.string());
                    break;
                case /* repeated org.apache.beam.model.pipeline.v1.ArtifactInformation dependencies */ 6:
                    message.dependencies.push(ArtifactInformation.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* map<string, bytes> resource_hints */ 7:
                    this.binaryReadMap7(message.resourceHints, reader, options);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


private binaryReadMap7(map: Environment["resourceHints"], reader: IBinaryReader, options: BinaryReadOptions): void {
        let len = reader.uint32(), end = reader.pos + len, key: keyof Environment["resourceHints"] | undefined, val: Environment["resourceHints"][any] | undefined;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case 1:
                    key = reader.string();
                    break;
                case 2:
                    val = reader.bytes();
                    break;
                default: throw new globalThis.Error("unknown map entry field for field org.apache.beam.model.pipeline.v1.Environment.resource_hints");
            }
        }
        map[key ?? ""] = val ?? new Uint8Array(0);
    }


internalBinaryWrite(message: Environment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string urn = 2; */
        if (message.urn !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.urn);
        /* bytes payload = 3; */
        if (message.payload.length)
            writer.tag(3, WireType.LengthDelimited).bytes(message.payload);
        /* repeated org.apache.beam.model.pipeline.v1.DisplayData display_data = 4; */
        for (let i = 0; i < message.displayData.length; i++)
            DisplayData.internalBinaryWrite(message.displayData[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* repeated string capabilities = 5; */
        for (let i = 0; i < message.capabilities.length; i++)
            writer.tag(5, WireType.LengthDelimited).string(message.capabilities[i]);
        /* repeated org.apache.beam.model.pipeline.v1.ArtifactInformation dependencies = 6; */
        for (let i = 0; i < message.dependencies.length; i++)
            ArtifactInformation.internalBinaryWrite(message.dependencies[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        /* map<string, bytes> resource_hints = 7; */
        for (let k of Object.keys(message.resourceHints))
            writer.tag(7, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).bytes(message.resourceHints[k]).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<StandardEnvironments>): StandardEnvironments {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<StandardEnvironments>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StandardEnvironments): StandardEnvironments {
        return target ?? this.create();
    }


internalBinaryWrite(message: StandardEnvironments, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<DockerPayload>): DockerPayload {
        const message = { containerImage: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<DockerPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DockerPayload): DockerPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string container_image */ 1:
                    message.containerImage = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


internalBinaryWrite(message: DockerPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string container_image = 1; */
        if (message.containerImage !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.containerImage);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<ProcessPayload>): ProcessPayload {
        const message = { os: "", arch: "", command: "", env: {} };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ProcessPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ProcessPayload): ProcessPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string os */ 1:
                    message.os = reader.string();
                    break;
                case /* string arch */ 2:
                    message.arch = reader.string();
                    break;
                case /* string command */ 3:
                    message.command = reader.string();
                    break;
                case /* map<string, string> env */ 4:
                    this.binaryReadMap4(message.env, reader, options);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }


private binaryReadMap4(map: ProcessPayload["env"], reader: IBinaryReader, options: BinaryReadOptions): void {
        let len = reader.uint32(), end = reader.pos + len, key: keyof ProcessPayload["env"] | undefined, val: ProcessPayload["env"][any] | undefined;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case 1:
                    key = reader.string();
                    break;
                case 2:
                    val = reader.string();
                    break;
                default: throw new globalThis.Error("unknown map entry field for field org.apache.beam.model.pipeline.v1.ProcessPayload.env");
            }
        }
        map[key ?? ""] = val ?? "";
    }


internalBinaryWrite(message: ProcessPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string os = 1; */
        if (message.os !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.os);
        /* string arch = 2; */
        if (message.arch !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.arch);
        /* string command = 3; */
        if (message.command !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.command);
        /* map<string, string> env = 4; */
        for (let k of Object.keys(message.env))
            writer.tag(4, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.env[k]).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<ExternalPayload>): ExternalPayload {
        const message = { params: {} };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ExternalPayload>(this, message, value);
        return message;
    }