/**
 * Primitive transforms may not specify composite sub-transforms.
 *
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardPTransforms.Primitives
 */
export enum StandardPTransforms_Primitives {
    /**
     * ParDo is a Beam transform for generic parallel processing. The ParDo
     * processing paradigm is similar to the “Map” phase of a
     * Map/Shuffle/Reduce-style algorithm: a ParDo transform considers each
     * element in the input PCollection, performs some processing function
     * (your user code) on that element, and emits zero, one, or multiple
     * elements to an output PCollection.
     *
     * See https://beam.apache.org/documentation/programming-guide/#pardo
     * for additional details.
     *
     * Payload: ParDoPayload
     *
     * @generated from protobuf enum value: PAR_DO = 0;
     */
    PAR_DO = 0,
    /**
     * Flatten is a Beam transform for PCollection objects that store the same
     * data type. Flatten merges multiple PCollection objects into a single
     * logical PCollection.
     *
     * See https://beam.apache.org/documentation/programming-guide/#flatten
     * for additional details.
     *
     * Payload: None
     *
     * @generated from protobuf enum value: FLATTEN = 1;
     */
    FLATTEN = 1,
    /**
     * GroupByKey is a Beam transform for processing collections of key/value
     * pairs. It’s a parallel reduction operation, analogous to the Shuffle
     * phase of a Map/Shuffle/Reduce-style algorithm. The input to GroupByKey is
     * a collection of key/value pairs that represents a multimap, where the
     * collection contains multiple pairs that have the same key, but different
     * values. Given such a collection, you use GroupByKey to collect all of the
     * values associated with each unique key.
     *
     * See https://beam.apache.org/documentation/programming-guide/#groupbykey
     * for additional details.
     *
     * Never defines an environment as the runner is required to implement this
     * transform.
     *
     * Payload: None
     *
     * @generated from protobuf enum value: GROUP_BY_KEY = 2;
     */
    GROUP_BY_KEY = 2,
    /**
     * A transform which produces a single empty byte array at the minimum
     * timestamp in the GlobalWindow.
     *
     * Never defines an environment as the runner is required to implement this
     * transform.
     *
     * Payload: None
     *
     * @generated from protobuf enum value: IMPULSE = 3;
     */
    IMPULSE = 3,
    /**
     * Windowing subdivides a PCollection according to the timestamps of its
     * individual elements. Transforms that aggregate multiple elements, such as
     * GroupByKey and Combine, work implicitly on a per-window basis — they
     * process each PCollection as a succession of multiple, finite windows,
     * though the entire collection itself may be of unbounded size.
     *
     * See https://beam.apache.org/documentation/programming-guide/#windowing
     * for additional details.
     *
     * Payload: WindowIntoPayload
     *
     * @generated from protobuf enum value: ASSIGN_WINDOWS = 4;
     */
    ASSIGN_WINDOWS = 4,
    /**
     * A testing input that generates an unbounded {@link PCollection} of
     * elements, advancing the watermark and processing time as elements are
     * emitted. After all of the specified elements are emitted, ceases to
     * produce output.
     *
     * See https://beam.apache.org/blog/2016/10/20/test-stream.html
     * for additional details.
     *
     * Payload: TestStreamPayload
     *
     * @generated from protobuf enum value: TEST_STREAM = 5;
     */
    TEST_STREAM = 5,
    /**
     * Represents mapping of main input window onto side input window.
     *
     * Side input window mapping function:
     * Input: KV<nonce, MainInputWindow>
     * Output: KV<nonce, SideInputWindow>
     *
     * For each main input window, the side input window is returned. The
     * nonce is used by a runner to associate each input with its output.
     * The nonce is represented as an opaque set of bytes.
     *
     * Payload: SideInput#window_mapping_fn FunctionSpec
     *
     * @generated from protobuf enum value: MAP_WINDOWS = 6;
     */
    MAP_WINDOWS = 6,
    /**
     * Used to merge windows during a GroupByKey.
     *
     * Window merging function:
     * Input: KV<nonce, iterable<OriginalWindow>>
     * Output: KV<nonce, KV<iterable<UnmergedOriginalWindow>, iterable<KV<MergedWindow, iterable<ConsumedOriginalWindow>>>>
     *
     * For each set of original windows, a list of all unmerged windows is
     * output alongside a map of merged window to set of consumed windows.
     * All original windows must be contained in either the unmerged original
     * window set or one of the consumed original window sets. Each original
     * window can only be part of one output set. The nonce is used by a runner
     * to associate each input with its output. The nonce is represented as an
     * opaque set of bytes.
     *
     * Payload: WindowingStrategy#window_fn FunctionSpec
     *
     * @generated from protobuf enum value: MERGE_WINDOWS = 7;
     */
    MERGE_WINDOWS = 7,
    /**
     * A transform that translates a given element to its human-readable
     * representation.
     *
     * Input: KV<nonce, element>
     * Output: KV<nonce, string>
     *
     * For each given element, the implementation returns the best-effort
     * human-readable representation. When possible, the implementation could
     * call a user-overridable method on the type. For example, Java could
     * call `toString()`, Python could call `str()`, Golang could call
     * `String()`.  The nonce is used by a runner to associate each input with
     * its output. The nonce is represented as an opaque set of bytes.
     *
     * Payload: none
     *
     * @generated from protobuf enum value: TO_STRING = 8;
     */
    TO_STRING = 8
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardPTransforms.DeprecatedPrimitives
 */
export enum StandardPTransforms_DeprecatedPrimitives {
    /**
     * Represents the operation to read a Bounded or Unbounded source.
     * Payload: ReadPayload.
     *
     * @generated from protobuf enum value: READ = 0;
     */
    READ = 0,
    /**
     * Runners should move away from translating `CreatePCollectionView` and treat this as
     * part of the translation for a `ParDo` side input.
     *
     * @generated from protobuf enum value: CREATE_VIEW = 1;
     */
    CREATE_VIEW = 1
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardPTransforms.Composites
 */
export enum StandardPTransforms_Composites {
    /**
     * Represents the Combine.perKey() operation.
     * If this is produced by an SDK, it is assumed that the SDK understands
     * each of CombineComponents.
     * Payload: CombinePayload
     *
     * @generated from protobuf enum value: COMBINE_PER_KEY = 0;
     */
    COMBINE_PER_KEY = 0,
    /**
     * Represents the Combine.globally() operation.
     * If this is produced by an SDK, it is assumed that the SDK understands
     * each of CombineComponents.
     * Payload: CombinePayload
     *
     * @generated from protobuf enum value: COMBINE_GLOBALLY = 1;
     */
    COMBINE_GLOBALLY = 1,
    /**
     * Represents the Reshuffle operation.
     *
     * @generated from protobuf enum value: RESHUFFLE = 2;
     */
    RESHUFFLE = 2,
    /**
     * Less well-known. Payload: WriteFilesPayload.
     *
     * @generated from protobuf enum value: WRITE_FILES = 3;
     */
    WRITE_FILES = 3,
    /**
     * Payload: PubSubReadPayload.
     *
     * @generated from protobuf enum value: PUBSUB_READ = 4;
     */
    PUBSUB_READ = 4,
    /**
     * Payload: PubSubWritePayload.
     *
     * @generated from protobuf enum value: PUBSUB_WRITE = 5;
     */
    PUBSUB_WRITE = 5,
    /**
     * Represents the GroupIntoBatches.WithShardedKey operation.
     * Payload: GroupIntoBatchesPayload
     *
     * @generated from protobuf enum value: GROUP_INTO_BATCHES_WITH_SHARDED_KEY = 6;
     */
    GROUP_INTO_BATCHES_WITH_SHARDED_KEY = 6
}


/**
 * Payload for all of these: CombinePayload
 *
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardPTransforms.CombineComponents
 */
export enum StandardPTransforms_CombineComponents {
    /**
     * Represents the Pre-Combine part of a lifted Combine Per Key, as described
     * in the following document:
     * https://s.apache.org/beam-runner-api-combine-model#heading=h.ta0g6ase8z07
     * Payload: CombinePayload
     *
     * @generated from protobuf enum value: COMBINE_PER_KEY_PRECOMBINE = 0;
     */
    COMBINE_PER_KEY_PRECOMBINE = 0,
    /**
     * Represents the Merge Accumulators part of a lifted Combine Per Key, as
     * described in the following document:
     * https://s.apache.org/beam-runner-api-combine-model#heading=h.jco9rvatld5m
     * Payload: CombinePayload
     *
     * @generated from protobuf enum value: COMBINE_PER_KEY_MERGE_ACCUMULATORS = 1;
     */
    COMBINE_PER_KEY_MERGE_ACCUMULATORS = 1,
    /**
     * Represents the Extract Outputs part of a lifted Combine Per Key, as
     * described in the following document:
     * https://s.apache.org/beam-runner-api-combine-model#heading=h.i9i6p8gtl6ku
     * Payload: CombinePayload
     *
     * @generated from protobuf enum value: COMBINE_PER_KEY_EXTRACT_OUTPUTS = 2;
     */
    COMBINE_PER_KEY_EXTRACT_OUTPUTS = 2,
    /**
     * Represents the Combine Grouped Values transform, as described in the
     * following document:
     * https://s.apache.org/beam-runner-api-combine-model#heading=h.aj86ew4v1wk
     * Payload: CombinePayload
     *
     * @generated from protobuf enum value: COMBINE_GROUPED_VALUES = 3;
     */
    COMBINE_GROUPED_VALUES = 3,
    /**
     * Represents the Convert To Accumulators transform, as described in the
     * following document:
     * https://s.apache.org/beam-runner-api-combine-model#heading=h.h5697l1scd9x
     * Payload: CombinePayload
     *
     * @generated from protobuf enum value: COMBINE_PER_KEY_CONVERT_TO_ACCUMULATORS = 4;
     */
    COMBINE_PER_KEY_CONVERT_TO_ACCUMULATORS = 4
}


/**
 * Payload for all of these: ParDoPayload containing the user's SDF
 *
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardPTransforms.SplittableParDoComponents
 */
export enum StandardPTransforms_SplittableParDoComponents {
    /**
     * Pairs the input element with its initial restriction.
     * Input: element; output: KV(element, restriction).
     *
     * @generated from protobuf enum value: PAIR_WITH_RESTRICTION = 0;
     */
    PAIR_WITH_RESTRICTION = 0,
    /**
     * Splits the restriction of each element/restriction pair and returns the
     * resulting splits, with a corresponding floating point size estimation
     * for each.
     *
     * A reasonable value for size is the number of bytes expected to be
     * produced by this (element, restriction) pair.
     *
     * Input: KV(element, restriction)
     * Output: KV(KV(element, restriction), size))
     *
     * @generated from protobuf enum value: SPLIT_AND_SIZE_RESTRICTIONS = 1;
     */
    SPLIT_AND_SIZE_RESTRICTIONS = 1,
    /**
     * Applies the DoFn to every element and restriction.
     *
     * All primary and residuals returned from checkpointing or splitting must
     * have the same type as the input to this transform.
     *
     * Input: KV(KV(element, restriction), size); output: DoFn's output.
     *
     * @generated from protobuf enum value: PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS = 2;
     */
    PROCESS_SIZED_ELEMENTS_AND_RESTRICTIONS = 2,
    /**
     * Truncates the restriction of each element/restriction pair and returns
     * the finite restriction which will be processed when a pipeline is
     * drained. See
     * https://docs.google.com/document/d/1NExwHlj-2q2WUGhSO4jTu8XGhDPmm3cllSN8IMmWci8/edit#.
     * for additional details about drain.
     *
     * Input: KV(KV(element, restriction), size);
     * Output: KV(KV(element, restriction), size).
     *
     * @generated from protobuf enum value: TRUNCATE_SIZED_RESTRICTION = 3;
     */
    TRUNCATE_SIZED_RESTRICTION = 3
}


/**
 * Payload for all of these: GroupIntoBatchesPayload
 *
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardPTransforms.GroupIntoBatchesComponents
 */
export enum StandardPTransforms_GroupIntoBatchesComponents {
    /**
     * @generated from protobuf enum value: GROUP_INTO_BATCHES = 0;
     */
    GROUP_INTO_BATCHES = 0
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardSideInputTypes.Enum
 */
export enum StandardSideInputTypes_Enum {
    /**
     * Represents a view over a PCollection<V>.
     *
     * StateGetRequests performed on this side input must use
     * StateKey.IterableSideInput.
     *
     * @generated from protobuf enum value: ITERABLE = 0;
     */
    ITERABLE = 0,
    /**
     * Represents a view over a PCollection<KV<K, V>>.
     *
     * StateGetRequests performed on this side input must use
     * StateKey.IterableSideInput or StateKey.MultimapSideInput.
     *
     * @generated from protobuf enum value: MULTIMAP = 1;
     */
    MULTIMAP = 1
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.IsBounded.Enum
 */
export enum IsBounded_Enum {
    /**
     * @generated from protobuf enum value: UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * @generated from protobuf enum value: UNBOUNDED = 1;
     */
    UNBOUNDED = 1,
    /**
     * @generated from protobuf enum value: BOUNDED = 2;
     */
    BOUNDED = 2
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.MergeStatus.Enum
 */
export enum MergeStatus_Enum {
    /**
     * @generated from protobuf enum value: UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * The WindowFn does not require merging.
     * Examples: global window, FixedWindows, SlidingWindows
     *
     * @generated from protobuf enum value: NON_MERGING = 1;
     */
    NON_MERGING = 1,
    /**
     * The WindowFn is merging and the PCollection has not had merging
     * performed.
     * Example: Sessions prior to a GroupByKey
     *
     * @generated from protobuf enum value: NEEDS_MERGE = 2;
     */
    NEEDS_MERGE = 2,
    /**
     * The WindowFn is merging and the PCollection has had merging occur
     * already.
     * Example: Sessions after a GroupByKey
     *
     * @generated from protobuf enum value: ALREADY_MERGED = 3;
     */
    ALREADY_MERGED = 3
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.AccumulationMode.Enum
 */
export enum AccumulationMode_Enum {
    /**
     * @generated from protobuf enum value: UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * The aggregation is discarded when it is output
     *
     * @generated from protobuf enum value: DISCARDING = 1;
     */
    DISCARDING = 1,
    /**
     * The aggregation is accumulated across outputs
     *
     * @generated from protobuf enum value: ACCUMULATING = 2;
     */
    ACCUMULATING = 2,
    /**
     * The aggregation emits retractions when it is output
     *
     * @generated from protobuf enum value: RETRACTING = 3;
     */
    RETRACTING = 3
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.ClosingBehavior.Enum
 */
export enum ClosingBehavior_Enum {
    /**
     * @generated from protobuf enum value: UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * Emit output when a window expires, whether or not there has been
     * any new data since the last output.
     *
     * @generated from protobuf enum value: EMIT_ALWAYS = 1;
     */
    EMIT_ALWAYS = 1,
    /**
     * Only emit output when new data has arrives since the last output
     *
     * @generated from protobuf enum value: EMIT_IF_NONEMPTY = 2;
     */
    EMIT_IF_NONEMPTY = 2
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.OnTimeBehavior.Enum
 */
export enum OnTimeBehavior_Enum {
    /**
     * @generated from protobuf enum value: UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * Always fire the on-time pane. Even if there is no new data since
     * the previous firing, an element will be produced.
     *
     * @generated from protobuf enum value: FIRE_ALWAYS = 1;
     */
    FIRE_ALWAYS = 1,
    /**
     * Only fire the on-time pane if there is new data since the previous firing.
     *
     * @generated from protobuf enum value: FIRE_IF_NONEMPTY = 2;
     */
    FIRE_IF_NONEMPTY = 2
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.OutputTime.Enum
 */
export enum OutputTime_Enum {
    /**
     * @generated from protobuf enum value: UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * The output has the timestamp of the end of the window.
     *
     * @generated from protobuf enum value: END_OF_WINDOW = 1;
     */
    END_OF_WINDOW = 1,
    /**
     * The output has the latest timestamp of the input elements since
     * the last output.
     *
     * @generated from protobuf enum value: LATEST_IN_PANE = 2;
     */
    LATEST_IN_PANE = 2,
    /**
     * The output has the earliest timestamp of the input elements since
     * the last output.
     *
     * @generated from protobuf enum value: EARLIEST_IN_PANE = 3;
     */
    EARLIEST_IN_PANE = 3
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.TimeDomain.Enum
 */
export enum TimeDomain_Enum {
    /**
     * @generated from protobuf enum value: UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * Event time is time from the perspective of the data
     *
     * @generated from protobuf enum value: EVENT_TIME = 1;
     */
    EVENT_TIME = 1,
    /**
     * Processing time is time from the perspective of the
     * execution of your pipeline
     *
     * @generated from protobuf enum value: PROCESSING_TIME = 2;
     */
    PROCESSING_TIME = 2
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardArtifacts.Types
 */
export enum StandardArtifacts_Types {
    /**
     * A URN for locally-accessible artifact files.
     * payload: ArtifactFilePayload
     *
     * @generated from protobuf enum value: FILE = 0;
     */
    FILE = 0,
    /**
     * A URN for artifacts described by URLs.
     * payload: ArtifactUrlPayload
     *
     * @generated from protobuf enum value: URL = 1;
     */
    URL = 1,
    /**
     * A URN for artifacts embedded in ArtifactInformation proto.
     * payload: EmbeddedFilePayload.
     *
     * @generated from protobuf enum value: EMBEDDED = 2;
     */
    EMBEDDED = 2,
    /**
     * A URN for Python artifacts hosted on PYPI.
     * payload: PypiPayload
     *
     * @generated from protobuf enum value: PYPI = 3;
     */
    PYPI = 3,
    /**
     * A URN for Java artifacts hosted on a Maven repository.
     * payload: MavenPayload
     *
     * @generated from protobuf enum value: MAVEN = 4;
     */
    MAVEN = 4,
    /**
     * A URN for deferred artifacts.
     * payload: DeferredArtifactPayload
     *
     * @generated from protobuf enum value: DEFERRED = 5;
     */
    DEFERRED = 5
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardArtifacts.Roles
 */
export enum StandardArtifacts_Roles {
    /**
     * A URN for staging-to role.
     * payload: ArtifactStagingToRolePayload
     *
     * @generated from protobuf enum value: STAGING_TO = 0;
     */
    STAGING_TO = 0,
    /**
     * A URN for pip-requirements-file role.
     * payload: None
     *
     * @generated from protobuf enum value: PIP_REQUIREMENTS_FILE = 1;
     */
    PIP_REQUIREMENTS_FILE = 1
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardEnvironments.Environments
 */
export enum StandardEnvironments_Environments {
    /**
     * A managed docker container to run user code.
     *
     * @generated from protobuf enum value: DOCKER = 0;
     */
    DOCKER = 0,
    /**
     * A managed native process to run user code.
     *
     * @generated from protobuf enum value: PROCESS = 1;
     */
    PROCESS = 1,
    /**
     * An external non managed process to run user code.
     *
     * @generated from protobuf enum value: EXTERNAL = 2;
     */
    EXTERNAL = 2,
    /**
     * Used as a stub when context is missing a runner-provided default environment.
     *
     * @generated from protobuf enum value: DEFAULT = 3;
     */
    DEFAULT = 3
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardProtocols.Enum
 */
export enum StandardProtocols_Enum {
    /**
     * Indicates suport for progress reporting via the legacy Metrics proto.
     *
     * @generated from protobuf enum value: LEGACY_PROGRESS_REPORTING = 0;
     */
    LEGACY_PROGRESS_REPORTING = 0,
    /**
     * Indicates suport for progress reporting via the new MonitoringInfo proto.
     *
     * @generated from protobuf enum value: PROGRESS_REPORTING = 1;
     */
    PROGRESS_REPORTING = 1,
    /**
     * Indicates suport for worker status protocol defined at
     * https://s.apache.org/beam-fn-api-harness-status.
     *
     * @generated from protobuf enum value: WORKER_STATUS = 2;
     */
    WORKER_STATUS = 2,
    /**
     * Indicates this SDK can take advantage of multiple cores when processing
     * concurrent process bundle requests. (Note that all SDKs must process
     * an unbounded number of concurrent process bundle requests; this capability
     * simply indicates this SDK can actually parallelize the work across multiple
     * cores.
     *
     * @generated from protobuf enum value: MULTI_CORE_BUNDLE_PROCESSING = 3;
     */
    MULTI_CORE_BUNDLE_PROCESSING = 3,
    /**
     * Indicates this SDK can cheaply spawn sibling workers (e.g. within the
     * same container) to work around the fact that it cannot take advantage
     * of multiple cores (i.e. MULTI_CORE_BUNDLE_PROCESSING is not set).
     *
     * @generated from protobuf enum value: SIBLING_WORKERS = 5;
     */
    SIBLING_WORKERS = 5,
    /**
     * Indicates that this SDK handles the InstructionRequest of type
     * HarnessMonitoringInfosRequest.
     * A request to provide full MonitoringInfo data associated with
     * the entire SDK harness process, not specific to a bundle.
     *
     * @generated from protobuf enum value: HARNESS_MONITORING_INFOS = 4;
     */
    HARNESS_MONITORING_INFOS = 4,
    /**
     * Indicates that this SDK can process elements embedded in the
     * ProcessBundleRequest. See more about the protocol at
     * https://s.apache.org/beam-fn-api-control-data-embedding
     *
     * @generated from protobuf enum value: CONTROL_REQUEST_ELEMENTS_EMBEDDING = 6;
     */
    CONTROL_REQUEST_ELEMENTS_EMBEDDING = 6
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardRunnerProtocols.Enum
 */
export enum StandardRunnerProtocols_Enum {
    /**
     * Indicates suport the MonitoringInfo short id protocol.
     *
     * @generated from protobuf enum value: MONITORING_INFO_SHORT_IDS = 0;
     */
    MONITORING_INFO_SHORT_IDS = 0,
    /**
     * Indicates that this runner can process elements embedded in the
     * ProcessBundleResponse. See more about the protocol at
     * https://s.apache.org/beam-fn-api-control-data-embedding
     *
     * @generated from protobuf enum value: CONTROL_RESPONSE_ELEMENTS_EMBEDDING = 6;
     */
    CONTROL_RESPONSE_ELEMENTS_EMBEDDING = 6
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardRequirements.Enum
 */
export enum StandardRequirements_Enum {
    /**
     * This requirement indicates the state_spec and time_spec fields of ParDo
     * transform payloads must be inspected.
     *
     * @generated from protobuf enum value: REQUIRES_STATEFUL_PROCESSING = 0;
     */
    REQUIRES_STATEFUL_PROCESSING = 0,
    /**
     * This requirement indicates the requests_finalization field of ParDo
     * transform payloads must be inspected.
     *
     * @generated from protobuf enum value: REQUIRES_BUNDLE_FINALIZATION = 1;
     */
    REQUIRES_BUNDLE_FINALIZATION = 1,
    /**
     * This requirement indicates the requires_stable_input field of ParDo
     * transform payloads must be inspected.
     *
     * @generated from protobuf enum value: REQUIRES_STABLE_INPUT = 2;
     */
    REQUIRES_STABLE_INPUT = 2,
    /**
     * This requirement indicates the requires_time_sorted_input field of ParDo
     * transform payloads must be inspected.
     *
     * @generated from protobuf enum value: REQUIRES_TIME_SORTED_INPUT = 3;
     */
    REQUIRES_TIME_SORTED_INPUT = 3,
    /**
     * This requirement indicates the restriction_coder_id field of ParDo
     * transform payloads must be inspected.
     *
     * @generated from protobuf enum value: REQUIRES_SPLITTABLE_DOFN = 4;
     */
    REQUIRES_SPLITTABLE_DOFN = 4
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardDisplayData.DisplayData
 */
export enum StandardDisplayData_DisplayData {
    /**
     * A string label and value. Has a payload containing an encoded
     * LabelledPayload.
     *
     * @generated from protobuf enum value: LABELLED = 0;
     */
    LABELLED = 0
}


/**
 * @generated from protobuf enum org.apache.beam.model.pipeline.v1.StandardResourceHints.Enum
 */
export enum StandardResourceHints_Enum {
    /**
     * Describes hardware accelerators that are desired to have in the execution environment.
     *
     * @generated from protobuf enum value: ACCELERATOR = 0;
     */
    ACCELERATOR = 0,
    /**
     * Describes desired minimal available RAM size in transform's execution environment.
     * SDKs should convert the size to bytes, but can allow users to specify human-friendly units (e.g. GiB).
     *
     * @generated from protobuf enum value: MIN_RAM_BYTES = 1;
     */
    MIN_RAM_BYTES = 1
}


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


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


internalBinaryWrite(message: BeamConstants, 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<Components>): Components {
        const message = { transforms: {}, pcollections: {}, windowingStrategies: {}, coders: {}, environments: {} };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Components>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Components): Components {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* map<string, org.apache.beam.model.pipeline.v1.PTransform> transforms */ 1:
                    this.binaryReadMap1(message.transforms, reader, options);
                    break;
                case /* map<string, org.apache.beam.model.pipeline.v1.PCollection> pcollections */ 2:
                    this.binaryReadMap2(message.pcollections, reader, options);
                    break;
                case /* map<string, org.apache.beam.model.pipeline.v1.WindowingStrategy> windowing_strategies */ 3:
                    this.binaryReadMap3(message.windowingStrategies, reader, options);
                    break;
                case /* map<string, org.apache.beam.model.pipeline.v1.Coder> coders */ 4:
                    this.binaryReadMap4(message.coders, reader, options);
                    break;
                case /* map<string, org.apache.beam.model.pipeline.v1.Environment> environments */ 5:
                    this.binaryReadMap5(message.environments, 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 binaryReadMap1(map: Components["transforms"], reader: IBinaryReader, options: BinaryReadOptions): void {
        let len = reader.uint32(), end = reader.pos + len, key: keyof Components["transforms"] | undefined, val: Components["transforms"][any] | undefined;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case 1:
                    key = reader.string();
                    break;
                case 2:
                    val = PTransform.internalBinaryRead(reader, reader.uint32(), options);
                    break;
                default: throw new globalThis.Error("unknown map entry field for field org.apache.beam.model.pipeline.v1.Components.transforms");
            }
        }
        map[key ?? ""] = val ?? PTransform.create();
    }


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


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


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


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


internalBinaryWrite(message: Components, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* map<string, org.apache.beam.model.pipeline.v1.PTransform> transforms = 1; */
        for (let k of Object.keys(message.transforms)) {
            writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
            writer.tag(2, WireType.LengthDelimited).fork();
            PTransform.internalBinaryWrite(message.transforms[k], writer, options);
            writer.join().join();
        }
        /* map<string, org.apache.beam.model.pipeline.v1.PCollection> pcollections = 2; */
        for (let k of Object.keys(message.pcollections)) {
            writer.tag(2, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
            writer.tag(2, WireType.LengthDelimited).fork();
            PCollection.internalBinaryWrite(message.pcollections[k], writer, options);
            writer.join().join();
        }
        /* map<string, org.apache.beam.model.pipeline.v1.WindowingStrategy> windowing_strategies = 3; */
        for (let k of Object.keys(message.windowingStrategies)) {
            writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
            writer.tag(2, WireType.LengthDelimited).fork();
            WindowingStrategy.internalBinaryWrite(message.windowingStrategies[k], writer, options);
            writer.join().join();
        }
        /* map<string, org.apache.beam.model.pipeline.v1.Coder> coders = 4; */
        for (let k of Object.keys(message.coders)) {
            writer.tag(4, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
            writer.tag(2, WireType.LengthDelimited).fork();
            Coder.internalBinaryWrite(message.coders[k], writer, options);
            writer.join().join();
        }
        /* map<string, org.apache.beam.model.pipeline.v1.Environment> environments = 5; */
        for (let k of Object.keys(message.environments)) {
            writer.tag(5, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
            writer.tag(2, WireType.LengthDelimited).fork();
            Environment.internalBinaryWrite(message.environments[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<Pipeline>): Pipeline {
        const message = { rootTransformIds: [], displayData: [], requirements: [] };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<Pipeline>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Pipeline): Pipeline {
        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.Components components */ 1:
                    message.components = Components.internalBinaryRead(reader, reader.uint32(), options, message.components);
                    break;
                case /* repeated string root_transform_ids */ 2:
                    message.rootTransformIds.push(reader.string());
                    break;
                case /* repeated org.apache.beam.model.pipeline.v1.DisplayData display_data */ 3:
                    message.displayData.push(DisplayData.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated string requirements */ 4:
                    message.requirements.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: Pipeline, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.Components components = 1; */
        if (message.components)
            Components.internalBinaryWrite(message.components, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated string root_transform_ids = 2; */
        for (let i = 0; i < message.rootTransformIds.length; i++)
            writer.tag(2, WireType.LengthDelimited).string(message.rootTransformIds[i]);
        /* repeated org.apache.beam.model.pipeline.v1.DisplayData display_data = 3; */
        for (let i = 0; i < message.displayData.length; i++)
            DisplayData.internalBinaryWrite(message.displayData[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* repeated string requirements = 4; */
        for (let i = 0; i < message.requirements.length; i++)
            writer.tag(4, WireType.LengthDelimited).string(message.requirements[i]);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


create(value?: PartialMessage<PTransform>): PTransform {
        const message = { uniqueName: "", subtransforms: [], inputs: {}, outputs: {}, displayData: [], environmentId: "", annotations: {} };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<PTransform>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PTransform): PTransform {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string unique_name */ 5:
                    message.uniqueName = reader.string();
                    break;
                case /* org.apache.beam.model.pipeline.v1.FunctionSpec spec */ 1:
                    message.spec = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.spec);
                    break;
                case /* repeated string subtransforms */ 2:
                    message.subtransforms.push(reader.string());
                    break;
                case /* map<string, string> inputs */ 3:
                    this.binaryReadMap3(message.inputs, reader, options);
                    break;
                case /* map<string, string> outputs */ 4:
                    this.binaryReadMap4(message.outputs, reader, options);
                    break;
                case /* repeated org.apache.beam.model.pipeline.v1.DisplayData display_data */ 6:
                    message.displayData.push(DisplayData.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* string environment_id */ 7:
                    message.environmentId = reader.string();
                    break;
                case /* map<string, bytes> annotations */ 8:
                    this.binaryReadMap8(message.annotations, 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 binaryReadMap3(map: PTransform["inputs"], reader: IBinaryReader, options: BinaryReadOptions): void {
        let len = reader.uint32(), end = reader.pos + len, key: keyof PTransform["inputs"] | undefined, val: PTransform["inputs"][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.PTransform.inputs");
            }
        }
        map[key ?? ""] = val ?? "";
    }


private binaryReadMap4(map: PTransform["outputs"], reader: IBinaryReader, options: BinaryReadOptions): void {
        let len = reader.uint32(), end = reader.pos + len, key: keyof PTransform["outputs"] | undefined, val: PTransform["outputs"][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.PTransform.outputs");
            }
        }
        map[key ?? ""] = val ?? "";
    }


private binaryReadMap8(map: PTransform["annotations"], reader: IBinaryReader, options: BinaryReadOptions): void {
        let len = reader.uint32(), end = reader.pos + len, key: keyof PTransform["annotations"] | undefined, val: PTransform["annotations"][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.PTransform.annotations");
            }
        }
        map[key ?? ""] = val ?? new Uint8Array(0);
    }


internalBinaryWrite(message: PTransform, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string unique_name = 5; */
        if (message.uniqueName !== "")
            writer.tag(5, WireType.LengthDelimited).string(message.uniqueName);
        /* 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 subtransforms = 2; */
        for (let i = 0; i < message.subtransforms.length; i++)
            writer.tag(2, WireType.LengthDelimited).string(message.subtransforms[i]);
        /* map<string, string> inputs = 3; */
        for (let k of Object.keys(message.inputs))
            writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.inputs[k]).join();
        /* map<string, string> outputs = 4; */
        for (let k of Object.keys(message.outputs))
            writer.tag(4, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.outputs[k]).join();
        /* repeated org.apache.beam.model.pipeline.v1.DisplayData display_data = 6; */
        for (let i = 0; i < message.displayData.length; i++)
            DisplayData.internalBinaryWrite(message.displayData[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        /* string environment_id = 7; */
        if (message.environmentId !== "")
            writer.tag(7, WireType.LengthDelimited).string(message.environmentId);
        /* map<string, bytes> annotations = 8; */
        for (let k of Object.keys(message.annotations))
            writer.tag(8, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).bytes(message.annotations[k]).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


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


internalBinaryWrite(message: StandardPTransforms, 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<StandardSideInputTypes>): StandardSideInputTypes {
        const message = {};
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<StandardSideInputTypes>(this, message, value);
        return message;
    }


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


internalBinaryWrite(message: StandardSideInputTypes, 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<PCollection>): PCollection {
        const message = { uniqueName: "", coderId: "", isBounded: 0, windowingStrategyId: "", displayData: [] };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<PCollection>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PCollection): PCollection {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string unique_name */ 1:
                    message.uniqueName = reader.string();
                    break;
                case /* string coder_id */ 2:
                    message.coderId = reader.string();
                    break;
                case /* org.apache.beam.model.pipeline.v1.IsBounded.Enum is_bounded */ 3:
                    message.isBounded = reader.int32();
                    break;
                case /* string windowing_strategy_id */ 4:
                    message.windowingStrategyId = reader.string();
                    break;
                case /* repeated org.apache.beam.model.pipeline.v1.DisplayData display_data */ 5:
                    message.displayData.push(DisplayData.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: PCollection, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string unique_name = 1; */
        if (message.uniqueName !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.uniqueName);
        /* string coder_id = 2; */
        if (message.coderId !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.coderId);
        /* org.apache.beam.model.pipeline.v1.IsBounded.Enum is_bounded = 3; */
        if (message.isBounded !== 0)
            writer.tag(3, WireType.Varint).int32(message.isBounded);
        /* string windowing_strategy_id = 4; */
        if (message.windowingStrategyId !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.windowingStrategyId);
        /* repeated org.apache.beam.model.pipeline.v1.DisplayData display_data = 5; */
        for (let i = 0; i < message.displayData.length; i++)
            DisplayData.internalBinaryWrite(message.displayData[i], writer.tag(5, 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<ParDoPayload>): ParDoPayload {
        const message = { sideInputs: {}, stateSpecs: {}, timerFamilySpecs: {}, restrictionCoderId: "", requestsFinalization: false, requiresTimeSortedInput: false, requiresStableInput: false };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ParDoPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParDoPayload): ParDoPayload {
        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 do_fn */ 1:
                    message.doFn = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.doFn);
                    break;
                case /* map<string, org.apache.beam.model.pipeline.v1.SideInput> side_inputs */ 3:
                    this.binaryReadMap3(message.sideInputs, reader, options);
                    break;
                case /* map<string, org.apache.beam.model.pipeline.v1.StateSpec> state_specs */ 4:
                    this.binaryReadMap4(message.stateSpecs, reader, options);
                    break;
                case /* map<string, org.apache.beam.model.pipeline.v1.TimerFamilySpec> timer_family_specs */ 9:
                    this.binaryReadMap9(message.timerFamilySpecs, reader, options);
                    break;
                case /* string restriction_coder_id */ 7:
                    message.restrictionCoderId = reader.string();
                    break;
                case /* bool requests_finalization */ 8:
                    message.requestsFinalization = reader.bool();
                    break;
                case /* bool requires_time_sorted_input */ 10:
                    message.requiresTimeSortedInput = reader.bool();
                    break;
                case /* bool requires_stable_input */ 11:
                    message.requiresStableInput = reader.bool();
                    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 binaryReadMap3(map: ParDoPayload["sideInputs"], reader: IBinaryReader, options: BinaryReadOptions): void {
        let len = reader.uint32(), end = reader.pos + len, key: keyof ParDoPayload["sideInputs"] | undefined, val: ParDoPayload["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.ParDoPayload.side_inputs");
            }
        }
        map[key ?? ""] = val ?? SideInput.create();
    }


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


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


internalBinaryWrite(message: ParDoPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.FunctionSpec do_fn = 1; */
        if (message.doFn)
            FunctionSpec.internalBinaryWrite(message.doFn, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* map<string, org.apache.beam.model.pipeline.v1.SideInput> side_inputs = 3; */
        for (let k of Object.keys(message.sideInputs)) {
            writer.tag(3, 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();
        }
        /* map<string, org.apache.beam.model.pipeline.v1.StateSpec> state_specs = 4; */
        for (let k of Object.keys(message.stateSpecs)) {
            writer.tag(4, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
            writer.tag(2, WireType.LengthDelimited).fork();
            StateSpec.internalBinaryWrite(message.stateSpecs[k], writer, options);
            writer.join().join();
        }
        /* map<string, org.apache.beam.model.pipeline.v1.TimerFamilySpec> timer_family_specs = 9; */
        for (let k of Object.keys(message.timerFamilySpecs)) {
            writer.tag(9, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
            writer.tag(2, WireType.LengthDelimited).fork();
            TimerFamilySpec.internalBinaryWrite(message.timerFamilySpecs[k], writer, options);
            writer.join().join();
        }
        /* string restriction_coder_id = 7; */
        if (message.restrictionCoderId !== "")
            writer.tag(7, WireType.LengthDelimited).string(message.restrictionCoderId);
        /* bool requests_finalization = 8; */
        if (message.requestsFinalization !== false)
            writer.tag(8, WireType.Varint).bool(message.requestsFinalization);
        /* bool requires_time_sorted_input = 10; */
        if (message.requiresTimeSortedInput !== false)
            writer.tag(10, WireType.Varint).bool(message.requiresTimeSortedInput);
        /* bool requires_stable_input = 11; */
        if (message.requiresStableInput !== false)
            writer.tag(11, WireType.Varint).bool(message.requiresStableInput);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StateSpec): StateSpec {
        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.ReadModifyWriteStateSpec read_modify_write_spec */ 1:
                    message.spec = {
                        oneofKind: "readModifyWriteSpec",
                        readModifyWriteSpec: ReadModifyWriteStateSpec.internalBinaryRead(reader, reader.uint32(), options, (message.spec as any).readModifyWriteSpec)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.BagStateSpec bag_spec */ 2:
                    message.spec = {
                        oneofKind: "bagSpec",
                        bagSpec: BagStateSpec.internalBinaryRead(reader, reader.uint32(), options, (message.spec as any).bagSpec)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.CombiningStateSpec combining_spec */ 3:
                    message.spec = {
                        oneofKind: "combiningSpec",
                        combiningSpec: CombiningStateSpec.internalBinaryRead(reader, reader.uint32(), options, (message.spec as any).combiningSpec)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.MapStateSpec map_spec */ 4:
                    message.spec = {
                        oneofKind: "mapSpec",
                        mapSpec: MapStateSpec.internalBinaryRead(reader, reader.uint32(), options, (message.spec as any).mapSpec)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.SetStateSpec set_spec */ 5:
                    message.spec = {
                        oneofKind: "setSpec",
                        setSpec: SetStateSpec.internalBinaryRead(reader, reader.uint32(), options, (message.spec as any).setSpec)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.OrderedListStateSpec ordered_list_spec */ 6:
                    message.spec = {
                        oneofKind: "orderedListSpec",
                        orderedListSpec: OrderedListStateSpec.internalBinaryRead(reader, reader.uint32(), options, (message.spec as any).orderedListSpec)
                    };
                    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: StateSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.ReadModifyWriteStateSpec read_modify_write_spec = 1; */
        if (message.spec.oneofKind === "readModifyWriteSpec")
            ReadModifyWriteStateSpec.internalBinaryWrite(message.spec.readModifyWriteSpec, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.BagStateSpec bag_spec = 2; */
        if (message.spec.oneofKind === "bagSpec")
            BagStateSpec.internalBinaryWrite(message.spec.bagSpec, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.CombiningStateSpec combining_spec = 3; */
        if (message.spec.oneofKind === "combiningSpec")
            CombiningStateSpec.internalBinaryWrite(message.spec.combiningSpec, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.MapStateSpec map_spec = 4; */
        if (message.spec.oneofKind === "mapSpec")
            MapStateSpec.internalBinaryWrite(message.spec.mapSpec, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.SetStateSpec set_spec = 5; */
        if (message.spec.oneofKind === "setSpec")
            SetStateSpec.internalBinaryWrite(message.spec.setSpec, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.OrderedListStateSpec ordered_list_spec = 6; */
        if (message.spec.oneofKind === "orderedListSpec")
            OrderedListStateSpec.internalBinaryWrite(message.spec.orderedListSpec, writer.tag(6, 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<ReadModifyWriteStateSpec>): ReadModifyWriteStateSpec {
        const message = { coderId: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ReadModifyWriteStateSpec>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReadModifyWriteStateSpec): ReadModifyWriteStateSpec {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string coder_id */ 1:
                    message.coderId = 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: ReadModifyWriteStateSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string coder_id = 1; */
        if (message.coderId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.coderId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BagStateSpec): BagStateSpec {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string element_coder_id */ 1:
                    message.elementCoderId = 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: BagStateSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string element_coder_id = 1; */
        if (message.elementCoderId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.elementCoderId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderedListStateSpec): OrderedListStateSpec {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string element_coder_id */ 1:
                    message.elementCoderId = 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: OrderedListStateSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string element_coder_id = 1; */
        if (message.elementCoderId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.elementCoderId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CombiningStateSpec): CombiningStateSpec {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string accumulator_coder_id */ 1:
                    message.accumulatorCoderId = reader.string();
                    break;
                case /* org.apache.beam.model.pipeline.v1.FunctionSpec combine_fn */ 2:
                    message.combineFn = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.combineFn);
                    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: CombiningStateSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string accumulator_coder_id = 1; */
        if (message.accumulatorCoderId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.accumulatorCoderId);
        /* org.apache.beam.model.pipeline.v1.FunctionSpec combine_fn = 2; */
        if (message.combineFn)
            FunctionSpec.internalBinaryWrite(message.combineFn, 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<MapStateSpec>): MapStateSpec {
        const message = { keyCoderId: "", valueCoderId: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<MapStateSpec>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MapStateSpec): MapStateSpec {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string key_coder_id */ 1:
                    message.keyCoderId = reader.string();
                    break;
                case /* string value_coder_id */ 2:
                    message.valueCoderId = 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: MapStateSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string key_coder_id = 1; */
        if (message.keyCoderId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.keyCoderId);
        /* string value_coder_id = 2; */
        if (message.valueCoderId !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.valueCoderId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetStateSpec): SetStateSpec {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string element_coder_id */ 1:
                    message.elementCoderId = 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: SetStateSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string element_coder_id = 1; */
        if (message.elementCoderId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.elementCoderId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TimerFamilySpec): TimerFamilySpec {
        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.TimeDomain.Enum time_domain */ 1:
                    message.timeDomain = reader.int32();
                    break;
                case /* string timer_family_coder_id */ 2:
                    message.timerFamilyCoderId = 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: TimerFamilySpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.TimeDomain.Enum time_domain = 1; */
        if (message.timeDomain !== 0)
            writer.tag(1, WireType.Varint).int32(message.timeDomain);
        /* string timer_family_coder_id = 2; */
        if (message.timerFamilyCoderId !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.timerFamilyCoderId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


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


internalBinaryWrite(message: IsBounded, 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<ReadPayload>): ReadPayload {
        const message = { isBounded: 0 };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<ReadPayload>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReadPayload): ReadPayload {
        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 source */ 1:
                    message.source = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.source);
                    break;
                case /* org.apache.beam.model.pipeline.v1.IsBounded.Enum is_bounded */ 2:
                    message.isBounded = 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: ReadPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.FunctionSpec source = 1; */
        if (message.source)
            FunctionSpec.internalBinaryWrite(message.source, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.IsBounded.Enum is_bounded = 2; */
        if (message.isBounded !== 0)
            writer.tag(2, WireType.Varint).int32(message.isBounded);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WindowIntoPayload): WindowIntoPayload {
        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;
                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: WindowIntoPayload, 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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CombinePayload): CombinePayload {
        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 combine_fn */ 1:
                    message.combineFn = FunctionSpec.internalBinaryRead(reader, reader.uint32(), options, message.combineFn);
                    break;
                case /* string accumulator_coder_id */ 2:
                    message.accumulatorCoderId = 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: CombinePayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.FunctionSpec combine_fn = 1; */
        if (message.combineFn)
            FunctionSpec.internalBinaryWrite(message.combineFn, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string accumulator_coder_id = 2; */
        if (message.accumulatorCoderId !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.accumulatorCoderId);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestStreamPayload): TestStreamPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string coder_id */ 1:
                    message.coderId = reader.string();
                    break;
                case /* repeated org.apache.beam.model.pipeline.v1.TestStreamPayload.Event events */ 2:
                    message.events.push(TestStreamPayload_Event.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* org.apache.beam.model.pipeline.v1.ApiServiceDescriptor endpoint */ 3:
                    message.endpoint = ApiServiceDescriptor.internalBinaryRead(reader, reader.uint32(), options, message.endpoint);
                    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, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string coder_id = 1; */
        if (message.coderId !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.coderId);
        /* repeated org.apache.beam.model.pipeline.v1.TestStreamPayload.Event events = 2; */
        for (let i = 0; i < message.events.length; i++)
            TestStreamPayload_Event.internalBinaryWrite(message.events[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.ApiServiceDescriptor endpoint = 3; */
        if (message.endpoint)
            ApiServiceDescriptor.internalBinaryWrite(message.endpoint, 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<TestStreamPayload_Event>): TestStreamPayload_Event {
        const message = { event: { oneofKind: undefined } };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<TestStreamPayload_Event>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestStreamPayload_Event): TestStreamPayload_Event {
        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.TestStreamPayload.Event.AdvanceWatermark watermark_event */ 1:
                    message.event = {
                        oneofKind: "watermarkEvent",
                        watermarkEvent: TestStreamPayload_Event_AdvanceWatermark.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).watermarkEvent)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.TestStreamPayload.Event.AdvanceProcessingTime processing_time_event */ 2:
                    message.event = {
                        oneofKind: "processingTimeEvent",
                        processingTimeEvent: TestStreamPayload_Event_AdvanceProcessingTime.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).processingTimeEvent)
                    };
                    break;
                case /* org.apache.beam.model.pipeline.v1.TestStreamPayload.Event.AddElements element_event */ 3:
                    message.event = {
                        oneofKind: "elementEvent",
                        elementEvent: TestStreamPayload_Event_AddElements.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).elementEvent)
                    };
                    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_Event, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* org.apache.beam.model.pipeline.v1.TestStreamPayload.Event.AdvanceWatermark watermark_event = 1; */
        if (message.event.oneofKind === "watermarkEvent")
            TestStreamPayload_Event_AdvanceWatermark.internalBinaryWrite(message.event.watermarkEvent, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.TestStreamPayload.Event.AdvanceProcessingTime processing_time_event = 2; */
        if (message.event.oneofKind === "processingTimeEvent")
            TestStreamPayload_Event_AdvanceProcessingTime.internalBinaryWrite(message.event.processingTimeEvent, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* org.apache.beam.model.pipeline.v1.TestStreamPayload.Event.AddElements element_event = 3; */
        if (message.event.oneofKind === "elementEvent")
            TestStreamPayload_Event_AddElements.internalBinaryWrite(message.event.elementEvent, 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<TestStreamPayload_Event_AdvanceWatermark>): TestStreamPayload_Event_AdvanceWatermark {
        const message = { newWatermark: 0n, tag: "" };
        globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
        if (value !== undefined)
            reflectionMergePartial<TestStreamPayload_Event_AdvanceWatermark>(this, message, value);
        return message;
    }


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestStreamPayload_Event_AdvanceWatermark): TestStreamPayload_Event_AdvanceWatermark {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* int64 new_watermark */ 1:
                    message.newWatermark = reader.int64().toBigInt();
                    break;
                case /* string tag */ 2:
                    message.tag = 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: TestStreamPayload_Event_AdvanceWatermark, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* int64 new_watermark = 1; */
        if (message.newWatermark !== 0n)
            writer.tag(1, WireType.Varint).int64(message.newWatermark);
        /* string tag = 2; */
        if (message.tag !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.tag);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestStreamPayload_Event_AdvanceProcessingTime): TestStreamPayload_Event_AdvanceProcessingTime {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* int64 advance_duration */ 1:
                    message.advanceDuration = 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_Event_AdvanceProcessingTime, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* int64 advance_duration = 1; */
        if (message.advanceDuration !== 0n)
            writer.tag(1, WireType.Varint).int64(message.advanceDuration);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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


internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestStreamPayload_Event_AddElements): TestStreamPayload_Event_AddElements {
        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.TestStreamPayload.TimestampedElement elements */ 1:
                    message.elements.push(TestStreamPayload_TimestampedElement.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* string tag */ 3:
                    message.tag = 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: TestStreamPayload_Event_AddElements, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated org.apache.beam.model.pipeline.v1.TestStreamPayload.TimestampedElement elements = 1; */
        for (let i = 0; i < message.elements.length; i++)
            TestStreamPayload_TimestampedElement.internalBinaryWrite(message.elements[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string tag = 3; */
        if (message.tag !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.tag);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }


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