blob: aabd52974831ef49deac51eb2bb02a96aa787f4d [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/job_management/v1/beam_expansion_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 Expansion API, an api for expanding
// transforms in a remote SDK.
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_Expansion_V1_ExpansionRequest {
// 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.
/// Set of components needed to interpret the transform, or which
/// may be useful for its expansion. This includes the input
/// PCollections (if any) to the to-be-expanded transform, along
/// with their coders and windowing strategies.
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}
/// The actual PTransform to be expaneded according to its spec.
/// Its input should be set, but its subtransforms and outputs
/// should not be.
var transform: Org_Apache_Beam_Model_Pipeline_V1_PTransform {
get {return _transform ?? Org_Apache_Beam_Model_Pipeline_V1_PTransform()}
set {_transform = newValue}
}
/// Returns true if `transform` has been explicitly set.
var hasTransform: Bool {return self._transform != nil}
/// Clears the value of `transform`. Subsequent reads from it will return its default value.
mutating func clearTransform() {self._transform = nil}
/// A namespace (prefix) to use for the id of any newly created
/// components.
var namespace: String = String()
/// (Optional) Map from a local output tag to a coder id.
/// If it is set, asks the expansion service to use the given
/// coders for the output PCollections. Note that the request
/// may not be fulfilled.
var outputCoderRequests: Dictionary<String,String> = [:]
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _components: Org_Apache_Beam_Model_Pipeline_V1_Components? = nil
fileprivate var _transform: Org_Apache_Beam_Model_Pipeline_V1_PTransform? = nil
}
struct Org_Apache_Beam_Model_Expansion_V1_ExpansionResponse {
// 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.
/// Set of components needed to execute the expanded transform,
/// including the (original) inputs, outputs, and subtransforms.
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}
/// The expanded transform itself, with references to its outputs
/// and subtransforms.
var transform: Org_Apache_Beam_Model_Pipeline_V1_PTransform {
get {return _transform ?? Org_Apache_Beam_Model_Pipeline_V1_PTransform()}
set {_transform = newValue}
}
/// Returns true if `transform` has been explicitly set.
var hasTransform: Bool {return self._transform != nil}
/// Clears the value of `transform`. Subsequent reads from it will return its default value.
mutating func clearTransform() {self._transform = nil}
/// A set of requirements that must be appended to this pipeline's
/// requirements.
var requirements: [String] = []
/// (Optional) An string representation of any error encountered while
/// attempting to expand this transform.
var error: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _components: Org_Apache_Beam_Model_Pipeline_V1_Components? = nil
fileprivate var _transform: Org_Apache_Beam_Model_Pipeline_V1_PTransform? = nil
}
struct Org_Apache_Beam_Model_Expansion_V1_DiscoverSchemaTransformRequest {
// 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() {}
}
struct Org_Apache_Beam_Model_Expansion_V1_SchemaTransformConfig {
// 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.
/// Config schema of the SchemaTransform
var configSchema: Org_Apache_Beam_Model_Pipeline_V1_Schema {
get {return _configSchema ?? Org_Apache_Beam_Model_Pipeline_V1_Schema()}
set {_configSchema = newValue}
}
/// Returns true if `configSchema` has been explicitly set.
var hasConfigSchema: Bool {return self._configSchema != nil}
/// Clears the value of `configSchema`. Subsequent reads from it will return its default value.
mutating func clearConfigSchema() {self._configSchema = nil}
/// Names of input PCollections
var inputPcollectionNames: [String] = []
/// Names of output PCollections
var outputPcollectionNames: [String] = []
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _configSchema: Org_Apache_Beam_Model_Pipeline_V1_Schema? = nil
}
struct Org_Apache_Beam_Model_Expansion_V1_DiscoverSchemaTransformResponse {
// 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 mapping from SchemaTransform ID to schema transform config of discovered
/// SchemaTransforms
var schemaTransformConfigs: Dictionary<String,Org_Apache_Beam_Model_Expansion_V1_SchemaTransformConfig> = [:]
/// If list of identifies are empty, this may contain an error.
var error: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension Org_Apache_Beam_Model_Expansion_V1_ExpansionRequest: @unchecked Sendable {}
extension Org_Apache_Beam_Model_Expansion_V1_ExpansionResponse: @unchecked Sendable {}
extension Org_Apache_Beam_Model_Expansion_V1_DiscoverSchemaTransformRequest: @unchecked Sendable {}
extension Org_Apache_Beam_Model_Expansion_V1_SchemaTransformConfig: @unchecked Sendable {}
extension Org_Apache_Beam_Model_Expansion_V1_DiscoverSchemaTransformResponse: @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.expansion.v1"
extension Org_Apache_Beam_Model_Expansion_V1_ExpansionRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".ExpansionRequest"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "components"),
2: .same(proto: "transform"),
3: .same(proto: "namespace"),
4: .standard(proto: "output_coder_requests"),
]
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._components) }()
case 2: try { try decoder.decodeSingularMessageField(value: &self._transform) }()
case 3: try { try decoder.decodeSingularStringField(value: &self.namespace) }()
case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &self.outputCoderRequests) }()
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._components {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
} }()
try { if let v = self._transform {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
if !self.namespace.isEmpty {
try visitor.visitSingularStringField(value: self.namespace, fieldNumber: 3)
}
if !self.outputCoderRequests.isEmpty {
try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: self.outputCoderRequests, fieldNumber: 4)
}
try unknownFields.traverse(visitor: &visitor)
}
static func ==(lhs: Org_Apache_Beam_Model_Expansion_V1_ExpansionRequest, rhs: Org_Apache_Beam_Model_Expansion_V1_ExpansionRequest) -> Bool {
if lhs._components != rhs._components {return false}
if lhs._transform != rhs._transform {return false}
if lhs.namespace != rhs.namespace {return false}
if lhs.outputCoderRequests != rhs.outputCoderRequests {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension Org_Apache_Beam_Model_Expansion_V1_ExpansionResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".ExpansionResponse"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "components"),
2: .same(proto: "transform"),
3: .same(proto: "requirements"),
10: .same(proto: "error"),
]
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._components) }()
case 2: try { try decoder.decodeSingularMessageField(value: &self._transform) }()
case 3: try { try decoder.decodeRepeatedStringField(value: &self.requirements) }()
case 10: try { try decoder.decodeSingularStringField(value: &self.error) }()
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._components {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
} }()
try { if let v = self._transform {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
if !self.requirements.isEmpty {
try visitor.visitRepeatedStringField(value: self.requirements, fieldNumber: 3)
}
if !self.error.isEmpty {
try visitor.visitSingularStringField(value: self.error, fieldNumber: 10)
}
try unknownFields.traverse(visitor: &visitor)
}
static func ==(lhs: Org_Apache_Beam_Model_Expansion_V1_ExpansionResponse, rhs: Org_Apache_Beam_Model_Expansion_V1_ExpansionResponse) -> Bool {
if lhs._components != rhs._components {return false}
if lhs._transform != rhs._transform {return false}
if lhs.requirements != rhs.requirements {return false}
if lhs.error != rhs.error {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension Org_Apache_Beam_Model_Expansion_V1_DiscoverSchemaTransformRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".DiscoverSchemaTransformRequest"
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_Expansion_V1_DiscoverSchemaTransformRequest, rhs: Org_Apache_Beam_Model_Expansion_V1_DiscoverSchemaTransformRequest) -> Bool {
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension Org_Apache_Beam_Model_Expansion_V1_SchemaTransformConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".SchemaTransformConfig"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "config_schema"),
2: .standard(proto: "input_pcollection_names"),
3: .standard(proto: "output_pcollection_names"),
]
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._configSchema) }()
case 2: try { try decoder.decodeRepeatedStringField(value: &self.inputPcollectionNames) }()
case 3: try { try decoder.decodeRepeatedStringField(value: &self.outputPcollectionNames) }()
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._configSchema {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
} }()
if !self.inputPcollectionNames.isEmpty {
try visitor.visitRepeatedStringField(value: self.inputPcollectionNames, fieldNumber: 2)
}
if !self.outputPcollectionNames.isEmpty {
try visitor.visitRepeatedStringField(value: self.outputPcollectionNames, fieldNumber: 3)
}
try unknownFields.traverse(visitor: &visitor)
}
static func ==(lhs: Org_Apache_Beam_Model_Expansion_V1_SchemaTransformConfig, rhs: Org_Apache_Beam_Model_Expansion_V1_SchemaTransformConfig) -> Bool {
if lhs._configSchema != rhs._configSchema {return false}
if lhs.inputPcollectionNames != rhs.inputPcollectionNames {return false}
if lhs.outputPcollectionNames != rhs.outputPcollectionNames {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension Org_Apache_Beam_Model_Expansion_V1_DiscoverSchemaTransformResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".DiscoverSchemaTransformResponse"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "schema_transform_configs"),
2: .same(proto: "error"),
]
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.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,Org_Apache_Beam_Model_Expansion_V1_SchemaTransformConfig>.self, value: &self.schemaTransformConfigs) }()
case 2: try { try decoder.decodeSingularStringField(value: &self.error) }()
default: break
}
}
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.schemaTransformConfigs.isEmpty {
try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,Org_Apache_Beam_Model_Expansion_V1_SchemaTransformConfig>.self, value: self.schemaTransformConfigs, fieldNumber: 1)
}
if !self.error.isEmpty {
try visitor.visitSingularStringField(value: self.error, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
}
static func ==(lhs: Org_Apache_Beam_Model_Expansion_V1_DiscoverSchemaTransformResponse, rhs: Org_Apache_Beam_Model_Expansion_V1_DiscoverSchemaTransformResponse) -> Bool {
if lhs.schemaTransformConfigs != rhs.schemaTransformConfigs {return false}
if lhs.error != rhs.error {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}