blob: d9a06cc968ce1554bfae4823ef7df0017693c16b [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/endpoints.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 endpoints containing a service.
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 description of how to connect to a Beam API endpoint.
struct Org_Apache_Beam_Model_Pipeline_V1_ApiServiceDescriptor {
// 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 URL to connect to.
var url: String = String()
/// (Optional) The method for authentication. If unspecified, access to the
/// url is already being performed in a trusted context (e.g. localhost,
/// private network).
var authentication: Org_Apache_Beam_Model_Pipeline_V1_AuthenticationSpec {
get {return _authentication ?? Org_Apache_Beam_Model_Pipeline_V1_AuthenticationSpec()}
set {_authentication = newValue}
}
/// Returns true if `authentication` has been explicitly set.
var hasAuthentication: Bool {return self._authentication != nil}
/// Clears the value of `authentication`. Subsequent reads from it will return its default value.
mutating func clearAuthentication() {self._authentication = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _authentication: Org_Apache_Beam_Model_Pipeline_V1_AuthenticationSpec? = nil
}
struct Org_Apache_Beam_Model_Pipeline_V1_AuthenticationSpec {
// 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 URN that describes the accompanying payload.
/// For any URN that is not recognized (by whomever is inspecting
/// it) the parameter payload should be treated as opaque and
/// passed as-is.
var urn: String = String()
/// (Optional) The data specifying any parameters to the URN. If
/// the URN does not require any arguments, this may be omitted.
var payload: Data = Data()
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
#if swift(>=5.5) && canImport(_Concurrency)
extension Org_Apache_Beam_Model_Pipeline_V1_ApiServiceDescriptor: @unchecked Sendable {}
extension Org_Apache_Beam_Model_Pipeline_V1_AuthenticationSpec: @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_ApiServiceDescriptor: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".ApiServiceDescriptor"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "url"),
2: .same(proto: "authentication"),
]
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.url) }()
case 2: try { try decoder.decodeSingularMessageField(value: &self._authentication) }()
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.url.isEmpty {
try visitor.visitSingularStringField(value: self.url, fieldNumber: 1)
}
try { if let v = self._authentication {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
try unknownFields.traverse(visitor: &visitor)
}
static func ==(lhs: Org_Apache_Beam_Model_Pipeline_V1_ApiServiceDescriptor, rhs: Org_Apache_Beam_Model_Pipeline_V1_ApiServiceDescriptor) -> Bool {
if lhs.url != rhs.url {return false}
if lhs._authentication != rhs._authentication {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension Org_Apache_Beam_Model_Pipeline_V1_AuthenticationSpec: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".AuthenticationSpec"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "urn"),
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.decodeSingularStringField(value: &self.urn) }()
case 2: try { try decoder.decodeSingularBytesField(value: &self.payload) }()
default: break
}
}
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.urn.isEmpty {
try visitor.visitSingularStringField(value: self.urn, 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_AuthenticationSpec, rhs: Org_Apache_Beam_Model_Pipeline_V1_AuthenticationSpec) -> Bool {
if lhs.urn != rhs.urn {return false}
if lhs.payload != rhs.payload {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}