blob: 1438d95fdd076a1ddd547b2004468b317a24f2dc [file] [log] [blame]
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: org/apache/beam/model/pipeline/v1/beam_runner_api.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Protocol Buffers describing the Runner API, which is the runner-independent,
// SDK-independent definition of the Beam model.
import Foundation
import SwiftProtobuf
// If the compiler emits an error on this type, it is because this file
// was generated by a version of the `protoc` Swift plug-in that is
// incompatible with the version of SwiftProtobuf to which you are linking.
// Please ensure that you are building against the same version of the API
// that was used to generate this file.
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
typealias Version = _2
}
struct Org_Apache_Beam_Model_Pipeline_V1_BeamConstants {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
/// All timestamps in milliseconds since Jan 1, 1970.
enum Constants: SwiftProtobuf.Enum {
typealias RawValue = Int
/// All timestamps of elements or window boundaries must be within
/// the interval [MIN_TIMESTAMP_MILLIS, MAX_TIMESTAMP_MILLIS].
/// The smallest representable timestamp of an element or a window boundary.
case minTimestampMillis // = 0
/// The largest representable timestamp of an element or a window boundary.
case maxTimestampMillis // = 1
/// The maximum timestamp for the global window.
/// Triggers use max timestamp to set timers' timestamp. Timers fire when
/// the watermark passes their timestamps. So, the timestamp needs to be
/// smaller than the MAX_TIMESTAMP_MILLIS.
/// One standard day is subtracted from MAX_TIMESTAMP_MILLIS to make sure
/// the max timestamp is smaller than MAX_TIMESTAMP_MILLIS even after rounding up
/// to seconds or minutes.
case globalWindowMaxTimestampMillis // = 2
case UNRECOGNIZED(Int)
init() {
self = .minTimestampMillis
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .minTimestampMillis
case 1: self = .maxTimestampMillis
case 2: self = .globalWindowMaxTimestampMillis
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .minTimestampMillis: return 0
case .maxTimestampMillis: return 1
case .globalWindowMaxTimestampMillis: return 2
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_BeamConstants.Constants: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_BeamConstants.Constants] = [
.minTimestampMillis,
.maxTimestampMillis,
.globalWindowMaxTimestampMillis,
]
}
#endif // swift(>=4.2)
/// A set of mappings from id to message. This is included as an optional field
/// on any proto message that may contain references needing resolution.
struct Org_Apache_Beam_Model_Pipeline_V1_Components {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) A map from pipeline-scoped id to PTransform.
///
/// Keys of the transforms map may be used by runners to identify pipeline
/// steps. Hence it's recommended to use strings that are not too long that
/// match regex '[A-Za-z0-9-_]+'.
var transforms: Dictionary<String,Org_Apache_Beam_Model_Pipeline_V1_PTransform> = [:]
/// (Required) A map from pipeline-scoped id to PCollection.
var pcollections: Dictionary<String,Org_Apache_Beam_Model_Pipeline_V1_PCollection> = [:]
/// (Required) A map from pipeline-scoped id to WindowingStrategy.
var windowingStrategies: Dictionary<String,Org_Apache_Beam_Model_Pipeline_V1_WindowingStrategy> = [:]
/// (Required) A map from pipeline-scoped id to Coder.
var coders: Dictionary<String,Org_Apache_Beam_Model_Pipeline_V1_Coder> = [:]
/// (Required) A map from pipeline-scoped id to Environment.
var environments: Dictionary<String,Org_Apache_Beam_Model_Pipeline_V1_Environment> = [:]
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// A Pipeline is a hierarchical graph of PTransforms, linked
/// by PCollections. A typical graph may look like:
///
/// Impulse -> PCollection -> ParDo -> PCollection -> GroupByKey -> ...
/// \> PCollection -> ParDo -> ...
/// \> ParDo -> ...
/// Impulse -> PCollection -> ParDo -> PCollection -> ...
///
/// This is represented by a number of by-reference maps to transforms,
/// PCollections, SDK environments, coders, etc., for
/// supporting compact reuse and arbitrary graph structure.
struct Org_Apache_Beam_Model_Pipeline_V1_Pipeline {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The coders, UDFs, graph nodes, etc, that make up
/// this pipeline.
var components: Org_Apache_Beam_Model_Pipeline_V1_Components {
get {return _components ?? Org_Apache_Beam_Model_Pipeline_V1_Components()}
set {_components = newValue}
}
/// Returns true if `components` has been explicitly set.
var hasComponents: Bool {return self._components != nil}
/// Clears the value of `components`. Subsequent reads from it will return its default value.
mutating func clearComponents() {self._components = nil}
/// (Required) The ids of all PTransforms that are not contained within another
/// PTransform. These must be in shallow topological order, so that traversing
/// them recursively in this order yields a recursively topological traversal.
var rootTransformIds: [String] = []
/// (Optional) Static display data for the pipeline. If there is none,
/// it may be omitted.
var displayData: [Org_Apache_Beam_Model_Pipeline_V1_DisplayData] = []
/// (Optional) A set of requirements that the runner MUST understand and be
/// able to faithfully provide in order to execute this pipeline. These
/// may indicate that a runner must inspect new fields on a component or
/// provide additional guarantees when processing specific transforms.
/// A runner should reject any pipelines with unknown requirements.
var requirements: [String] = []
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _components: Org_Apache_Beam_Model_Pipeline_V1_Components? = nil
}
/// Transforms are the operations in your pipeline, and provide a generic
/// processing framework. You provide processing logic in the form of a function
/// object (colloquially referred to as “user code”), and your user code is
/// applied to each element of an input PCollection (or more than one
/// PCollection). Depending on the pipeline runner and back-end that you choose,
/// many different workers across a cluster may execute instances of your user
/// code in parallel. The user code running on each worker generates the output
/// elements that are ultimately added to the final output PCollection that the
/// transform produces.
///
/// The Beam SDKs contain a number of different transforms that you can apply to
/// your pipeline’s PCollections. These include general-purpose core transforms,
/// such as ParDo or Combine. There are also pre-written composite transforms
/// included in the SDKs, which combine one or more of the core transforms in a
/// useful processing pattern, such as counting or combining elements in a
/// collection. You can also define your own more complex composite transforms to
/// fit your pipeline’s exact use case.
struct Org_Apache_Beam_Model_Pipeline_V1_PTransform {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) A unique name for the application node.
///
/// Ideally, this should be stable over multiple evolutions of a pipeline
/// for the purposes of logging and associating pipeline state with a node,
/// etc.
///
/// If it is not stable, then the runner decides what will happen. But, most
/// importantly, it must always be here and be unique, even if it is
/// autogenerated.
var uniqueName: String = String()
/// (Optional) A URN and payload that, together, fully defined the semantics
/// of this transform.
///
/// If absent, this must be an "anonymous" composite transform.
///
/// For primitive transform in the Runner API, this is required, and the
/// payloads are well-defined messages. When the URN indicates ParDo it
/// is a ParDoPayload, and so on. For some special composite transforms,
/// the payload is also officially defined. See StandardPTransforms for
/// details.
var spec: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _spec ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_spec = newValue}
}
/// Returns true if `spec` has been explicitly set.
var hasSpec: Bool {return self._spec != nil}
/// Clears the value of `spec`. Subsequent reads from it will return its default value.
mutating func clearSpec() {self._spec = nil}
/// (Optional) A list of the ids of transforms that it contains.
///
/// Primitive transforms (see StandardPTransforms.Primitives) are not allowed
/// to specify subtransforms.
///
/// Note that a composite transform may have zero subtransforms as long as it
/// only outputs PCollections that are in its inputs.
var subtransforms: [String] = []
/// (Required) A map from local names of inputs (unique only with this map, and
/// likely embedded in the transform payload and serialized user code) to
/// PCollection ids.
///
/// The payload for this transform may clarify the relationship of these
/// inputs. For example:
///
/// - for a Flatten transform they are merged
/// - for a ParDo transform, some may be side inputs
///
/// All inputs are recorded here so that the topological ordering of
/// the graph is consistent whether or not the payload is understood.
var inputs: Dictionary<String,String> = [:]
/// (Required) A map from local names of outputs (unique only within this map,
/// and likely embedded in the transform payload and serialized user code)
/// to PCollection ids.
///
/// The URN or payload for this transform node may clarify the type and
/// relationship of these outputs. For example:
///
/// - for a ParDo transform, these are tags on PCollections, which will be
/// embedded in the DoFn.
var outputs: Dictionary<String,String> = [:]
/// (Optional) Static display data for this PTransform application. If
/// there is none, it may be omitted.
var displayData: [Org_Apache_Beam_Model_Pipeline_V1_DisplayData] = []
/// Environment where the current PTransform should be executed in.
///
/// Transforms that are required to be implemented by a runner must omit this.
/// All other transforms are required to specify this.
var environmentID: String = String()
/// (Optional) A map from URNs designating a type of annotation, to the
/// annotation in binary format. For example, an annotation could indicate
/// that this PTransform has specific privacy properties.
///
/// A runner MAY ignore types of annotations it doesn't understand. Therefore
/// annotations MUST NOT be used for metadata that can affect correct
/// execution of the transform.
var annotations: Dictionary<String,Data> = [:]
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _spec: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
struct Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
/// Primitive transforms may not specify composite sub-transforms.
enum Primitives: SwiftProtobuf.Enum {
typealias RawValue = Int
/// 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
case parDo // = 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
case 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
case groupByKey // = 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
case 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
case assignWindows // = 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
case testStream // = 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
case mapWindows // = 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
case mergeWindows // = 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
case toString // = 8
case UNRECOGNIZED(Int)
init() {
self = .parDo
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .parDo
case 1: self = .flatten
case 2: self = .groupByKey
case 3: self = .impulse
case 4: self = .assignWindows
case 5: self = .testStream
case 6: self = .mapWindows
case 7: self = .mergeWindows
case 8: self = .toString
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .parDo: return 0
case .flatten: return 1
case .groupByKey: return 2
case .impulse: return 3
case .assignWindows: return 4
case .testStream: return 5
case .mapWindows: return 6
case .mergeWindows: return 7
case .toString: return 8
case .UNRECOGNIZED(let i): return i
}
}
}
enum DeprecatedPrimitives: SwiftProtobuf.Enum {
typealias RawValue = Int
/// Represents the operation to read a Bounded or Unbounded source.
/// Payload: ReadPayload.
case read // = 0
/// Runners should move away from translating `CreatePCollectionView` and treat this as
/// part of the translation for a `ParDo` side input.
case createView // = 1
case UNRECOGNIZED(Int)
init() {
self = .read
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .read
case 1: self = .createView
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .read: return 0
case .createView: return 1
case .UNRECOGNIZED(let i): return i
}
}
}
enum Composites: SwiftProtobuf.Enum {
typealias RawValue = Int
/// Represents the Combine.perKey() operation.
/// If this is produced by an SDK, it is assumed that the SDK understands
/// each of CombineComponents.
/// Payload: CombinePayload
case combinePerKey // = 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
case combineGlobally // = 1
/// Represents the Reshuffle operation.
case reshuffle // = 2
/// Less well-known. Payload: WriteFilesPayload.
case writeFiles // = 3
/// Payload: PubSubReadPayload.
case pubsubRead // = 4
/// Payload: PubSubWritePayload.
case pubsubWrite // = 5
/// Used for pubsub dynamic destinations.
/// Payload: PubSubWritePayload.
case pubsubWriteV2 // = 7
/// Represents the GroupIntoBatches.WithShardedKey operation.
/// Payload: GroupIntoBatchesPayload
case groupIntoBatchesWithShardedKey // = 6
case UNRECOGNIZED(Int)
init() {
self = .combinePerKey
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .combinePerKey
case 1: self = .combineGlobally
case 2: self = .reshuffle
case 3: self = .writeFiles
case 4: self = .pubsubRead
case 5: self = .pubsubWrite
case 6: self = .groupIntoBatchesWithShardedKey
case 7: self = .pubsubWriteV2
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .combinePerKey: return 0
case .combineGlobally: return 1
case .reshuffle: return 2
case .writeFiles: return 3
case .pubsubRead: return 4
case .pubsubWrite: return 5
case .groupIntoBatchesWithShardedKey: return 6
case .pubsubWriteV2: return 7
case .UNRECOGNIZED(let i): return i
}
}
}
/// Payload for all of these: CombinePayload
enum CombineComponents: SwiftProtobuf.Enum {
typealias RawValue = Int
/// 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
case combinePerKeyPrecombine // = 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
case combinePerKeyMergeAccumulators // = 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
case combinePerKeyExtractOutputs // = 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
case combineGroupedValues // = 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
case combinePerKeyConvertToAccumulators // = 4
case UNRECOGNIZED(Int)
init() {
self = .combinePerKeyPrecombine
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .combinePerKeyPrecombine
case 1: self = .combinePerKeyMergeAccumulators
case 2: self = .combinePerKeyExtractOutputs
case 3: self = .combineGroupedValues
case 4: self = .combinePerKeyConvertToAccumulators
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .combinePerKeyPrecombine: return 0
case .combinePerKeyMergeAccumulators: return 1
case .combinePerKeyExtractOutputs: return 2
case .combineGroupedValues: return 3
case .combinePerKeyConvertToAccumulators: return 4
case .UNRECOGNIZED(let i): return i
}
}
}
/// Payload for all of these: ParDoPayload containing the user's SDF
enum SplittableParDoComponents: SwiftProtobuf.Enum {
typealias RawValue = Int
/// Pairs the input element with its initial restriction.
/// Input: element; output: KV(element, restriction).
case pairWithRestriction // = 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))
case splitAndSizeRestrictions // = 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.
case processSizedElementsAndRestrictions // = 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).
case truncateSizedRestriction // = 3
case UNRECOGNIZED(Int)
init() {
self = .pairWithRestriction
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .pairWithRestriction
case 1: self = .splitAndSizeRestrictions
case 2: self = .processSizedElementsAndRestrictions
case 3: self = .truncateSizedRestriction
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .pairWithRestriction: return 0
case .splitAndSizeRestrictions: return 1
case .processSizedElementsAndRestrictions: return 2
case .truncateSizedRestriction: return 3
case .UNRECOGNIZED(let i): return i
}
}
}
/// Payload for all of these: GroupIntoBatchesPayload
enum GroupIntoBatchesComponents: SwiftProtobuf.Enum {
typealias RawValue = Int
case groupIntoBatches // = 0
case UNRECOGNIZED(Int)
init() {
self = .groupIntoBatches
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .groupIntoBatches
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .groupIntoBatches: return 0
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.Primitives: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.Primitives] = [
.parDo,
.flatten,
.groupByKey,
.impulse,
.assignWindows,
.testStream,
.mapWindows,
.mergeWindows,
.toString,
]
}
extension Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.DeprecatedPrimitives: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.DeprecatedPrimitives] = [
.read,
.createView,
]
}
extension Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.Composites: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.Composites] = [
.combinePerKey,
.combineGlobally,
.reshuffle,
.writeFiles,
.pubsubRead,
.pubsubWrite,
.pubsubWriteV2,
.groupIntoBatchesWithShardedKey,
]
}
extension Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.CombineComponents: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.CombineComponents] = [
.combinePerKeyPrecombine,
.combinePerKeyMergeAccumulators,
.combinePerKeyExtractOutputs,
.combineGroupedValues,
.combinePerKeyConvertToAccumulators,
]
}
extension Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.SplittableParDoComponents: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.SplittableParDoComponents] = [
.pairWithRestriction,
.splitAndSizeRestrictions,
.processSizedElementsAndRestrictions,
.truncateSizedRestriction,
]
}
extension Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.GroupIntoBatchesComponents: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_StandardPTransforms.GroupIntoBatchesComponents] = [
.groupIntoBatches,
]
}
#endif // swift(>=4.2)
struct Org_Apache_Beam_Model_Pipeline_V1_StandardSideInputTypes {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
/// Represents a view over a PCollection<V>.
///
/// StateGetRequests performed on this side input must use
/// StateKey.IterableSideInput.
case iterable // = 0
/// Represents a view over a PCollection<KV<K, V>>.
///
/// StateGetRequests performed on this side input must use
/// StateKey.MultimapKeysSideInput or StateKey.MultimapSideInput.
case multimap // = 1
case UNRECOGNIZED(Int)
init() {
self = .iterable
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .iterable
case 1: self = .multimap
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .iterable: return 0
case .multimap: return 1
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_StandardSideInputTypes.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_StandardSideInputTypes.Enum] = [
.iterable,
.multimap,
]
}
#endif // swift(>=4.2)
struct Org_Apache_Beam_Model_Pipeline_V1_StandardUserStateTypes {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
/// Represents a user state specification that supports a bag.
///
/// StateRequests performed on this user state must use
/// StateKey.BagUserState.
case bag // = 0
/// Represents a user state specification that supports a multimap.
///
/// StateRequests performed on this user state must use
/// StateKey.MultimapKeysUserState or StateKey.MultimapUserState.
case multimap // = 1
case UNRECOGNIZED(Int)
init() {
self = .bag
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .bag
case 1: self = .multimap
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .bag: return 0
case .multimap: return 1
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_StandardUserStateTypes.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_StandardUserStateTypes.Enum] = [
.bag,
.multimap,
]
}
#endif // swift(>=4.2)
/// A PCollection!
struct Org_Apache_Beam_Model_Pipeline_V1_PCollection {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) A unique name for the PCollection.
///
/// Ideally, this should be stable over multiple evolutions of a pipeline
/// for the purposes of logging and associating pipeline state with a node,
/// etc.
///
/// If it is not stable, then the runner decides what will happen. But, most
/// importantly, it must always be here, even if it is autogenerated.
var uniqueName: String = String()
/// (Required) The id of the Coder for this PCollection.
var coderID: String = String()
/// (Required) Whether this PCollection is bounded or unbounded
var isBounded: Org_Apache_Beam_Model_Pipeline_V1_IsBounded.Enum = .unspecified
/// (Required) The id of the windowing strategy for this PCollection.
var windowingStrategyID: String = String()
/// (Optional) Static display data for the PCollection. If there is none,
/// it may be omitted.
var displayData: [Org_Apache_Beam_Model_Pipeline_V1_DisplayData] = []
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// The payload for the primitive ParDo transform.
struct Org_Apache_Beam_Model_Pipeline_V1_ParDoPayload {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The FunctionSpec of the DoFn.
var doFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _doFn ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_doFn = newValue}
}
/// Returns true if `doFn` has been explicitly set.
var hasDoFn: Bool {return self._doFn != nil}
/// Clears the value of `doFn`. Subsequent reads from it will return its default value.
mutating func clearDoFn() {self._doFn = nil}
/// (Optional) A mapping of local input names to side inputs, describing
/// the expected access pattern.
var sideInputs: Dictionary<String,Org_Apache_Beam_Model_Pipeline_V1_SideInput> = [:]
/// (Optional) A mapping of local state names to state specifications.
/// If this is set, the stateful processing requirement should also
/// be placed in the pipeline requirements.
var stateSpecs: Dictionary<String,Org_Apache_Beam_Model_Pipeline_V1_StateSpec> = [:]
/// (Optional) A mapping of local timer family names to timer family
/// specifications. If this is set, the stateful processing requirement should
/// also be placed in the pipeline requirements.
var timerFamilySpecs: Dictionary<String,Org_Apache_Beam_Model_Pipeline_V1_TimerFamilySpec> = [:]
/// (Optional) Only set when this ParDo contains a splittable DoFn.
/// If this is set, the corresponding standard requirement should also
/// be placed in the pipeline requirements.
var restrictionCoderID: String = String()
/// (Optional) Only set when this ParDo can request bundle finalization.
/// If this is set, the corresponding standard requirement should also
/// be placed in the pipeline requirements.
var requestsFinalization: Bool = false
/// Whether this stage requires time sorted input.
/// If this is set, the corresponding standard requirement should also
/// be placed in the pipeline requirements.
var requiresTimeSortedInput: Bool = false
/// Whether this stage requires stable input.
/// If this is set, the corresponding standard requirement should also
/// be placed in the pipeline requirements.
var requiresStableInput: Bool = false
/// If populated, the name of the timer family spec which should be notified
/// on each window expiry.
/// If this is set, the corresponding standard requirement should also
/// be placed in the pipeline requirements.
var onWindowExpirationTimerFamilySpec: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _doFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
struct Org_Apache_Beam_Model_Pipeline_V1_StateSpec {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// TODO(BEAM-13930): Deprecate and remove these state specs
var spec: Org_Apache_Beam_Model_Pipeline_V1_StateSpec.OneOf_Spec? = nil
var readModifyWriteSpec: Org_Apache_Beam_Model_Pipeline_V1_ReadModifyWriteStateSpec {
get {
if case .readModifyWriteSpec(let v)? = spec {return v}
return Org_Apache_Beam_Model_Pipeline_V1_ReadModifyWriteStateSpec()
}
set {spec = .readModifyWriteSpec(newValue)}
}
var bagSpec: Org_Apache_Beam_Model_Pipeline_V1_BagStateSpec {
get {
if case .bagSpec(let v)? = spec {return v}
return Org_Apache_Beam_Model_Pipeline_V1_BagStateSpec()
}
set {spec = .bagSpec(newValue)}
}
var combiningSpec: Org_Apache_Beam_Model_Pipeline_V1_CombiningStateSpec {
get {
if case .combiningSpec(let v)? = spec {return v}
return Org_Apache_Beam_Model_Pipeline_V1_CombiningStateSpec()
}
set {spec = .combiningSpec(newValue)}
}
var mapSpec: Org_Apache_Beam_Model_Pipeline_V1_MapStateSpec {
get {
if case .mapSpec(let v)? = spec {return v}
return Org_Apache_Beam_Model_Pipeline_V1_MapStateSpec()
}
set {spec = .mapSpec(newValue)}
}
var setSpec: Org_Apache_Beam_Model_Pipeline_V1_SetStateSpec {
get {
if case .setSpec(let v)? = spec {return v}
return Org_Apache_Beam_Model_Pipeline_V1_SetStateSpec()
}
set {spec = .setSpec(newValue)}
}
var orderedListSpec: Org_Apache_Beam_Model_Pipeline_V1_OrderedListStateSpec {
get {
if case .orderedListSpec(let v)? = spec {return v}
return Org_Apache_Beam_Model_Pipeline_V1_OrderedListStateSpec()
}
set {spec = .orderedListSpec(newValue)}
}
var multimapSpec: Org_Apache_Beam_Model_Pipeline_V1_MultimapStateSpec {
get {
if case .multimapSpec(let v)? = spec {return v}
return Org_Apache_Beam_Model_Pipeline_V1_MultimapStateSpec()
}
set {spec = .multimapSpec(newValue)}
}
/// (Required) URN of the protocol required by this state specification to present
/// the desired SDK-specific interface to a UDF.
///
/// This protocol defines the SDK harness <-> Runner Harness RPC
/// interface for accessing and mutating user state.
///
/// See StandardUserStateTypes for an enumeration of all user state types
/// defined.
var `protocol`: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _protocol ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_protocol = newValue}
}
/// Returns true if ``protocol`` has been explicitly set.
var hasProtocol: Bool {return self._protocol != nil}
/// Clears the value of ``protocol``. Subsequent reads from it will return its default value.
mutating func clearProtocol() {self._protocol = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
/// TODO(BEAM-13930): Deprecate and remove these state specs
enum OneOf_Spec: Equatable {
case readModifyWriteSpec(Org_Apache_Beam_Model_Pipeline_V1_ReadModifyWriteStateSpec)
case bagSpec(Org_Apache_Beam_Model_Pipeline_V1_BagStateSpec)
case combiningSpec(Org_Apache_Beam_Model_Pipeline_V1_CombiningStateSpec)
case mapSpec(Org_Apache_Beam_Model_Pipeline_V1_MapStateSpec)
case setSpec(Org_Apache_Beam_Model_Pipeline_V1_SetStateSpec)
case orderedListSpec(Org_Apache_Beam_Model_Pipeline_V1_OrderedListStateSpec)
case multimapSpec(Org_Apache_Beam_Model_Pipeline_V1_MultimapStateSpec)
#if !swift(>=4.1)
static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_StateSpec.OneOf_Spec, rhs: Org_Apache_Beam_Model_Pipeline_V1_StateSpec.OneOf_Spec) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.readModifyWriteSpec, .readModifyWriteSpec): return {
guard case .readModifyWriteSpec(let l) = lhs, case .readModifyWriteSpec(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.bagSpec, .bagSpec): return {
guard case .bagSpec(let l) = lhs, case .bagSpec(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.combiningSpec, .combiningSpec): return {
guard case .combiningSpec(let l) = lhs, case .combiningSpec(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.mapSpec, .mapSpec): return {
guard case .mapSpec(let l) = lhs, case .mapSpec(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.setSpec, .setSpec): return {
guard case .setSpec(let l) = lhs, case .setSpec(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.orderedListSpec, .orderedListSpec): return {
guard case .orderedListSpec(let l) = lhs, case .orderedListSpec(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.multimapSpec, .multimapSpec): return {
guard case .multimapSpec(let l) = lhs, case .multimapSpec(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
init() {}
fileprivate var _protocol: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
struct Org_Apache_Beam_Model_Pipeline_V1_ReadModifyWriteStateSpec {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var coderID: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
struct Org_Apache_Beam_Model_Pipeline_V1_BagStateSpec {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var elementCoderID: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
struct Org_Apache_Beam_Model_Pipeline_V1_OrderedListStateSpec {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var elementCoderID: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
struct Org_Apache_Beam_Model_Pipeline_V1_CombiningStateSpec {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var accumulatorCoderID: String = String()
var combineFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _combineFn ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_combineFn = newValue}
}
/// Returns true if `combineFn` has been explicitly set.
var hasCombineFn: Bool {return self._combineFn != nil}
/// Clears the value of `combineFn`. Subsequent reads from it will return its default value.
mutating func clearCombineFn() {self._combineFn = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _combineFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
struct Org_Apache_Beam_Model_Pipeline_V1_MapStateSpec {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var keyCoderID: String = String()
var valueCoderID: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
struct Org_Apache_Beam_Model_Pipeline_V1_MultimapStateSpec {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var keyCoderID: String = String()
var valueCoderID: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
struct Org_Apache_Beam_Model_Pipeline_V1_SetStateSpec {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var elementCoderID: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
struct Org_Apache_Beam_Model_Pipeline_V1_TimerFamilySpec {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var timeDomain: Org_Apache_Beam_Model_Pipeline_V1_TimeDomain.Enum = .unspecified
var timerFamilyCoderID: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
struct Org_Apache_Beam_Model_Pipeline_V1_IsBounded {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
case unspecified // = 0
case unbounded // = 1
case bounded // = 2
case UNRECOGNIZED(Int)
init() {
self = .unspecified
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .unspecified
case 1: self = .unbounded
case 2: self = .bounded
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .unspecified: return 0
case .unbounded: return 1
case .bounded: return 2
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_IsBounded.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_IsBounded.Enum] = [
.unspecified,
.unbounded,
.bounded,
]
}
#endif // swift(>=4.2)
/// The payload for the primitive Read transform.
struct Org_Apache_Beam_Model_Pipeline_V1_ReadPayload {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The FunctionSpec of the source for this Read.
var source: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _source ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_source = newValue}
}
/// Returns true if `source` has been explicitly set.
var hasSource: Bool {return self._source != nil}
/// Clears the value of `source`. Subsequent reads from it will return its default value.
mutating func clearSource() {self._source = nil}
/// (Required) Whether the source is bounded or unbounded
var isBounded: Org_Apache_Beam_Model_Pipeline_V1_IsBounded.Enum = .unspecified
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _source: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
/// The payload for the WindowInto transform.
struct Org_Apache_Beam_Model_Pipeline_V1_WindowIntoPayload {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The FunctionSpec of the WindowFn.
var windowFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _windowFn ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_windowFn = newValue}
}
/// Returns true if `windowFn` has been explicitly set.
var hasWindowFn: Bool {return self._windowFn != nil}
/// Clears the value of `windowFn`. Subsequent reads from it will return its default value.
mutating func clearWindowFn() {self._windowFn = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _windowFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
/// The payload for the special-but-not-primitive Combine transform.
struct Org_Apache_Beam_Model_Pipeline_V1_CombinePayload {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The FunctionSpec of the CombineFn.
var combineFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _combineFn ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_combineFn = newValue}
}
/// Returns true if `combineFn` has been explicitly set.
var hasCombineFn: Bool {return self._combineFn != nil}
/// Clears the value of `combineFn`. Subsequent reads from it will return its default value.
mutating func clearCombineFn() {self._combineFn = nil}
/// (Required) A reference to the Coder to use for accumulators of the CombineFn
var accumulatorCoderID: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _combineFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
/// The payload for the test-only primitive TestStream
struct Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) the coder for elements in the TestStream events
var coderID: String = String()
/// (Optional) If specified, the TestStream will replay these events.
var events: [Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event] = []
/// (Optional) If specified, points to a TestStreamService to be
/// used to retrieve events.
var endpoint: Org_Apache_Beam_Model_Pipeline_V1_ApiServiceDescriptor {
get {return _endpoint ?? Org_Apache_Beam_Model_Pipeline_V1_ApiServiceDescriptor()}
set {_endpoint = newValue}
}
/// Returns true if `endpoint` has been explicitly set.
var hasEndpoint: Bool {return self._endpoint != nil}
/// Clears the value of `endpoint`. Subsequent reads from it will return its default value.
mutating func clearEndpoint() {self._endpoint = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
struct Event {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var event: Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.OneOf_Event? = nil
var watermarkEvent: Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.AdvanceWatermark {
get {
if case .watermarkEvent(let v)? = event {return v}
return Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.AdvanceWatermark()
}
set {event = .watermarkEvent(newValue)}
}
var processingTimeEvent: Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.AdvanceProcessingTime {
get {
if case .processingTimeEvent(let v)? = event {return v}
return Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.AdvanceProcessingTime()
}
set {event = .processingTimeEvent(newValue)}
}
var elementEvent: Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.AddElements {
get {
if case .elementEvent(let v)? = event {return v}
return Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.AddElements()
}
set {event = .elementEvent(newValue)}
}
var unknownFields = SwiftProtobuf.UnknownStorage()
enum OneOf_Event: Equatable {
case watermarkEvent(Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.AdvanceWatermark)
case processingTimeEvent(Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.AdvanceProcessingTime)
case elementEvent(Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.AddElements)
#if !swift(>=4.1)
static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.OneOf_Event, rhs: Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.Event.OneOf_Event) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.watermarkEvent, .watermarkEvent): return {
guard case .watermarkEvent(let l) = lhs, case .watermarkEvent(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.processingTimeEvent, .processingTimeEvent): return {
guard case .processingTimeEvent(let l) = lhs, case .processingTimeEvent(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.elementEvent, .elementEvent): return {
guard case .elementEvent(let l) = lhs, case .elementEvent(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
/// Advances the watermark to the specified timestamp.
struct AdvanceWatermark {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The watermark in millisecond to advance to.
var newWatermark: Int64 = 0
/// (Optional) The output watermark tag for a PCollection. If unspecified
/// or with an empty string, this will default to the Main PCollection
/// Output
var tag: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Advances the processing time clock by the specified amount.
struct AdvanceProcessingTime {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The duration in millisecond to advance by.
var advanceDuration: Int64 = 0
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Adds elements to the stream to be emitted.
struct AddElements {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The elements to add to the TestStream.
var elements: [Org_Apache_Beam_Model_Pipeline_V1_TestStreamPayload.TimestampedElement] = []
/// (Optional) The output PCollection tag to add these elements to. If
/// unspecified or with an empty string, this will default to the Main
/// PCollection Output.
var tag: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
init() {}
}
/// A single element inside of the TestStream.
struct TimestampedElement {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The element encoded. Currently the TestStream only supports
/// encoding primitives.
var encodedElement: Data = Data()
/// (Required) The event timestamp in millisecond of this element.
var timestamp: Int64 = 0
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
init() {}
fileprivate var _endpoint: Org_Apache_Beam_Model_Pipeline_V1_ApiServiceDescriptor? = nil
}
struct Org_Apache_Beam_Model_Pipeline_V1_EventsRequest {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// The set of PCollections to read from. These are the PTransform outputs
/// local names. These are a subset of the TestStream's outputs. This allows
/// Interactive Beam to cache many PCollections from a pipeline then replay a
/// subset of them.
var outputIds: [String] = []
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// The payload for the special-but-not-primitive WriteFiles transform.
struct Org_Apache_Beam_Model_Pipeline_V1_WriteFilesPayload {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The FunctionSpec of the FileBasedSink.
var sink: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _sink ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_sink = newValue}
}
/// Returns true if `sink` has been explicitly set.
var hasSink: Bool {return self._sink != nil}
/// Clears the value of `sink`. Subsequent reads from it will return its default value.
mutating func clearSink() {self._sink = nil}
/// (Required) The format function.
var formatFunction: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _formatFunction ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_formatFunction = newValue}
}
/// Returns true if `formatFunction` has been explicitly set.
var hasFormatFunction: Bool {return self._formatFunction != nil}
/// Clears the value of `formatFunction`. Subsequent reads from it will return its default value.
mutating func clearFormatFunction() {self._formatFunction = nil}
var windowedWrites: Bool = false
var runnerDeterminedSharding: Bool = false
var sideInputs: Dictionary<String,Org_Apache_Beam_Model_Pipeline_V1_SideInput> = [:]
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _sink: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
fileprivate var _formatFunction: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
/// Payload used by Google Cloud Pub/Sub read transform.
/// This can be used by runners that wish to override Beam Pub/Sub read transform
/// with a native implementation.
/// The SDK should guarantee that only one of topic, subscription,
/// topic_runtime_overridden and subscription_runtime_overridden is set.
/// The output of PubSubReadPayload should be bytes of serialized PubsubMessage
/// proto if with_attributes == true. Otherwise, the bytes is the raw payload.
struct Org_Apache_Beam_Model_Pipeline_V1_PubSubReadPayload {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// Topic to read from. Exactly one of topic or subscription should be set.
/// Topic format is: /topics/project_id/subscription_name
var topic: String = String()
/// Subscription to read from. Exactly one of topic or subscription should be set.
/// Subscription format is: /subscriptions/project_id/subscription_name
var subscription: String = String()
/// Attribute that provides element timestamps.
var timestampAttribute: String = String()
/// Attribute to be used for uniquely identifying messages.
var idAttribute: String = String()
/// If true, reads Pub/Sub payload as well as attributes. If false, reads only the payload.
var withAttributes: Bool = false
/// If set, the topic is expected to be provided during runtime.
var topicRuntimeOverridden: String = String()
/// If set, the subscription that is expected to be provided during runtime.
var subscriptionRuntimeOverridden: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Payload used by Google Cloud Pub/Sub write transform.
/// This can be used by runners that wish to override Beam Pub/Sub write transform
/// with a native implementation.
/// The SDK should guarantee that only one of topic and topic_runtime_overridden
/// is set.
/// The output of PubSubWritePayload should be bytes if serialized PubsubMessage
/// proto.
struct Org_Apache_Beam_Model_Pipeline_V1_PubSubWritePayload {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// Topic to write to.
/// Topic format is: /topics/project_id/subscription_name
var topic: String = String()
/// Attribute that provides element timestamps.
var timestampAttribute: String = String()
/// Attribute that uniquely identify messages.
var idAttribute: String = String()
/// If set, the topic is expected to be provided during runtime.
var topicRuntimeOverridden: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Payload for GroupIntoBatches composite transform.
struct Org_Apache_Beam_Model_Pipeline_V1_GroupIntoBatchesPayload {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// Max size of a batch.
var batchSize: Int64 = 0
/// Max byte size of a batch in element.
var batchSizeBytes: Int64 = 0
/// (Optional) Max duration a batch is allowed to be cached in states.
var maxBufferingDurationMillis: Int64 = 0
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// A coder, the binary format for serialization and deserialization of data in
/// a pipeline.
struct Org_Apache_Beam_Model_Pipeline_V1_Coder {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) A specification for the coder, as a URN plus parameters. This
/// may be a cross-language agreed-upon format, or it may be a "custom coder"
/// that can only be used by a particular SDK. It does not include component
/// coders, as it is beneficial for these to be comprehensible to a runner
/// regardless of whether the binary format is agreed-upon.
var spec: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _spec ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_spec = newValue}
}
/// Returns true if `spec` has been explicitly set.
var hasSpec: Bool {return self._spec != nil}
/// Clears the value of `spec`. Subsequent reads from it will return its default value.
mutating func clearSpec() {self._spec = nil}
/// (Optional) If this coder is parametric, such as ListCoder(VarIntCoder),
/// this is a list of the components. In order for encodings to be identical,
/// the FunctionSpec and all components must be identical, recursively.
var componentCoderIds: [String] = []
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _spec: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
struct Org_Apache_Beam_Model_Pipeline_V1_StandardCoders {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
/// Components: None
case bytes // = 0
/// Components: None
case stringUtf8 // = 10
/// Components: The key and value coder, in that order.
case kv // = 1
/// Components: None
case bool // = 12
/// Variable length Encodes a 64-bit integer.
/// Components: None
case varint // = 2
/// Encodes the floating point value as a big-endian 64-bit integer
/// according to the IEEE 754 double format bit layout.
/// Components: None
case double // = 11
/// Encodes an iterable of elements.
///
/// The encoding for an iterable [e1...eN] of known length N is
///
/// fixed32(N)
/// encode(e1) encode(e2) encode(e3) ... encode(eN)
///
/// If the length is unknown, it is batched up into groups of size b1..bM
/// and encoded as
///
/// fixed32(-1)
/// varInt64(b1) encode(e1) encode(e2) ... encode(e_b1)
/// varInt64(b2) encode(e_(b1+1)) encode(e_(b1+2)) ... encode(e_(b1+b2))
/// ...
/// varInt64(bM) encode(e_(N-bM+1)) encode(e_(N-bM+2)) ... encode(eN)
/// varInt64(0)
///
/// Components: Coder for a single element.
case iterable // = 3
/// Encodes a timer containing a user key, a dynamic timer tag, a clear bit,
/// a fire timestamp, a hold timestamp, the windows and the paneinfo.
/// The encoding is represented as:
/// user key - user defined key, uses the component coder.
/// dynamic timer tag - a string which identifies a timer.
/// windows - uses component coders.
/// clear bit - a boolean set for clearing the timer.
/// fire timestamp - a big endian 8 byte integer representing millis-since-epoch.
/// The encoded representation is shifted so that the byte representation of
/// negative values are lexicographically ordered before the byte representation
/// of positive values. This is typically done by subtracting -9223372036854775808
/// from the value and encoding it as a signed big endian integer. Example values:
///
/// -9223372036854775808: 00 00 00 00 00 00 00 00
/// -255: 7F FF FF FF FF FF FF 01
/// -1: 7F FF FF FF FF FF FF FF
/// 0: 80 00 00 00 00 00 00 00
/// 1: 80 00 00 00 00 00 00 01
/// 256: 80 00 00 00 00 00 01 00
/// 9223372036854775807: FF FF FF FF FF FF FF FF
/// hold timestamp - similar to the fire timestamp.
/// paneinfo - similar to the paneinfo of the windowed_value.
/// Components: Coder for the key and windows.
case timer // = 4
/// Components: None
case intervalWindow // = 5
/// Components: The coder to attach a length prefix to
case lengthPrefix // = 6
/// Components: None
case globalWindow // = 7
/// Encodes an element, the windows it is in, the timestamp of the element,
/// and the pane of the element. The encoding is represented as:
/// timestamp windows pane element
/// timestamp - A big endian 8 byte integer representing millis-since-epoch.
/// The encoded representation is shifted so that the byte representation
/// of negative values are lexicographically ordered before the byte
/// representation of positive values. This is typically done by
/// subtracting -9223372036854775808 from the value and encoding it as a
/// signed big endian integer. Example values:
///
/// -9223372036854775808: 00 00 00 00 00 00 00 00
/// -255: 7F FF FF FF FF FF FF 01
/// -1: 7F FF FF FF FF FF FF FF
/// 0: 80 00 00 00 00 00 00 00
/// 1: 80 00 00 00 00 00 00 01
/// 256: 80 00 00 00 00 00 01 00
/// 9223372036854775807: FF FF FF FF FF FF FF FF
///
/// windows - The windows are encoded using the beam:coder:iterable:v1
/// format, where the windows are encoded using the supplied window
/// coder.
///
/// pane - The first byte of the pane info determines which type of
/// encoding is used, as well as the is_first, is_last, and timing
/// fields. If this byte is bits [0 1 2 3 4 5 6 7], then:
/// * bits [0 1 2 3] determine the encoding as follows:
/// 0000 - The entire pane info is encoded as a single byte.
/// The is_first, is_last, and timing fields are encoded
/// as below, and the index and non-speculative index are
/// both zero (and hence are not encoded here).
/// 0001 - The pane info is encoded as this byte plus a single
/// VarInt encoed integer representing the pane index. The
/// non-speculative index can be derived as follows:
/// -1 if the pane is early, otherwise equal to index.
/// 0010 - The pane info is encoded as this byte plus two VarInt
/// encoded integers representing the pane index and
/// non-speculative index respectively.
/// * bits [4 5] encode the timing as follows:
/// 00 - early
/// 01 - on time
/// 10 - late
/// 11 - unknown
/// * bit 6 is 1 if this is the first pane, 0 otherwise.
/// * bit 7 is 1 if this is the last pane, 0 otherwise.
///
/// element - The element incoded using the supplied element coder.
///
/// Components: The element coder and the window coder, in that order.
case windowedValue // = 8
/// A windowed value coder with parameterized timestamp, windows and pane info.
/// Encodes an element with only the value of the windowed value.
/// Decodes the value and assigns the parameterized timestamp, windows and pane info to the
/// windowed value.
/// Components: The element coder and the window coder, in that order
/// The payload of this coder is an encoded windowed value using the
/// beam:coder:windowed_value:v1 coder parameterized by a beam:coder:bytes:v1
/// element coder and the window coder that this param_windowed_value coder uses.
case paramWindowedValue // = 14
/// Encodes an iterable of elements, some of which may be stored elsewhere.
///
/// The encoding for a state-backed iterable is the same as that for
/// an iterable, but the final varInt64(0) terminating the set of batches
/// may instead be replaced by
///
/// varInt64(-1)
/// varInt64(len(token))
/// token
///
/// where token is an opaque byte string that can be used to fetch the
/// remainder of the iterable (e.g. over the state API).
///
/// Components: Coder for a single element.
case stateBackedIterable // = 9
/// Encodes an arbitrary user defined window and its max timestamp (inclusive).
/// The encoding format is:
/// maxTimestamp window
///
/// maxTimestamp - A big endian 8 byte integer representing millis-since-epoch.
/// The encoded representation is shifted so that the byte representation
/// of negative values are lexicographically ordered before the byte
/// representation of positive values. This is typically done by
/// subtracting -9223372036854775808 from the value and encoding it as a
/// signed big endian integer. Example values:
///
/// -9223372036854775808: 00 00 00 00 00 00 00 00
/// -255: 7F FF FF FF FF FF FF 01
/// -1: 7F FF FF FF FF FF FF FF
/// 0: 80 00 00 00 00 00 00 00
/// 1: 80 00 00 00 00 00 00 01
/// 256: 80 00 00 00 00 00 01 00
/// 9223372036854775807: FF FF FF FF FF FF FF FF
///
/// window - the window is encoded using the supplied window coder.
///
/// Components: Coder for the custom window type.
case customWindow // = 16
/// Encodes a "row", an element with a known schema, defined by an
/// instance of Schema from schema.proto.
///
/// A row is encoded as the concatenation of:
/// - The number of attributes in the schema, encoded with
/// beam:coder:varint:v1. This makes it possible to detect certain
/// allowed schema changes (appending or removing columns) in
/// long-running streaming pipelines.
/// - A byte array representing a packed bitset indicating null fields (a
/// 1 indicating a null) encoded with beam:coder:bytes:v1. The unused
/// bits in the last byte must be set to 0. If there are no nulls an
/// empty byte array is encoded.
/// The two-byte bitset (not including the lenghth-prefix) for the row
/// [NULL, 0, 0, 0, NULL, 0, 0, NULL, 0, NULL] would be
/// [0b10010001, 0b00000010]
/// - An encoding for each non-null field, concatenated together.
///
/// Schema types are mapped to coders as follows:
/// AtomicType:
/// BYTE: not yet a standard coder (https://github.com/apache/beam/issues/19815)
/// INT16: not yet a standard coder (https://github.com/apache/beam/issues/19815)
/// INT32: beam:coder:varint:v1
/// INT64: beam:coder:varint:v1
/// FLOAT: not yet a standard coder (https://github.com/apache/beam/issues/19815)
/// DOUBLE: beam:coder:double:v1
/// STRING: beam:coder:string_utf8:v1
/// BOOLEAN: beam:coder:bool:v1
/// BYTES: beam:coder:bytes:v1
/// ArrayType: beam:coder:iterable:v1 (always has a known length)
/// MapType: not a standard coder, specification defined below.
/// RowType: beam:coder:row:v1
/// LogicalType: Uses the coder for its representation.
///
/// The MapType is encoded by:
/// - An INT32 representing the size of the map (N)
/// - Followed by N interleaved keys and values, encoded with their
/// corresponding coder.
///
/// Nullable types in container types (ArrayType, MapType) per the
/// encoding described for general Nullable types below.
///
/// Logical types understood by all SDKs should be defined in schema.proto.
/// Example of well known logical types:
/// beam:logical_type:schema:v1
/// - Representation type: BYTES
/// - A Beam Schema stored as a serialized proto.
///
/// The payload for RowCoder is an instance of Schema.
/// Components: None
case row // = 13
/// Encodes a user key and a shard id which is an opaque byte string.
///
/// The encoding for a sharded key consists of a shard id byte string and the
/// encoded user key in the following order:
///
/// - shard id using beam:coder:bytes:v1
/// - encoded user key
///
/// Examples:
/// user key with an empty shard id
/// 0x00
/// encode(user_key)
///
/// user key with a shard id taking up two bytes.
/// 0x02
/// 0x11 0x22
/// encode(user_key)
///
/// Components: the user key coder.
case shardedKey // = 15
/// Wraps a coder of a potentially null value
/// A Nullable Type is encoded by:
/// - A one byte null indicator, 0x00 for null values, or 0x01 for present
/// values.
/// - For present values the null indicator is followed by the value
/// encoded with it's corresponding coder.
/// Components: single coder for the value
case nullable // = 17
case UNRECOGNIZED(Int)
init() {
self = .bytes
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .bytes
case 1: self = .kv
case 2: self = .varint
case 3: self = .iterable
case 4: self = .timer
case 5: self = .intervalWindow
case 6: self = .lengthPrefix
case 7: self = .globalWindow
case 8: self = .windowedValue
case 9: self = .stateBackedIterable
case 10: self = .stringUtf8
case 11: self = .double
case 12: self = .bool
case 13: self = .row
case 14: self = .paramWindowedValue
case 15: self = .shardedKey
case 16: self = .customWindow
case 17: self = .nullable
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .bytes: return 0
case .kv: return 1
case .varint: return 2
case .iterable: return 3
case .timer: return 4
case .intervalWindow: return 5
case .lengthPrefix: return 6
case .globalWindow: return 7
case .windowedValue: return 8
case .stateBackedIterable: return 9
case .stringUtf8: return 10
case .double: return 11
case .bool: return 12
case .row: return 13
case .paramWindowedValue: return 14
case .shardedKey: return 15
case .customWindow: return 16
case .nullable: return 17
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_StandardCoders.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_StandardCoders.Enum] = [
.bytes,
.stringUtf8,
.kv,
.bool,
.varint,
.double,
.iterable,
.timer,
.intervalWindow,
.lengthPrefix,
.globalWindow,
.windowedValue,
.paramWindowedValue,
.stateBackedIterable,
.customWindow,
.row,
.shardedKey,
.nullable,
]
}
#endif // swift(>=4.2)
/// A windowing strategy describes the window function, triggering, allowed
/// lateness, and accumulation mode for a PCollection.
///
/// TODO: consider inlining field on PCollection
struct Org_Apache_Beam_Model_Pipeline_V1_WindowingStrategy {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The FunctionSpec of the UDF that assigns windows,
/// merges windows, and shifts timestamps before they are
/// combined according to the OutputTime.
var windowFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _windowFn ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_windowFn = newValue}
}
/// Returns true if `windowFn` has been explicitly set.
var hasWindowFn: Bool {return self._windowFn != nil}
/// Clears the value of `windowFn`. Subsequent reads from it will return its default value.
mutating func clearWindowFn() {self._windowFn = nil}
/// (Required) Whether or not the window fn is merging.
///
/// This knowledge is required for many optimizations.
var mergeStatus: Org_Apache_Beam_Model_Pipeline_V1_MergeStatus.Enum = .unspecified
/// (Required) The coder for the windows of this PCollection.
var windowCoderID: String = String()
/// (Required) The trigger to use when grouping this PCollection.
var trigger: Org_Apache_Beam_Model_Pipeline_V1_Trigger {
get {return _trigger ?? Org_Apache_Beam_Model_Pipeline_V1_Trigger()}
set {_trigger = newValue}
}
/// Returns true if `trigger` has been explicitly set.
var hasTrigger: Bool {return self._trigger != nil}
/// Clears the value of `trigger`. Subsequent reads from it will return its default value.
mutating func clearTrigger() {self._trigger = nil}
/// (Required) The accumulation mode indicates whether new panes are a full
/// replacement for prior panes or whether they are deltas to be combined
/// with other panes (the combine should correspond to whatever the upstream
/// grouping transform is).
var accumulationMode: Org_Apache_Beam_Model_Pipeline_V1_AccumulationMode.Enum = .unspecified
/// (Required) The OutputTime specifies, for a grouping transform, how to
/// compute the aggregate timestamp. The window_fn will first possibly shift
/// it later, then the OutputTime takes the max, min, or ignores it and takes
/// the end of window.
///
/// This is actually only for input to grouping transforms, but since they
/// may be introduced in runner-specific ways, it is carried along with the
/// windowing strategy.
var outputTime: Org_Apache_Beam_Model_Pipeline_V1_OutputTime.Enum = .unspecified
/// (Required) Indicate when output should be omitted upon window expiration.
var closingBehavior: Org_Apache_Beam_Model_Pipeline_V1_ClosingBehavior.Enum = .unspecified
/// (Required) The duration, in milliseconds, beyond the end of a window at
/// which the window becomes droppable.
var allowedLateness: Int64 = 0
/// (Required) Indicate whether empty on-time panes should be omitted.
var onTimeBehavior: Org_Apache_Beam_Model_Pipeline_V1_OnTimeBehavior.Enum = .unspecified
/// (Required) Whether or not the window fn assigns inputs to exactly one window
///
/// This knowledge is required for some optimizations
var assignsToOneWindow: Bool = false
/// (Optional) Environment where the current window_fn should be applied in.
/// Runner that executes the pipeline may choose to override this if needed.
/// If not specified, environment will be decided by the runner.
var environmentID: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _windowFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
fileprivate var _trigger: Org_Apache_Beam_Model_Pipeline_V1_Trigger? = nil
}
/// Whether or not a PCollection's WindowFn is non-merging, merging, or
/// merging-but-already-merged, in which case a subsequent GroupByKey is almost
/// always going to do something the user does not want
struct Org_Apache_Beam_Model_Pipeline_V1_MergeStatus {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
case unspecified // = 0
/// The WindowFn does not require merging.
/// Examples: global window, FixedWindows, SlidingWindows
case nonMerging // = 1
/// The WindowFn is merging and the PCollection has not had merging
/// performed.
/// Example: Sessions prior to a GroupByKey
case needsMerge // = 2
/// The WindowFn is merging and the PCollection has had merging occur
/// already.
/// Example: Sessions after a GroupByKey
case alreadyMerged // = 3
case UNRECOGNIZED(Int)
init() {
self = .unspecified
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .unspecified
case 1: self = .nonMerging
case 2: self = .needsMerge
case 3: self = .alreadyMerged
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .unspecified: return 0
case .nonMerging: return 1
case .needsMerge: return 2
case .alreadyMerged: return 3
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_MergeStatus.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_MergeStatus.Enum] = [
.unspecified,
.nonMerging,
.needsMerge,
.alreadyMerged,
]
}
#endif // swift(>=4.2)
/// Whether or not subsequent outputs of aggregations should be entire
/// replacement values or just the aggregation of inputs received since
/// the prior output.
struct Org_Apache_Beam_Model_Pipeline_V1_AccumulationMode {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
case unspecified // = 0
/// The aggregation is discarded when it is output
case discarding // = 1
/// The aggregation is accumulated across outputs
case accumulating // = 2
/// The aggregation emits retractions when it is output
case retracting // = 3
case UNRECOGNIZED(Int)
init() {
self = .unspecified
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .unspecified
case 1: self = .discarding
case 2: self = .accumulating
case 3: self = .retracting
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .unspecified: return 0
case .discarding: return 1
case .accumulating: return 2
case .retracting: return 3
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_AccumulationMode.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_AccumulationMode.Enum] = [
.unspecified,
.discarding,
.accumulating,
.retracting,
]
}
#endif // swift(>=4.2)
/// Controls whether or not an aggregating transform should output data
/// when a window expires.
struct Org_Apache_Beam_Model_Pipeline_V1_ClosingBehavior {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
case unspecified // = 0
/// Emit output when a window expires, whether or not there has been
/// any new data since the last output.
case emitAlways // = 1
/// Only emit output when new data has arrives since the last output
case emitIfNonempty // = 2
case UNRECOGNIZED(Int)
init() {
self = .unspecified
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .unspecified
case 1: self = .emitAlways
case 2: self = .emitIfNonempty
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .unspecified: return 0
case .emitAlways: return 1
case .emitIfNonempty: return 2
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_ClosingBehavior.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_ClosingBehavior.Enum] = [
.unspecified,
.emitAlways,
.emitIfNonempty,
]
}
#endif // swift(>=4.2)
/// Controls whether or not an aggregating transform should output data
/// when an on-time pane is empty.
struct Org_Apache_Beam_Model_Pipeline_V1_OnTimeBehavior {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
case unspecified // = 0
/// Always fire the on-time pane. Even if there is no new data since
/// the previous firing, an element will be produced.
case fireAlways // = 1
/// Only fire the on-time pane if there is new data since the previous firing.
case fireIfNonempty // = 2
case UNRECOGNIZED(Int)
init() {
self = .unspecified
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .unspecified
case 1: self = .fireAlways
case 2: self = .fireIfNonempty
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .unspecified: return 0
case .fireAlways: return 1
case .fireIfNonempty: return 2
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_OnTimeBehavior.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_OnTimeBehavior.Enum] = [
.unspecified,
.fireAlways,
.fireIfNonempty,
]
}
#endif // swift(>=4.2)
/// When a number of windowed, timestamped inputs are aggregated, the timestamp
/// for the resulting output.
struct Org_Apache_Beam_Model_Pipeline_V1_OutputTime {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
case unspecified // = 0
/// The output has the timestamp of the end of the window.
case endOfWindow // = 1
/// The output has the latest timestamp of the input elements since
/// the last output.
case latestInPane // = 2
/// The output has the earliest timestamp of the input elements since
/// the last output.
case earliestInPane // = 3
case UNRECOGNIZED(Int)
init() {
self = .unspecified
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .unspecified
case 1: self = .endOfWindow
case 2: self = .latestInPane
case 3: self = .earliestInPane
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .unspecified: return 0
case .endOfWindow: return 1
case .latestInPane: return 2
case .earliestInPane: return 3
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_OutputTime.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_OutputTime.Enum] = [
.unspecified,
.endOfWindow,
.latestInPane,
.earliestInPane,
]
}
#endif // swift(>=4.2)
/// The different time domains in the Beam model.
struct Org_Apache_Beam_Model_Pipeline_V1_TimeDomain {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Enum: SwiftProtobuf.Enum {
typealias RawValue = Int
case unspecified // = 0
/// Event time is time from the perspective of the data
case eventTime // = 1
/// Processing time is time from the perspective of the
/// execution of your pipeline
case processingTime // = 2
case UNRECOGNIZED(Int)
init() {
self = .unspecified
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .unspecified
case 1: self = .eventTime
case 2: self = .processingTime
default: self = .UNRECOGNIZED(rawValue)
}
}
var rawValue: Int {
switch self {
case .unspecified: return 0
case .eventTime: return 1
case .processingTime: return 2
case .UNRECOGNIZED(let i): return i
}
}
}
init() {}
}
#if swift(>=4.2)
extension Org_Apache_Beam_Model_Pipeline_V1_TimeDomain.Enum: CaseIterable {
// The compiler won't synthesize support with the UNRECOGNIZED case.
static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_TimeDomain.Enum] = [
.unspecified,
.eventTime,
.processingTime,
]
}
#endif // swift(>=4.2)
/// A small DSL for expressing when to emit new aggregations
/// from a GroupByKey or CombinePerKey
///
/// A trigger is described in terms of when it is _ready_ to permit output.
struct Org_Apache_Beam_Model_Pipeline_V1_Trigger {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// The full disjoint union of possible triggers.
var trigger: OneOf_Trigger? {
get {return _storage._trigger}
set {_uniqueStorage()._trigger = newValue}
}
var afterAll: Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterAll {
get {
if case .afterAll(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterAll()
}
set {_uniqueStorage()._trigger = .afterAll(newValue)}
}
var afterAny: Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterAny {
get {
if case .afterAny(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterAny()
}
set {_uniqueStorage()._trigger = .afterAny(newValue)}
}
var afterEach: Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterEach {
get {
if case .afterEach(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterEach()
}
set {_uniqueStorage()._trigger = .afterEach(newValue)}
}
var afterEndOfWindow: Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterEndOfWindow {
get {
if case .afterEndOfWindow(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterEndOfWindow()
}
set {_uniqueStorage()._trigger = .afterEndOfWindow(newValue)}
}
var afterProcessingTime: Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterProcessingTime {
get {
if case .afterProcessingTime(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterProcessingTime()
}
set {_uniqueStorage()._trigger = .afterProcessingTime(newValue)}
}
var afterSynchronizedProcessingTime: Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterSynchronizedProcessingTime {
get {
if case .afterSynchronizedProcessingTime(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterSynchronizedProcessingTime()
}
set {_uniqueStorage()._trigger = .afterSynchronizedProcessingTime(newValue)}
}
var always: Org_Apache_Beam_Model_Pipeline_V1_Trigger.Always {
get {
if case .always(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.Always()
}
set {_uniqueStorage()._trigger = .always(newValue)}
}
var `default`: Org_Apache_Beam_Model_Pipeline_V1_Trigger.Default {
get {
if case .default(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.Default()
}
set {_uniqueStorage()._trigger = .default(newValue)}
}
var elementCount: Org_Apache_Beam_Model_Pipeline_V1_Trigger.ElementCount {
get {
if case .elementCount(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.ElementCount()
}
set {_uniqueStorage()._trigger = .elementCount(newValue)}
}
var never: Org_Apache_Beam_Model_Pipeline_V1_Trigger.Never {
get {
if case .never(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.Never()
}
set {_uniqueStorage()._trigger = .never(newValue)}
}
var orFinally: Org_Apache_Beam_Model_Pipeline_V1_Trigger.OrFinally {
get {
if case .orFinally(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.OrFinally()
}
set {_uniqueStorage()._trigger = .orFinally(newValue)}
}
var `repeat`: Org_Apache_Beam_Model_Pipeline_V1_Trigger.Repeat {
get {
if case .repeat(let v)? = _storage._trigger {return v}
return Org_Apache_Beam_Model_Pipeline_V1_Trigger.Repeat()
}
set {_uniqueStorage()._trigger = .repeat(newValue)}
}
var unknownFields = SwiftProtobuf.UnknownStorage()
/// The full disjoint union of possible triggers.
enum OneOf_Trigger: Equatable {
case afterAll(Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterAll)
case afterAny(Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterAny)
case afterEach(Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterEach)
case afterEndOfWindow(Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterEndOfWindow)
case afterProcessingTime(Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterProcessingTime)
case afterSynchronizedProcessingTime(Org_Apache_Beam_Model_Pipeline_V1_Trigger.AfterSynchronizedProcessingTime)
case always(Org_Apache_Beam_Model_Pipeline_V1_Trigger.Always)
case `default`(Org_Apache_Beam_Model_Pipeline_V1_Trigger.Default)
case elementCount(Org_Apache_Beam_Model_Pipeline_V1_Trigger.ElementCount)
case never(Org_Apache_Beam_Model_Pipeline_V1_Trigger.Never)
case orFinally(Org_Apache_Beam_Model_Pipeline_V1_Trigger.OrFinally)
case `repeat`(Org_Apache_Beam_Model_Pipeline_V1_Trigger.Repeat)
#if !swift(>=4.1)
static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_Trigger.OneOf_Trigger, rhs: Org_Apache_Beam_Model_Pipeline_V1_Trigger.OneOf_Trigger) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.afterAll, .afterAll): return {
guard case .afterAll(let l) = lhs, case .afterAll(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.afterAny, .afterAny): return {
guard case .afterAny(let l) = lhs, case .afterAny(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.afterEach, .afterEach): return {
guard case .afterEach(let l) = lhs, case .afterEach(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.afterEndOfWindow, .afterEndOfWindow): return {
guard case .afterEndOfWindow(let l) = lhs, case .afterEndOfWindow(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.afterProcessingTime, .afterProcessingTime): return {
guard case .afterProcessingTime(let l) = lhs, case .afterProcessingTime(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.afterSynchronizedProcessingTime, .afterSynchronizedProcessingTime): return {
guard case .afterSynchronizedProcessingTime(let l) = lhs, case .afterSynchronizedProcessingTime(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.always, .always): return {
guard case .always(let l) = lhs, case .always(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.default, .default): return {
guard case .default(let l) = lhs, case .default(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.elementCount, .elementCount): return {
guard case .elementCount(let l) = lhs, case .elementCount(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.never, .never): return {
guard case .never(let l) = lhs, case .never(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.orFinally, .orFinally): return {
guard case .orFinally(let l) = lhs, case .orFinally(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.repeat, .repeat): return {
guard case .repeat(let l) = lhs, case .repeat(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
/// Ready when all subtriggers are ready.
struct AfterAll {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var subtriggers: [Org_Apache_Beam_Model_Pipeline_V1_Trigger] = []
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Ready when any subtrigger is ready.
struct AfterAny {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var subtriggers: [Org_Apache_Beam_Model_Pipeline_V1_Trigger] = []
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Starting with the first subtrigger, ready when the _current_ subtrigger
/// is ready. After output, advances the current trigger by one.
struct AfterEach {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var subtriggers: [Org_Apache_Beam_Model_Pipeline_V1_Trigger] = []
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Ready after the input watermark is past the end of the window.
///
/// May have implicitly-repeated subtriggers for early and late firings.
/// When the end of the window is reached, the trigger transitions between
/// the subtriggers.
struct AfterEndOfWindow {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Optional) A trigger governing output prior to the end of the window.
var earlyFirings: Org_Apache_Beam_Model_Pipeline_V1_Trigger {
get {return _storage._earlyFirings ?? Org_Apache_Beam_Model_Pipeline_V1_Trigger()}
set {_uniqueStorage()._earlyFirings = newValue}
}
/// Returns true if `earlyFirings` has been explicitly set.
var hasEarlyFirings: Bool {return _storage._earlyFirings != nil}
/// Clears the value of `earlyFirings`. Subsequent reads from it will return its default value.
mutating func clearEarlyFirings() {_uniqueStorage()._earlyFirings = nil}
/// (Optional) A trigger governing output after the end of the window.
var lateFirings: Org_Apache_Beam_Model_Pipeline_V1_Trigger {
get {return _storage._lateFirings ?? Org_Apache_Beam_Model_Pipeline_V1_Trigger()}
set {_uniqueStorage()._lateFirings = newValue}
}
/// Returns true if `lateFirings` has been explicitly set.
var hasLateFirings: Bool {return _storage._lateFirings != nil}
/// Clears the value of `lateFirings`. Subsequent reads from it will return its default value.
mutating func clearLateFirings() {_uniqueStorage()._lateFirings = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
/// After input arrives, ready when the specified delay has passed.
struct AfterProcessingTime {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The transforms to apply to an arriving element's timestamp,
/// in order
var timestampTransforms: [Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform] = []
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Ready whenever upstream processing time has all caught up with
/// the arrival time of an input element
struct AfterSynchronizedProcessingTime {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// The default trigger. Equivalent to Repeat { AfterEndOfWindow } but
/// specially denoted to indicate the user did not alter the triggering.
struct Default {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Ready whenever the requisite number of input elements have arrived
struct ElementCount {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var elementCount: Int32 = 0
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Never ready. There will only be an ON_TIME output and a final
/// output at window expiration.
struct Never {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Always ready. This can also be expressed as ElementCount(1) but
/// is more explicit.
struct Always {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// Ready whenever either of its subtriggers are ready, but finishes output
/// when the finally subtrigger fires.
struct OrFinally {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) Trigger governing main output; may fire repeatedly.
var main: Org_Apache_Beam_Model_Pipeline_V1_Trigger {
get {return _storage._main ?? Org_Apache_Beam_Model_Pipeline_V1_Trigger()}
set {_uniqueStorage()._main = newValue}
}
/// Returns true if `main` has been explicitly set.
var hasMain: Bool {return _storage._main != nil}
/// Clears the value of `main`. Subsequent reads from it will return its default value.
mutating func clearMain() {_uniqueStorage()._main = nil}
/// (Required) Trigger governing termination of output.
var finally: Org_Apache_Beam_Model_Pipeline_V1_Trigger {
get {return _storage._finally ?? Org_Apache_Beam_Model_Pipeline_V1_Trigger()}
set {_uniqueStorage()._finally = newValue}
}
/// Returns true if `finally` has been explicitly set.
var hasFinally: Bool {return _storage._finally != nil}
/// Clears the value of `finally`. Subsequent reads from it will return its default value.
mutating func clearFinally() {_uniqueStorage()._finally = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
/// Ready whenever the subtrigger is ready; resets state when the subtrigger
/// completes.
struct Repeat {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Require) Trigger that is run repeatedly.
var subtrigger: Org_Apache_Beam_Model_Pipeline_V1_Trigger {
get {return _storage._subtrigger ?? Org_Apache_Beam_Model_Pipeline_V1_Trigger()}
set {_uniqueStorage()._subtrigger = newValue}
}
/// Returns true if `subtrigger` has been explicitly set.
var hasSubtrigger: Bool {return _storage._subtrigger != nil}
/// Clears the value of `subtrigger`. Subsequent reads from it will return its default value.
mutating func clearSubtrigger() {_uniqueStorage()._subtrigger = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
/// A specification for a transformation on a timestamp.
///
/// Primarily used by AfterProcessingTime triggers to transform
/// the arrival time of input to a target time for firing.
struct Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var timestampTransform: Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform.OneOf_TimestampTransform? = nil
var delay: Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform.Delay {
get {
if case .delay(let v)? = timestampTransform {return v}
return Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform.Delay()
}
set {timestampTransform = .delay(newValue)}
}
var alignTo: Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform.AlignTo {
get {
if case .alignTo(let v)? = timestampTransform {return v}
return Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform.AlignTo()
}
set {timestampTransform = .alignTo(newValue)}
}
var unknownFields = SwiftProtobuf.UnknownStorage()
enum OneOf_TimestampTransform: Equatable {
case delay(Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform.Delay)
case alignTo(Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform.AlignTo)
#if !swift(>=4.1)
static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform.OneOf_TimestampTransform, rhs: Org_Apache_Beam_Model_Pipeline_V1_TimestampTransform.OneOf_TimestampTransform) -> Bool {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch (lhs, rhs) {
case (.delay, .delay): return {
guard case .delay(let l) = lhs, case .delay(let r) = rhs else { preconditionFailure() }
return l == r
}()
case (.alignTo, .alignTo): return {
guard case .alignTo(let l) = lhs, case .alignTo(let r) = rhs else { preconditionFailure() }
return l == r
}()
default: return false
}
}
#endif
}
struct Delay {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) The delay, in milliseconds.
var delayMillis: Int64 = 0
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
struct AlignTo {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) A duration to which delays should be quantized
/// in milliseconds.
var period: Int64 = 0
/// (Required) An offset from 0 for the quantization specified by
/// alignment_size, in milliseconds
var offset: Int64 = 0
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
init() {}
}
/// A specification for how to "side input" a PCollection.
struct Org_Apache_Beam_Model_Pipeline_V1_SideInput {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// (Required) URN of the access pattern required by the `view_fn` to present
/// the desired SDK-specific interface to a UDF.
///
/// This access pattern defines the SDK harness <-> Runner Harness RPC
/// interface for accessing a side input.
///
/// See StandardSideInputTypes for an enumeration of all side input types
/// defined.
var accessPattern: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _accessPattern ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_accessPattern = newValue}
}
/// Returns true if `accessPattern` has been explicitly set.
var hasAccessPattern: Bool {return self._accessPattern != nil}
/// Clears the value of `accessPattern`. Subsequent reads from it will return its default value.
mutating func clearAccessPattern() {self._accessPattern = nil}
/// (Required) The FunctionSpec of the UDF that adapts a particular
/// access_pattern to a user-facing view type.
///
/// For example, View.asSingleton() may include a `view_fn` that adapts a
/// specially-designed multimap to a single value per window.
var viewFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _viewFn ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_viewFn = newValue}
}
/// Returns true if `viewFn` has been explicitly set.
var hasViewFn: Bool {return self._viewFn != nil}
/// Clears the value of `viewFn`. Subsequent reads from it will return its default value.
mutating func clearViewFn() {self._viewFn = nil}
/// (Required) The FunctionSpec of the UDF that maps a main input window
/// to a side input window.
///
/// For example, when the main input is in fixed windows of one hour, this
/// can specify that the side input should be accessed according to the day
/// in which that hour falls.
var windowMappingFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec {
get {return _windowMappingFn ?? Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec()}
set {_windowMappingFn = newValue}
}
/// Returns true if `windowMappingFn` has been explicitly set.
var hasWindowMappingFn: Bool {return self._windowMappingFn != nil}
/// Clears the value of `windowMappingFn`. Subsequent reads from it will return its default value.
mutating func clearWindowMappingFn() {self._windowMappingFn = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _accessPattern: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
fileprivate var _viewFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
fileprivate var _windowMappingFn: Org_Apache_Beam_Model_Pipeline_V1_FunctionSpec? = nil
}
struct Org_Apache_Beam_Model_Pipeline_V1_StandardArtifacts {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var unknownFields = SwiftProtobuf.UnknownStorage()
enum Types: SwiftProtobuf.Enum {
typealias RawValue = Int
/// A URN for locally-accessible artifact files.
/// payload: ArtifactFilePayload
case file // = 0
/// A URN for artifacts described by URLs.
/// payload: ArtifactUrlPayload
case url // = 1
/// A URN for artifacts embedded in ArtifactInformation proto.
/// payload: EmbeddedFilePayload.
case embedded // = 2
/// A URN for Python artifacts hosted on PYPI.
/// payload: PypiPayload
case pypi // = 3
/// A URN for Java artifacts hosted on a Maven repository.
/// payload: MavenPayload
case maven // = 4
/// A URN for deferred artifacts.
/// payload: DeferredArtifactPayload
case deferred // = 5
case UNRECOGNIZED(Int)
init() {