| // 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/external_transforms.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 external transforms available. |
| |
| 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 |
| } |
| |
| /// A configuration payload for an external transform. |
| /// Used as the payload of ExternalTransform as part of an ExpansionRequest. |
| struct Org_Apache_Beam_Model_Pipeline_V1_ExternalConfigurationPayload { |
| // 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. |
| |
| /// A schema for use in beam:coder:row:v1 |
| var schema: Org_Apache_Beam_Model_Pipeline_V1_Schema { |
| get {return _schema ?? Org_Apache_Beam_Model_Pipeline_V1_Schema()} |
| set {_schema = newValue} |
| } |
| /// Returns true if `schema` has been explicitly set. |
| var hasSchema: Bool {return self._schema != nil} |
| /// Clears the value of `schema`. Subsequent reads from it will return its default value. |
| mutating func clearSchema() {self._schema = nil} |
| |
| /// A payload which can be decoded using beam:coder:row:v1 and the given |
| /// schema. |
| var payload: Data = Data() |
| |
| var unknownFields = SwiftProtobuf.UnknownStorage() |
| |
| init() {} |
| |
| fileprivate var _schema: Org_Apache_Beam_Model_Pipeline_V1_Schema? = nil |
| } |
| |
| /// Defines specific expansion methods that may be used to expand cross-language |
| /// transforms. |
| /// Has to be set as the URN of the transform of the expansion request. |
| struct Org_Apache_Beam_Model_Pipeline_V1_ExpansionMethods { |
| // 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 |
| |
| /// Expand a Java transform using specified constructor and builder methods. |
| /// Transform payload will be of type JavaClassLookupPayload. |
| case javaClassLookup // = 0 |
| |
| /// Expanding a SchemaTransform identified by the expansion service. |
| /// Transform payload will be of type SchemaTransformPayload. |
| case schemaTransform // = 1 |
| case UNRECOGNIZED(Int) |
| |
| init() { |
| self = .javaClassLookup |
| } |
| |
| init?(rawValue: Int) { |
| switch rawValue { |
| case 0: self = .javaClassLookup |
| case 1: self = .schemaTransform |
| default: self = .UNRECOGNIZED(rawValue) |
| } |
| } |
| |
| var rawValue: Int { |
| switch self { |
| case .javaClassLookup: return 0 |
| case .schemaTransform: return 1 |
| case .UNRECOGNIZED(let i): return i |
| } |
| } |
| |
| } |
| |
| init() {} |
| } |
| |
| #if swift(>=4.2) |
| |
| extension Org_Apache_Beam_Model_Pipeline_V1_ExpansionMethods.Enum: CaseIterable { |
| // The compiler won't synthesize support with the UNRECOGNIZED case. |
| static var allCases: [Org_Apache_Beam_Model_Pipeline_V1_ExpansionMethods.Enum] = [ |
| .javaClassLookup, |
| .schemaTransform, |
| ] |
| } |
| |
| #endif // swift(>=4.2) |
| |
| /// A configuration payload for an external transform. |
| /// Used to define a Java transform that can be directly instantiated by a Java |
| /// expansion service. |
| struct Org_Apache_Beam_Model_Pipeline_V1_JavaClassLookupPayload { |
| // 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. |
| |
| /// Name of the Java transform class. |
| var className: String = String() |
| |
| /// A static method to construct the initial instance of the transform. |
| /// If not provided, the transform should be instantiated using a class |
| /// constructor. |
| var constructorMethod: String = String() |
| |
| /// The top level fields of the schema represent the method parameters in |
| /// order. |
| /// If able, top level field names are also verified against the method |
| /// parameters for a match. |
| /// Any field names in the form 'ignore[0-9]+' will not be used for validation |
| /// hence that format can be used to represent arbitrary field names. |
| var constructorSchema: Org_Apache_Beam_Model_Pipeline_V1_Schema { |
| get {return _constructorSchema ?? Org_Apache_Beam_Model_Pipeline_V1_Schema()} |
| set {_constructorSchema = newValue} |
| } |
| /// Returns true if `constructorSchema` has been explicitly set. |
| var hasConstructorSchema: Bool {return self._constructorSchema != nil} |
| /// Clears the value of `constructorSchema`. Subsequent reads from it will return its default value. |
| mutating func clearConstructorSchema() {self._constructorSchema = nil} |
| |
| /// A payload which can be decoded using beam:coder:row:v1 and the provided |
| /// constructor schema. |
| var constructorPayload: Data = Data() |
| |
| /// Set of builder methods and corresponding parameters to apply after the |
| /// transform object is constructed. |
| /// When constructing the transform object, given builder methods will be |
| /// applied in order. |
| var builderMethods: [Org_Apache_Beam_Model_Pipeline_V1_BuilderMethod] = [] |
| |
| var unknownFields = SwiftProtobuf.UnknownStorage() |
| |
| init() {} |
| |
| fileprivate var _constructorSchema: Org_Apache_Beam_Model_Pipeline_V1_Schema? = nil |
| } |
| |
| /// This represents a builder method of the transform class that should be |
| /// applied in-order after instantiating the initial transform object. |
| /// Each builder method may take one or more parameters and has to return an |
| /// instance of the transform object. |
| struct Org_Apache_Beam_Model_Pipeline_V1_BuilderMethod { |
| // 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. |
| |
| /// Name of the builder method |
| var name: String = String() |
| |
| /// The top level fields of the schema represent the method parameters in |
| /// order. |
| /// If able, top level field names are also verified against the method |
| /// parameters for a match. |
| /// Any field names in the form 'ignore[0-9]+' will not be used for validation |
| /// hence that format can be used to represent arbitrary field names. |
| var schema: Org_Apache_Beam_Model_Pipeline_V1_Schema { |
| get {return _schema ?? Org_Apache_Beam_Model_Pipeline_V1_Schema()} |
| set {_schema = newValue} |
| } |
| /// Returns true if `schema` has been explicitly set. |
| var hasSchema: Bool {return self._schema != nil} |
| /// Clears the value of `schema`. Subsequent reads from it will return its default value. |
| mutating func clearSchema() {self._schema = nil} |
| |
| /// A payload which can be decoded using beam:coder:row:v1 and the builder |
| /// method schema. |
| var payload: Data = Data() |
| |
| var unknownFields = SwiftProtobuf.UnknownStorage() |
| |
| init() {} |
| |
| fileprivate var _schema: Org_Apache_Beam_Model_Pipeline_V1_Schema? = nil |
| } |
| |
| struct Org_Apache_Beam_Model_Pipeline_V1_SchemaTransformPayload { |
| // 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 identifier of the SchemaTransform (typically a URN). |
| var identifier: String = String() |
| |
| /// The configuration schema of the SchemaTransform. |
| var configurationSchema: Org_Apache_Beam_Model_Pipeline_V1_Schema { |
| get {return _configurationSchema ?? Org_Apache_Beam_Model_Pipeline_V1_Schema()} |
| set {_configurationSchema = newValue} |
| } |
| /// Returns true if `configurationSchema` has been explicitly set. |
| var hasConfigurationSchema: Bool {return self._configurationSchema != nil} |
| /// Clears the value of `configurationSchema`. Subsequent reads from it will return its default value. |
| mutating func clearConfigurationSchema() {self._configurationSchema = nil} |
| |
| /// The configuration of the SchemaTransform. |
| /// Should be decodable via beam:coder:row:v1. |
| /// The schema of the Row should be compatible with the schema of the |
| /// SchemaTransform. |
| var configurationRow: Data = Data() |
| |
| var unknownFields = SwiftProtobuf.UnknownStorage() |
| |
| init() {} |
| |
| fileprivate var _configurationSchema: Org_Apache_Beam_Model_Pipeline_V1_Schema? = nil |
| } |
| |
| #if swift(>=5.5) && canImport(_Concurrency) |
| extension Org_Apache_Beam_Model_Pipeline_V1_ExternalConfigurationPayload: @unchecked Sendable {} |
| extension Org_Apache_Beam_Model_Pipeline_V1_ExpansionMethods: @unchecked Sendable {} |
| extension Org_Apache_Beam_Model_Pipeline_V1_ExpansionMethods.Enum: @unchecked Sendable {} |
| extension Org_Apache_Beam_Model_Pipeline_V1_JavaClassLookupPayload: @unchecked Sendable {} |
| extension Org_Apache_Beam_Model_Pipeline_V1_BuilderMethod: @unchecked Sendable {} |
| extension Org_Apache_Beam_Model_Pipeline_V1_SchemaTransformPayload: @unchecked Sendable {} |
| #endif // swift(>=5.5) && canImport(_Concurrency) |
| |
| // MARK: - Code below here is support for the SwiftProtobuf runtime. |
| |
| fileprivate let _protobuf_package = "org.apache.beam.model.pipeline.v1" |
| |
| extension Org_Apache_Beam_Model_Pipeline_V1_ExternalConfigurationPayload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
| static let protoMessageName: String = _protobuf_package + ".ExternalConfigurationPayload" |
| static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
| 1: .same(proto: "schema"), |
| 2: .same(proto: "payload"), |
| ] |
| |
| mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
| while let fieldNumber = try decoder.nextFieldNumber() { |
| // 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 fieldNumber { |
| case 1: try { try decoder.decodeSingularMessageField(value: &self._schema) }() |
| case 2: try { try decoder.decodeSingularBytesField(value: &self.payload) }() |
| default: break |
| } |
| } |
| } |
| |
| func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
| // The use of inline closures is to circumvent an issue where the compiler |
| // allocates stack space for every if/case branch local when no optimizations |
| // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and |
| // https://github.com/apple/swift-protobuf/issues/1182 |
| try { if let v = self._schema { |
| try visitor.visitSingularMessageField(value: v, fieldNumber: 1) |
| } }() |
| if !self.payload.isEmpty { |
| try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 2) |
| } |
| try unknownFields.traverse(visitor: &visitor) |
| } |
| |
| static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_ExternalConfigurationPayload, rhs: Org_Apache_Beam_Model_Pipeline_V1_ExternalConfigurationPayload) -> Bool { |
| if lhs._schema != rhs._schema {return false} |
| if lhs.payload != rhs.payload {return false} |
| if lhs.unknownFields != rhs.unknownFields {return false} |
| return true |
| } |
| } |
| |
| extension Org_Apache_Beam_Model_Pipeline_V1_ExpansionMethods: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
| static let protoMessageName: String = _protobuf_package + ".ExpansionMethods" |
| static let _protobuf_nameMap = SwiftProtobuf._NameMap() |
| |
| mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
| while let _ = try decoder.nextFieldNumber() { |
| } |
| } |
| |
| func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
| try unknownFields.traverse(visitor: &visitor) |
| } |
| |
| static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_ExpansionMethods, rhs: Org_Apache_Beam_Model_Pipeline_V1_ExpansionMethods) -> Bool { |
| if lhs.unknownFields != rhs.unknownFields {return false} |
| return true |
| } |
| } |
| |
| extension Org_Apache_Beam_Model_Pipeline_V1_ExpansionMethods.Enum: SwiftProtobuf._ProtoNameProviding { |
| static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
| 0: .same(proto: "JAVA_CLASS_LOOKUP"), |
| 1: .same(proto: "SCHEMA_TRANSFORM"), |
| ] |
| } |
| |
| extension Org_Apache_Beam_Model_Pipeline_V1_JavaClassLookupPayload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
| static let protoMessageName: String = _protobuf_package + ".JavaClassLookupPayload" |
| static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
| 1: .standard(proto: "class_name"), |
| 2: .standard(proto: "constructor_method"), |
| 3: .standard(proto: "constructor_schema"), |
| 4: .standard(proto: "constructor_payload"), |
| 5: .standard(proto: "builder_methods"), |
| ] |
| |
| mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
| while let fieldNumber = try decoder.nextFieldNumber() { |
| // 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 fieldNumber { |
| case 1: try { try decoder.decodeSingularStringField(value: &self.className) }() |
| case 2: try { try decoder.decodeSingularStringField(value: &self.constructorMethod) }() |
| case 3: try { try decoder.decodeSingularMessageField(value: &self._constructorSchema) }() |
| case 4: try { try decoder.decodeSingularBytesField(value: &self.constructorPayload) }() |
| case 5: try { try decoder.decodeRepeatedMessageField(value: &self.builderMethods) }() |
| default: break |
| } |
| } |
| } |
| |
| func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
| // The use of inline closures is to circumvent an issue where the compiler |
| // allocates stack space for every if/case branch local when no optimizations |
| // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and |
| // https://github.com/apple/swift-protobuf/issues/1182 |
| if !self.className.isEmpty { |
| try visitor.visitSingularStringField(value: self.className, fieldNumber: 1) |
| } |
| if !self.constructorMethod.isEmpty { |
| try visitor.visitSingularStringField(value: self.constructorMethod, fieldNumber: 2) |
| } |
| try { if let v = self._constructorSchema { |
| try visitor.visitSingularMessageField(value: v, fieldNumber: 3) |
| } }() |
| if !self.constructorPayload.isEmpty { |
| try visitor.visitSingularBytesField(value: self.constructorPayload, fieldNumber: 4) |
| } |
| if !self.builderMethods.isEmpty { |
| try visitor.visitRepeatedMessageField(value: self.builderMethods, fieldNumber: 5) |
| } |
| try unknownFields.traverse(visitor: &visitor) |
| } |
| |
| static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_JavaClassLookupPayload, rhs: Org_Apache_Beam_Model_Pipeline_V1_JavaClassLookupPayload) -> Bool { |
| if lhs.className != rhs.className {return false} |
| if lhs.constructorMethod != rhs.constructorMethod {return false} |
| if lhs._constructorSchema != rhs._constructorSchema {return false} |
| if lhs.constructorPayload != rhs.constructorPayload {return false} |
| if lhs.builderMethods != rhs.builderMethods {return false} |
| if lhs.unknownFields != rhs.unknownFields {return false} |
| return true |
| } |
| } |
| |
| extension Org_Apache_Beam_Model_Pipeline_V1_BuilderMethod: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
| static let protoMessageName: String = _protobuf_package + ".BuilderMethod" |
| static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
| 1: .same(proto: "name"), |
| 2: .same(proto: "schema"), |
| 3: .same(proto: "payload"), |
| ] |
| |
| mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
| while let fieldNumber = try decoder.nextFieldNumber() { |
| // 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 fieldNumber { |
| case 1: try { try decoder.decodeSingularStringField(value: &self.name) }() |
| case 2: try { try decoder.decodeSingularMessageField(value: &self._schema) }() |
| case 3: try { try decoder.decodeSingularBytesField(value: &self.payload) }() |
| default: break |
| } |
| } |
| } |
| |
| func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
| // The use of inline closures is to circumvent an issue where the compiler |
| // allocates stack space for every if/case branch local when no optimizations |
| // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and |
| // https://github.com/apple/swift-protobuf/issues/1182 |
| if !self.name.isEmpty { |
| try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) |
| } |
| try { if let v = self._schema { |
| try visitor.visitSingularMessageField(value: v, fieldNumber: 2) |
| } }() |
| if !self.payload.isEmpty { |
| try visitor.visitSingularBytesField(value: self.payload, fieldNumber: 3) |
| } |
| try unknownFields.traverse(visitor: &visitor) |
| } |
| |
| static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_BuilderMethod, rhs: Org_Apache_Beam_Model_Pipeline_V1_BuilderMethod) -> Bool { |
| if lhs.name != rhs.name {return false} |
| if lhs._schema != rhs._schema {return false} |
| if lhs.payload != rhs.payload {return false} |
| if lhs.unknownFields != rhs.unknownFields {return false} |
| return true |
| } |
| } |
| |
| extension Org_Apache_Beam_Model_Pipeline_V1_SchemaTransformPayload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
| static let protoMessageName: String = _protobuf_package + ".SchemaTransformPayload" |
| static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
| 1: .same(proto: "identifier"), |
| 2: .standard(proto: "configuration_schema"), |
| 3: .standard(proto: "configuration_row"), |
| ] |
| |
| mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
| while let fieldNumber = try decoder.nextFieldNumber() { |
| // 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 fieldNumber { |
| case 1: try { try decoder.decodeSingularStringField(value: &self.identifier) }() |
| case 2: try { try decoder.decodeSingularMessageField(value: &self._configurationSchema) }() |
| case 3: try { try decoder.decodeSingularBytesField(value: &self.configurationRow) }() |
| default: break |
| } |
| } |
| } |
| |
| func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
| // The use of inline closures is to circumvent an issue where the compiler |
| // allocates stack space for every if/case branch local when no optimizations |
| // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and |
| // https://github.com/apple/swift-protobuf/issues/1182 |
| if !self.identifier.isEmpty { |
| try visitor.visitSingularStringField(value: self.identifier, fieldNumber: 1) |
| } |
| try { if let v = self._configurationSchema { |
| try visitor.visitSingularMessageField(value: v, fieldNumber: 2) |
| } }() |
| if !self.configurationRow.isEmpty { |
| try visitor.visitSingularBytesField(value: self.configurationRow, fieldNumber: 3) |
| } |
| try unknownFields.traverse(visitor: &visitor) |
| } |
| |
| static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_SchemaTransformPayload, rhs: Org_Apache_Beam_Model_Pipeline_V1_SchemaTransformPayload) -> Bool { |
| if lhs.identifier != rhs.identifier {return false} |
| if lhs._configurationSchema != rhs._configurationSchema {return false} |
| if lhs.configurationRow != rhs.configurationRow {return false} |
| if lhs.unknownFields != rhs.unknownFields {return false} |
| return true |
| } |
| } |