blob: 643e63645b8f2653de34dd0da3893b0f0aacb40b [file] [log] [blame]
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: org/apache/beam/model/job_management/v1/beam_artifact_api.proto
//
//
// Copyright 2018, gRPC Authors All rights reserved.
//
// Licensed 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.
//
import GRPC
import NIO
import NIOConcurrencyHelpers
import SwiftProtobuf
/// A service to retrieve artifacts for use in a Job.
///
/// Usage: instantiate `Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClient`, then call methods of this protocol to make API calls.
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol? { get }
func resolveArtifacts(
_ request: Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest,
callOptions: CallOptions?
) -> UnaryCall<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest, Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse>
func getArtifact(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest,
callOptions: CallOptions?,
handler: @escaping (Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse) -> Void
) -> ServerStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse>
}
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientProtocol {
internal var serviceName: String {
return "org.apache.beam.model.job_management.v1.ArtifactRetrievalService"
}
/// Resolves the given artifact references into one or more replacement
/// artifact references (e.g. a Maven dependency into a (transitive) set
/// of jars.
///
/// - Parameters:
/// - request: Request to send to ResolveArtifacts.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
internal func resolveArtifacts(
_ request: Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest,
callOptions: CallOptions? = nil
) -> UnaryCall<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest, Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse> {
return self.makeUnaryCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata.Methods.resolveArtifacts.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeResolveArtifactsInterceptors() ?? []
)
}
/// Retrieves the given artifact as a stream of bytes.
///
/// - Parameters:
/// - request: Request to send to GetArtifact.
/// - callOptions: Call options.
/// - handler: A closure called when each response is received from the server.
/// - Returns: A `ServerStreamingCall` with futures for the metadata and status.
internal func getArtifact(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest,
callOptions: CallOptions? = nil,
handler: @escaping (Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse) -> Void
) -> ServerStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse> {
return self.makeServerStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata.Methods.getArtifact.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? [],
handler: handler
)
}
}
@available(*, deprecated)
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClient: @unchecked Sendable {}
@available(*, deprecated, renamed: "Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceNIOClient")
internal final class Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClient: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientProtocol {
private let lock = Lock()
private var _defaultCallOptions: CallOptions
private var _interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol?
internal let channel: GRPCChannel
internal var defaultCallOptions: CallOptions {
get { self.lock.withLock { return self._defaultCallOptions } }
set { self.lock.withLockVoid { self._defaultCallOptions = newValue } }
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol? {
get { self.lock.withLock { return self._interceptors } }
set { self.lock.withLockVoid { self._interceptors = newValue } }
}
/// Creates a client for the org.apache.beam.model.job_management.v1.ArtifactRetrievalService service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self._defaultCallOptions = defaultCallOptions
self._interceptors = interceptors
}
}
internal struct Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceNIOClient: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientProtocol {
internal var channel: GRPCChannel
internal var defaultCallOptions: CallOptions
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol?
/// Creates a client for the org.apache.beam.model.job_management.v1.ArtifactRetrievalService service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
/// A service to retrieve artifacts for use in a Job.
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceAsyncClientProtocol: GRPCClient {
static var serviceDescriptor: GRPCServiceDescriptor { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol? { get }
func makeResolveArtifactsCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest,
callOptions: CallOptions?
) -> GRPCAsyncUnaryCall<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest, Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse>
func makeGetArtifactCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest,
callOptions: CallOptions?
) -> GRPCAsyncServerStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse>
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceAsyncClientProtocol {
internal static var serviceDescriptor: GRPCServiceDescriptor {
return Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata.serviceDescriptor
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol? {
return nil
}
internal func makeResolveArtifactsCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest,
callOptions: CallOptions? = nil
) -> GRPCAsyncUnaryCall<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest, Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse> {
return self.makeAsyncUnaryCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata.Methods.resolveArtifacts.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeResolveArtifactsInterceptors() ?? []
)
}
internal func makeGetArtifactCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest,
callOptions: CallOptions? = nil
) -> GRPCAsyncServerStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse> {
return self.makeAsyncServerStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata.Methods.getArtifact.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? []
)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceAsyncClientProtocol {
internal func resolveArtifacts(
_ request: Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest,
callOptions: CallOptions? = nil
) async throws -> Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse {
return try await self.performAsyncUnaryCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata.Methods.resolveArtifacts.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeResolveArtifactsInterceptors() ?? []
)
}
internal func getArtifact(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest,
callOptions: CallOptions? = nil
) -> GRPCAsyncResponseStream<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse> {
return self.performAsyncServerStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata.Methods.getArtifact.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? []
)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal struct Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceAsyncClient: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceAsyncClientProtocol {
internal var channel: GRPCChannel
internal var defaultCallOptions: CallOptions
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol?
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientInterceptorFactoryProtocol: Sendable {
/// - Returns: Interceptors to use when invoking 'resolveArtifacts'.
func makeResolveArtifactsInterceptors() -> [ClientInterceptor<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest, Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse>]
/// - Returns: Interceptors to use when invoking 'getArtifact'.
func makeGetArtifactInterceptors() -> [ClientInterceptor<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse>]
}
internal enum Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata {
internal static let serviceDescriptor = GRPCServiceDescriptor(
name: "ArtifactRetrievalService",
fullName: "org.apache.beam.model.job_management.v1.ArtifactRetrievalService",
methods: [
Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata.Methods.resolveArtifacts,
Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceClientMetadata.Methods.getArtifact,
]
)
internal enum Methods {
internal static let resolveArtifacts = GRPCMethodDescriptor(
name: "ResolveArtifacts",
path: "/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/ResolveArtifacts",
type: GRPCCallType.unary
)
internal static let getArtifact = GRPCMethodDescriptor(
name: "GetArtifact",
path: "/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/GetArtifact",
type: GRPCCallType.serverStreaming
)
}
}
/// A service that allows the client to act as an ArtifactRetrievalService,
/// for a particular job with the server initiating requests and receiving
/// responses.
///
/// A client calls the service with an ArtifactResponseWrapper that has the
/// staging token set, and thereafter responds to the server's requests.
///
/// Usage: instantiate `Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClient`, then call methods of this protocol to make API calls.
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol? { get }
func reverseArtifactRetrievalService(
callOptions: CallOptions?,
handler: @escaping (Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper) -> Void
) -> BidirectionalStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper, Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper>
}
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientProtocol {
internal var serviceName: String {
return "org.apache.beam.model.job_management.v1.ArtifactStagingService"
}
/// Bidirectional streaming call to ReverseArtifactRetrievalService
///
/// Callers should use the `send` method on the returned object to send messages
/// to the server. The caller should send an `.end` after the final message has been sent.
///
/// - Parameters:
/// - callOptions: Call options.
/// - handler: A closure called when each response is received from the server.
/// - Returns: A `ClientStreamingCall` with futures for the metadata and status.
internal func reverseArtifactRetrievalService(
callOptions: CallOptions? = nil,
handler: @escaping (Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper) -> Void
) -> BidirectionalStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper, Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper> {
return self.makeBidirectionalStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientMetadata.Methods.reverseArtifactRetrievalService.path,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeReverseArtifactRetrievalServiceInterceptors() ?? [],
handler: handler
)
}
}
@available(*, deprecated)
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClient: @unchecked Sendable {}
@available(*, deprecated, renamed: "Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceNIOClient")
internal final class Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClient: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientProtocol {
private let lock = Lock()
private var _defaultCallOptions: CallOptions
private var _interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol?
internal let channel: GRPCChannel
internal var defaultCallOptions: CallOptions {
get { self.lock.withLock { return self._defaultCallOptions } }
set { self.lock.withLockVoid { self._defaultCallOptions = newValue } }
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol? {
get { self.lock.withLock { return self._interceptors } }
set { self.lock.withLockVoid { self._interceptors = newValue } }
}
/// Creates a client for the org.apache.beam.model.job_management.v1.ArtifactStagingService service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self._defaultCallOptions = defaultCallOptions
self._interceptors = interceptors
}
}
internal struct Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceNIOClient: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientProtocol {
internal var channel: GRPCChannel
internal var defaultCallOptions: CallOptions
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol?
/// Creates a client for the org.apache.beam.model.job_management.v1.ArtifactStagingService service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
/// A service that allows the client to act as an ArtifactRetrievalService,
/// for a particular job with the server initiating requests and receiving
/// responses.
///
/// A client calls the service with an ArtifactResponseWrapper that has the
/// staging token set, and thereafter responds to the server's requests.
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceAsyncClientProtocol: GRPCClient {
static var serviceDescriptor: GRPCServiceDescriptor { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol? { get }
func makeReverseArtifactRetrievalServiceCall(
callOptions: CallOptions?
) -> GRPCAsyncBidirectionalStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper, Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper>
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceAsyncClientProtocol {
internal static var serviceDescriptor: GRPCServiceDescriptor {
return Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientMetadata.serviceDescriptor
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol? {
return nil
}
internal func makeReverseArtifactRetrievalServiceCall(
callOptions: CallOptions? = nil
) -> GRPCAsyncBidirectionalStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper, Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper> {
return self.makeAsyncBidirectionalStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientMetadata.Methods.reverseArtifactRetrievalService.path,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeReverseArtifactRetrievalServiceInterceptors() ?? []
)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceAsyncClientProtocol {
internal func reverseArtifactRetrievalService<RequestStream>(
_ requests: RequestStream,
callOptions: CallOptions? = nil
) -> GRPCAsyncResponseStream<Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper> where RequestStream: Sequence, RequestStream.Element == Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper {
return self.performAsyncBidirectionalStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientMetadata.Methods.reverseArtifactRetrievalService.path,
requests: requests,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeReverseArtifactRetrievalServiceInterceptors() ?? []
)
}
internal func reverseArtifactRetrievalService<RequestStream>(
_ requests: RequestStream,
callOptions: CallOptions? = nil
) -> GRPCAsyncResponseStream<Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper> where RequestStream: AsyncSequence & Sendable, RequestStream.Element == Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper {
return self.performAsyncBidirectionalStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientMetadata.Methods.reverseArtifactRetrievalService.path,
requests: requests,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeReverseArtifactRetrievalServiceInterceptors() ?? []
)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal struct Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceAsyncClient: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceAsyncClientProtocol {
internal var channel: GRPCChannel
internal var defaultCallOptions: CallOptions
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol?
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientInterceptorFactoryProtocol: Sendable {
/// - Returns: Interceptors to use when invoking 'reverseArtifactRetrievalService'.
func makeReverseArtifactRetrievalServiceInterceptors() -> [ClientInterceptor<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper, Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper>]
}
internal enum Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientMetadata {
internal static let serviceDescriptor = GRPCServiceDescriptor(
name: "ArtifactStagingService",
fullName: "org.apache.beam.model.job_management.v1.ArtifactStagingService",
methods: [
Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceClientMetadata.Methods.reverseArtifactRetrievalService,
]
)
internal enum Methods {
internal static let reverseArtifactRetrievalService = GRPCMethodDescriptor(
name: "ReverseArtifactRetrievalService",
path: "/org.apache.beam.model.job_management.v1.ArtifactStagingService/ReverseArtifactRetrievalService",
type: GRPCCallType.bidirectionalStreaming
)
}
}
/// A service to stage artifacts for use in a Job.
///
/// Usage: instantiate `Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClient`, then call methods of this protocol to make API calls.
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol? { get }
func putArtifact(
callOptions: CallOptions?
) -> ClientStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse>
func commitManifest(
_ request: Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest,
callOptions: CallOptions?
) -> UnaryCall<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse>
}
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientProtocol {
internal var serviceName: String {
return "org.apache.beam.model.job_management.v1.LegacyArtifactStagingService"
}
/// Stage an artifact to be available during job execution. The first request must contain the
/// name of the artifact. All future requests must contain sequential chunks of the content of
/// the artifact.
///
/// Callers should use the `send` method on the returned object to send messages
/// to the server. The caller should send an `.end` after the final message has been sent.
///
/// - Parameters:
/// - callOptions: Call options.
/// - Returns: A `ClientStreamingCall` with futures for the metadata, status and response.
internal func putArtifact(
callOptions: CallOptions? = nil
) -> ClientStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse> {
return self.makeClientStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.Methods.putArtifact.path,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makePutArtifactInterceptors() ?? []
)
}
/// Commit the manifest for a Job. All artifacts must have been successfully uploaded
/// before this call is made.
///
/// Throws error INVALID_ARGUMENT if not all of the members of the manifest are present
///
/// - Parameters:
/// - request: Request to send to CommitManifest.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
internal func commitManifest(
_ request: Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest,
callOptions: CallOptions? = nil
) -> UnaryCall<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse> {
return self.makeUnaryCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.Methods.commitManifest.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeCommitManifestInterceptors() ?? []
)
}
}
@available(*, deprecated)
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClient: @unchecked Sendable {}
@available(*, deprecated, renamed: "Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceNIOClient")
internal final class Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClient: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientProtocol {
private let lock = Lock()
private var _defaultCallOptions: CallOptions
private var _interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol?
internal let channel: GRPCChannel
internal var defaultCallOptions: CallOptions {
get { self.lock.withLock { return self._defaultCallOptions } }
set { self.lock.withLockVoid { self._defaultCallOptions = newValue } }
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol? {
get { self.lock.withLock { return self._interceptors } }
set { self.lock.withLockVoid { self._interceptors = newValue } }
}
/// Creates a client for the org.apache.beam.model.job_management.v1.LegacyArtifactStagingService service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self._defaultCallOptions = defaultCallOptions
self._interceptors = interceptors
}
}
internal struct Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceNIOClient: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientProtocol {
internal var channel: GRPCChannel
internal var defaultCallOptions: CallOptions
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol?
/// Creates a client for the org.apache.beam.model.job_management.v1.LegacyArtifactStagingService service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
/// A service to stage artifacts for use in a Job.
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceAsyncClientProtocol: GRPCClient {
static var serviceDescriptor: GRPCServiceDescriptor { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol? { get }
func makePutArtifactCall(
callOptions: CallOptions?
) -> GRPCAsyncClientStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse>
func makeCommitManifestCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest,
callOptions: CallOptions?
) -> GRPCAsyncUnaryCall<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse>
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceAsyncClientProtocol {
internal static var serviceDescriptor: GRPCServiceDescriptor {
return Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.serviceDescriptor
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol? {
return nil
}
internal func makePutArtifactCall(
callOptions: CallOptions? = nil
) -> GRPCAsyncClientStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse> {
return self.makeAsyncClientStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.Methods.putArtifact.path,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makePutArtifactInterceptors() ?? []
)
}
internal func makeCommitManifestCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest,
callOptions: CallOptions? = nil
) -> GRPCAsyncUnaryCall<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse> {
return self.makeAsyncUnaryCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.Methods.commitManifest.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeCommitManifestInterceptors() ?? []
)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceAsyncClientProtocol {
internal func putArtifact<RequestStream>(
_ requests: RequestStream,
callOptions: CallOptions? = nil
) async throws -> Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse where RequestStream: Sequence, RequestStream.Element == Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest {
return try await self.performAsyncClientStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.Methods.putArtifact.path,
requests: requests,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makePutArtifactInterceptors() ?? []
)
}
internal func putArtifact<RequestStream>(
_ requests: RequestStream,
callOptions: CallOptions? = nil
) async throws -> Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse where RequestStream: AsyncSequence & Sendable, RequestStream.Element == Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest {
return try await self.performAsyncClientStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.Methods.putArtifact.path,
requests: requests,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makePutArtifactInterceptors() ?? []
)
}
internal func commitManifest(
_ request: Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest,
callOptions: CallOptions? = nil
) async throws -> Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse {
return try await self.performAsyncUnaryCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.Methods.commitManifest.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeCommitManifestInterceptors() ?? []
)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal struct Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceAsyncClient: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceAsyncClientProtocol {
internal var channel: GRPCChannel
internal var defaultCallOptions: CallOptions
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol?
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientInterceptorFactoryProtocol: Sendable {
/// - Returns: Interceptors to use when invoking 'putArtifact'.
func makePutArtifactInterceptors() -> [ClientInterceptor<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse>]
/// - Returns: Interceptors to use when invoking 'commitManifest'.
func makeCommitManifestInterceptors() -> [ClientInterceptor<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse>]
}
internal enum Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata {
internal static let serviceDescriptor = GRPCServiceDescriptor(
name: "LegacyArtifactStagingService",
fullName: "org.apache.beam.model.job_management.v1.LegacyArtifactStagingService",
methods: [
Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.Methods.putArtifact,
Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceClientMetadata.Methods.commitManifest,
]
)
internal enum Methods {
internal static let putArtifact = GRPCMethodDescriptor(
name: "PutArtifact",
path: "/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/PutArtifact",
type: GRPCCallType.clientStreaming
)
internal static let commitManifest = GRPCMethodDescriptor(
name: "CommitManifest",
path: "/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/CommitManifest",
type: GRPCCallType.unary
)
}
}
/// A service to retrieve artifacts for use in a Job.
///
/// Usage: instantiate `Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClient`, then call methods of this protocol to make API calls.
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientProtocol: GRPCClient {
var serviceName: String { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol? { get }
func getManifest(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest,
callOptions: CallOptions?
) -> UnaryCall<Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse>
func getArtifact(
_ request: Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest,
callOptions: CallOptions?,
handler: @escaping (Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk) -> Void
) -> ServerStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk>
}
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientProtocol {
internal var serviceName: String {
return "org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService"
}
/// Get the manifest for the job
///
/// - Parameters:
/// - request: Request to send to GetManifest.
/// - callOptions: Call options.
/// - Returns: A `UnaryCall` with futures for the metadata, status and response.
internal func getManifest(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest,
callOptions: CallOptions? = nil
) -> UnaryCall<Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse> {
return self.makeUnaryCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata.Methods.getManifest.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetManifestInterceptors() ?? []
)
}
/// Get an artifact staged for the job. The requested artifact must be within the manifest
///
/// - Parameters:
/// - request: Request to send to GetArtifact.
/// - callOptions: Call options.
/// - handler: A closure called when each response is received from the server.
/// - Returns: A `ServerStreamingCall` with futures for the metadata and status.
internal func getArtifact(
_ request: Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest,
callOptions: CallOptions? = nil,
handler: @escaping (Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk) -> Void
) -> ServerStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk> {
return self.makeServerStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata.Methods.getArtifact.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? [],
handler: handler
)
}
}
@available(*, deprecated)
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClient: @unchecked Sendable {}
@available(*, deprecated, renamed: "Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceNIOClient")
internal final class Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClient: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientProtocol {
private let lock = Lock()
private var _defaultCallOptions: CallOptions
private var _interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol?
internal let channel: GRPCChannel
internal var defaultCallOptions: CallOptions {
get { self.lock.withLock { return self._defaultCallOptions } }
set { self.lock.withLockVoid { self._defaultCallOptions = newValue } }
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol? {
get { self.lock.withLock { return self._interceptors } }
set { self.lock.withLockVoid { self._interceptors = newValue } }
}
/// Creates a client for the org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self._defaultCallOptions = defaultCallOptions
self._interceptors = interceptors
}
}
internal struct Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceNIOClient: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientProtocol {
internal var channel: GRPCChannel
internal var defaultCallOptions: CallOptions
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol?
/// Creates a client for the org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService service.
///
/// - Parameters:
/// - channel: `GRPCChannel` to the service host.
/// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
/// - interceptors: A factory providing interceptors for each RPC.
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
/// A service to retrieve artifacts for use in a Job.
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceAsyncClientProtocol: GRPCClient {
static var serviceDescriptor: GRPCServiceDescriptor { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol? { get }
func makeGetManifestCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest,
callOptions: CallOptions?
) -> GRPCAsyncUnaryCall<Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse>
func makeGetArtifactCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest,
callOptions: CallOptions?
) -> GRPCAsyncServerStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk>
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceAsyncClientProtocol {
internal static var serviceDescriptor: GRPCServiceDescriptor {
return Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata.serviceDescriptor
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol? {
return nil
}
internal func makeGetManifestCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest,
callOptions: CallOptions? = nil
) -> GRPCAsyncUnaryCall<Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse> {
return self.makeAsyncUnaryCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata.Methods.getManifest.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetManifestInterceptors() ?? []
)
}
internal func makeGetArtifactCall(
_ request: Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest,
callOptions: CallOptions? = nil
) -> GRPCAsyncServerStreamingCall<Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk> {
return self.makeAsyncServerStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata.Methods.getArtifact.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? []
)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceAsyncClientProtocol {
internal func getManifest(
_ request: Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest,
callOptions: CallOptions? = nil
) async throws -> Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse {
return try await self.performAsyncUnaryCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata.Methods.getManifest.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetManifestInterceptors() ?? []
)
}
internal func getArtifact(
_ request: Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest,
callOptions: CallOptions? = nil
) -> GRPCAsyncResponseStream<Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk> {
return self.performAsyncServerStreamingCall(
path: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata.Methods.getArtifact.path,
request: request,
callOptions: callOptions ?? self.defaultCallOptions,
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? []
)
}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal struct Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceAsyncClient: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceAsyncClientProtocol {
internal var channel: GRPCChannel
internal var defaultCallOptions: CallOptions
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol?
internal init(
channel: GRPCChannel,
defaultCallOptions: CallOptions = CallOptions(),
interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol? = nil
) {
self.channel = channel
self.defaultCallOptions = defaultCallOptions
self.interceptors = interceptors
}
}
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientInterceptorFactoryProtocol: Sendable {
/// - Returns: Interceptors to use when invoking 'getManifest'.
func makeGetManifestInterceptors() -> [ClientInterceptor<Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse>]
/// - Returns: Interceptors to use when invoking 'getArtifact'.
func makeGetArtifactInterceptors() -> [ClientInterceptor<Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk>]
}
internal enum Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata {
internal static let serviceDescriptor = GRPCServiceDescriptor(
name: "LegacyArtifactRetrievalService",
fullName: "org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService",
methods: [
Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata.Methods.getManifest,
Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceClientMetadata.Methods.getArtifact,
]
)
internal enum Methods {
internal static let getManifest = GRPCMethodDescriptor(
name: "GetManifest",
path: "/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetManifest",
type: GRPCCallType.unary
)
internal static let getArtifact = GRPCMethodDescriptor(
name: "GetArtifact",
path: "/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetArtifact",
type: GRPCCallType.serverStreaming
)
}
}
/// A service to retrieve artifacts for use in a Job.
///
/// To build a server, implement a class that conforms to this protocol.
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceProvider: CallHandlerProvider {
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerInterceptorFactoryProtocol? { get }
/// Resolves the given artifact references into one or more replacement
/// artifact references (e.g. a Maven dependency into a (transitive) set
/// of jars.
func resolveArtifacts(request: Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse>
/// Retrieves the given artifact as a stream of bytes.
func getArtifact(request: Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest, context: StreamingResponseCallContext<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse>) -> EventLoopFuture<GRPCStatus>
}
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceProvider {
internal var serviceName: Substring {
return Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerMetadata.serviceDescriptor.fullName[...]
}
/// Determines, calls and returns the appropriate request handler, depending on the request's method.
/// Returns nil for methods not handled by this service.
internal func handle(
method name: Substring,
context: CallHandlerContext
) -> GRPCServerHandlerProtocol? {
switch name {
case "ResolveArtifacts":
return UnaryServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse>(),
interceptors: self.interceptors?.makeResolveArtifactsInterceptors() ?? [],
userFunction: self.resolveArtifacts(request:context:)
)
case "GetArtifact":
return ServerStreamingServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse>(),
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? [],
userFunction: self.getArtifact(request:context:)
)
default:
return nil
}
}
}
/// A service to retrieve artifacts for use in a Job.
///
/// To implement a server, implement an object which conforms to this protocol.
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceAsyncProvider: CallHandlerProvider, Sendable {
static var serviceDescriptor: GRPCServiceDescriptor { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerInterceptorFactoryProtocol? { get }
/// Resolves the given artifact references into one or more replacement
/// artifact references (e.g. a Maven dependency into a (transitive) set
/// of jars.
func resolveArtifacts(
request: Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest,
context: GRPCAsyncServerCallContext
) async throws -> Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse
/// Retrieves the given artifact as a stream of bytes.
func getArtifact(
request: Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest,
responseStream: GRPCAsyncResponseStreamWriter<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse>,
context: GRPCAsyncServerCallContext
) async throws
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceAsyncProvider {
internal static var serviceDescriptor: GRPCServiceDescriptor {
return Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerMetadata.serviceDescriptor
}
internal var serviceName: Substring {
return Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerMetadata.serviceDescriptor.fullName[...]
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerInterceptorFactoryProtocol? {
return nil
}
internal func handle(
method name: Substring,
context: CallHandlerContext
) -> GRPCServerHandlerProtocol? {
switch name {
case "ResolveArtifacts":
return GRPCAsyncServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse>(),
interceptors: self.interceptors?.makeResolveArtifactsInterceptors() ?? [],
wrapping: { try await self.resolveArtifacts(request: $0, context: $1) }
)
case "GetArtifact":
return GRPCAsyncServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse>(),
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? [],
wrapping: { try await self.getArtifact(request: $0, responseStream: $1, context: $2) }
)
default:
return nil
}
}
}
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerInterceptorFactoryProtocol: Sendable {
/// - Returns: Interceptors to use when handling 'resolveArtifacts'.
/// Defaults to calling `self.makeInterceptors()`.
func makeResolveArtifactsInterceptors() -> [ServerInterceptor<Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsRequest, Org_Apache_Beam_Model_JobManagement_V1_ResolveArtifactsResponse>]
/// - Returns: Interceptors to use when handling 'getArtifact'.
/// Defaults to calling `self.makeInterceptors()`.
func makeGetArtifactInterceptors() -> [ServerInterceptor<Org_Apache_Beam_Model_JobManagement_V1_GetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_GetArtifactResponse>]
}
internal enum Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerMetadata {
internal static let serviceDescriptor = GRPCServiceDescriptor(
name: "ArtifactRetrievalService",
fullName: "org.apache.beam.model.job_management.v1.ArtifactRetrievalService",
methods: [
Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerMetadata.Methods.resolveArtifacts,
Org_Apache_Beam_Model_JobManagement_V1_ArtifactRetrievalServiceServerMetadata.Methods.getArtifact,
]
)
internal enum Methods {
internal static let resolveArtifacts = GRPCMethodDescriptor(
name: "ResolveArtifacts",
path: "/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/ResolveArtifacts",
type: GRPCCallType.unary
)
internal static let getArtifact = GRPCMethodDescriptor(
name: "GetArtifact",
path: "/org.apache.beam.model.job_management.v1.ArtifactRetrievalService/GetArtifact",
type: GRPCCallType.serverStreaming
)
}
}
/// A service that allows the client to act as an ArtifactRetrievalService,
/// for a particular job with the server initiating requests and receiving
/// responses.
///
/// A client calls the service with an ArtifactResponseWrapper that has the
/// staging token set, and thereafter responds to the server's requests.
///
/// To build a server, implement a class that conforms to this protocol.
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceProvider: CallHandlerProvider {
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceServerInterceptorFactoryProtocol? { get }
func reverseArtifactRetrievalService(context: StreamingResponseCallContext<Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper>) -> EventLoopFuture<(StreamEvent<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper>) -> Void>
}
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceProvider {
internal var serviceName: Substring {
return Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceServerMetadata.serviceDescriptor.fullName[...]
}
/// Determines, calls and returns the appropriate request handler, depending on the request's method.
/// Returns nil for methods not handled by this service.
internal func handle(
method name: Substring,
context: CallHandlerContext
) -> GRPCServerHandlerProtocol? {
switch name {
case "ReverseArtifactRetrievalService":
return BidirectionalStreamingServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper>(),
interceptors: self.interceptors?.makeReverseArtifactRetrievalServiceInterceptors() ?? [],
observerFactory: self.reverseArtifactRetrievalService(context:)
)
default:
return nil
}
}
}
/// A service that allows the client to act as an ArtifactRetrievalService,
/// for a particular job with the server initiating requests and receiving
/// responses.
///
/// A client calls the service with an ArtifactResponseWrapper that has the
/// staging token set, and thereafter responds to the server's requests.
///
/// To implement a server, implement an object which conforms to this protocol.
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceAsyncProvider: CallHandlerProvider, Sendable {
static var serviceDescriptor: GRPCServiceDescriptor { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceServerInterceptorFactoryProtocol? { get }
func reverseArtifactRetrievalService(
requestStream: GRPCAsyncRequestStream<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper>,
responseStream: GRPCAsyncResponseStreamWriter<Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper>,
context: GRPCAsyncServerCallContext
) async throws
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceAsyncProvider {
internal static var serviceDescriptor: GRPCServiceDescriptor {
return Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceServerMetadata.serviceDescriptor
}
internal var serviceName: Substring {
return Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceServerMetadata.serviceDescriptor.fullName[...]
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceServerInterceptorFactoryProtocol? {
return nil
}
internal func handle(
method name: Substring,
context: CallHandlerContext
) -> GRPCServerHandlerProtocol? {
switch name {
case "ReverseArtifactRetrievalService":
return GRPCAsyncServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper>(),
interceptors: self.interceptors?.makeReverseArtifactRetrievalServiceInterceptors() ?? [],
wrapping: { try await self.reverseArtifactRetrievalService(requestStream: $0, responseStream: $1, context: $2) }
)
default:
return nil
}
}
}
internal protocol Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceServerInterceptorFactoryProtocol: Sendable {
/// - Returns: Interceptors to use when handling 'reverseArtifactRetrievalService'.
/// Defaults to calling `self.makeInterceptors()`.
func makeReverseArtifactRetrievalServiceInterceptors() -> [ServerInterceptor<Org_Apache_Beam_Model_JobManagement_V1_ArtifactResponseWrapper, Org_Apache_Beam_Model_JobManagement_V1_ArtifactRequestWrapper>]
}
internal enum Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceServerMetadata {
internal static let serviceDescriptor = GRPCServiceDescriptor(
name: "ArtifactStagingService",
fullName: "org.apache.beam.model.job_management.v1.ArtifactStagingService",
methods: [
Org_Apache_Beam_Model_JobManagement_V1_ArtifactStagingServiceServerMetadata.Methods.reverseArtifactRetrievalService,
]
)
internal enum Methods {
internal static let reverseArtifactRetrievalService = GRPCMethodDescriptor(
name: "ReverseArtifactRetrievalService",
path: "/org.apache.beam.model.job_management.v1.ArtifactStagingService/ReverseArtifactRetrievalService",
type: GRPCCallType.bidirectionalStreaming
)
}
}
/// A service to stage artifacts for use in a Job.
///
/// To build a server, implement a class that conforms to this protocol.
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceProvider: CallHandlerProvider {
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerInterceptorFactoryProtocol? { get }
/// Stage an artifact to be available during job execution. The first request must contain the
/// name of the artifact. All future requests must contain sequential chunks of the content of
/// the artifact.
func putArtifact(context: UnaryResponseCallContext<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse>) -> EventLoopFuture<(StreamEvent<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest>) -> Void>
/// Commit the manifest for a Job. All artifacts must have been successfully uploaded
/// before this call is made.
///
/// Throws error INVALID_ARGUMENT if not all of the members of the manifest are present
func commitManifest(request: Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse>
}
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceProvider {
internal var serviceName: Substring {
return Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerMetadata.serviceDescriptor.fullName[...]
}
/// Determines, calls and returns the appropriate request handler, depending on the request's method.
/// Returns nil for methods not handled by this service.
internal func handle(
method name: Substring,
context: CallHandlerContext
) -> GRPCServerHandlerProtocol? {
switch name {
case "PutArtifact":
return ClientStreamingServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse>(),
interceptors: self.interceptors?.makePutArtifactInterceptors() ?? [],
observerFactory: self.putArtifact(context:)
)
case "CommitManifest":
return UnaryServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse>(),
interceptors: self.interceptors?.makeCommitManifestInterceptors() ?? [],
userFunction: self.commitManifest(request:context:)
)
default:
return nil
}
}
}
/// A service to stage artifacts for use in a Job.
///
/// To implement a server, implement an object which conforms to this protocol.
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceAsyncProvider: CallHandlerProvider, Sendable {
static var serviceDescriptor: GRPCServiceDescriptor { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerInterceptorFactoryProtocol? { get }
/// Stage an artifact to be available during job execution. The first request must contain the
/// name of the artifact. All future requests must contain sequential chunks of the content of
/// the artifact.
func putArtifact(
requestStream: GRPCAsyncRequestStream<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest>,
context: GRPCAsyncServerCallContext
) async throws -> Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse
/// Commit the manifest for a Job. All artifacts must have been successfully uploaded
/// before this call is made.
///
/// Throws error INVALID_ARGUMENT if not all of the members of the manifest are present
func commitManifest(
request: Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest,
context: GRPCAsyncServerCallContext
) async throws -> Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceAsyncProvider {
internal static var serviceDescriptor: GRPCServiceDescriptor {
return Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerMetadata.serviceDescriptor
}
internal var serviceName: Substring {
return Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerMetadata.serviceDescriptor.fullName[...]
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerInterceptorFactoryProtocol? {
return nil
}
internal func handle(
method name: Substring,
context: CallHandlerContext
) -> GRPCServerHandlerProtocol? {
switch name {
case "PutArtifact":
return GRPCAsyncServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse>(),
interceptors: self.interceptors?.makePutArtifactInterceptors() ?? [],
wrapping: { try await self.putArtifact(requestStream: $0, context: $1) }
)
case "CommitManifest":
return GRPCAsyncServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse>(),
interceptors: self.interceptors?.makeCommitManifestInterceptors() ?? [],
wrapping: { try await self.commitManifest(request: $0, context: $1) }
)
default:
return nil
}
}
}
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerInterceptorFactoryProtocol: Sendable {
/// - Returns: Interceptors to use when handling 'putArtifact'.
/// Defaults to calling `self.makeInterceptors()`.
func makePutArtifactInterceptors() -> [ServerInterceptor<Org_Apache_Beam_Model_JobManagement_V1_PutArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_PutArtifactResponse>]
/// - Returns: Interceptors to use when handling 'commitManifest'.
/// Defaults to calling `self.makeInterceptors()`.
func makeCommitManifestInterceptors() -> [ServerInterceptor<Org_Apache_Beam_Model_JobManagement_V1_CommitManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_CommitManifestResponse>]
}
internal enum Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerMetadata {
internal static let serviceDescriptor = GRPCServiceDescriptor(
name: "LegacyArtifactStagingService",
fullName: "org.apache.beam.model.job_management.v1.LegacyArtifactStagingService",
methods: [
Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerMetadata.Methods.putArtifact,
Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactStagingServiceServerMetadata.Methods.commitManifest,
]
)
internal enum Methods {
internal static let putArtifact = GRPCMethodDescriptor(
name: "PutArtifact",
path: "/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/PutArtifact",
type: GRPCCallType.clientStreaming
)
internal static let commitManifest = GRPCMethodDescriptor(
name: "CommitManifest",
path: "/org.apache.beam.model.job_management.v1.LegacyArtifactStagingService/CommitManifest",
type: GRPCCallType.unary
)
}
}
/// A service to retrieve artifacts for use in a Job.
///
/// To build a server, implement a class that conforms to this protocol.
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceProvider: CallHandlerProvider {
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerInterceptorFactoryProtocol? { get }
/// Get the manifest for the job
func getManifest(request: Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse>
/// Get an artifact staged for the job. The requested artifact must be within the manifest
func getArtifact(request: Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest, context: StreamingResponseCallContext<Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk>) -> EventLoopFuture<GRPCStatus>
}
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceProvider {
internal var serviceName: Substring {
return Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerMetadata.serviceDescriptor.fullName[...]
}
/// Determines, calls and returns the appropriate request handler, depending on the request's method.
/// Returns nil for methods not handled by this service.
internal func handle(
method name: Substring,
context: CallHandlerContext
) -> GRPCServerHandlerProtocol? {
switch name {
case "GetManifest":
return UnaryServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse>(),
interceptors: self.interceptors?.makeGetManifestInterceptors() ?? [],
userFunction: self.getManifest(request:context:)
)
case "GetArtifact":
return ServerStreamingServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk>(),
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? [],
userFunction: self.getArtifact(request:context:)
)
default:
return nil
}
}
}
/// A service to retrieve artifacts for use in a Job.
///
/// To implement a server, implement an object which conforms to this protocol.
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceAsyncProvider: CallHandlerProvider, Sendable {
static var serviceDescriptor: GRPCServiceDescriptor { get }
var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerInterceptorFactoryProtocol? { get }
/// Get the manifest for the job
func getManifest(
request: Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest,
context: GRPCAsyncServerCallContext
) async throws -> Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse
/// Get an artifact staged for the job. The requested artifact must be within the manifest
func getArtifact(
request: Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest,
responseStream: GRPCAsyncResponseStreamWriter<Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk>,
context: GRPCAsyncServerCallContext
) async throws
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceAsyncProvider {
internal static var serviceDescriptor: GRPCServiceDescriptor {
return Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerMetadata.serviceDescriptor
}
internal var serviceName: Substring {
return Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerMetadata.serviceDescriptor.fullName[...]
}
internal var interceptors: Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerInterceptorFactoryProtocol? {
return nil
}
internal func handle(
method name: Substring,
context: CallHandlerContext
) -> GRPCServerHandlerProtocol? {
switch name {
case "GetManifest":
return GRPCAsyncServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse>(),
interceptors: self.interceptors?.makeGetManifestInterceptors() ?? [],
wrapping: { try await self.getManifest(request: $0, context: $1) }
)
case "GetArtifact":
return GRPCAsyncServerHandler(
context: context,
requestDeserializer: ProtobufDeserializer<Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest>(),
responseSerializer: ProtobufSerializer<Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk>(),
interceptors: self.interceptors?.makeGetArtifactInterceptors() ?? [],
wrapping: { try await self.getArtifact(request: $0, responseStream: $1, context: $2) }
)
default:
return nil
}
}
}
internal protocol Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerInterceptorFactoryProtocol: Sendable {
/// - Returns: Interceptors to use when handling 'getManifest'.
/// Defaults to calling `self.makeInterceptors()`.
func makeGetManifestInterceptors() -> [ServerInterceptor<Org_Apache_Beam_Model_JobManagement_V1_GetManifestRequest, Org_Apache_Beam_Model_JobManagement_V1_GetManifestResponse>]
/// - Returns: Interceptors to use when handling 'getArtifact'.
/// Defaults to calling `self.makeInterceptors()`.
func makeGetArtifactInterceptors() -> [ServerInterceptor<Org_Apache_Beam_Model_JobManagement_V1_LegacyGetArtifactRequest, Org_Apache_Beam_Model_JobManagement_V1_ArtifactChunk>]
}
internal enum Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerMetadata {
internal static let serviceDescriptor = GRPCServiceDescriptor(
name: "LegacyArtifactRetrievalService",
fullName: "org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService",
methods: [
Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerMetadata.Methods.getManifest,
Org_Apache_Beam_Model_JobManagement_V1_LegacyArtifactRetrievalServiceServerMetadata.Methods.getArtifact,
]
)
internal enum Methods {
internal static let getManifest = GRPCMethodDescriptor(
name: "GetManifest",
path: "/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetManifest",
type: GRPCCallType.unary
)
internal static let getArtifact = GRPCMethodDescriptor(
name: "GetArtifact",
path: "/org.apache.beam.model.job_management.v1.LegacyArtifactRetrievalService/GetArtifact",
type: GRPCCallType.serverStreaming
)
}
}