diff --git a/Package.resolved b/Package.resolved index 58c65149..015b316b 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "ac3ef791bf32cf99904bb681e6465fd729983add7f517f1c9342249121799bef", + "originHash" : "eae1101f58cf68e006ea75bf8424aff7680f8ffa798e2552be4a87c27957c802", "pins" : [ { "identity" : "async-http-client", @@ -19,6 +19,33 @@ "version" : "1.26.1" } }, + { + "identity" : "grpc-swift-2", + "kind" : "remoteSourceControl", + "location" : "https://github.com/grpc/grpc-swift-2.git", + "state" : { + "revision" : "0e52abf7ea0fca7ffe876953aa41feff84cc6e29", + "version" : "2.1.0" + } + }, + { + "identity" : "grpc-swift-nio-transport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/grpc/grpc-swift-nio-transport.git", + "state" : { + "revision" : "0393731de32c472e3bcdb7f339ecf55cc607a6b4", + "version" : "2.2.0" + } + }, + { + "identity" : "grpc-swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/grpc/grpc-swift-protobuf.git", + "state" : { + "revision" : "df605cde2957657a078eb754ed24f3a0e05d3f54", + "version" : "2.0.0" + } + }, { "identity" : "swift-algorithms", "kind" : "remoteSourceControl", @@ -69,8 +96,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-certificates.git", "state" : { - "revision" : "999fd70c7803da89f3904d635a6815a2a7cd7585", - "version" : "1.10.0" + "revision" : "f4cd9e78a1ec209b27e426a5f5c693675f95e75a", + "version" : "1.15.0" } }, { @@ -141,8 +168,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio.git", "state" : { - "revision" : "34d486b01cd891297ac615e40d5999536a1e138d", - "version" : "2.83.0" + "revision" : "4e8f4b1c9adaa59315c523540c1ff2b38adc20a9", + "version" : "2.87.0" } }, { @@ -159,8 +186,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-http2.git", "state" : { - "revision" : "4281466512f63d1bd530e33f4aa6993ee7864be0", - "version" : "1.36.0" + "revision" : "5e9e99ec96c53bc2c18ddd10c1e25a3cd97c55e5", + "version" : "1.38.0" } }, { @@ -168,8 +195,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-ssl.git", "state" : { - "revision" : "4b38f35946d00d8f6176fe58f96d83aba64b36c7", - "version" : "2.31.0" + "revision" : "d3bad3847c53015fe8ec1e6c3ab54e53a5b6f15f", + "version" : "2.35.0" } }, { @@ -195,8 +222,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "102a647b573f60f73afdce5613a51d71349fe507", - "version" : "1.30.0" + "revision" : "c6fe6442e6a64250495669325044052e113e990c", + "version" : "1.32.0" } }, { diff --git a/Package.swift b/Package.swift index 4d070ff0..d8af735c 100644 --- a/Package.swift +++ b/Package.swift @@ -40,8 +40,11 @@ let package = Package( .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.3.0"), .package(url: "https://github.com/apple/swift-collections.git", from: "1.1.4"), .package(url: "https://github.com/apple/swift-crypto.git", from: "3.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-2.git", from: "2.1.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "2.2.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "2.0.0"), .package(url: "https://github.com/grpc/grpc-swift.git", from: "1.26.0"), - .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.29.0"), + .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.32.0"), .package(url: "https://github.com/apple/swift-nio.git", from: "2.80.0"), .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.20.1"), .package(url: "https://github.com/apple/swift-system.git", from: "1.4.0"), @@ -55,8 +58,10 @@ let package = Package( name: "Containerization", dependencies: [ .product(name: "Logging", package: "swift-log"), - .product(name: "GRPC", package: "grpc-swift"), .product(name: "SystemPackage", package: "swift-system"), + .product(name: "GRPCCore", package: "grpc-swift-2"), + .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), + .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), .product(name: "_NIOFileSystem", package: "swift-nio"), "ContainerizationOCI", "ContainerizationOS", diff --git a/Protobuf.Makefile b/Protobuf.Makefile index 3af1aaf2..1c49f3c1 100644 --- a/Protobuf.Makefile +++ b/Protobuf.Makefile @@ -33,13 +33,13 @@ $(PROTOC): .PHONY: protoc-gen-swift protoc-gen-swift: @$(SWIFT) build --product protoc-gen-swift - @$(SWIFT) build --product protoc-gen-grpc-swift + @$(SWIFT) build --product protoc-gen-grpc-swift-2 .PHONY: protos protos: $(PROTOC) protoc-gen-swift @echo Generating protocol buffers source code... @$(PROTOC) Sources/Containerization/SandboxContext/SandboxContext.proto \ - --plugin=protoc-gen-grpc-swift=$(BUILD_BIN_DIR)/protoc-gen-grpc-swift \ + --plugin=protoc-gen-grpc-swift=$(BUILD_BIN_DIR)/protoc-gen-grpc-swift-2 \ --plugin=protoc-gen-swift=$(BUILD_BIN_DIR)/protoc-gen-swift \ --proto_path=Sources/Containerization/SandboxContext \ --grpc-swift_out="Sources/Containerization/SandboxContext" \ diff --git a/Sources/Containerization/SandboxContext/SandboxContext.grpc.swift b/Sources/Containerization/SandboxContext/SandboxContext.grpc.swift index ed59bfe2..e17975eb 100644 --- a/Sources/Containerization/SandboxContext/SandboxContext.grpc.swift +++ b/Sources/Containerization/SandboxContext/SandboxContext.grpc.swift @@ -14,2914 +14,6115 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// // DO NOT EDIT. // swift-format-ignore-file +// swiftlint:disable all // -// Generated by the protocol buffer compiler. +// Generated by the gRPC Swift generator plugin for the protocol buffer compiler. // Source: SandboxContext.proto // -import GRPC -import NIO -import NIOConcurrencyHelpers -import SwiftProtobuf +// For information on using the generated types, please see the documentation: +// https://github.com/grpc/grpc-swift +import GRPCCore +import GRPCProtobuf +import SwiftProtobuf -/// Context for interacting with a container's runtime environment. -/// -/// Usage: instantiate `Com_Apple_Containerization_Sandbox_V3_SandboxContextClient`, then call methods of this protocol to make API calls. -public protocol Com_Apple_Containerization_Sandbox_V3_SandboxContextClientProtocol: GRPCClient { - var serviceName: String { get } - var interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? { get } - - func mount( - _ request: Com_Apple_Containerization_Sandbox_V3_MountRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func umount( - _ request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func setenv( - _ request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func getenv( - _ request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func mkdir( - _ request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func sysctl( - _ request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func setTime( - _ request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func setupEmulator( - _ request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func writeFile( - _ request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func createProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func deleteProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func startProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func killProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func waitProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func resizeProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func closeProcessStdin( - _ request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func containerStatistics( - _ request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func proxyVsock( - _ request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func stopVsockProxy( - _ request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func ipLinkSet( - _ request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func ipAddrAdd( - _ request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func ipRouteAddLink( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func ipRouteAddDefault( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func configureDns( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func configureHosts( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func sync( - _ request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func kill( - _ request: Com_Apple_Containerization_Sandbox_V3_KillRequest, - callOptions: CallOptions? - ) -> UnaryCall +// MARK: - com.apple.containerization.sandbox.v3.SandboxContext + +/// Namespace containing generated types for the "com.apple.containerization.sandbox.v3.SandboxContext" service. +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +public enum Com_Apple_Containerization_Sandbox_V3_SandboxContext { + /// Service descriptor for the "com.apple.containerization.sandbox.v3.SandboxContext" service. + public static let descriptor = GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext") + /// Namespace for method metadata. + public enum Method { + /// Namespace for "Mount" metadata. + public enum Mount { + /// Request type for "Mount". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_MountRequest + /// Response type for "Mount". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_MountResponse + /// Descriptor for "Mount". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "Mount" + ) + } + /// Namespace for "Umount" metadata. + public enum Umount { + /// Request type for "Umount". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_UmountRequest + /// Response type for "Umount". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_UmountResponse + /// Descriptor for "Umount". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "Umount" + ) + } + /// Namespace for "Setenv" metadata. + public enum Setenv { + /// Request type for "Setenv". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_SetenvRequest + /// Response type for "Setenv". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_SetenvResponse + /// Descriptor for "Setenv". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "Setenv" + ) + } + /// Namespace for "Getenv" metadata. + public enum Getenv { + /// Request type for "Getenv". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_GetenvRequest + /// Response type for "Getenv". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_GetenvResponse + /// Descriptor for "Getenv". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "Getenv" + ) + } + /// Namespace for "Mkdir" metadata. + public enum Mkdir { + /// Request type for "Mkdir". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_MkdirRequest + /// Response type for "Mkdir". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_MkdirResponse + /// Descriptor for "Mkdir". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "Mkdir" + ) + } + /// Namespace for "Sysctl" metadata. + public enum Sysctl { + /// Request type for "Sysctl". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_SysctlRequest + /// Response type for "Sysctl". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_SysctlResponse + /// Descriptor for "Sysctl". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "Sysctl" + ) + } + /// Namespace for "SetTime" metadata. + public enum SetTime { + /// Request type for "SetTime". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_SetTimeRequest + /// Response type for "SetTime". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_SetTimeResponse + /// Descriptor for "SetTime". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "SetTime" + ) + } + /// Namespace for "SetupEmulator" metadata. + public enum SetupEmulator { + /// Request type for "SetupEmulator". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest + /// Response type for "SetupEmulator". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse + /// Descriptor for "SetupEmulator". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "SetupEmulator" + ) + } + /// Namespace for "WriteFile" metadata. + public enum WriteFile { + /// Request type for "WriteFile". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_WriteFileRequest + /// Response type for "WriteFile". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_WriteFileResponse + /// Descriptor for "WriteFile". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "WriteFile" + ) + } + /// Namespace for "CreateProcess" metadata. + public enum CreateProcess { + /// Request type for "CreateProcess". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest + /// Response type for "CreateProcess". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse + /// Descriptor for "CreateProcess". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "CreateProcess" + ) + } + /// Namespace for "DeleteProcess" metadata. + public enum DeleteProcess { + /// Request type for "DeleteProcess". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest + /// Response type for "DeleteProcess". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse + /// Descriptor for "DeleteProcess". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "DeleteProcess" + ) + } + /// Namespace for "StartProcess" metadata. + public enum StartProcess { + /// Request type for "StartProcess". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_StartProcessRequest + /// Response type for "StartProcess". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_StartProcessResponse + /// Descriptor for "StartProcess". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "StartProcess" + ) + } + /// Namespace for "KillProcess" metadata. + public enum KillProcess { + /// Request type for "KillProcess". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_KillProcessRequest + /// Response type for "KillProcess". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_KillProcessResponse + /// Descriptor for "KillProcess". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "KillProcess" + ) + } + /// Namespace for "WaitProcess" metadata. + public enum WaitProcess { + /// Request type for "WaitProcess". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest + /// Response type for "WaitProcess". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse + /// Descriptor for "WaitProcess". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "WaitProcess" + ) + } + /// Namespace for "ResizeProcess" metadata. + public enum ResizeProcess { + /// Request type for "ResizeProcess". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest + /// Response type for "ResizeProcess". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse + /// Descriptor for "ResizeProcess". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "ResizeProcess" + ) + } + /// Namespace for "CloseProcessStdin" metadata. + public enum CloseProcessStdin { + /// Request type for "CloseProcessStdin". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest + /// Response type for "CloseProcessStdin". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse + /// Descriptor for "CloseProcessStdin". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "CloseProcessStdin" + ) + } + /// Namespace for "ContainerStatistics" metadata. + public enum ContainerStatistics { + /// Request type for "ContainerStatistics". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest + /// Response type for "ContainerStatistics". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse + /// Descriptor for "ContainerStatistics". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "ContainerStatistics" + ) + } + /// Namespace for "ProxyVsock" metadata. + public enum ProxyVsock { + /// Request type for "ProxyVsock". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest + /// Response type for "ProxyVsock". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse + /// Descriptor for "ProxyVsock". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "ProxyVsock" + ) + } + /// Namespace for "StopVsockProxy" metadata. + public enum StopVsockProxy { + /// Request type for "StopVsockProxy". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest + /// Response type for "StopVsockProxy". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse + /// Descriptor for "StopVsockProxy". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "StopVsockProxy" + ) + } + /// Namespace for "IpLinkSet" metadata. + public enum IpLinkSet { + /// Request type for "IpLinkSet". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest + /// Response type for "IpLinkSet". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse + /// Descriptor for "IpLinkSet". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "IpLinkSet" + ) + } + /// Namespace for "IpAddrAdd" metadata. + public enum IpAddrAdd { + /// Request type for "IpAddrAdd". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest + /// Response type for "IpAddrAdd". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse + /// Descriptor for "IpAddrAdd". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "IpAddrAdd" + ) + } + /// Namespace for "IpRouteAddLink" metadata. + public enum IpRouteAddLink { + /// Request type for "IpRouteAddLink". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest + /// Response type for "IpRouteAddLink". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse + /// Descriptor for "IpRouteAddLink". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "IpRouteAddLink" + ) + } + /// Namespace for "IpRouteAddDefault" metadata. + public enum IpRouteAddDefault { + /// Request type for "IpRouteAddDefault". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest + /// Response type for "IpRouteAddDefault". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse + /// Descriptor for "IpRouteAddDefault". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "IpRouteAddDefault" + ) + } + /// Namespace for "ConfigureDns" metadata. + public enum ConfigureDns { + /// Request type for "ConfigureDns". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest + /// Response type for "ConfigureDns". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse + /// Descriptor for "ConfigureDns". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "ConfigureDns" + ) + } + /// Namespace for "ConfigureHosts" metadata. + public enum ConfigureHosts { + /// Request type for "ConfigureHosts". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest + /// Response type for "ConfigureHosts". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse + /// Descriptor for "ConfigureHosts". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "ConfigureHosts" + ) + } + /// Namespace for "Sync" metadata. + public enum Sync { + /// Request type for "Sync". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_SyncRequest + /// Response type for "Sync". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_SyncResponse + /// Descriptor for "Sync". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "Sync" + ) + } + /// Namespace for "Kill" metadata. + public enum Kill { + /// Request type for "Kill". + public typealias Input = Com_Apple_Containerization_Sandbox_V3_KillRequest + /// Response type for "Kill". + public typealias Output = Com_Apple_Containerization_Sandbox_V3_KillResponse + /// Descriptor for "Kill". + public static let descriptor = GRPCCore.MethodDescriptor( + service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), + method: "Kill" + ) + } + /// Descriptors for all methods in the "com.apple.containerization.sandbox.v3.SandboxContext" service. + public static let descriptors: [GRPCCore.MethodDescriptor] = [ + Mount.descriptor, + Umount.descriptor, + Setenv.descriptor, + Getenv.descriptor, + Mkdir.descriptor, + Sysctl.descriptor, + SetTime.descriptor, + SetupEmulator.descriptor, + WriteFile.descriptor, + CreateProcess.descriptor, + DeleteProcess.descriptor, + StartProcess.descriptor, + KillProcess.descriptor, + WaitProcess.descriptor, + ResizeProcess.descriptor, + CloseProcessStdin.descriptor, + ContainerStatistics.descriptor, + ProxyVsock.descriptor, + StopVsockProxy.descriptor, + IpLinkSet.descriptor, + IpAddrAdd.descriptor, + IpRouteAddLink.descriptor, + IpRouteAddDefault.descriptor, + ConfigureDns.descriptor, + ConfigureHosts.descriptor, + Sync.descriptor, + Kill.descriptor + ] + } } -extension Com_Apple_Containerization_Sandbox_V3_SandboxContextClientProtocol { - public var serviceName: String { - return "com.apple.containerization.sandbox.v3.SandboxContext" - } - - /// Mount a filesystem. - /// - /// - Parameters: - /// - request: Request to send to Mount. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func mount( - _ request: Com_Apple_Containerization_Sandbox_V3_MountRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.mount.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeMountInterceptors() ?? [] - ) - } - - /// Unmount a filesystem. - /// - /// - Parameters: - /// - request: Request to send to Umount. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func umount( - _ request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.umount.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeUmountInterceptors() ?? [] - ) - } - - /// Set an environment variable on the init process. - /// - /// - Parameters: - /// - request: Request to send to Setenv. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func setenv( - _ request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setenv.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSetenvInterceptors() ?? [] - ) - } - - /// Get an environment variable from the init process. - /// - /// - Parameters: - /// - request: Request to send to Getenv. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func getenv( - _ request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.getenv.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeGetenvInterceptors() ?? [] - ) - } - - /// Create a new directory inside the sandbox. - /// - /// - Parameters: - /// - request: Request to send to Mkdir. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func mkdir( - _ request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.mkdir.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeMkdirInterceptors() ?? [] - ) - } - - /// Set sysctls in the context of the sandbox. - /// - /// - Parameters: - /// - request: Request to send to Sysctl. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func sysctl( - _ request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.sysctl.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSysctlInterceptors() ?? [] - ) - } - - /// Set time in the guest. - /// - /// - Parameters: - /// - request: Request to send to SetTime. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func setTime( - _ request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setTime.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSetTimeInterceptors() ?? [] - ) - } - - /// Set up an emulator in the guest for a specific binary format. - /// - /// - Parameters: - /// - request: Request to send to SetupEmulator. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func setupEmulator( - _ request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setupEmulator.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSetupEmulatorInterceptors() ?? [] - ) - } - - /// Write data to an existing or new file. - /// - /// - Parameters: - /// - request: Request to send to WriteFile. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func writeFile( - _ request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.writeFile.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeWriteFileInterceptors() ?? [] - ) - } - - /// Create a new process inside the container. - /// - /// - Parameters: - /// - request: Request to send to CreateProcess. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func createProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.createProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeCreateProcessInterceptors() ?? [] - ) - } - - /// Delete an existing process inside the container. - /// - /// - Parameters: - /// - request: Request to send to DeleteProcess. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func deleteProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.deleteProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeDeleteProcessInterceptors() ?? [] - ) - } - - /// Start the provided process. - /// - /// - Parameters: - /// - request: Request to send to StartProcess. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func startProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.startProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeStartProcessInterceptors() ?? [] - ) - } - - /// Send a signal to the provided process. - /// - /// - Parameters: - /// - request: Request to send to KillProcess. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func killProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.killProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeKillProcessInterceptors() ?? [] - ) - } - - /// Wait for a process to exit and return the exit code. - /// - /// - Parameters: - /// - request: Request to send to WaitProcess. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func waitProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.waitProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeWaitProcessInterceptors() ?? [] - ) - } - - /// Resize the tty of a given process. This will error if the process does - /// not have a pty allocated. - /// - /// - Parameters: - /// - request: Request to send to ResizeProcess. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func resizeProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.resizeProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeResizeProcessInterceptors() ?? [] - ) - } - - /// Close IO for a given process. - /// - /// - Parameters: - /// - request: Request to send to CloseProcessStdin. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func closeProcessStdin( - _ request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.closeProcessStdin.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeCloseProcessStdinInterceptors() ?? [] - ) - } - - /// Get statistics for containers. - /// - /// - Parameters: - /// - request: Request to send to ContainerStatistics. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func containerStatistics( - _ request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.containerStatistics.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeContainerStatisticsInterceptors() ?? [] - ) - } - - /// Proxy a vsock port to a unix domain socket in the guest, or vice versa. - /// - /// - Parameters: - /// - request: Request to send to ProxyVsock. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func proxyVsock( - _ request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.proxyVsock.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeProxyVsockInterceptors() ?? [] - ) - } - - /// Stop a vsock proxy to a unix domain socket. - /// - /// - Parameters: - /// - request: Request to send to StopVsockProxy. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func stopVsockProxy( - _ request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.stopVsockProxy.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeStopVsockProxyInterceptors() ?? [] - ) - } - - /// Set the link state of a network interface. - /// - /// - Parameters: - /// - request: Request to send to IpLinkSet. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func ipLinkSet( - _ request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipLinkSet.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpLinkSetInterceptors() ?? [] - ) - } - - /// Add an IPv4 address to a network interface. - /// - /// - Parameters: - /// - request: Request to send to IpAddrAdd. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func ipAddrAdd( - _ request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipAddrAdd.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpAddrAddInterceptors() ?? [] - ) - } - - /// Add an IP route for a network interface. - /// - /// - Parameters: - /// - request: Request to send to IpRouteAddLink. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func ipRouteAddLink( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipRouteAddLink.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpRouteAddLinkInterceptors() ?? [] - ) - } - - /// Add an IP route for a network interface. - /// - /// - Parameters: - /// - request: Request to send to IpRouteAddDefault. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func ipRouteAddDefault( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipRouteAddDefault.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpRouteAddDefaultInterceptors() ?? [] - ) - } - - /// Configure DNS resolver. - /// - /// - Parameters: - /// - request: Request to send to ConfigureDns. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func configureDns( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.configureDns.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeConfigureDnsInterceptors() ?? [] - ) - } - - /// Configure /etc/hosts. - /// - /// - Parameters: - /// - request: Request to send to ConfigureHosts. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func configureHosts( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.configureHosts.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeConfigureHostsInterceptors() ?? [] - ) - } - - /// Perform the sync syscall. - /// - /// - Parameters: - /// - request: Request to send to Sync. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func sync( - _ request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.sync.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSyncInterceptors() ?? [] - ) - } - - /// Send a signal to a process via the PID. - /// - /// - Parameters: - /// - request: Request to send to Kill. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - public func kill( - _ request: Com_Apple_Containerization_Sandbox_V3_KillRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.kill.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeKillInterceptors() ?? [] - ) - } +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension GRPCCore.ServiceDescriptor { + /// Service descriptor for the "com.apple.containerization.sandbox.v3.SandboxContext" service. + public static let com_apple_containerization_sandbox_v3_SandboxContext = GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext") } -@available(*, deprecated) -extension Com_Apple_Containerization_Sandbox_V3_SandboxContextClient: @unchecked Sendable {} - -@available(*, deprecated, renamed: "Com_Apple_Containerization_Sandbox_V3_SandboxContextNIOClient") -public final class Com_Apple_Containerization_Sandbox_V3_SandboxContextClient: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientProtocol { - private let lock = Lock() - private var _defaultCallOptions: CallOptions - private var _interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? - public let channel: GRPCChannel - public var defaultCallOptions: CallOptions { - get { self.lock.withLock { return self._defaultCallOptions } } - set { self.lock.withLockVoid { self._defaultCallOptions = newValue } } - } - public var interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? { - get { self.lock.withLock { return self._interceptors } } - set { self.lock.withLockVoid { self._interceptors = newValue } } - } - - /// Creates a client for the com.apple.containerization.sandbox.v3.SandboxContext 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. - public init( - channel: GRPCChannel, - defaultCallOptions: CallOptions = CallOptions(), - interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? = nil - ) { - self.channel = channel - self._defaultCallOptions = defaultCallOptions - self._interceptors = interceptors - } -} +// MARK: com.apple.containerization.sandbox.v3.SandboxContext (server) + +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Com_Apple_Containerization_Sandbox_V3_SandboxContext { + /// Streaming variant of the service protocol for the "com.apple.containerization.sandbox.v3.SandboxContext" service. + /// + /// This protocol is the lowest-level of the service protocols generated for this service + /// giving you the most flexibility over the implementation of your service. This comes at + /// the cost of more verbose and less strict APIs. Each RPC requires you to implement it in + /// terms of a request stream and response stream. Where only a single request or response + /// message is expected, you are responsible for enforcing this invariant is maintained. + /// + /// Where possible, prefer using the stricter, less-verbose ``ServiceProtocol`` + /// or ``SimpleServiceProtocol`` instead. + /// + /// > Source IDL Documentation: + /// > + /// > Context for interacting with a container's runtime environment. + public protocol StreamingServiceProtocol: GRPCCore.RegistrableRPCService { + /// Handle the "Mount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Mount a filesystem. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_MountRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_MountResponse` messages. + func mount( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "Umount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Unmount a filesystem. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_UmountRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_UmountResponse` messages. + func umount( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "Setenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set an environment variable on the init process. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_SetenvRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_SetenvResponse` messages. + func setenv( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "Getenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get an environment variable from the init process. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_GetenvRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_GetenvResponse` messages. + func getenv( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "Mkdir" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new directory inside the sandbox. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_MkdirRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_MkdirResponse` messages. + func mkdir( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "Sysctl" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set sysctls in the context of the sandbox. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_SysctlRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_SysctlResponse` messages. + func sysctl( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "SetTime" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set time in the guest. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_SetTimeRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_SetTimeResponse` messages. + func setTime( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "SetupEmulator" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set up an emulator in the guest for a specific binary format. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse` messages. + func setupEmulator( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "WriteFile" method. + /// + /// > Source IDL Documentation: + /// > + /// > Write data to an existing or new file. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_WriteFileRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_WriteFileResponse` messages. + func writeFile( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "CreateProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new process inside the container. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse` messages. + func createProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "DeleteProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Delete an existing process inside the container. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse` messages. + func deleteProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "StartProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Start the provided process. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_StartProcessRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_StartProcessResponse` messages. + func startProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "KillProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to the provided process. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_KillProcessRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_KillProcessResponse` messages. + func killProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "WaitProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Wait for a process to exit and return the exit code. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse` messages. + func waitProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "ResizeProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Resize the tty of a given process. This will error if the process does + /// > not have a pty allocated. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse` messages. + func resizeProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "CloseProcessStdin" method. + /// + /// > Source IDL Documentation: + /// > + /// > Close IO for a given process. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse` messages. + func closeProcessStdin( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "ContainerStatistics" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get statistics for containers. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse` messages. + func containerStatistics( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "ProxyVsock" method. + /// + /// > Source IDL Documentation: + /// > + /// > Proxy a vsock port to a unix domain socket in the guest, or vice versa. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse` messages. + func proxyVsock( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "StopVsockProxy" method. + /// + /// > Source IDL Documentation: + /// > + /// > Stop a vsock proxy to a unix domain socket. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse` messages. + func stopVsockProxy( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "IpLinkSet" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set the link state of a network interface. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse` messages. + func ipLinkSet( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "IpAddrAdd" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IPv4 address to a network interface. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse` messages. + func ipAddrAdd( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "IpRouteAddLink" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse` messages. + func ipRouteAddLink( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "IpRouteAddDefault" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse` messages. + func ipRouteAddDefault( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "ConfigureDns" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure DNS resolver. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse` messages. + func configureDns( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "ConfigureHosts" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure /etc/hosts. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse` messages. + func configureHosts( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "Sync" method. + /// + /// > Source IDL Documentation: + /// > + /// > Perform the sync syscall. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_SyncRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_SyncResponse` messages. + func sync( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + + /// Handle the "Kill" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to a process via the PID. + /// + /// - Parameters: + /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_KillRequest` messages. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A streaming response of `Com_Apple_Containerization_Sandbox_V3_KillResponse` messages. + func kill( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse + } -public struct Com_Apple_Containerization_Sandbox_V3_SandboxContextNIOClient: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientProtocol { - public var channel: GRPCChannel - public var defaultCallOptions: CallOptions - public var interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? - - /// Creates a client for the com.apple.containerization.sandbox.v3.SandboxContext 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. - public init( - channel: GRPCChannel, - defaultCallOptions: CallOptions = CallOptions(), - interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? = nil - ) { - self.channel = channel - self.defaultCallOptions = defaultCallOptions - self.interceptors = interceptors - } -} + /// Service protocol for the "com.apple.containerization.sandbox.v3.SandboxContext" service. + /// + /// This protocol is higher level than ``StreamingServiceProtocol`` but lower level than + /// the ``SimpleServiceProtocol``, it provides access to request and response metadata and + /// trailing response metadata. If you don't need these then consider using + /// the ``SimpleServiceProtocol``. If you need fine grained control over your RPCs then + /// use ``StreamingServiceProtocol``. + /// + /// > Source IDL Documentation: + /// > + /// > Context for interacting with a container's runtime environment. + public protocol ServiceProtocol: Com_Apple_Containerization_Sandbox_V3_SandboxContext.StreamingServiceProtocol { + /// Handle the "Mount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Mount a filesystem. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_MountRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_MountResponse` message. + func mount( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "Umount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Unmount a filesystem. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_UmountRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_UmountResponse` message. + func umount( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "Setenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set an environment variable on the init process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetenvRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_SetenvResponse` message. + func setenv( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "Getenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get an environment variable from the init process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_GetenvRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_GetenvResponse` message. + func getenv( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "Mkdir" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new directory inside the sandbox. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_MkdirRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_MkdirResponse` message. + func mkdir( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "Sysctl" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set sysctls in the context of the sandbox. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SysctlRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_SysctlResponse` message. + func sysctl( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "SetTime" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set time in the guest. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetTimeRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_SetTimeResponse` message. + func setTime( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "SetupEmulator" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set up an emulator in the guest for a specific binary format. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse` message. + func setupEmulator( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "WriteFile" method. + /// + /// > Source IDL Documentation: + /// > + /// > Write data to an existing or new file. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_WriteFileRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_WriteFileResponse` message. + func writeFile( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "CreateProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new process inside the container. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse` message. + func createProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "DeleteProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Delete an existing process inside the container. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse` message. + func deleteProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "StartProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Start the provided process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_StartProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_StartProcessResponse` message. + func startProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "KillProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to the provided process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_KillProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_KillProcessResponse` message. + func killProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "WaitProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Wait for a process to exit and return the exit code. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse` message. + func waitProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "ResizeProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Resize the tty of a given process. This will error if the process does + /// > not have a pty allocated. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse` message. + func resizeProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "CloseProcessStdin" method. + /// + /// > Source IDL Documentation: + /// > + /// > Close IO for a given process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse` message. + func closeProcessStdin( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "ContainerStatistics" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get statistics for containers. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse` message. + func containerStatistics( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "ProxyVsock" method. + /// + /// > Source IDL Documentation: + /// > + /// > Proxy a vsock port to a unix domain socket in the guest, or vice versa. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse` message. + func proxyVsock( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "StopVsockProxy" method. + /// + /// > Source IDL Documentation: + /// > + /// > Stop a vsock proxy to a unix domain socket. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse` message. + func stopVsockProxy( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "IpLinkSet" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set the link state of a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse` message. + func ipLinkSet( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "IpAddrAdd" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IPv4 address to a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse` message. + func ipAddrAdd( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "IpRouteAddLink" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse` message. + func ipRouteAddLink( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "IpRouteAddDefault" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse` message. + func ipRouteAddDefault( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "ConfigureDns" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure DNS resolver. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse` message. + func configureDns( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "ConfigureHosts" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure /etc/hosts. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse` message. + func configureHosts( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "Sync" method. + /// + /// > Source IDL Documentation: + /// > + /// > Perform the sync syscall. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SyncRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_SyncResponse` message. + func sync( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + + /// Handle the "Kill" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to a process via the PID. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_KillRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A response containing a single `Com_Apple_Containerization_Sandbox_V3_KillResponse` message. + func kill( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse + } -/// Context for interacting with a container's runtime environment. -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) -public protocol Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncClientProtocol: GRPCClient { - static var serviceDescriptor: GRPCServiceDescriptor { get } - var interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? { get } - - func makeMountCall( - _ request: Com_Apple_Containerization_Sandbox_V3_MountRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeUmountCall( - _ request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeSetenvCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeGetenvCall( - _ request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeMkdirCall( - _ request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeSysctlCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeSetTimeCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeSetupEmulatorCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeWriteFileCall( - _ request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeCreateProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeDeleteProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeStartProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeKillProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeWaitProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeResizeProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeCloseProcessStdinCall( - _ request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeContainerStatisticsCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeProxyVsockCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeStopVsockProxyCall( - _ request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeIpLinkSetCall( - _ request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeIpAddrAddCall( - _ request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeIpRouteAddLinkCall( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeIpRouteAddDefaultCall( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeConfigureDnsCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeConfigureHostsCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeSyncCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeKillCall( - _ request: Com_Apple_Containerization_Sandbox_V3_KillRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + /// Simple service protocol for the "com.apple.containerization.sandbox.v3.SandboxContext" service. + /// + /// This is the highest level protocol for the service. The API is the easiest to use but + /// doesn't provide access to request or response metadata. If you need access to these + /// then use ``ServiceProtocol`` instead. + /// + /// > Source IDL Documentation: + /// > + /// > Context for interacting with a container's runtime environment. + public protocol SimpleServiceProtocol: Com_Apple_Containerization_Sandbox_V3_SandboxContext.ServiceProtocol { + /// Handle the "Mount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Mount a filesystem. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_MountRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_MountResponse` to respond with. + func mount( + request: Com_Apple_Containerization_Sandbox_V3_MountRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_MountResponse + + /// Handle the "Umount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Unmount a filesystem. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_UmountRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_UmountResponse` to respond with. + func umount( + request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_UmountResponse + + /// Handle the "Setenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set an environment variable on the init process. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_SetenvRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_SetenvResponse` to respond with. + func setenv( + request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetenvResponse + + /// Handle the "Getenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get an environment variable from the init process. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_GetenvRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_GetenvResponse` to respond with. + func getenv( + request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_GetenvResponse + + /// Handle the "Mkdir" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new directory inside the sandbox. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_MkdirRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_MkdirResponse` to respond with. + func mkdir( + request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_MkdirResponse + + /// Handle the "Sysctl" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set sysctls in the context of the sandbox. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_SysctlRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_SysctlResponse` to respond with. + func sysctl( + request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_SysctlResponse + + /// Handle the "SetTime" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set time in the guest. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_SetTimeRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_SetTimeResponse` to respond with. + func setTime( + request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetTimeResponse + + /// Handle the "SetupEmulator" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set up an emulator in the guest for a specific binary format. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse` to respond with. + func setupEmulator( + request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse + + /// Handle the "WriteFile" method. + /// + /// > Source IDL Documentation: + /// > + /// > Write data to an existing or new file. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_WriteFileRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_WriteFileResponse` to respond with. + func writeFile( + request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_WriteFileResponse + + /// Handle the "CreateProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new process inside the container. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse` to respond with. + func createProcess( + request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse + + /// Handle the "DeleteProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Delete an existing process inside the container. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse` to respond with. + func deleteProcess( + request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse + + /// Handle the "StartProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Start the provided process. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_StartProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_StartProcessResponse` to respond with. + func startProcess( + request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_StartProcessResponse + + /// Handle the "KillProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to the provided process. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_KillProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_KillProcessResponse` to respond with. + func killProcess( + request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_KillProcessResponse + + /// Handle the "WaitProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Wait for a process to exit and return the exit code. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse` to respond with. + func waitProcess( + request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse + + /// Handle the "ResizeProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Resize the tty of a given process. This will error if the process does + /// > not have a pty allocated. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse` to respond with. + func resizeProcess( + request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse + + /// Handle the "CloseProcessStdin" method. + /// + /// > Source IDL Documentation: + /// > + /// > Close IO for a given process. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse` to respond with. + func closeProcessStdin( + request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse + + /// Handle the "ContainerStatistics" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get statistics for containers. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse` to respond with. + func containerStatistics( + request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse + + /// Handle the "ProxyVsock" method. + /// + /// > Source IDL Documentation: + /// > + /// > Proxy a vsock port to a unix domain socket in the guest, or vice versa. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse` to respond with. + func proxyVsock( + request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse + + /// Handle the "StopVsockProxy" method. + /// + /// > Source IDL Documentation: + /// > + /// > Stop a vsock proxy to a unix domain socket. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse` to respond with. + func stopVsockProxy( + request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse + + /// Handle the "IpLinkSet" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set the link state of a network interface. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse` to respond with. + func ipLinkSet( + request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse + + /// Handle the "IpAddrAdd" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IPv4 address to a network interface. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse` to respond with. + func ipAddrAdd( + request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse + + /// Handle the "IpRouteAddLink" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse` to respond with. + func ipRouteAddLink( + request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse + + /// Handle the "IpRouteAddDefault" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse` to respond with. + func ipRouteAddDefault( + request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse + + /// Handle the "ConfigureDns" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure DNS resolver. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse` to respond with. + func configureDns( + request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse + + /// Handle the "ConfigureHosts" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure /etc/hosts. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse` to respond with. + func configureHosts( + request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse + + /// Handle the "Sync" method. + /// + /// > Source IDL Documentation: + /// > + /// > Perform the sync syscall. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_SyncRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_SyncResponse` to respond with. + func sync( + request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_SyncResponse + + /// Handle the "Kill" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to a process via the PID. + /// + /// - Parameters: + /// - request: A `Com_Apple_Containerization_Sandbox_V3_KillRequest` message. + /// - context: Context providing information about the RPC. + /// - Throws: Any error which occurred during the processing of the request. Thrown errors + /// of type `RPCError` are mapped to appropriate statuses. All other errors are converted + /// to an internal error. + /// - Returns: A `Com_Apple_Containerization_Sandbox_V3_KillResponse` to respond with. + func kill( + request: Com_Apple_Containerization_Sandbox_V3_KillRequest, + context: GRPCCore.ServerContext + ) async throws -> Com_Apple_Containerization_Sandbox_V3_KillResponse + } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) -extension Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncClientProtocol { - public static var serviceDescriptor: GRPCServiceDescriptor { - return Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.serviceDescriptor - } - - public var interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? { - return nil - } - - public func makeMountCall( - _ request: Com_Apple_Containerization_Sandbox_V3_MountRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.mount.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeMountInterceptors() ?? [] - ) - } - - public func makeUmountCall( - _ request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.umount.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeUmountInterceptors() ?? [] - ) - } - - public func makeSetenvCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setenv.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSetenvInterceptors() ?? [] - ) - } - - public func makeGetenvCall( - _ request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.getenv.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeGetenvInterceptors() ?? [] - ) - } - - public func makeMkdirCall( - _ request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.mkdir.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeMkdirInterceptors() ?? [] - ) - } - - public func makeSysctlCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.sysctl.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSysctlInterceptors() ?? [] - ) - } - - public func makeSetTimeCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setTime.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSetTimeInterceptors() ?? [] - ) - } - - public func makeSetupEmulatorCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setupEmulator.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSetupEmulatorInterceptors() ?? [] - ) - } - - public func makeWriteFileCall( - _ request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.writeFile.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeWriteFileInterceptors() ?? [] - ) - } - - public func makeCreateProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.createProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeCreateProcessInterceptors() ?? [] - ) - } - - public func makeDeleteProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.deleteProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeDeleteProcessInterceptors() ?? [] - ) - } - - public func makeStartProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.startProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeStartProcessInterceptors() ?? [] - ) - } - - public func makeKillProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.killProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeKillProcessInterceptors() ?? [] - ) - } - - public func makeWaitProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.waitProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeWaitProcessInterceptors() ?? [] - ) - } - - public func makeResizeProcessCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.resizeProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeResizeProcessInterceptors() ?? [] - ) - } - - public func makeCloseProcessStdinCall( - _ request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.closeProcessStdin.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeCloseProcessStdinInterceptors() ?? [] - ) - } - - public func makeContainerStatisticsCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.containerStatistics.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeContainerStatisticsInterceptors() ?? [] - ) - } - - public func makeProxyVsockCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.proxyVsock.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeProxyVsockInterceptors() ?? [] - ) - } - - public func makeStopVsockProxyCall( - _ request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.stopVsockProxy.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeStopVsockProxyInterceptors() ?? [] - ) - } - - public func makeIpLinkSetCall( - _ request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipLinkSet.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpLinkSetInterceptors() ?? [] - ) - } - - public func makeIpAddrAddCall( - _ request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipAddrAdd.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpAddrAddInterceptors() ?? [] - ) - } - - public func makeIpRouteAddLinkCall( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipRouteAddLink.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpRouteAddLinkInterceptors() ?? [] - ) - } - - public func makeIpRouteAddDefaultCall( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipRouteAddDefault.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpRouteAddDefaultInterceptors() ?? [] - ) - } - - public func makeConfigureDnsCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.configureDns.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeConfigureDnsInterceptors() ?? [] - ) - } - - public func makeConfigureHostsCall( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.configureHosts.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeConfigureHostsInterceptors() ?? [] - ) - } - - public func makeSyncCall( - _ request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.sync.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSyncInterceptors() ?? [] - ) - } - - public func makeKillCall( - _ request: Com_Apple_Containerization_Sandbox_V3_KillRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.kill.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeKillInterceptors() ?? [] - ) - } +// Default implementation of 'registerMethods(with:)'. +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Com_Apple_Containerization_Sandbox_V3_SandboxContext.StreamingServiceProtocol { + public func registerMethods(with router: inout GRPCCore.RPCRouter) where Transport: GRPCCore.ServerTransport { + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Mount.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.mount( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Umount.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.umount( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Setenv.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.setenv( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Getenv.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.getenv( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Mkdir.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.mkdir( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Sysctl.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.sysctl( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.SetTime.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.setTime( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.SetupEmulator.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.setupEmulator( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.WriteFile.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.writeFile( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.CreateProcess.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.createProcess( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.DeleteProcess.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.deleteProcess( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.StartProcess.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.startProcess( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.KillProcess.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.killProcess( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.WaitProcess.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.waitProcess( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ResizeProcess.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.resizeProcess( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.CloseProcessStdin.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.closeProcessStdin( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ContainerStatistics.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.containerStatistics( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ProxyVsock.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.proxyVsock( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.StopVsockProxy.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.stopVsockProxy( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.IpLinkSet.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.ipLinkSet( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.IpAddrAdd.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.ipAddrAdd( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.IpRouteAddLink.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.ipRouteAddLink( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.IpRouteAddDefault.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.ipRouteAddDefault( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ConfigureDns.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.configureDns( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ConfigureHosts.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.configureHosts( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Sync.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.sync( + request: request, + context: context + ) + } + ) + router.registerHandler( + forMethod: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Kill.descriptor, + deserializer: GRPCProtobuf.ProtobufDeserializer(), + serializer: GRPCProtobuf.ProtobufSerializer(), + handler: { request, context in + try await self.kill( + request: request, + context: context + ) + } + ) + } } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) -extension Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncClientProtocol { - public func mount( - _ request: Com_Apple_Containerization_Sandbox_V3_MountRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_MountResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.mount.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeMountInterceptors() ?? [] - ) - } - - public func umount( - _ request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_UmountResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.umount.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeUmountInterceptors() ?? [] - ) - } - - public func setenv( - _ request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetenvResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setenv.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSetenvInterceptors() ?? [] - ) - } - - public func getenv( - _ request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_GetenvResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.getenv.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeGetenvInterceptors() ?? [] - ) - } - - public func mkdir( - _ request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_MkdirResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.mkdir.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeMkdirInterceptors() ?? [] - ) - } - - public func sysctl( - _ request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SysctlResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.sysctl.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSysctlInterceptors() ?? [] - ) - } - - public func setTime( - _ request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetTimeResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setTime.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSetTimeInterceptors() ?? [] - ) - } - - public func setupEmulator( - _ request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setupEmulator.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSetupEmulatorInterceptors() ?? [] - ) - } - - public func writeFile( - _ request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_WriteFileResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.writeFile.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeWriteFileInterceptors() ?? [] - ) - } - - public func createProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.createProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeCreateProcessInterceptors() ?? [] - ) - } - - public func deleteProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.deleteProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeDeleteProcessInterceptors() ?? [] - ) - } - - public func startProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_StartProcessResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.startProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeStartProcessInterceptors() ?? [] - ) - } - - public func killProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_KillProcessResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.killProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeKillProcessInterceptors() ?? [] - ) - } - - public func waitProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.waitProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeWaitProcessInterceptors() ?? [] - ) - } - - public func resizeProcess( - _ request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.resizeProcess.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeResizeProcessInterceptors() ?? [] - ) - } - - public func closeProcessStdin( - _ request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.closeProcessStdin.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeCloseProcessStdinInterceptors() ?? [] - ) - } - - public func containerStatistics( - _ request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.containerStatistics.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeContainerStatisticsInterceptors() ?? [] - ) - } - - public func proxyVsock( - _ request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.proxyVsock.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeProxyVsockInterceptors() ?? [] - ) - } - - public func stopVsockProxy( - _ request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.stopVsockProxy.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeStopVsockProxyInterceptors() ?? [] - ) - } - - public func ipLinkSet( - _ request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipLinkSet.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpLinkSetInterceptors() ?? [] - ) - } - - public func ipAddrAdd( - _ request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipAddrAdd.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpAddrAddInterceptors() ?? [] - ) - } - - public func ipRouteAddLink( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipRouteAddLink.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpRouteAddLinkInterceptors() ?? [] - ) - } - - public func ipRouteAddDefault( - _ request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipRouteAddDefault.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeIpRouteAddDefaultInterceptors() ?? [] - ) - } - - public func configureDns( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.configureDns.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeConfigureDnsInterceptors() ?? [] - ) - } - - public func configureHosts( - _ request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.configureHosts.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeConfigureHostsInterceptors() ?? [] - ) - } - - public func sync( - _ request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SyncResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.sync.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeSyncInterceptors() ?? [] - ) - } - - public func kill( - _ request: Com_Apple_Containerization_Sandbox_V3_KillRequest, - callOptions: CallOptions? = nil - ) async throws -> Com_Apple_Containerization_Sandbox_V3_KillResponse { - return try await self.performAsyncUnaryCall( - path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.kill.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeKillInterceptors() ?? [] - ) - } -} +// Default implementation of streaming methods from 'StreamingServiceProtocol'. +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Com_Apple_Containerization_Sandbox_V3_SandboxContext.ServiceProtocol { + public func mount( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.mount( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) -public struct Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncClient: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncClientProtocol { - public var channel: GRPCChannel - public var defaultCallOptions: CallOptions - public var interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? - - public init( - channel: GRPCChannel, - defaultCallOptions: CallOptions = CallOptions(), - interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol? = nil - ) { - self.channel = channel - self.defaultCallOptions = defaultCallOptions - self.interceptors = interceptors - } -} + public func umount( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.umount( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } -public protocol Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol: Sendable { + public func setenv( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.setenv( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'mount'. - func makeMountInterceptors() -> [ClientInterceptor] + public func getenv( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.getenv( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'umount'. - func makeUmountInterceptors() -> [ClientInterceptor] + public func mkdir( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.mkdir( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'setenv'. - func makeSetenvInterceptors() -> [ClientInterceptor] + public func sysctl( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.sysctl( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'getenv'. - func makeGetenvInterceptors() -> [ClientInterceptor] + public func setTime( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.setTime( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'mkdir'. - func makeMkdirInterceptors() -> [ClientInterceptor] + public func setupEmulator( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.setupEmulator( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'sysctl'. - func makeSysctlInterceptors() -> [ClientInterceptor] + public func writeFile( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.writeFile( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'setTime'. - func makeSetTimeInterceptors() -> [ClientInterceptor] + public func createProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.createProcess( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'setupEmulator'. - func makeSetupEmulatorInterceptors() -> [ClientInterceptor] + public func deleteProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.deleteProcess( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'writeFile'. - func makeWriteFileInterceptors() -> [ClientInterceptor] + public func startProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.startProcess( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'createProcess'. - func makeCreateProcessInterceptors() -> [ClientInterceptor] + public func killProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.killProcess( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'deleteProcess'. - func makeDeleteProcessInterceptors() -> [ClientInterceptor] + public func waitProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.waitProcess( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'startProcess'. - func makeStartProcessInterceptors() -> [ClientInterceptor] + public func resizeProcess( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.resizeProcess( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'killProcess'. - func makeKillProcessInterceptors() -> [ClientInterceptor] + public func closeProcessStdin( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.closeProcessStdin( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'waitProcess'. - func makeWaitProcessInterceptors() -> [ClientInterceptor] + public func containerStatistics( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.containerStatistics( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'resizeProcess'. - func makeResizeProcessInterceptors() -> [ClientInterceptor] + public func proxyVsock( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.proxyVsock( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'closeProcessStdin'. - func makeCloseProcessStdinInterceptors() -> [ClientInterceptor] + public func stopVsockProxy( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.stopVsockProxy( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'containerStatistics'. - func makeContainerStatisticsInterceptors() -> [ClientInterceptor] + public func ipLinkSet( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.ipLinkSet( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'proxyVsock'. - func makeProxyVsockInterceptors() -> [ClientInterceptor] + public func ipAddrAdd( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.ipAddrAdd( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'stopVsockProxy'. - func makeStopVsockProxyInterceptors() -> [ClientInterceptor] + public func ipRouteAddLink( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.ipRouteAddLink( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'ipLinkSet'. - func makeIpLinkSetInterceptors() -> [ClientInterceptor] + public func ipRouteAddDefault( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.ipRouteAddDefault( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'ipAddrAdd'. - func makeIpAddrAddInterceptors() -> [ClientInterceptor] + public func configureDns( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.configureDns( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'ipRouteAddLink'. - func makeIpRouteAddLinkInterceptors() -> [ClientInterceptor] + public func configureHosts( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.configureHosts( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'ipRouteAddDefault'. - func makeIpRouteAddDefaultInterceptors() -> [ClientInterceptor] + public func sync( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.sync( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } - /// - Returns: Interceptors to use when invoking 'configureDns'. - func makeConfigureDnsInterceptors() -> [ClientInterceptor] + public func kill( + request: GRPCCore.StreamingServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.StreamingServerResponse { + let response = try await self.kill( + request: GRPCCore.ServerRequest(stream: request), + context: context + ) + return GRPCCore.StreamingServerResponse(single: response) + } +} - /// - Returns: Interceptors to use when invoking 'configureHosts'. - func makeConfigureHostsInterceptors() -> [ClientInterceptor] +// Default implementation of methods from 'ServiceProtocol'. +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServiceProtocol { + public func mount( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.mount( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// - Returns: Interceptors to use when invoking 'sync'. - func makeSyncInterceptors() -> [ClientInterceptor] + public func umount( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.umount( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// - Returns: Interceptors to use when invoking 'kill'. - func makeKillInterceptors() -> [ClientInterceptor] -} + public func setenv( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.setenv( + request: request.message, + context: context + ), + metadata: [:] + ) + } -public enum Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata { - public static let serviceDescriptor = GRPCServiceDescriptor( - name: "SandboxContext", - fullName: "com.apple.containerization.sandbox.v3.SandboxContext", - methods: [ - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.mount, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.umount, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setenv, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.getenv, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.mkdir, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.sysctl, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setTime, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.setupEmulator, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.writeFile, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.createProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.deleteProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.startProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.killProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.waitProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.resizeProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.closeProcessStdin, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.containerStatistics, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.proxyVsock, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.stopVsockProxy, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipLinkSet, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipAddrAdd, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipRouteAddLink, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.ipRouteAddDefault, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.configureDns, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.configureHosts, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.sync, - Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.kill, - ] - ) - - public enum Methods { - public static let mount = GRPCMethodDescriptor( - name: "Mount", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Mount", - type: GRPCCallType.unary - ) - - public static let umount = GRPCMethodDescriptor( - name: "Umount", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Umount", - type: GRPCCallType.unary - ) - - public static let setenv = GRPCMethodDescriptor( - name: "Setenv", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Setenv", - type: GRPCCallType.unary - ) - - public static let getenv = GRPCMethodDescriptor( - name: "Getenv", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Getenv", - type: GRPCCallType.unary - ) - - public static let mkdir = GRPCMethodDescriptor( - name: "Mkdir", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Mkdir", - type: GRPCCallType.unary - ) - - public static let sysctl = GRPCMethodDescriptor( - name: "Sysctl", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Sysctl", - type: GRPCCallType.unary - ) - - public static let setTime = GRPCMethodDescriptor( - name: "SetTime", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/SetTime", - type: GRPCCallType.unary - ) - - public static let setupEmulator = GRPCMethodDescriptor( - name: "SetupEmulator", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/SetupEmulator", - type: GRPCCallType.unary - ) - - public static let writeFile = GRPCMethodDescriptor( - name: "WriteFile", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/WriteFile", - type: GRPCCallType.unary - ) - - public static let createProcess = GRPCMethodDescriptor( - name: "CreateProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/CreateProcess", - type: GRPCCallType.unary - ) - - public static let deleteProcess = GRPCMethodDescriptor( - name: "DeleteProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/DeleteProcess", - type: GRPCCallType.unary - ) - - public static let startProcess = GRPCMethodDescriptor( - name: "StartProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/StartProcess", - type: GRPCCallType.unary - ) - - public static let killProcess = GRPCMethodDescriptor( - name: "KillProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/KillProcess", - type: GRPCCallType.unary - ) - - public static let waitProcess = GRPCMethodDescriptor( - name: "WaitProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/WaitProcess", - type: GRPCCallType.unary - ) - - public static let resizeProcess = GRPCMethodDescriptor( - name: "ResizeProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ResizeProcess", - type: GRPCCallType.unary - ) - - public static let closeProcessStdin = GRPCMethodDescriptor( - name: "CloseProcessStdin", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/CloseProcessStdin", - type: GRPCCallType.unary - ) - - public static let containerStatistics = GRPCMethodDescriptor( - name: "ContainerStatistics", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ContainerStatistics", - type: GRPCCallType.unary - ) - - public static let proxyVsock = GRPCMethodDescriptor( - name: "ProxyVsock", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ProxyVsock", - type: GRPCCallType.unary - ) - - public static let stopVsockProxy = GRPCMethodDescriptor( - name: "StopVsockProxy", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/StopVsockProxy", - type: GRPCCallType.unary - ) - - public static let ipLinkSet = GRPCMethodDescriptor( - name: "IpLinkSet", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/IpLinkSet", - type: GRPCCallType.unary - ) - - public static let ipAddrAdd = GRPCMethodDescriptor( - name: "IpAddrAdd", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/IpAddrAdd", - type: GRPCCallType.unary - ) - - public static let ipRouteAddLink = GRPCMethodDescriptor( - name: "IpRouteAddLink", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/IpRouteAddLink", - type: GRPCCallType.unary - ) - - public static let ipRouteAddDefault = GRPCMethodDescriptor( - name: "IpRouteAddDefault", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/IpRouteAddDefault", - type: GRPCCallType.unary - ) - - public static let configureDns = GRPCMethodDescriptor( - name: "ConfigureDns", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ConfigureDns", - type: GRPCCallType.unary - ) - - public static let configureHosts = GRPCMethodDescriptor( - name: "ConfigureHosts", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ConfigureHosts", - type: GRPCCallType.unary - ) - - public static let sync = GRPCMethodDescriptor( - name: "Sync", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Sync", - type: GRPCCallType.unary - ) - - public static let kill = GRPCMethodDescriptor( - name: "Kill", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Kill", - type: GRPCCallType.unary - ) - } -} + public func getenv( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.getenv( + request: request.message, + context: context + ), + metadata: [:] + ) + } -/// Context for interacting with a container's runtime environment. -/// -/// To build a server, implement a class that conforms to this protocol. -public protocol Com_Apple_Containerization_Sandbox_V3_SandboxContextProvider: CallHandlerProvider { - var interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextServerInterceptorFactoryProtocol? { get } + public func mkdir( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.mkdir( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Mount a filesystem. - func mount(request: Com_Apple_Containerization_Sandbox_V3_MountRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func sysctl( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.sysctl( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Unmount a filesystem. - func umount(request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func setTime( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.setTime( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Set an environment variable on the init process. - func setenv(request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func setupEmulator( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.setupEmulator( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Get an environment variable from the init process. - func getenv(request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func writeFile( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.writeFile( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Create a new directory inside the sandbox. - func mkdir(request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func createProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.createProcess( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Set sysctls in the context of the sandbox. - func sysctl(request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func deleteProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.deleteProcess( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Set time in the guest. - func setTime(request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func startProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.startProcess( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Set up an emulator in the guest for a specific binary format. - func setupEmulator(request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func killProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.killProcess( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Write data to an existing or new file. - func writeFile(request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func waitProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.waitProcess( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Create a new process inside the container. - func createProcess(request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func resizeProcess( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.resizeProcess( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Delete an existing process inside the container. - func deleteProcess(request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func closeProcessStdin( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.closeProcessStdin( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Start the provided process. - func startProcess(request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func containerStatistics( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.containerStatistics( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Send a signal to the provided process. - func killProcess(request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func proxyVsock( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.proxyVsock( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Wait for a process to exit and return the exit code. - func waitProcess(request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func stopVsockProxy( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.stopVsockProxy( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Resize the tty of a given process. This will error if the process does - /// not have a pty allocated. - func resizeProcess(request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func ipLinkSet( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.ipLinkSet( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Close IO for a given process. - func closeProcessStdin(request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func ipAddrAdd( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.ipAddrAdd( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Get statistics for containers. - func containerStatistics(request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func ipRouteAddLink( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.ipRouteAddLink( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Proxy a vsock port to a unix domain socket in the guest, or vice versa. - func proxyVsock(request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func ipRouteAddDefault( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.ipRouteAddDefault( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Stop a vsock proxy to a unix domain socket. - func stopVsockProxy(request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func configureDns( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.configureDns( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Set the link state of a network interface. - func ipLinkSet(request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func configureHosts( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.configureHosts( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Add an IPv4 address to a network interface. - func ipAddrAdd(request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func sync( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.sync( + request: request.message, + context: context + ), + metadata: [:] + ) + } - /// Add an IP route for a network interface. - func ipRouteAddLink(request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, context: StatusOnlyCallContext) -> EventLoopFuture + public func kill( + request: GRPCCore.ServerRequest, + context: GRPCCore.ServerContext + ) async throws -> GRPCCore.ServerResponse { + return GRPCCore.ServerResponse( + message: try await self.kill( + request: request.message, + context: context + ), + metadata: [:] + ) + } +} - /// Add an IP route for a network interface. - func ipRouteAddDefault(request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, context: StatusOnlyCallContext) -> EventLoopFuture +// MARK: com.apple.containerization.sandbox.v3.SandboxContext (client) + +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Com_Apple_Containerization_Sandbox_V3_SandboxContext { + /// Generated client protocol for the "com.apple.containerization.sandbox.v3.SandboxContext" service. + /// + /// You don't need to implement this protocol directly, use the generated + /// implementation, ``Client``. + /// + /// > Source IDL Documentation: + /// > + /// > Context for interacting with a container's runtime environment. + public protocol ClientProtocol: Sendable { + /// Call the "Mount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Mount a filesystem. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_MountRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_MountRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_MountResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func mount( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "Umount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Unmount a filesystem. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_UmountRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_UmountRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_UmountResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func umount( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "Setenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set an environment variable on the init process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetenvRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SetenvRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SetenvResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func setenv( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "Getenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get an environment variable from the init process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_GetenvRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_GetenvRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_GetenvResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func getenv( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "Mkdir" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new directory inside the sandbox. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_MkdirRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_MkdirRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_MkdirResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func mkdir( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "Sysctl" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set sysctls in the context of the sandbox. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SysctlRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SysctlRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SysctlResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func sysctl( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "SetTime" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set time in the guest. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetTimeRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SetTimeRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SetTimeResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func setTime( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "SetupEmulator" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set up an emulator in the guest for a specific binary format. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func setupEmulator( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "WriteFile" method. + /// + /// > Source IDL Documentation: + /// > + /// > Write data to an existing or new file. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_WriteFileRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_WriteFileRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_WriteFileResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func writeFile( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "CreateProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new process inside the container. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func createProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "DeleteProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Delete an existing process inside the container. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func deleteProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "StartProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Start the provided process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_StartProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_StartProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_StartProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func startProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "KillProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to the provided process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_KillProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_KillProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_KillProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func killProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "WaitProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Wait for a process to exit and return the exit code. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func waitProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "ResizeProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Resize the tty of a given process. This will error if the process does + /// > not have a pty allocated. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func resizeProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "CloseProcessStdin" method. + /// + /// > Source IDL Documentation: + /// > + /// > Close IO for a given process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func closeProcessStdin( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "ContainerStatistics" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get statistics for containers. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func containerStatistics( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "ProxyVsock" method. + /// + /// > Source IDL Documentation: + /// > + /// > Proxy a vsock port to a unix domain socket in the guest, or vice versa. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func proxyVsock( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "StopVsockProxy" method. + /// + /// > Source IDL Documentation: + /// > + /// > Stop a vsock proxy to a unix domain socket. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func stopVsockProxy( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "IpLinkSet" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set the link state of a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func ipLinkSet( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "IpAddrAdd" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IPv4 address to a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func ipAddrAdd( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "IpRouteAddLink" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func ipRouteAddLink( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "IpRouteAddDefault" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func ipRouteAddDefault( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "ConfigureDns" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure DNS resolver. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func configureDns( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "ConfigureHosts" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure /etc/hosts. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func configureHosts( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "Sync" method. + /// + /// > Source IDL Documentation: + /// > + /// > Perform the sync syscall. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SyncRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SyncRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SyncResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func sync( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + + /// Call the "Kill" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to a process via the PID. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_KillRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_KillRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_KillResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + func kill( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result + ) async throws -> Result where Result: Sendable + } - /// Configure DNS resolver. - func configureDns(request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, context: StatusOnlyCallContext) -> EventLoopFuture + /// Generated client for the "com.apple.containerization.sandbox.v3.SandboxContext" service. + /// + /// The ``Client`` provides an implementation of ``ClientProtocol`` which wraps + /// a `GRPCCore.GRPCCClient`. The underlying `GRPCClient` provides the long-lived + /// means of communication with the remote peer. + /// + /// > Source IDL Documentation: + /// > + /// > Context for interacting with a container's runtime environment. + public struct Client: ClientProtocol where Transport: GRPCCore.ClientTransport { + private let client: GRPCCore.GRPCClient + + /// Creates a new client wrapping the provided `GRPCCore.GRPCClient`. + /// + /// - Parameters: + /// - client: A `GRPCCore.GRPCClient` providing a communication channel to the service. + public init(wrapping client: GRPCCore.GRPCClient) { + self.client = client + } + + /// Call the "Mount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Mount a filesystem. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_MountRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_MountRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_MountResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func mount( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Mount.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "Umount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Unmount a filesystem. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_UmountRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_UmountRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_UmountResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func umount( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Umount.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "Setenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set an environment variable on the init process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetenvRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SetenvRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SetenvResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func setenv( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Setenv.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "Getenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get an environment variable from the init process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_GetenvRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_GetenvRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_GetenvResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func getenv( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Getenv.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "Mkdir" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new directory inside the sandbox. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_MkdirRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_MkdirRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_MkdirResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func mkdir( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Mkdir.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "Sysctl" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set sysctls in the context of the sandbox. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SysctlRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SysctlRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SysctlResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func sysctl( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Sysctl.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "SetTime" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set time in the guest. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetTimeRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SetTimeRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SetTimeResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func setTime( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.SetTime.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "SetupEmulator" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set up an emulator in the guest for a specific binary format. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func setupEmulator( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.SetupEmulator.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "WriteFile" method. + /// + /// > Source IDL Documentation: + /// > + /// > Write data to an existing or new file. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_WriteFileRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_WriteFileRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_WriteFileResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func writeFile( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.WriteFile.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "CreateProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new process inside the container. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func createProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.CreateProcess.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "DeleteProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Delete an existing process inside the container. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func deleteProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.DeleteProcess.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "StartProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Start the provided process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_StartProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_StartProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_StartProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func startProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.StartProcess.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "KillProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to the provided process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_KillProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_KillProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_KillProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func killProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.KillProcess.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "WaitProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Wait for a process to exit and return the exit code. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func waitProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.WaitProcess.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ResizeProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Resize the tty of a given process. This will error if the process does + /// > not have a pty allocated. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func resizeProcess( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ResizeProcess.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "CloseProcessStdin" method. + /// + /// > Source IDL Documentation: + /// > + /// > Close IO for a given process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func closeProcessStdin( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.CloseProcessStdin.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ContainerStatistics" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get statistics for containers. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func containerStatistics( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ContainerStatistics.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ProxyVsock" method. + /// + /// > Source IDL Documentation: + /// > + /// > Proxy a vsock port to a unix domain socket in the guest, or vice versa. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func proxyVsock( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ProxyVsock.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "StopVsockProxy" method. + /// + /// > Source IDL Documentation: + /// > + /// > Stop a vsock proxy to a unix domain socket. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func stopVsockProxy( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.StopVsockProxy.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IpLinkSet" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set the link state of a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipLinkSet( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.IpLinkSet.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IpAddrAdd" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IPv4 address to a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipAddrAdd( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.IpAddrAdd.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IpRouteAddLink" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipRouteAddLink( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.IpRouteAddLink.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IpRouteAddDefault" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipRouteAddDefault( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.IpRouteAddDefault.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ConfigureDns" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure DNS resolver. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func configureDns( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ConfigureDns.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ConfigureHosts" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure /etc/hosts. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func configureHosts( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.ConfigureHosts.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "Sync" method. + /// + /// > Source IDL Documentation: + /// > + /// > Perform the sync syscall. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SyncRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_SyncRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_SyncResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func sync( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Sync.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "Kill" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to a process via the PID. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_KillRequest` message. + /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_KillRequest` messages. + /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_KillResponse` messages. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func kill( + request: GRPCCore.ClientRequest, + serializer: some GRPCCore.MessageSerializer, + deserializer: some GRPCCore.MessageDeserializer, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.client.unary( + request: request, + descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Kill.descriptor, + serializer: serializer, + deserializer: deserializer, + options: options, + onResponse: handleResponse + ) + } + } +} - /// Configure /etc/hosts. - func configureHosts(request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, context: StatusOnlyCallContext) -> EventLoopFuture +// Helpers providing default arguments to 'ClientProtocol' methods. +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Com_Apple_Containerization_Sandbox_V3_SandboxContext.ClientProtocol { + /// Call the "Mount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Mount a filesystem. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_MountRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func mount( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.mount( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// Perform the sync syscall. - func sync(request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, context: StatusOnlyCallContext) -> EventLoopFuture + /// Call the "Umount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Unmount a filesystem. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_UmountRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func umount( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.umount( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// Send a signal to a process via the PID. - func kill(request: Com_Apple_Containerization_Sandbox_V3_KillRequest, context: StatusOnlyCallContext) -> EventLoopFuture -} + /// Call the "Setenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set an environment variable on the init process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetenvRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func setenv( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.setenv( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } -extension Com_Apple_Containerization_Sandbox_V3_SandboxContextProvider { - public var serviceName: Substring { - return Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.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. - public func handle( - method name: Substring, - context: CallHandlerContext - ) -> GRPCServerHandlerProtocol? { - switch name { - case "Mount": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeMountInterceptors() ?? [], - userFunction: self.mount(request:context:) - ) - - case "Umount": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeUmountInterceptors() ?? [], - userFunction: self.umount(request:context:) - ) - - case "Setenv": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSetenvInterceptors() ?? [], - userFunction: self.setenv(request:context:) - ) - - case "Getenv": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeGetenvInterceptors() ?? [], - userFunction: self.getenv(request:context:) - ) - - case "Mkdir": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeMkdirInterceptors() ?? [], - userFunction: self.mkdir(request:context:) - ) - - case "Sysctl": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSysctlInterceptors() ?? [], - userFunction: self.sysctl(request:context:) - ) - - case "SetTime": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSetTimeInterceptors() ?? [], - userFunction: self.setTime(request:context:) - ) - - case "SetupEmulator": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSetupEmulatorInterceptors() ?? [], - userFunction: self.setupEmulator(request:context:) - ) - - case "WriteFile": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeWriteFileInterceptors() ?? [], - userFunction: self.writeFile(request:context:) - ) - - case "CreateProcess": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeCreateProcessInterceptors() ?? [], - userFunction: self.createProcess(request:context:) - ) - - case "DeleteProcess": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeDeleteProcessInterceptors() ?? [], - userFunction: self.deleteProcess(request:context:) - ) - - case "StartProcess": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeStartProcessInterceptors() ?? [], - userFunction: self.startProcess(request:context:) - ) - - case "KillProcess": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeKillProcessInterceptors() ?? [], - userFunction: self.killProcess(request:context:) - ) - - case "WaitProcess": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeWaitProcessInterceptors() ?? [], - userFunction: self.waitProcess(request:context:) - ) - - case "ResizeProcess": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeResizeProcessInterceptors() ?? [], - userFunction: self.resizeProcess(request:context:) - ) - - case "CloseProcessStdin": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeCloseProcessStdinInterceptors() ?? [], - userFunction: self.closeProcessStdin(request:context:) - ) - - case "ContainerStatistics": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeContainerStatisticsInterceptors() ?? [], - userFunction: self.containerStatistics(request:context:) - ) - - case "ProxyVsock": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeProxyVsockInterceptors() ?? [], - userFunction: self.proxyVsock(request:context:) - ) - - case "StopVsockProxy": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeStopVsockProxyInterceptors() ?? [], - userFunction: self.stopVsockProxy(request:context:) - ) - - case "IpLinkSet": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeIpLinkSetInterceptors() ?? [], - userFunction: self.ipLinkSet(request:context:) - ) - - case "IpAddrAdd": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeIpAddrAddInterceptors() ?? [], - userFunction: self.ipAddrAdd(request:context:) - ) - - case "IpRouteAddLink": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeIpRouteAddLinkInterceptors() ?? [], - userFunction: self.ipRouteAddLink(request:context:) - ) - - case "IpRouteAddDefault": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeIpRouteAddDefaultInterceptors() ?? [], - userFunction: self.ipRouteAddDefault(request:context:) - ) - - case "ConfigureDns": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeConfigureDnsInterceptors() ?? [], - userFunction: self.configureDns(request:context:) - ) - - case "ConfigureHosts": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeConfigureHostsInterceptors() ?? [], - userFunction: self.configureHosts(request:context:) - ) - - case "Sync": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSyncInterceptors() ?? [], - userFunction: self.sync(request:context:) - ) - - case "Kill": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeKillInterceptors() ?? [], - userFunction: self.kill(request:context:) - ) - - default: - return nil - } - } -} + /// Call the "Getenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get an environment variable from the init process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_GetenvRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func getenv( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.getenv( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } -/// Context for interacting with a container's runtime environment. -/// -/// To implement a server, implement an object which conforms to this protocol. -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) -public protocol Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvider: CallHandlerProvider, Sendable { - static var serviceDescriptor: GRPCServiceDescriptor { get } - var interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextServerInterceptorFactoryProtocol? { get } - - /// Mount a filesystem. - func mount( - request: Com_Apple_Containerization_Sandbox_V3_MountRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_MountResponse - - /// Unmount a filesystem. - func umount( - request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_UmountResponse - - /// Set an environment variable on the init process. - func setenv( - request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetenvResponse - - /// Get an environment variable from the init process. - func getenv( - request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_GetenvResponse - - /// Create a new directory inside the sandbox. - func mkdir( - request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_MkdirResponse - - /// Set sysctls in the context of the sandbox. - func sysctl( - request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SysctlResponse - - /// Set time in the guest. - func setTime( - request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetTimeResponse - - /// Set up an emulator in the guest for a specific binary format. - func setupEmulator( - request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse - - /// Write data to an existing or new file. - func writeFile( - request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_WriteFileResponse - - /// Create a new process inside the container. - func createProcess( - request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse - - /// Delete an existing process inside the container. - func deleteProcess( - request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse - - /// Start the provided process. - func startProcess( - request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_StartProcessResponse - - /// Send a signal to the provided process. - func killProcess( - request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_KillProcessResponse - - /// Wait for a process to exit and return the exit code. - func waitProcess( - request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse - - /// Resize the tty of a given process. This will error if the process does - /// not have a pty allocated. - func resizeProcess( - request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse - - /// Close IO for a given process. - func closeProcessStdin( - request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse - - /// Get statistics for containers. - func containerStatistics( - request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse - - /// Proxy a vsock port to a unix domain socket in the guest, or vice versa. - func proxyVsock( - request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse - - /// Stop a vsock proxy to a unix domain socket. - func stopVsockProxy( - request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse - - /// Set the link state of a network interface. - func ipLinkSet( - request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse - - /// Add an IPv4 address to a network interface. - func ipAddrAdd( - request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse - - /// Add an IP route for a network interface. - func ipRouteAddLink( - request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse - - /// Add an IP route for a network interface. - func ipRouteAddDefault( - request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse - - /// Configure DNS resolver. - func configureDns( - request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse - - /// Configure /etc/hosts. - func configureHosts( - request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse - - /// Perform the sync syscall. - func sync( - request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_SyncResponse - - /// Send a signal to a process via the PID. - func kill( - request: Com_Apple_Containerization_Sandbox_V3_KillRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Com_Apple_Containerization_Sandbox_V3_KillResponse -} + /// Call the "Mkdir" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new directory inside the sandbox. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_MkdirRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func mkdir( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.mkdir( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } -@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) -extension Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvider { - public static var serviceDescriptor: GRPCServiceDescriptor { - return Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.serviceDescriptor - } - - public var serviceName: Substring { - return Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.serviceDescriptor.fullName[...] - } - - public var interceptors: Com_Apple_Containerization_Sandbox_V3_SandboxContextServerInterceptorFactoryProtocol? { - return nil - } - - public func handle( - method name: Substring, - context: CallHandlerContext - ) -> GRPCServerHandlerProtocol? { - switch name { - case "Mount": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeMountInterceptors() ?? [], - wrapping: { try await self.mount(request: $0, context: $1) } - ) - - case "Umount": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeUmountInterceptors() ?? [], - wrapping: { try await self.umount(request: $0, context: $1) } - ) - - case "Setenv": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSetenvInterceptors() ?? [], - wrapping: { try await self.setenv(request: $0, context: $1) } - ) - - case "Getenv": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeGetenvInterceptors() ?? [], - wrapping: { try await self.getenv(request: $0, context: $1) } - ) - - case "Mkdir": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeMkdirInterceptors() ?? [], - wrapping: { try await self.mkdir(request: $0, context: $1) } - ) - - case "Sysctl": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSysctlInterceptors() ?? [], - wrapping: { try await self.sysctl(request: $0, context: $1) } - ) - - case "SetTime": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSetTimeInterceptors() ?? [], - wrapping: { try await self.setTime(request: $0, context: $1) } - ) - - case "SetupEmulator": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSetupEmulatorInterceptors() ?? [], - wrapping: { try await self.setupEmulator(request: $0, context: $1) } - ) - - case "WriteFile": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeWriteFileInterceptors() ?? [], - wrapping: { try await self.writeFile(request: $0, context: $1) } - ) - - case "CreateProcess": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeCreateProcessInterceptors() ?? [], - wrapping: { try await self.createProcess(request: $0, context: $1) } - ) - - case "DeleteProcess": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeDeleteProcessInterceptors() ?? [], - wrapping: { try await self.deleteProcess(request: $0, context: $1) } - ) - - case "StartProcess": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeStartProcessInterceptors() ?? [], - wrapping: { try await self.startProcess(request: $0, context: $1) } - ) - - case "KillProcess": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeKillProcessInterceptors() ?? [], - wrapping: { try await self.killProcess(request: $0, context: $1) } - ) - - case "WaitProcess": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeWaitProcessInterceptors() ?? [], - wrapping: { try await self.waitProcess(request: $0, context: $1) } - ) - - case "ResizeProcess": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeResizeProcessInterceptors() ?? [], - wrapping: { try await self.resizeProcess(request: $0, context: $1) } - ) - - case "CloseProcessStdin": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeCloseProcessStdinInterceptors() ?? [], - wrapping: { try await self.closeProcessStdin(request: $0, context: $1) } - ) - - case "ContainerStatistics": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeContainerStatisticsInterceptors() ?? [], - wrapping: { try await self.containerStatistics(request: $0, context: $1) } - ) - - case "ProxyVsock": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeProxyVsockInterceptors() ?? [], - wrapping: { try await self.proxyVsock(request: $0, context: $1) } - ) - - case "StopVsockProxy": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeStopVsockProxyInterceptors() ?? [], - wrapping: { try await self.stopVsockProxy(request: $0, context: $1) } - ) - - case "IpLinkSet": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeIpLinkSetInterceptors() ?? [], - wrapping: { try await self.ipLinkSet(request: $0, context: $1) } - ) - - case "IpAddrAdd": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeIpAddrAddInterceptors() ?? [], - wrapping: { try await self.ipAddrAdd(request: $0, context: $1) } - ) - - case "IpRouteAddLink": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeIpRouteAddLinkInterceptors() ?? [], - wrapping: { try await self.ipRouteAddLink(request: $0, context: $1) } - ) - - case "IpRouteAddDefault": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeIpRouteAddDefaultInterceptors() ?? [], - wrapping: { try await self.ipRouteAddDefault(request: $0, context: $1) } - ) - - case "ConfigureDns": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeConfigureDnsInterceptors() ?? [], - wrapping: { try await self.configureDns(request: $0, context: $1) } - ) - - case "ConfigureHosts": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeConfigureHostsInterceptors() ?? [], - wrapping: { try await self.configureHosts(request: $0, context: $1) } - ) - - case "Sync": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeSyncInterceptors() ?? [], - wrapping: { try await self.sync(request: $0, context: $1) } - ) - - case "Kill": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeKillInterceptors() ?? [], - wrapping: { try await self.kill(request: $0, context: $1) } - ) - - default: - return nil - } - } -} + /// Call the "Sysctl" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set sysctls in the context of the sandbox. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SysctlRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func sysctl( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.sysctl( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } -public protocol Com_Apple_Containerization_Sandbox_V3_SandboxContextServerInterceptorFactoryProtocol: Sendable { + /// Call the "SetTime" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set time in the guest. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetTimeRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func setTime( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.setTime( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'mount'. - /// Defaults to calling `self.makeInterceptors()`. - func makeMountInterceptors() -> [ServerInterceptor] + /// Call the "SetupEmulator" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set up an emulator in the guest for a specific binary format. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func setupEmulator( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.setupEmulator( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'umount'. - /// Defaults to calling `self.makeInterceptors()`. - func makeUmountInterceptors() -> [ServerInterceptor] + /// Call the "WriteFile" method. + /// + /// > Source IDL Documentation: + /// > + /// > Write data to an existing or new file. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_WriteFileRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func writeFile( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.writeFile( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'setenv'. - /// Defaults to calling `self.makeInterceptors()`. - func makeSetenvInterceptors() -> [ServerInterceptor] + /// Call the "CreateProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new process inside the container. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func createProcess( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.createProcess( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'getenv'. - /// Defaults to calling `self.makeInterceptors()`. - func makeGetenvInterceptors() -> [ServerInterceptor] + /// Call the "DeleteProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Delete an existing process inside the container. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func deleteProcess( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.deleteProcess( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'mkdir'. - /// Defaults to calling `self.makeInterceptors()`. - func makeMkdirInterceptors() -> [ServerInterceptor] + /// Call the "StartProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Start the provided process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_StartProcessRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func startProcess( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.startProcess( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'sysctl'. - /// Defaults to calling `self.makeInterceptors()`. - func makeSysctlInterceptors() -> [ServerInterceptor] + /// Call the "KillProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to the provided process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_KillProcessRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func killProcess( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.killProcess( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'setTime'. - /// Defaults to calling `self.makeInterceptors()`. - func makeSetTimeInterceptors() -> [ServerInterceptor] + /// Call the "WaitProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Wait for a process to exit and return the exit code. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func waitProcess( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.waitProcess( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'setupEmulator'. - /// Defaults to calling `self.makeInterceptors()`. - func makeSetupEmulatorInterceptors() -> [ServerInterceptor] + /// Call the "ResizeProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Resize the tty of a given process. This will error if the process does + /// > not have a pty allocated. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func resizeProcess( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.resizeProcess( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'writeFile'. - /// Defaults to calling `self.makeInterceptors()`. - func makeWriteFileInterceptors() -> [ServerInterceptor] + /// Call the "CloseProcessStdin" method. + /// + /// > Source IDL Documentation: + /// > + /// > Close IO for a given process. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func closeProcessStdin( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.closeProcessStdin( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'createProcess'. - /// Defaults to calling `self.makeInterceptors()`. - func makeCreateProcessInterceptors() -> [ServerInterceptor] + /// Call the "ContainerStatistics" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get statistics for containers. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func containerStatistics( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.containerStatistics( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'deleteProcess'. - /// Defaults to calling `self.makeInterceptors()`. - func makeDeleteProcessInterceptors() -> [ServerInterceptor] + /// Call the "ProxyVsock" method. + /// + /// > Source IDL Documentation: + /// > + /// > Proxy a vsock port to a unix domain socket in the guest, or vice versa. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func proxyVsock( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.proxyVsock( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'startProcess'. - /// Defaults to calling `self.makeInterceptors()`. - func makeStartProcessInterceptors() -> [ServerInterceptor] + /// Call the "StopVsockProxy" method. + /// + /// > Source IDL Documentation: + /// > + /// > Stop a vsock proxy to a unix domain socket. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func stopVsockProxy( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.stopVsockProxy( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'killProcess'. - /// Defaults to calling `self.makeInterceptors()`. - func makeKillProcessInterceptors() -> [ServerInterceptor] + /// Call the "IpLinkSet" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set the link state of a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipLinkSet( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.ipLinkSet( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'waitProcess'. - /// Defaults to calling `self.makeInterceptors()`. - func makeWaitProcessInterceptors() -> [ServerInterceptor] + /// Call the "IpAddrAdd" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IPv4 address to a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipAddrAdd( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.ipAddrAdd( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'resizeProcess'. - /// Defaults to calling `self.makeInterceptors()`. - func makeResizeProcessInterceptors() -> [ServerInterceptor] + /// Call the "IpRouteAddLink" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipRouteAddLink( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.ipRouteAddLink( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'closeProcessStdin'. - /// Defaults to calling `self.makeInterceptors()`. - func makeCloseProcessStdinInterceptors() -> [ServerInterceptor] + /// Call the "IpRouteAddDefault" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipRouteAddDefault( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.ipRouteAddDefault( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'containerStatistics'. - /// Defaults to calling `self.makeInterceptors()`. - func makeContainerStatisticsInterceptors() -> [ServerInterceptor] + /// Call the "ConfigureDns" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure DNS resolver. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func configureDns( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.configureDns( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'proxyVsock'. - /// Defaults to calling `self.makeInterceptors()`. - func makeProxyVsockInterceptors() -> [ServerInterceptor] + /// Call the "ConfigureHosts" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure /etc/hosts. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func configureHosts( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.configureHosts( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'stopVsockProxy'. - /// Defaults to calling `self.makeInterceptors()`. - func makeStopVsockProxyInterceptors() -> [ServerInterceptor] + /// Call the "Sync" method. + /// + /// > Source IDL Documentation: + /// > + /// > Perform the sync syscall. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_SyncRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func sync( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.sync( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'ipLinkSet'. - /// Defaults to calling `self.makeInterceptors()`. - func makeIpLinkSetInterceptors() -> [ServerInterceptor] + /// Call the "Kill" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to a process via the PID. + /// + /// - Parameters: + /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_KillRequest` message. + /// - options: Options to apply to this RPC. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func kill( + request: GRPCCore.ClientRequest, + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + try await self.kill( + request: request, + serializer: GRPCProtobuf.ProtobufSerializer(), + deserializer: GRPCProtobuf.ProtobufDeserializer(), + options: options, + onResponse: handleResponse + ) + } +} - /// - Returns: Interceptors to use when handling 'ipAddrAdd'. - /// Defaults to calling `self.makeInterceptors()`. - func makeIpAddrAddInterceptors() -> [ServerInterceptor] +// Helpers providing sugared APIs for 'ClientProtocol' methods. +@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) +extension Com_Apple_Containerization_Sandbox_V3_SandboxContext.ClientProtocol { + /// Call the "Mount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Mount a filesystem. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func mount( + _ message: Com_Apple_Containerization_Sandbox_V3_MountRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.mount( + request: request, + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'ipRouteAddLink'. - /// Defaults to calling `self.makeInterceptors()`. - func makeIpRouteAddLinkInterceptors() -> [ServerInterceptor] + /// Call the "Umount" method. + /// + /// > Source IDL Documentation: + /// > + /// > Unmount a filesystem. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func umount( + _ message: Com_Apple_Containerization_Sandbox_V3_UmountRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.umount( + request: request, + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'ipRouteAddDefault'. - /// Defaults to calling `self.makeInterceptors()`. - func makeIpRouteAddDefaultInterceptors() -> [ServerInterceptor] + /// Call the "Setenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set an environment variable on the init process. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func setenv( + _ message: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.setenv( + request: request, + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'configureDns'. - /// Defaults to calling `self.makeInterceptors()`. - func makeConfigureDnsInterceptors() -> [ServerInterceptor] + /// Call the "Getenv" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get an environment variable from the init process. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func getenv( + _ message: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.getenv( + request: request, + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'configureHosts'. - /// Defaults to calling `self.makeInterceptors()`. - func makeConfigureHostsInterceptors() -> [ServerInterceptor] + /// Call the "Mkdir" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new directory inside the sandbox. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func mkdir( + _ message: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.mkdir( + request: request, + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'sync'. - /// Defaults to calling `self.makeInterceptors()`. - func makeSyncInterceptors() -> [ServerInterceptor] + /// Call the "Sysctl" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set sysctls in the context of the sandbox. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func sysctl( + _ message: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.sysctl( + request: request, + options: options, + onResponse: handleResponse + ) + } - /// - Returns: Interceptors to use when handling 'kill'. - /// Defaults to calling `self.makeInterceptors()`. - func makeKillInterceptors() -> [ServerInterceptor] -} + /// Call the "SetTime" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set time in the guest. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func setTime( + _ message: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.setTime( + request: request, + options: options, + onResponse: handleResponse + ) + } -public enum Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata { - public static let serviceDescriptor = GRPCServiceDescriptor( - name: "SandboxContext", - fullName: "com.apple.containerization.sandbox.v3.SandboxContext", - methods: [ - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.mount, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.umount, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.setenv, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.getenv, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.mkdir, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.sysctl, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.setTime, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.setupEmulator, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.writeFile, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.createProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.deleteProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.startProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.killProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.waitProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.resizeProcess, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.closeProcessStdin, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.containerStatistics, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.proxyVsock, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.stopVsockProxy, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.ipLinkSet, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.ipAddrAdd, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.ipRouteAddLink, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.ipRouteAddDefault, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.configureDns, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.configureHosts, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.sync, - Com_Apple_Containerization_Sandbox_V3_SandboxContextServerMetadata.Methods.kill, - ] - ) - - public enum Methods { - public static let mount = GRPCMethodDescriptor( - name: "Mount", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Mount", - type: GRPCCallType.unary - ) - - public static let umount = GRPCMethodDescriptor( - name: "Umount", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Umount", - type: GRPCCallType.unary - ) - - public static let setenv = GRPCMethodDescriptor( - name: "Setenv", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Setenv", - type: GRPCCallType.unary - ) - - public static let getenv = GRPCMethodDescriptor( - name: "Getenv", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Getenv", - type: GRPCCallType.unary - ) - - public static let mkdir = GRPCMethodDescriptor( - name: "Mkdir", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Mkdir", - type: GRPCCallType.unary - ) - - public static let sysctl = GRPCMethodDescriptor( - name: "Sysctl", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Sysctl", - type: GRPCCallType.unary - ) - - public static let setTime = GRPCMethodDescriptor( - name: "SetTime", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/SetTime", - type: GRPCCallType.unary - ) - - public static let setupEmulator = GRPCMethodDescriptor( - name: "SetupEmulator", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/SetupEmulator", - type: GRPCCallType.unary - ) - - public static let writeFile = GRPCMethodDescriptor( - name: "WriteFile", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/WriteFile", - type: GRPCCallType.unary - ) - - public static let createProcess = GRPCMethodDescriptor( - name: "CreateProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/CreateProcess", - type: GRPCCallType.unary - ) - - public static let deleteProcess = GRPCMethodDescriptor( - name: "DeleteProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/DeleteProcess", - type: GRPCCallType.unary - ) - - public static let startProcess = GRPCMethodDescriptor( - name: "StartProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/StartProcess", - type: GRPCCallType.unary - ) - - public static let killProcess = GRPCMethodDescriptor( - name: "KillProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/KillProcess", - type: GRPCCallType.unary - ) - - public static let waitProcess = GRPCMethodDescriptor( - name: "WaitProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/WaitProcess", - type: GRPCCallType.unary - ) - - public static let resizeProcess = GRPCMethodDescriptor( - name: "ResizeProcess", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ResizeProcess", - type: GRPCCallType.unary - ) - - public static let closeProcessStdin = GRPCMethodDescriptor( - name: "CloseProcessStdin", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/CloseProcessStdin", - type: GRPCCallType.unary - ) - - public static let containerStatistics = GRPCMethodDescriptor( - name: "ContainerStatistics", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ContainerStatistics", - type: GRPCCallType.unary - ) - - public static let proxyVsock = GRPCMethodDescriptor( - name: "ProxyVsock", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ProxyVsock", - type: GRPCCallType.unary - ) - - public static let stopVsockProxy = GRPCMethodDescriptor( - name: "StopVsockProxy", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/StopVsockProxy", - type: GRPCCallType.unary - ) - - public static let ipLinkSet = GRPCMethodDescriptor( - name: "IpLinkSet", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/IpLinkSet", - type: GRPCCallType.unary - ) - - public static let ipAddrAdd = GRPCMethodDescriptor( - name: "IpAddrAdd", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/IpAddrAdd", - type: GRPCCallType.unary - ) - - public static let ipRouteAddLink = GRPCMethodDescriptor( - name: "IpRouteAddLink", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/IpRouteAddLink", - type: GRPCCallType.unary - ) - - public static let ipRouteAddDefault = GRPCMethodDescriptor( - name: "IpRouteAddDefault", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/IpRouteAddDefault", - type: GRPCCallType.unary - ) - - public static let configureDns = GRPCMethodDescriptor( - name: "ConfigureDns", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ConfigureDns", - type: GRPCCallType.unary - ) - - public static let configureHosts = GRPCMethodDescriptor( - name: "ConfigureHosts", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/ConfigureHosts", - type: GRPCCallType.unary - ) - - public static let sync = GRPCMethodDescriptor( - name: "Sync", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Sync", - type: GRPCCallType.unary - ) - - public static let kill = GRPCMethodDescriptor( - name: "Kill", - path: "/com.apple.containerization.sandbox.v3.SandboxContext/Kill", - type: GRPCCallType.unary - ) - } -} + /// Call the "SetupEmulator" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set up an emulator in the guest for a specific binary format. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func setupEmulator( + _ message: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.setupEmulator( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "WriteFile" method. + /// + /// > Source IDL Documentation: + /// > + /// > Write data to an existing or new file. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func writeFile( + _ message: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.writeFile( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "CreateProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Create a new process inside the container. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func createProcess( + _ message: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.createProcess( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "DeleteProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Delete an existing process inside the container. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func deleteProcess( + _ message: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.deleteProcess( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "StartProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Start the provided process. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func startProcess( + _ message: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.startProcess( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "KillProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to the provided process. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func killProcess( + _ message: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.killProcess( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "WaitProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Wait for a process to exit and return the exit code. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func waitProcess( + _ message: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.waitProcess( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ResizeProcess" method. + /// + /// > Source IDL Documentation: + /// > + /// > Resize the tty of a given process. This will error if the process does + /// > not have a pty allocated. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func resizeProcess( + _ message: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.resizeProcess( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "CloseProcessStdin" method. + /// + /// > Source IDL Documentation: + /// > + /// > Close IO for a given process. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func closeProcessStdin( + _ message: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.closeProcessStdin( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ContainerStatistics" method. + /// + /// > Source IDL Documentation: + /// > + /// > Get statistics for containers. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func containerStatistics( + _ message: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.containerStatistics( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ProxyVsock" method. + /// + /// > Source IDL Documentation: + /// > + /// > Proxy a vsock port to a unix domain socket in the guest, or vice versa. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func proxyVsock( + _ message: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.proxyVsock( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "StopVsockProxy" method. + /// + /// > Source IDL Documentation: + /// > + /// > Stop a vsock proxy to a unix domain socket. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func stopVsockProxy( + _ message: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.stopVsockProxy( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IpLinkSet" method. + /// + /// > Source IDL Documentation: + /// > + /// > Set the link state of a network interface. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipLinkSet( + _ message: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.ipLinkSet( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IpAddrAdd" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IPv4 address to a network interface. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipAddrAdd( + _ message: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.ipAddrAdd( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IpRouteAddLink" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipRouteAddLink( + _ message: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.ipRouteAddLink( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "IpRouteAddDefault" method. + /// + /// > Source IDL Documentation: + /// > + /// > Add an IP route for a network interface. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func ipRouteAddDefault( + _ message: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.ipRouteAddDefault( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ConfigureDns" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure DNS resolver. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func configureDns( + _ message: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.configureDns( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "ConfigureHosts" method. + /// + /// > Source IDL Documentation: + /// > + /// > Configure /etc/hosts. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func configureHosts( + _ message: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.configureHosts( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "Sync" method. + /// + /// > Source IDL Documentation: + /// > + /// > Perform the sync syscall. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func sync( + _ message: Com_Apple_Containerization_Sandbox_V3_SyncRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.sync( + request: request, + options: options, + onResponse: handleResponse + ) + } + + /// Call the "Kill" method. + /// + /// > Source IDL Documentation: + /// > + /// > Send a signal to a process via the PID. + /// + /// - Parameters: + /// - message: request message to send. + /// - metadata: Additional metadata to send, defaults to empty. + /// - options: Options to apply to this RPC, defaults to `.defaults`. + /// - handleResponse: A closure which handles the response, the result of which is + /// returned to the caller. Returning from the closure will cancel the RPC if it + /// hasn't already finished. + /// - Returns: The result of `handleResponse`. + public func kill( + _ message: Com_Apple_Containerization_Sandbox_V3_KillRequest, + metadata: GRPCCore.Metadata = [:], + options: GRPCCore.CallOptions = .defaults, + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { response in + try response.message + } + ) async throws -> Result where Result: Sendable { + let request = GRPCCore.ClientRequest( + message: message, + metadata: metadata + ) + return try await self.kill( + request: request, + options: options, + onResponse: handleResponse + ) + } +} \ No newline at end of file diff --git a/Sources/Containerization/SandboxContext/SandboxContext.pb.swift b/Sources/Containerization/SandboxContext/SandboxContext.pb.swift index f4b63152..0db6edef 100644 --- a/Sources/Containerization/SandboxContext/SandboxContext.pb.swift +++ b/Sources/Containerization/SandboxContext/SandboxContext.pb.swift @@ -371,7 +371,7 @@ public struct Com_Apple_Containerization_Sandbox_V3_GetenvResponse: Sendable { fileprivate var _value: String? = nil } -public struct Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest: @unchecked Sendable { +public struct Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest: Sendable { // 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. @@ -693,7 +693,7 @@ public struct Com_Apple_Containerization_Sandbox_V3_MkdirResponse: Sendable { public init() {} } -public struct Com_Apple_Containerization_Sandbox_V3_WriteFileRequest: @unchecked Sendable { +public struct Com_Apple_Containerization_Sandbox_V3_WriteFileRequest: Sendable { // 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. @@ -1212,11 +1212,7 @@ fileprivate let _protobuf_package = "com.apple.containerization.sandbox.v3" extension Com_Apple_Containerization_Sandbox_V3_Stdio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".Stdio" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "stdinPort"), - 2: .same(proto: "stdoutPort"), - 3: .same(proto: "stderrPort"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}stdinPort\0\u{1}stdoutPort\0\u{1}stderrPort\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1260,15 +1256,7 @@ extension Com_Apple_Containerization_Sandbox_V3_Stdio: SwiftProtobuf.Message, Sw extension Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".SetupEmulatorRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "binary_path"), - 2: .same(proto: "name"), - 3: .same(proto: "type"), - 4: .same(proto: "offset"), - 5: .same(proto: "magic"), - 6: .same(proto: "mask"), - 7: .same(proto: "flags"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}binary_path\0\u{1}name\0\u{1}type\0\u{1}offset\0\u{1}magic\0\u{1}mask\0\u{1}flags\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1347,10 +1335,7 @@ extension Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse: SwiftProt extension Com_Apple_Containerization_Sandbox_V3_SetTimeRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".SetTimeRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "sec"), - 2: .same(proto: "usec"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}sec\0\u{1}usec\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1404,9 +1389,7 @@ extension Com_Apple_Containerization_Sandbox_V3_SetTimeResponse: SwiftProtobuf.M extension Com_Apple_Containerization_Sandbox_V3_SysctlRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".SysctlRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "settings"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}settings\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1455,13 +1438,7 @@ extension Com_Apple_Containerization_Sandbox_V3_SysctlResponse: SwiftProtobuf.Me extension Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ProxyVsockRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .standard(proto: "vsock_port"), - 3: .same(proto: "guestPath"), - 4: .same(proto: "guestSocketPermissions"), - 5: .same(proto: "action"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{3}vsock_port\0\u{1}guestPath\0\u{1}guestSocketPermissions\0\u{1}action\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1514,10 +1491,7 @@ extension Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest: SwiftProtobuf } extension Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest.Action: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "INTO"), - 1: .same(proto: "OUT_OF"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0INTO\0\u{1}OUT_OF\0") } extension Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { @@ -1541,9 +1515,7 @@ extension Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse: SwiftProtobu extension Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".StopVsockProxyRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1592,12 +1564,7 @@ extension Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse: SwiftPro extension Com_Apple_Containerization_Sandbox_V3_MountRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".MountRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "type"), - 2: .same(proto: "source"), - 3: .same(proto: "destination"), - 4: .same(proto: "options"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{1}source\0\u{1}destination\0\u{1}options\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1661,10 +1628,7 @@ extension Com_Apple_Containerization_Sandbox_V3_MountResponse: SwiftProtobuf.Mes extension Com_Apple_Containerization_Sandbox_V3_UmountRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".UmountRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "path"), - 2: .same(proto: "flags"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}path\0\u{1}flags\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1718,10 +1682,7 @@ extension Com_Apple_Containerization_Sandbox_V3_UmountResponse: SwiftProtobuf.Me extension Com_Apple_Containerization_Sandbox_V3_SetenvRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".SetenvRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "key"), - 2: .same(proto: "value"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}key\0\u{1}value\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1779,9 +1740,7 @@ extension Com_Apple_Containerization_Sandbox_V3_SetenvResponse: SwiftProtobuf.Me extension Com_Apple_Containerization_Sandbox_V3_GetenvRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".GetenvRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "key"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}key\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1811,9 +1770,7 @@ extension Com_Apple_Containerization_Sandbox_V3_GetenvRequest: SwiftProtobuf.Mes extension Com_Apple_Containerization_Sandbox_V3_GetenvResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".GetenvResponse" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "value"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}value\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1847,15 +1804,7 @@ extension Com_Apple_Containerization_Sandbox_V3_GetenvResponse: SwiftProtobuf.Me extension Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CreateProcessRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .same(proto: "containerID"), - 3: .same(proto: "stdin"), - 4: .same(proto: "stdout"), - 5: .same(proto: "stderr"), - 6: .same(proto: "configuration"), - 7: .same(proto: "options"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}containerID\0\u{1}stdin\0\u{1}stdout\0\u{1}stderr\0\u{1}configuration\0\u{1}options\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1938,10 +1887,7 @@ extension Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse: SwiftProt extension Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".WaitProcessRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .same(proto: "containerID"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}containerID\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1980,10 +1926,7 @@ extension Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest: SwiftProtobu extension Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".WaitProcessResponse" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "exitCode"), - 2: .standard(proto: "exited_at"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}exitCode\0\u{3}exited_at\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2022,12 +1965,7 @@ extension Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse: SwiftProtob extension Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ResizeProcessRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .same(proto: "containerID"), - 3: .same(proto: "rows"), - 4: .same(proto: "columns"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}containerID\0\u{1}rows\0\u{1}columns\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2095,10 +2033,7 @@ extension Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse: SwiftProt extension Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".DeleteProcessRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .same(proto: "containerID"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}containerID\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2156,10 +2091,7 @@ extension Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse: SwiftProt extension Com_Apple_Containerization_Sandbox_V3_StartProcessRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".StartProcessRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .same(proto: "containerID"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}containerID\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2198,9 +2130,7 @@ extension Com_Apple_Containerization_Sandbox_V3_StartProcessRequest: SwiftProtob extension Com_Apple_Containerization_Sandbox_V3_StartProcessResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".StartProcessResponse" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "pid"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}pid\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2230,11 +2160,7 @@ extension Com_Apple_Containerization_Sandbox_V3_StartProcessResponse: SwiftProto extension Com_Apple_Containerization_Sandbox_V3_KillProcessRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".KillProcessRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .same(proto: "containerID"), - 3: .same(proto: "signal"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}containerID\0\u{1}signal\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2278,9 +2204,7 @@ extension Com_Apple_Containerization_Sandbox_V3_KillProcessRequest: SwiftProtobu extension Com_Apple_Containerization_Sandbox_V3_KillProcessResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".KillProcessResponse" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "result"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2310,10 +2234,7 @@ extension Com_Apple_Containerization_Sandbox_V3_KillProcessResponse: SwiftProtob extension Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CloseProcessStdinRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "id"), - 2: .same(proto: "containerID"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}containerID\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2371,11 +2292,7 @@ extension Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse: Swift extension Com_Apple_Containerization_Sandbox_V3_MkdirRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".MkdirRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "path"), - 2: .same(proto: "all"), - 3: .same(proto: "perms"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}path\0\u{1}all\0\u{1}perms\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2434,12 +2351,7 @@ extension Com_Apple_Containerization_Sandbox_V3_MkdirResponse: SwiftProtobuf.Mes extension Com_Apple_Containerization_Sandbox_V3_WriteFileRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".WriteFileRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "path"), - 2: .same(proto: "data"), - 3: .same(proto: "mode"), - 4: .same(proto: "flags"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}path\0\u{1}data\0\u{1}mode\0\u{1}flags\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2488,11 +2400,7 @@ extension Com_Apple_Containerization_Sandbox_V3_WriteFileRequest: SwiftProtobuf. extension Com_Apple_Containerization_Sandbox_V3_WriteFileRequest.WriteFileFlags: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = Com_Apple_Containerization_Sandbox_V3_WriteFileRequest.protoMessageName + ".WriteFileFlags" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "create_parent_dirs"), - 2: .same(proto: "append"), - 3: .standard(proto: "create_if_missing"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}create_parent_dirs\0\u{1}append\0\u{3}create_if_missing\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2551,11 +2459,7 @@ extension Com_Apple_Containerization_Sandbox_V3_WriteFileResponse: SwiftProtobuf extension Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".IpLinkSetRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "interface"), - 2: .same(proto: "up"), - 3: .same(proto: "mtu"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}interface\0\u{1}up\0\u{1}mtu\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2618,10 +2522,7 @@ extension Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse: SwiftProtobuf extension Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".IpAddrAddRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "interface"), - 2: .same(proto: "address"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}interface\0\u{1}address\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2675,11 +2576,7 @@ extension Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse: SwiftProtobuf extension Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".IpRouteAddLinkRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "interface"), - 2: .same(proto: "address"), - 3: .same(proto: "srcAddr"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}interface\0\u{1}address\0\u{1}srcAddr\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2738,10 +2635,7 @@ extension Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse: SwiftPro extension Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".IpRouteAddDefaultRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "interface"), - 2: .same(proto: "gateway"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}interface\0\u{1}gateway\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2795,13 +2689,7 @@ extension Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse: Swift extension Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ConfigureDnsRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "location"), - 2: .same(proto: "nameservers"), - 3: .same(proto: "domain"), - 4: .same(proto: "searchDomains"), - 5: .same(proto: "options"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}location\0\u{1}nameservers\0\u{1}domain\0\u{1}searchDomains\0\u{1}options\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2874,11 +2762,7 @@ extension Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse: SwiftProto extension Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ConfigureHostsRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "location"), - 2: .same(proto: "entries"), - 3: .same(proto: "comment"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}location\0\u{1}entries\0\u{1}comment\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2922,11 +2806,7 @@ extension Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest: SwiftProt extension Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest.HostsEntry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest.protoMessageName + ".HostsEntry" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "ipAddress"), - 2: .same(proto: "hostnames"), - 3: .same(proto: "comment"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}ipAddress\0\u{1}hostnames\0\u{1}comment\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3027,10 +2907,7 @@ extension Com_Apple_Containerization_Sandbox_V3_SyncResponse: SwiftProtobuf.Mess extension Com_Apple_Containerization_Sandbox_V3_KillRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".KillRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "pid"), - 3: .same(proto: "signal"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}pid\0\u{2}\u{2}signal\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3065,9 +2942,7 @@ extension Com_Apple_Containerization_Sandbox_V3_KillRequest: SwiftProtobuf.Messa extension Com_Apple_Containerization_Sandbox_V3_KillResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".KillResponse" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "result"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}result\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3097,9 +2972,7 @@ extension Com_Apple_Containerization_Sandbox_V3_KillResponse: SwiftProtobuf.Mess extension Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ContainerStatisticsRequest" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "container_ids"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}container_ids\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3129,9 +3002,7 @@ extension Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest: Swif extension Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ContainerStatisticsResponse" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "containers"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}containers\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3161,14 +3032,7 @@ extension Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse: Swi extension Com_Apple_Containerization_Sandbox_V3_ContainerStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ContainerStats" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "container_id"), - 2: .same(proto: "process"), - 3: .same(proto: "memory"), - 4: .same(proto: "cpu"), - 5: .standard(proto: "block_io"), - 6: .same(proto: "networks"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}container_id\0\u{1}process\0\u{1}memory\0\u{1}cpu\0\u{3}block_io\0\u{1}networks\0") fileprivate class _StorageClass { var _containerID: String = String() @@ -3273,10 +3137,7 @@ extension Com_Apple_Containerization_Sandbox_V3_ContainerStats: SwiftProtobuf.Me extension Com_Apple_Containerization_Sandbox_V3_ProcessStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ProcessStats" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "current"), - 2: .same(proto: "limit"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}current\0\u{1}limit\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3311,17 +3172,7 @@ extension Com_Apple_Containerization_Sandbox_V3_ProcessStats: SwiftProtobuf.Mess extension Com_Apple_Containerization_Sandbox_V3_MemoryStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".MemoryStats" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "usage_bytes"), - 2: .standard(proto: "limit_bytes"), - 3: .standard(proto: "swap_usage_bytes"), - 4: .standard(proto: "swap_limit_bytes"), - 5: .standard(proto: "cache_bytes"), - 6: .standard(proto: "kernel_stack_bytes"), - 7: .standard(proto: "slab_bytes"), - 8: .standard(proto: "page_faults"), - 9: .standard(proto: "major_page_faults"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}usage_bytes\0\u{3}limit_bytes\0\u{3}swap_usage_bytes\0\u{3}swap_limit_bytes\0\u{3}cache_bytes\0\u{3}kernel_stack_bytes\0\u{3}slab_bytes\0\u{3}page_faults\0\u{3}major_page_faults\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3391,14 +3242,7 @@ extension Com_Apple_Containerization_Sandbox_V3_MemoryStats: SwiftProtobuf.Messa extension Com_Apple_Containerization_Sandbox_V3_CPUStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CPUStats" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .standard(proto: "usage_usec"), - 2: .standard(proto: "user_usec"), - 3: .standard(proto: "system_usec"), - 4: .standard(proto: "throttling_periods"), - 5: .standard(proto: "throttled_periods"), - 6: .standard(proto: "throttled_time_usec"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}usage_usec\0\u{3}user_usec\0\u{3}system_usec\0\u{3}throttling_periods\0\u{3}throttled_periods\0\u{3}throttled_time_usec\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3453,9 +3297,7 @@ extension Com_Apple_Containerization_Sandbox_V3_CPUStats: SwiftProtobuf.Message, extension Com_Apple_Containerization_Sandbox_V3_BlockIOStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".BlockIOStats" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "devices"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}devices\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3485,14 +3327,7 @@ extension Com_Apple_Containerization_Sandbox_V3_BlockIOStats: SwiftProtobuf.Mess extension Com_Apple_Containerization_Sandbox_V3_BlockIOEntry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".BlockIOEntry" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "major"), - 2: .same(proto: "minor"), - 3: .standard(proto: "read_bytes"), - 4: .standard(proto: "write_bytes"), - 5: .standard(proto: "read_operations"), - 6: .standard(proto: "write_operations"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}major\0\u{1}minor\0\u{3}read_bytes\0\u{3}write_bytes\0\u{3}read_operations\0\u{3}write_operations\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3547,15 +3382,7 @@ extension Com_Apple_Containerization_Sandbox_V3_BlockIOEntry: SwiftProtobuf.Mess extension Com_Apple_Containerization_Sandbox_V3_NetworkStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".NetworkStats" - public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "interface"), - 2: .same(proto: "receivedPackets"), - 3: .same(proto: "transmittedPackets"), - 4: .same(proto: "receivedBytes"), - 5: .same(proto: "transmittedBytes"), - 6: .same(proto: "receivedErrors"), - 7: .same(proto: "transmittedErrors"), - ] + public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}interface\0\u{1}receivedPackets\0\u{1}transmittedPackets\0\u{1}receivedBytes\0\u{1}transmittedBytes\0\u{1}receivedErrors\0\u{1}transmittedErrors\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { diff --git a/Sources/Containerization/VZVirtualMachineInstance.swift b/Sources/Containerization/VZVirtualMachineInstance.swift index 035009e8..46efc2a7 100644 --- a/Sources/Containerization/VZVirtualMachineInstance.swift +++ b/Sources/Containerization/VZVirtualMachineInstance.swift @@ -130,7 +130,7 @@ extension VZVirtualMachineInstance: VirtualMachineInstance { try await self.vm.start(queue: self.queue) - let agent = Vminitd( + let agent = try Vminitd( connection: try await self.vm.waitForAgent(queue: self.queue), group: self.group ) @@ -200,7 +200,7 @@ extension VZVirtualMachineInstance: VirtualMachineInstance { port: Vminitd.port ).dupHandle() - let agent = Vminitd(connection: handle, group: self.group) + let agent = try Vminitd(connection: handle, group: self.group) connections.agents.append(agent) return agent diff --git a/Sources/Containerization/Vminitd.swift b/Sources/Containerization/Vminitd.swift index 225f3b2b..f355001a 100644 --- a/Sources/Containerization/Vminitd.swift +++ b/Sources/Containerization/Vminitd.swift @@ -18,31 +18,41 @@ import ContainerizationError import ContainerizationOCI import ContainerizationOS import Foundation -import GRPC +import GRPCCore +import GRPCNIOTransportCore import NIOCore import NIOPosix /// A remote connection into the vminitd Linux guest agent via a port (vsock). /// Used to modify the runtime environment of the Linux sandbox. public struct Vminitd: Sendable { - public typealias Client = Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncClient - // Default vsock port that the agent and client use. public static let port: UInt32 = 1024 - let client: Client - - public init(client: Client) { - self.client = client - } + let client: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Client + private let grpcClient: GRPCClient + private let connectionTask: Task - public init(connection: FileHandle, group: EventLoopGroup) { - self.client = .init(connection: connection, group: group) + public init(connection: FileHandle, group: any EventLoopGroup) throws { + let channel = try ClientBootstrap(group: group) + .withConnectedSocket(connection.fileDescriptor).wait() + let transport = HTTP2ClientTransport.WrappedChannel.wrapping( + channel: channel, + ) + let grpcClient = GRPCClient(transport: transport) + self.grpcClient = grpcClient + self.client = Com_Apple_Containerization_Sandbox_V3_SandboxContext.Client(wrapping: self.grpcClient) + // Not very structured concurrency friendly, but we'd need to expose a way on the protocol to "run" the + // agent otherwise, which some agents might not even need. + self.connectionTask = Task { + try await grpcClient.runConnections() + } } /// Close the connection to the guest agent. public func close() async throws { - try await client.close() + self.grpcClient.beginGracefulShutdown() + try await self.connectionTask.value } } @@ -254,17 +264,17 @@ extension Vminitd: VirtualMachineAgent { $0.containerID = containerID } } - var callOpts: CallOptions? + + var callOpts = GRPCCore.CallOptions.defaults if let timeoutInSeconds { - var copts = CallOptions() - copts.timeLimit = .timeout(.seconds(timeoutInSeconds)) - callOpts = copts + callOpts.timeout = .seconds(timeoutInSeconds) } + do { - let resp = try await client.waitProcess(request, callOptions: callOpts) + let resp = try await client.waitProcess(request, options: callOpts) return ExitStatus(exitCode: resp.exitCode, exitedAt: resp.exitedAt.date) } catch { - if let err = error as? GRPCError.RPCTimedOut { + if let err = error as? RPCError, err.code == .deadlineExceeded { throw ContainerizationError( .timeout, message: "failed to wait for process exit within timeout of \(timeoutInSeconds!) seconds", @@ -449,31 +459,3 @@ extension Hosts { } } } - -extension Vminitd.Client { - public init(socket: String, group: EventLoopGroup) { - var config = ClientConnection.Configuration.default( - target: .unixDomainSocket(socket), - eventLoopGroup: group - ) - config.maximumReceiveMessageLength = Int(64.mib()) - config.connectionBackoff = ConnectionBackoff(retries: .upTo(5)) - - self = .init(channel: ClientConnection(configuration: config)) - } - - public init(connection: FileHandle, group: EventLoopGroup) { - var config = ClientConnection.Configuration.default( - target: .connectedSocket(connection.fileDescriptor), - eventLoopGroup: group - ) - config.maximumReceiveMessageLength = Int(64.mib()) - config.connectionBackoff = ConnectionBackoff(retries: .upTo(5)) - - self = .init(channel: ClientConnection(configuration: config)) - } - - public func close() async throws { - try await self.channel.close().get() - } -} diff --git a/vminitd/Package.resolved b/vminitd/Package.resolved index 527e80af..1f7aea20 100644 --- a/vminitd/Package.resolved +++ b/vminitd/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "0855d97d95dd20ece9675e6b2aa0f7560c0843a73eadc8b42b9a9353047cb802", + "originHash" : "33caf5f8c4ba5c0567752386a790948b98eb078973f1b0391583a8adc637b2b0", "pins" : [ { "identity" : "async-http-client", @@ -11,12 +11,30 @@ } }, { - "identity" : "grpc-swift", + "identity" : "grpc-swift-2", "kind" : "remoteSourceControl", - "location" : "https://github.com/grpc/grpc-swift.git", + "location" : "https://github.com/grpc/grpc-swift-2.git", "state" : { - "revision" : "a56a157218877ef3e9625f7e1f7b2cb7e46ead1b", - "version" : "1.26.1" + "revision" : "0e52abf7ea0fca7ffe876953aa41feff84cc6e29", + "version" : "2.1.0" + } + }, + { + "identity" : "grpc-swift-nio-transport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/grpc/grpc-swift-nio-transport.git", + "state" : { + "revision" : "0393731de32c472e3bcdb7f339ecf55cc607a6b4", + "version" : "2.2.0" + } + }, + { + "identity" : "grpc-swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/grpc/grpc-swift-protobuf.git", + "state" : { + "revision" : "c008d356d9e9c2255602711888bf25b542a30919", + "version" : "2.1.1" } }, { @@ -69,8 +87,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-certificates.git", "state" : { - "revision" : "999fd70c7803da89f3904d635a6815a2a7cd7585", - "version" : "1.10.0" + "revision" : "f4cd9e78a1ec209b27e426a5f5c693675f95e75a", + "version" : "1.15.0" } }, { @@ -123,8 +141,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio.git", "state" : { - "revision" : "34d486b01cd891297ac615e40d5999536a1e138d", - "version" : "2.83.0" + "revision" : "4e8f4b1c9adaa59315c523540c1ff2b38adc20a9", + "version" : "2.87.0" } }, { @@ -141,8 +159,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-http2.git", "state" : { - "revision" : "4281466512f63d1bd530e33f4aa6993ee7864be0", - "version" : "1.36.0" + "revision" : "5e9e99ec96c53bc2c18ddd10c1e25a3cd97c55e5", + "version" : "1.38.0" } }, { @@ -150,8 +168,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-ssl.git", "state" : { - "revision" : "4b38f35946d00d8f6176fe58f96d83aba64b36c7", - "version" : "2.31.0" + "revision" : "d3bad3847c53015fe8ec1e6c3ab54e53a5b6f15f", + "version" : "2.35.0" } }, { @@ -177,8 +195,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "102a647b573f60f73afdce5613a51d71349fe507", - "version" : "1.30.0" + "revision" : "c6fe6442e6a64250495669325044052e113e990c", + "version" : "1.32.0" } }, { diff --git a/vminitd/Package.swift b/vminitd/Package.swift index 7c3b81c2..45551fdf 100644 --- a/vminitd/Package.swift +++ b/vminitd/Package.swift @@ -30,6 +30,9 @@ let package = Package( .package(url: "https://github.com/apple/swift-argument-parser", from: "1.3.0"), .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), .package(url: "https://github.com/apple/swift-nio", from: "2.80.0"), + .package(url: "https://github.com/grpc/grpc-swift-2.git", from: "2.1.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "2.2.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "2.0.0"), .package(name: "containerization", path: "../"), ], targets: [ @@ -53,6 +56,9 @@ let package = Package( .product(name: "ContainerizationNetlink", package: "containerization"), .product(name: "ContainerizationIO", package: "containerization"), .product(name: "ContainerizationOS", package: "containerization"), + .product(name: "GRPCCore", package: "grpc-swift-2"), + .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), + .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), "LCShim", "Cgroup", ] diff --git a/vminitd/Sources/vminitd/ManagedProcess.swift b/vminitd/Sources/vminitd/ManagedProcess.swift index 965d1205..9c70f97d 100644 --- a/vminitd/Sources/vminitd/ManagedProcess.swift +++ b/vminitd/Sources/vminitd/ManagedProcess.swift @@ -20,7 +20,6 @@ import ContainerizationError import ContainerizationOCI import ContainerizationOS import Foundation -import GRPC import Logging import Synchronization diff --git a/vminitd/Sources/vminitd/Server+GRPC.swift b/vminitd/Sources/vminitd/Server+GRPC.swift index 9b9d9228..29703cce 100644 --- a/vminitd/Sources/vminitd/Server+GRPC.swift +++ b/vminitd/Sources/vminitd/Server+GRPC.swift @@ -21,7 +21,8 @@ import ContainerizationNetlink import ContainerizationOCI import ContainerizationOS import Foundation -import GRPC +import GRPCCore +import GRPCProtobuf import Logging import NIOCore import NIOPosix @@ -44,10 +45,10 @@ private let _kill = Glibc.kill private let _sync = Glibc.sync #endif -extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvider { +extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServiceProtocol { func setTime( request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetTimeResponse { log.debug( "setTime", @@ -64,7 +65,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "failed to settimeofday: \(error)") + throw RPCError(code: .internalError, message: "failed to settimeofday", cause: error) } return .init() @@ -72,7 +73,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func setupEmulator( request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse { log.debug( "setupEmulator", @@ -81,7 +82,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid ]) if !Binfmt.mounted() { - throw GRPCStatus( + throw RPCError( code: .internalError, message: "\(Binfmt.path) is not mounted" ) @@ -103,9 +104,10 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "setupEmulator: failed to register binfmt_misc entry: \(error)" + message: "setupEmulator: failed to register binfmt_misc entry", + cause: error ) } @@ -114,7 +116,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func sysctl( request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_SysctlResponse { log.debug( "sysctl", @@ -126,7 +128,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid let sysctlPath = URL(fileURLWithPath: "/proc/sys/") for (k, v) in request.settings { guard let data = v.data(using: .ascii) else { - throw GRPCStatus(code: .internalError, message: "failed to convert \(v) to data buffer for sysctl write") + throw RPCError(code: .internalError, message: "failed to convert \(v) to data buffer for sysctl write") } let setting = @@ -143,9 +145,10 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "sysctl: failed to set sysctl: \(error)" + message: "sysctl: failed to set sysctl", + cause: error ) } @@ -154,7 +157,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func proxyVsock( request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse { log.debug( "proxyVsock", @@ -183,9 +186,10 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "proxyVsock: failed to setup vsock proxy: \(error)" + message: "proxyVsock: failed to setup vsock proxy", + cause: error ) } @@ -194,7 +198,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func stopVsockProxy( request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse { log.debug( "stopVsockProxy", @@ -211,16 +215,17 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "stopVsockProxy: failed to stop vsock proxy: \(error)" + message: "stopVsockProxy: failed to stop vsock proxy", + cause: error ) } return .init() } - func mkdir(request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, context: GRPC.GRPCAsyncServerCallContext) + func mkdir(request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, context: GRPCCore.ServerContext) async throws -> Com_Apple_Containerization_Sandbox_V3_MkdirResponse { log.debug( @@ -241,13 +246,13 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "mkdir: \(error)") + throw RPCError(code: .internalError, message: "mkdir", cause: error) } return .init() } - func writeFile(request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, context: GRPC.GRPCAsyncServerCallContext) + func writeFile(request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, context: GRPCCore.ServerContext) async throws -> Com_Apple_Containerization_Sandbox_V3_WriteFileResponse { log.debug( @@ -280,9 +285,10 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid let fd = open(request.path, flags, mode) guard fd != -1 else { let error = swiftErrno("open") - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "writeFile: failed to open file: \(error)" + message: "writeFile: failed to open file", + cause: error ) } @@ -294,19 +300,20 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - if error is GRPCStatus { + if error is RPCError { throw error } - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "writeFile: \(error)" + message: "writeFile", + cause: error ) } return .init() } - func mount(request: Com_Apple_Containerization_Sandbox_V3_MountRequest, context: GRPC.GRPCAsyncServerCallContext) + func mount(request: Com_Apple_Containerization_Sandbox_V3_MountRequest, context: GRPCCore.ServerContext) async throws -> Com_Apple_Containerization_Sandbox_V3_MountResponse { log.debug( @@ -337,11 +344,11 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "mount: \(error)") + throw RPCError(code: .internalError, message: "mount", cause: error) } } - func umount(request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, context: GRPC.GRPCAsyncServerCallContext) + func umount(request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, context: GRPCCore.ServerContext) async throws -> Com_Apple_Containerization_Sandbox_V3_UmountResponse { log.debug( @@ -367,7 +374,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .invalidArgument, message: "umount: \(error)") + throw RPCError(code: .invalidArgument, message: "umount", cause: error) } break } @@ -377,7 +384,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid #endif } - func setenv(request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, context: GRPC.GRPCAsyncServerCallContext) + func setenv(request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, context: GRPCCore.ServerContext) async throws -> Com_Apple_Containerization_Sandbox_V3_SetenvResponse { log.debug( @@ -396,12 +403,12 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid "error": "\(error)" ]) - throw GRPCStatus(code: .invalidArgument, message: "setenv: \(error)") + throw RPCError(code: .invalidArgument, message: "setenv", cause: error) } return .init() } - func getenv(request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, context: GRPC.GRPCAsyncServerCallContext) + func getenv(request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, context: GRPCCore.ServerContext) async throws -> Com_Apple_Containerization_Sandbox_V3_GetenvResponse { log.debug( @@ -419,7 +426,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid } func createProcess( - request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, context: GRPC.GRPCAsyncServerCallContext + request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse { log.debug( "createProcess", @@ -506,16 +513,16 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid "containerID": "\(request.containerID)", "error": "\(error)", ]) - if error is GRPCStatus { + if error is RPCError { throw error } - throw GRPCStatus(code: .internalError, message: "createProcess: \(error)") + throw RPCError(code: .internalError, message: "createProcess", cause: error) } } func killProcess( request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_KillProcessResponse { log.debug( "killProcess", @@ -539,7 +546,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid } func deleteProcess( - request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, context: GRPC.GRPCAsyncServerCallContext + request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse { log.debug( "deleteProcess", @@ -570,7 +577,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid } func startProcess( - request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, context: GRPCAsyncServerCallContext + request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_StartProcessResponse { log.debug( "startProcess", @@ -601,15 +608,16 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "startProcess: failed to start process: \(error)" + message: "startProcess: failed to start process", + cause: error ) } } func resizeProcess( - request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, context: GRPCAsyncServerCallContext + request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse { log.debug( "resizeProcess", @@ -640,9 +648,10 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "resizeProcess: failed to resize process: \(error)" + message: "resizeProcess: failed to resize process", + cause: error ) } @@ -650,7 +659,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid } func waitProcess( - request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, context: GRPCAsyncServerCallContext + request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse { log.debug( "waitProcess", @@ -682,15 +691,16 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "waitProcess: failed to wait on process: \(error)" + message: "waitProcess: failed to wait on process", + cause: error ) } } func closeProcessStdin( - request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, context: GRPCAsyncServerCallContext + request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse { log.debug( "closeProcessStdin", @@ -720,15 +730,16 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw GRPCStatus( + throw RPCError( code: .internalError, - message: "closeProcessStdin: failed to close process stdin: \(error)" + message: "closeProcessStdin: failed to close process stdin", + cause: error ) } } func ipLinkSet( - request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, context: GRPC.GRPCAsyncServerCallContext + request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse { log.debug( "ipLinkSet", @@ -748,14 +759,14 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "ip-link-set: \(error)") + throw RPCError(code: .internalError, message: "ipLinkSet", cause: error) } return .init() } func ipAddrAdd( - request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, context: GRPC.GRPCAsyncServerCallContext + request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse { log.debug( "ipAddrAdd", @@ -774,14 +785,14 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "ip-addr-add: \(error)") + throw RPCError(code: .internalError, message: "ipAddrAdd", cause: error) } return .init() } func ipRouteAddLink( - request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, context: GRPC.GRPCAsyncServerCallContext + request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse { log.debug( "ipRouteAddLink", @@ -805,7 +816,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "ip-route-add-link: \(error)") + throw RPCError(code: .internalError, message: "ipRouteAddLink", cause: error) } return .init() @@ -813,7 +824,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func ipRouteAddDefault( request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse { log.debug( "ipRouteAddDefault", @@ -832,7 +843,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "ip-route-add-default: \(error)") + throw RPCError(code: .internalError, message: "ipRouteAddDefault", cause: error) } return .init() @@ -840,7 +851,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func configureDns( request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse { let domain = request.hasDomain ? request.domain : nil log.debug( @@ -873,7 +884,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "configure-dns: \(error)") + throw RPCError(code: .internalError, message: "configureDns", cause: error) } return .init() @@ -881,7 +892,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func configureHosts( request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse { log.debug( "configureHosts", @@ -905,7 +916,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "configureHosts: \(error)") + throw RPCError(code: .internalError, message: "configureHosts", cause: error) } return .init() @@ -913,7 +924,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func containerStatistics( request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse { log.debug( "containerStatistics", @@ -972,7 +983,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid metadata: [ "error": "\(error)" ]) - throw GRPCStatus(code: .internalError, message: "containerStatistics: \(error)") + throw RPCError(code: .internalError, message: "containerStatistics", cause: error) } } @@ -1057,7 +1068,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func sync( request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, - context: GRPC.GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_SyncResponse { log.debug("sync") @@ -1067,7 +1078,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid func kill( request: Com_Apple_Containerization_Sandbox_V3_KillRequest, - context: GRPCAsyncServerCallContext + context: GRPCCore.ServerContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_KillResponse { log.debug( "kill", diff --git a/vminitd/Sources/vminitd/Server.swift b/vminitd/Sources/vminitd/Server.swift index 59fb57d8..7fe64dc1 100644 --- a/vminitd/Sources/vminitd/Server.swift +++ b/vminitd/Sources/vminitd/Server.swift @@ -16,7 +16,9 @@ import ContainerizationError import Foundation -import GRPC +import GRPCCore +import GRPCNIOTransportHTTP2 +import GRPCProtobuf import Logging import NIOCore import NIOPosix @@ -98,21 +100,23 @@ final class Initd: Sendable { metadata: [ "port": "\(port)" ]) - let server = try await Server.start( - configuration: .default( - target: .vsockAddress(.init(cid: .any, port: .init(port))), - eventLoopGroup: self.group, - serviceProviders: [self]) - ).get() + + let server = GRPCServer( + transport: .http2NIOPosix( + address: .vsock(contextID: .any, port: .init(port)), + transportSecurity: .plaintext + ), + services: [self] + ) + log.info( "gRPC API serving on vsock", metadata: [ "port": "\(port)" ]) - group.addTask { - try await server.onClose.get() - } + group.addTask { try await server.serve() } + try await group.next() log.info("closing gRPC server") group.cancelAll()