diff --git a/Package.resolved b/Package.resolved index abcc214e..25c0dcb3 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "f2af83112ef9c25538d60f115c1d21ccfa89e850a8685333af1b3492ff8cda36", + "originHash" : "8b51a9ec068537ab57ce9b8034b5b84a02a4697e4a6be491954e5fbda7e5783b", "pins" : [ { "identity" : "async-http-client", @@ -11,30 +11,12 @@ } }, { - "identity" : "grpc-swift-2", + "identity" : "grpc-swift", "kind" : "remoteSourceControl", - "location" : "https://github.com/grpc/grpc-swift-2.git", + "location" : "https://github.com/grpc/grpc-swift.git", "state" : { - "revision" : "f28854bc760a116e053fdfc4a48a9428c34625c0", - "version" : "2.3.0" - } - }, - { - "identity" : "grpc-swift-nio-transport", - "kind" : "remoteSourceControl", - "location" : "https://github.com/grpc/grpc-swift-nio-transport.git", - "state" : { - "revision" : "f37e0c2d293cea668b11e10e1fb1c24cb40781ff", - "version" : "2.4.4" - } - }, - { - "identity" : "grpc-swift-protobuf", - "kind" : "remoteSourceControl", - "location" : "https://github.com/grpc/grpc-swift-protobuf.git", - "state" : { - "revision" : "19153231a03c2fda1f4ea60da1b92a2cb9c011d8", - "version" : "2.2.0" + "revision" : "a56a157218877ef3e9625f7e1f7b2cb7e46ead1b", + "version" : "1.26.1" } }, { @@ -51,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser.git", "state" : { - "revision" : "c5d11a805e765f52ba34ec7284bd4fcd6ba68615", - "version" : "1.7.0" + "revision" : "011f0c765fb46d9cac61bca19be0527e99c98c8b", + "version" : "1.5.1" } }, { @@ -87,8 +69,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-certificates.git", "state" : { - "revision" : "f4cd9e78a1ec209b27e426a5f5c693675f95e75a", - "version" : "1.15.0" + "revision" : "999fd70c7803da89f3904d635a6815a2a7cd7585", + "version" : "1.10.0" } }, { @@ -150,8 +132,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log.git", "state" : { - "revision" : "bbd81b6725ae874c69e9b8c8804d462356b55523", - "version" : "1.10.1" + "revision" : "3d8596ed08bd13520157f0355e35caed215ffbfa", + "version" : "1.6.3" } }, { @@ -159,8 +141,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio.git", "state" : { - "revision" : "4e8f4b1c9adaa59315c523540c1ff2b38adc20a9", - "version" : "2.87.0" + "revision" : "34d486b01cd891297ac615e40d5999536a1e138d", + "version" : "2.83.0" } }, { @@ -177,8 +159,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-http2.git", "state" : { - "revision" : "5e9e99ec96c53bc2c18ddd10c1e25a3cd97c55e5", - "version" : "1.38.0" + "revision" : "4281466512f63d1bd530e33f4aa6993ee7864be0", + "version" : "1.36.0" } }, { @@ -213,8 +195,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "86970144a0b86068c81ff48ee29b3f97cae0b879", - "version" : "1.36.0" + "revision" : "102a647b573f60f73afdce5613a51d71349fe507", + "version" : "1.30.0" } }, { @@ -231,8 +213,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-system.git", "state" : { - "revision" : "7c6ad0fc39d0763e0b699210e4124afd5041c5df", - "version" : "1.6.4" + "revision" : "395a77f0aa927f0ff73941d7ac35f2b46d47c9db", + "version" : "1.6.3" } }, { diff --git a/Package.swift b/Package.swift index 63ed7e05..40997523 100644 --- a/Package.swift +++ b/Package.swift @@ -36,19 +36,17 @@ let package = Package( .executable(name: "cctl", targets: ["cctl"]), ], dependencies: [ - .package(url: "https://github.com/apple/swift-log.git", from: "1.10.1"), - .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.7.0"), + .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), + .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.3.0"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "2.4.4"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "2.2.0"), - .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.36.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-nio.git", from: "2.80.0"), - .package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.36.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.6.4"), + .package(url: "https://github.com/apple/swift-system.git", from: "1.4.0"), .package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0"), + .package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.36.0"), .package(url: "https://github.com/facebook/zstd.git", exact: "1.5.7"), ], targets: [ @@ -59,10 +57,8 @@ 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"), "ContainerizationArchive", "ContainerizationOCI", diff --git a/Protobuf.Makefile b/Protobuf.Makefile index 31e2293f..bc4f924d 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-2 + @$(SWIFT) build --product protoc-gen-grpc-swift .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-2 \ + --plugin=protoc-gen-grpc-swift=$(BUILD_BIN_DIR)/protoc-gen-grpc-swift \ --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 785296f3..1600090f 100644 --- a/Sources/Containerization/SandboxContext/SandboxContext.grpc.swift +++ b/Sources/Containerization/SandboxContext/SandboxContext.grpc.swift @@ -14,6376 +14,3025 @@ // limitations under the License. //===----------------------------------------------------------------------===// +// // DO NOT EDIT. // swift-format-ignore-file -// swiftlint:disable all // -// Generated by the gRPC Swift generator plugin for the protocol buffer compiler. +// Generated by the protocol buffer compiler. // Source: SandboxContext.proto // -// For information on using the generated types, please see the documentation: -// https://github.com/grpc/grpc-swift - -import GRPCCore -import GRPCProtobuf - -// 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: Sendable { - /// 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: Sendable { - /// Namespace for "Mount" metadata. - public enum Mount: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "Umount" metadata. - public enum Umount: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "Setenv" metadata. - public enum Setenv: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "Getenv" metadata. - public enum Getenv: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "Mkdir" metadata. - public enum Mkdir: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "Sysctl" metadata. - public enum Sysctl: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "SetTime" metadata. - public enum SetTime: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "SetupEmulator" metadata. - public enum SetupEmulator: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "WriteFile" metadata. - public enum WriteFile: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "Copy" metadata. - public enum Copy: Sendable { - /// Request type for "Copy". - public typealias Input = Com_Apple_Containerization_Sandbox_V3_CopyRequest - /// Response type for "Copy". - public typealias Output = Com_Apple_Containerization_Sandbox_V3_CopyResponse - /// Descriptor for "Copy". - public static let descriptor = GRPCCore.MethodDescriptor( - service: GRPCCore.ServiceDescriptor(fullyQualifiedService: "com.apple.containerization.sandbox.v3.SandboxContext"), - method: "Copy", - type: .serverStreaming - ) - } - /// Namespace for "CreateProcess" metadata. - public enum CreateProcess: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "DeleteProcess" metadata. - public enum DeleteProcess: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "StartProcess" metadata. - public enum StartProcess: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "KillProcess" metadata. - public enum KillProcess: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "WaitProcess" metadata. - public enum WaitProcess: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "ResizeProcess" metadata. - public enum ResizeProcess: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "CloseProcessStdin" metadata. - public enum CloseProcessStdin: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "ContainerStatistics" metadata. - public enum ContainerStatistics: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "ProxyVsock" metadata. - public enum ProxyVsock: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "StopVsockProxy" metadata. - public enum StopVsockProxy: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "IpLinkSet" metadata. - public enum IpLinkSet: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "IpAddrAdd" metadata. - public enum IpAddrAdd: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "IpRouteAddLink" metadata. - public enum IpRouteAddLink: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "IpRouteAddDefault" metadata. - public enum IpRouteAddDefault: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "ConfigureDns" metadata. - public enum ConfigureDns: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "ConfigureHosts" metadata. - public enum ConfigureHosts: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "Sync" metadata. - public enum Sync: Sendable { - /// 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", - type: .unary - ) - } - /// Namespace for "Kill" metadata. - public enum Kill: Sendable { - /// 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", - type: .unary - ) - } - /// 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, - Copy.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 - ] - } +import GRPC +import NIO +import NIOConcurrencyHelpers +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 copy( + _ request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, + callOptions: CallOptions?, + handler: @escaping (Com_Apple_Containerization_Sandbox_V3_CopyResponse) -> Void + ) -> ServerStreamingCall + + 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 } -@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") +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() ?? [] + ) + } + + /// Copy a file or directory between the host and guest. + /// Data transfer happens over a dedicated vsock connection; + /// the gRPC stream is used only for control/metadata. + /// + /// - Parameters: + /// - request: Request to send to Copy. + /// - callOptions: Call options. + /// - handler: A closure called when each response is received from the server. + /// - Returns: A `ServerStreamingCall` with futures for the metadata and status. + public func copy( + _ request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, + callOptions: CallOptions? = nil, + handler: @escaping (Com_Apple_Containerization_Sandbox_V3_CopyResponse) -> Void + ) -> ServerStreamingCall { + return self.makeServerStreamingCall( + path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.copy.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeCopyInterceptors() ?? [], + handler: handler + ) + } + + /// 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() ?? [] + ) + } } -// 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 "Copy" method. - /// - /// > Source IDL Documentation: - /// > - /// > Copy a file or directory between the host and guest. - /// > Data transfer happens over a dedicated vsock connection; - /// > the gRPC stream is used only for control/metadata. - /// - /// - Parameters: - /// - request: A streaming request of `Com_Apple_Containerization_Sandbox_V3_CopyRequest` 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_CopyResponse` messages. - func copy( - 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 - } - - /// 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 "Copy" method. - /// - /// > Source IDL Documentation: - /// > - /// > Copy a file or directory between the host and guest. - /// > Data transfer happens over a dedicated vsock connection; - /// > the gRPC stream is used only for control/metadata. - /// - /// - Parameters: - /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CopyRequest` 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 streaming response of `Com_Apple_Containerization_Sandbox_V3_CopyResponse` messages. - func copy( - request: GRPCCore.ServerRequest, - context: GRPCCore.ServerContext - ) async throws -> GRPCCore.StreamingServerResponse - - /// 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 - } - - /// 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 "Copy" method. - /// - /// > Source IDL Documentation: - /// > - /// > Copy a file or directory between the host and guest. - /// > Data transfer happens over a dedicated vsock connection; - /// > the gRPC stream is used only for control/metadata. - /// - /// - Parameters: - /// - request: A `Com_Apple_Containerization_Sandbox_V3_CopyRequest` message. - /// - response: A response stream of `Com_Apple_Containerization_Sandbox_V3_CopyResponse` 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. - func copy( - request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, - response: GRPCCore.RPCWriter, - context: GRPCCore.ServerContext - ) async throws - - /// 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(*, 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 + } } -// 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.Copy.descriptor, - deserializer: GRPCProtobuf.ProtobufDeserializer(), - serializer: GRPCProtobuf.ProtobufSerializer(), - handler: { request, context in - try await self.copy( - 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 - ) - } - ) - } +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 + } } -// 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) - } - - 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 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) - } - - 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) - } - - 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) - } - - 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) - } - - 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) - } - - 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) - } - - 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) - } - - public func copy( - request: GRPCCore.StreamingServerRequest, - context: GRPCCore.ServerContext - ) async throws -> GRPCCore.StreamingServerResponse { - let response = try await self.copy( - request: GRPCCore.ServerRequest(stream: request), - context: context - ) - return response - } - - 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) - } - - 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) - } - - 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) - } - - 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) - } - - 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) - } - - 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) - } - - 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) - } +/// 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 makeCopyCall( + _ request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, + callOptions: CallOptions? + ) -> GRPCAsyncServerStreamingCall + + 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 +} - 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) - } +@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 makeCopyCall( + _ request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncServerStreamingCall { + return self.makeAsyncServerStreamingCall( + path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.copy.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeCopyInterceptors() ?? [] + ) + } + + 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() ?? [] + ) + } +} - 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) - } +@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 copy( + _ request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, + callOptions: CallOptions? = nil + ) -> GRPCAsyncResponseStream { + return self.performAsyncServerStreamingCall( + path: Com_Apple_Containerization_Sandbox_V3_SandboxContextClientMetadata.Methods.copy.path, + request: request, + callOptions: callOptions ?? self.defaultCallOptions, + interceptors: self.interceptors?.makeCopyInterceptors() ?? [] + ) + } + + 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() ?? [] + ) + } +} - 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) - } +@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 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) - } +public protocol Com_Apple_Containerization_Sandbox_V3_SandboxContextClientInterceptorFactoryProtocol: Sendable { - 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 'mount'. + func makeMountInterceptors() -> [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 'umount'. + func makeUmountInterceptors() -> [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 'setenv'. + func makeSetenvInterceptors() -> [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 'getenv'. + func makeGetenvInterceptors() -> [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 'mkdir'. + func makeMkdirInterceptors() -> [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 'sysctl'. + func makeSysctlInterceptors() -> [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 'setTime'. + func makeSetTimeInterceptors() -> [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 'setupEmulator'. + func makeSetupEmulatorInterceptors() -> [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 'writeFile'. + func makeWriteFileInterceptors() -> [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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'copy'. + func makeCopyInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'createProcess'. + func makeCreateProcessInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'deleteProcess'. + func makeDeleteProcessInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'startProcess'. + func makeStartProcessInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'killProcess'. + func makeKillProcessInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'waitProcess'. + func makeWaitProcessInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'resizeProcess'. + func makeResizeProcessInterceptors() -> [ClientInterceptor] - public func copy( - request: GRPCCore.ServerRequest, - context: GRPCCore.ServerContext - ) async throws -> GRPCCore.StreamingServerResponse { - return GRPCCore.StreamingServerResponse( - metadata: [:], - producer: { writer in - try await self.copy( - request: request.message, - response: writer, - context: context - ) - return [:] - } - ) - } + /// - Returns: Interceptors to use when invoking 'closeProcessStdin'. + func makeCloseProcessStdinInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'containerStatistics'. + func makeContainerStatisticsInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'proxyVsock'. + func makeProxyVsockInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'stopVsockProxy'. + func makeStopVsockProxyInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'ipLinkSet'. + func makeIpLinkSetInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'ipAddrAdd'. + func makeIpAddrAddInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'ipRouteAddLink'. + func makeIpRouteAddLinkInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } - - 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: [:] - ) - } - - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'ipRouteAddDefault'. + func makeIpRouteAddDefaultInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'configureDns'. + func makeConfigureDnsInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'configureHosts'. + func makeConfigureHostsInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'sync'. + func makeSyncInterceptors() -> [ClientInterceptor] - 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: [:] - ) - } + /// - Returns: Interceptors to use when invoking 'kill'. + func makeKillInterceptors() -> [ClientInterceptor] +} - 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: [:] - ) - } +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.copy, + 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 copy = GRPCMethodDescriptor( + name: "Copy", + path: "/com.apple.containerization.sandbox.v3.SandboxContext/Copy", + type: GRPCCallType.serverStreaming + ) + + 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 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: [:] - ) - } +/// 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 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: [:] - ) - } + /// Mount a filesystem. + func mount(request: Com_Apple_Containerization_Sandbox_V3_MountRequest, 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: [:] - ) - } + /// Unmount a filesystem. + func umount(request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, 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: [:] - ) - } -} + /// Set an environment variable on the init process. + func setenv(request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, 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 "Copy" method. - /// - /// > Source IDL Documentation: - /// > - /// > Copy a file or directory between the host and guest. - /// > Data transfer happens over a dedicated vsock connection; - /// > the gRPC stream is used only for control/metadata. - /// - /// - Parameters: - /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CopyRequest` message. - /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_CopyRequest` messages. - /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_CopyResponse` 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 copy( - request: GRPCCore.ClientRequest, - serializer: some GRPCCore.MessageSerializer, - deserializer: some GRPCCore.MessageDeserializer, - options: GRPCCore.CallOptions, - onResponse handleResponse: @Sendable @escaping (GRPCCore.StreamingClientResponse) 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 - } + /// Get an environment variable from the init process. + func getenv(request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, 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 "Copy" method. - /// - /// > Source IDL Documentation: - /// > - /// > Copy a file or directory between the host and guest. - /// > Data transfer happens over a dedicated vsock connection; - /// > the gRPC stream is used only for control/metadata. - /// - /// - Parameters: - /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CopyRequest` message. - /// - serializer: A serializer for `Com_Apple_Containerization_Sandbox_V3_CopyRequest` messages. - /// - deserializer: A deserializer for `Com_Apple_Containerization_Sandbox_V3_CopyResponse` 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 copy( - request: GRPCCore.ClientRequest, - serializer: some GRPCCore.MessageSerializer, - deserializer: some GRPCCore.MessageDeserializer, - options: GRPCCore.CallOptions = .defaults, - onResponse handleResponse: @Sendable @escaping (GRPCCore.StreamingClientResponse) async throws -> Result - ) async throws -> Result where Result: Sendable { - try await self.client.serverStreaming( - request: request, - descriptor: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Method.Copy.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 - ) - } - } -} + /// Create a new directory inside the sandbox. + func mkdir(request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, 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 - ) - } + /// Set sysctls in the context of the sandbox. + func sysctl(request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, 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 - ) - } + /// Set time in the guest. + func setTime(request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, 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 - ) - } + /// Set up an emulator in the guest for a specific binary format. + func setupEmulator(request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Write data to an existing or new file. + func writeFile(request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Copy a file or directory between the host and guest. + /// Data transfer happens over a dedicated vsock connection; + /// the gRPC stream is used only for control/metadata. + func copy(request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, context: StreamingResponseCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Create a new process inside the container. + func createProcess(request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Delete an existing process inside the container. + func deleteProcess(request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Start the provided process. + func startProcess(request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Send a signal to the provided process. + func killProcess(request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// Call the "Copy" method. - /// - /// > Source IDL Documentation: - /// > - /// > Copy a file or directory between the host and guest. - /// > Data transfer happens over a dedicated vsock connection; - /// > the gRPC stream is used only for control/metadata. - /// - /// - Parameters: - /// - request: A request containing a single `Com_Apple_Containerization_Sandbox_V3_CopyRequest` 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 copy( - request: GRPCCore.ClientRequest, - options: GRPCCore.CallOptions = .defaults, - onResponse handleResponse: @Sendable @escaping (GRPCCore.StreamingClientResponse) async throws -> Result - ) async throws -> Result where Result: Sendable { - try await self.copy( - request: request, - serializer: GRPCProtobuf.ProtobufSerializer(), - deserializer: GRPCProtobuf.ProtobufDeserializer(), - options: options, - onResponse: handleResponse - ) - } + /// Wait for a process to exit and return the exit code. + func waitProcess(request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// 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 - /// 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 - ) - } + /// Close IO for a given process. + func closeProcessStdin(request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Get statistics for containers. + func containerStatistics(request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// 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 - /// 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 - ) - } + /// Stop a vsock proxy to a unix domain socket. + func stopVsockProxy(request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Set the link state of a network interface. + func ipLinkSet(request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Add an IPv4 address to a network interface. + func ipAddrAdd(request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Add an IP route for a network interface. + func ipRouteAddLink(request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Add an IP route for a network interface. + func ipRouteAddDefault(request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Configure DNS resolver. + func configureDns(request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Configure /etc/hosts. + func configureHosts(request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Perform the sync syscall. + func sync(request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, context: StatusOnlyCallContext) -> EventLoopFuture - /// 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 - ) - } + /// Send a signal to a process via the PID. + func kill(request: Com_Apple_Containerization_Sandbox_V3_KillRequest, context: StatusOnlyCallContext) -> EventLoopFuture +} - /// 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 - ) - } +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 "Copy": + return ServerStreamingServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeCopyInterceptors() ?? [], + userFunction: self.copy(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 "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 - ) - } +/// 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 + + /// Copy a file or directory between the host and guest. + /// Data transfer happens over a dedicated vsock connection; + /// the gRPC stream is used only for control/metadata. + func copy( + request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, + responseStream: GRPCAsyncResponseStreamWriter, + context: GRPCAsyncServerCallContext + ) async throws + + /// 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 "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 - ) - } +@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 "Copy": + return GRPCAsyncServerHandler( + context: context, + requestDeserializer: ProtobufDeserializer(), + responseSerializer: ProtobufSerializer(), + interceptors: self.interceptors?.makeCopyInterceptors() ?? [], + wrapping: { try await self.copy(request: $0, responseStream: $1, context: $2) } + ) + + 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 "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 - ) - } +public protocol Com_Apple_Containerization_Sandbox_V3_SandboxContextServerInterceptorFactoryProtocol: 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. - /// - 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 'mount'. + /// Defaults to calling `self.makeInterceptors()`. + func makeMountInterceptors() -> [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 'umount'. + /// Defaults to calling `self.makeInterceptors()`. + func makeUmountInterceptors() -> [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 'setenv'. + /// Defaults to calling `self.makeInterceptors()`. + func makeSetenvInterceptors() -> [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 'getenv'. + /// Defaults to calling `self.makeInterceptors()`. + func makeGetenvInterceptors() -> [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 'mkdir'. + /// Defaults to calling `self.makeInterceptors()`. + func makeMkdirInterceptors() -> [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 'sysctl'. + /// Defaults to calling `self.makeInterceptors()`. + func makeSysctlInterceptors() -> [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 'setTime'. + /// Defaults to calling `self.makeInterceptors()`. + func makeSetTimeInterceptors() -> [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 - ) - } + /// - Returns: Interceptors to use when handling 'setupEmulator'. + /// Defaults to calling `self.makeInterceptors()`. + func makeSetupEmulatorInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'writeFile'. + /// Defaults to calling `self.makeInterceptors()`. + func makeWriteFileInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'copy'. + /// Defaults to calling `self.makeInterceptors()`. + func makeCopyInterceptors() -> [ServerInterceptor] - /// Call the "Copy" method. - /// - /// > Source IDL Documentation: - /// > - /// > Copy a file or directory between the host and guest. - /// > Data transfer happens over a dedicated vsock connection; - /// > the gRPC stream is used only for control/metadata. - /// - /// - 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 copy( - _ message: Com_Apple_Containerization_Sandbox_V3_CopyRequest, - metadata: GRPCCore.Metadata = [:], - options: GRPCCore.CallOptions = .defaults, - onResponse handleResponse: @Sendable @escaping (GRPCCore.StreamingClientResponse) async throws -> Result - ) async throws -> Result where Result: Sendable { - let request = GRPCCore.ClientRequest( - message: message, - metadata: metadata - ) - return try await self.copy( - request: request, - options: options, - onResponse: handleResponse - ) - } + /// - Returns: Interceptors to use when handling 'createProcess'. + /// Defaults to calling `self.makeInterceptors()`. + func makeCreateProcessInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'deleteProcess'. + /// Defaults to calling `self.makeInterceptors()`. + func makeDeleteProcessInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'startProcess'. + /// Defaults to calling `self.makeInterceptors()`. + func makeStartProcessInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'killProcess'. + /// Defaults to calling `self.makeInterceptors()`. + func makeKillProcessInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'waitProcess'. + /// Defaults to calling `self.makeInterceptors()`. + func makeWaitProcessInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'resizeProcess'. + /// Defaults to calling `self.makeInterceptors()`. + func makeResizeProcessInterceptors() -> [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: - /// - 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 - ) - } + /// - Returns: Interceptors to use when handling 'closeProcessStdin'. + /// Defaults to calling `self.makeInterceptors()`. + func makeCloseProcessStdinInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'containerStatistics'. + /// Defaults to calling `self.makeInterceptors()`. + func makeContainerStatisticsInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'proxyVsock'. + /// Defaults to calling `self.makeInterceptors()`. + func makeProxyVsockInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'stopVsockProxy'. + /// Defaults to calling `self.makeInterceptors()`. + func makeStopVsockProxyInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'ipLinkSet'. + /// Defaults to calling `self.makeInterceptors()`. + func makeIpLinkSetInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'ipAddrAdd'. + /// Defaults to calling `self.makeInterceptors()`. + func makeIpAddrAddInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'ipRouteAddLink'. + /// Defaults to calling `self.makeInterceptors()`. + func makeIpRouteAddLinkInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'ipRouteAddDefault'. + /// Defaults to calling `self.makeInterceptors()`. + func makeIpRouteAddDefaultInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'configureDns'. + /// Defaults to calling `self.makeInterceptors()`. + func makeConfigureDnsInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'configureHosts'. + /// Defaults to calling `self.makeInterceptors()`. + func makeConfigureHostsInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'sync'. + /// Defaults to calling `self.makeInterceptors()`. + func makeSyncInterceptors() -> [ServerInterceptor] - /// 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 - ) - } + /// - Returns: Interceptors to use when handling 'kill'. + /// Defaults to calling `self.makeInterceptors()`. + func makeKillInterceptors() -> [ServerInterceptor] +} - /// 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 +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.copy, + 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 copy = GRPCMethodDescriptor( + name: "Copy", + path: "/com.apple.containerization.sandbox.v3.SandboxContext/Copy", + type: GRPCCallType.serverStreaming + ) + + 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 + ) + } +} diff --git a/Sources/Containerization/SandboxContext/SandboxContext.pb.swift b/Sources/Containerization/SandboxContext/SandboxContext.pb.swift index e35e2487..87d22643 100644 --- a/Sources/Containerization/SandboxContext/SandboxContext.pb.swift +++ b/Sources/Containerization/SandboxContext/SandboxContext.pb.swift @@ -24,11 +24,7 @@ // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ -#if canImport(FoundationEssentials) -import FoundationEssentials -#else import Foundation -#endif import SwiftProtobuf // If the compiler emits an error on this type, it is because this file @@ -102,29 +98,29 @@ public struct Com_Apple_Containerization_Sandbox_V3_Stdio: Sendable { // methods supported on all messages. public var stdinPort: Int32 { - get {_stdinPort ?? 0} + get {return _stdinPort ?? 0} set {_stdinPort = newValue} } /// Returns true if `stdinPort` has been explicitly set. - public var hasStdinPort: Bool {self._stdinPort != nil} + public var hasStdinPort: Bool {return self._stdinPort != nil} /// Clears the value of `stdinPort`. Subsequent reads from it will return its default value. public mutating func clearStdinPort() {self._stdinPort = nil} public var stdoutPort: Int32 { - get {_stdoutPort ?? 0} + get {return _stdoutPort ?? 0} set {_stdoutPort = newValue} } /// Returns true if `stdoutPort` has been explicitly set. - public var hasStdoutPort: Bool {self._stdoutPort != nil} + public var hasStdoutPort: Bool {return self._stdoutPort != nil} /// Clears the value of `stdoutPort`. Subsequent reads from it will return its default value. public mutating func clearStdoutPort() {self._stdoutPort = nil} public var stderrPort: Int32 { - get {_stderrPort ?? 0} + get {return _stderrPort ?? 0} set {_stderrPort = newValue} } /// Returns true if `stderrPort` has been explicitly set. - public var hasStderrPort: Bool {self._stderrPort != nil} + public var hasStderrPort: Bool {return self._stderrPort != nil} /// Clears the value of `stderrPort`. Subsequent reads from it will return its default value. public mutating func clearStderrPort() {self._stderrPort = nil} @@ -229,11 +225,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest: Sendable public var guestPath: String = String() public var guestSocketPermissions: UInt32 { - get {_guestSocketPermissions ?? 0} + get {return _guestSocketPermissions ?? 0} set {_guestSocketPermissions = newValue} } /// Returns true if `guestSocketPermissions` has been explicitly set. - public var hasGuestSocketPermissions: Bool {self._guestSocketPermissions != nil} + public var hasGuestSocketPermissions: Bool {return self._guestSocketPermissions != nil} /// Clears the value of `guestSocketPermissions`. Subsequent reads from it will return its default value. public mutating func clearGuestSocketPermissions() {self._guestSocketPermissions = nil} @@ -372,11 +368,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_SetenvRequest: Sendable { public var key: String = String() public var value: String { - get {_value ?? String()} + get {return _value ?? String()} set {_value = newValue} } /// Returns true if `value` has been explicitly set. - public var hasValue: Bool {self._value != nil} + public var hasValue: Bool {return self._value != nil} /// Clears the value of `value`. Subsequent reads from it will return its default value. public mutating func clearValue() {self._value = nil} @@ -415,11 +411,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_GetenvResponse: Sendable { // methods supported on all messages. public var value: String { - get {_value ?? String()} + get {return _value ?? String()} set {_value = newValue} } /// Returns true if `value` has been explicitly set. - public var hasValue: Bool {self._value != nil} + public var hasValue: Bool {return self._value != nil} /// Clears the value of `value`. Subsequent reads from it will return its default value. public mutating func clearValue() {self._value = nil} @@ -430,7 +426,7 @@ public struct Com_Apple_Containerization_Sandbox_V3_GetenvResponse: Sendable { fileprivate var _value: String? = nil } -public struct Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest: Sendable { +public struct Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest: @unchecked 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. @@ -438,58 +434,58 @@ public struct Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest: Sendab public var id: String = String() public var containerID: String { - get {_containerID ?? String()} + get {return _containerID ?? String()} set {_containerID = newValue} } /// Returns true if `containerID` has been explicitly set. - public var hasContainerID: Bool {self._containerID != nil} + public var hasContainerID: Bool {return self._containerID != nil} /// Clears the value of `containerID`. Subsequent reads from it will return its default value. public mutating func clearContainerID() {self._containerID = nil} public var stdin: UInt32 { - get {_stdin ?? 0} + get {return _stdin ?? 0} set {_stdin = newValue} } /// Returns true if `stdin` has been explicitly set. - public var hasStdin: Bool {self._stdin != nil} + public var hasStdin: Bool {return self._stdin != nil} /// Clears the value of `stdin`. Subsequent reads from it will return its default value. public mutating func clearStdin() {self._stdin = nil} public var stdout: UInt32 { - get {_stdout ?? 0} + get {return _stdout ?? 0} set {_stdout = newValue} } /// Returns true if `stdout` has been explicitly set. - public var hasStdout: Bool {self._stdout != nil} + public var hasStdout: Bool {return self._stdout != nil} /// Clears the value of `stdout`. Subsequent reads from it will return its default value. public mutating func clearStdout() {self._stdout = nil} public var stderr: UInt32 { - get {_stderr ?? 0} + get {return _stderr ?? 0} set {_stderr = newValue} } /// Returns true if `stderr` has been explicitly set. - public var hasStderr: Bool {self._stderr != nil} + public var hasStderr: Bool {return self._stderr != nil} /// Clears the value of `stderr`. Subsequent reads from it will return its default value. public mutating func clearStderr() {self._stderr = nil} public var ociRuntimePath: String { - get {_ociRuntimePath ?? String()} + get {return _ociRuntimePath ?? String()} set {_ociRuntimePath = newValue} } /// Returns true if `ociRuntimePath` has been explicitly set. - public var hasOciRuntimePath: Bool {self._ociRuntimePath != nil} + public var hasOciRuntimePath: Bool {return self._ociRuntimePath != nil} /// Clears the value of `ociRuntimePath`. Subsequent reads from it will return its default value. public mutating func clearOciRuntimePath() {self._ociRuntimePath = nil} public var configuration: Data = Data() public var options: Data { - get {_options ?? Data()} + get {return _options ?? Data()} set {_options = newValue} } /// Returns true if `options` has been explicitly set. - public var hasOptions: Bool {self._options != nil} + public var hasOptions: Bool {return self._options != nil} /// Clears the value of `options`. Subsequent reads from it will return its default value. public mutating func clearOptions() {self._options = nil} @@ -523,11 +519,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest: Sendable public var id: String = String() public var containerID: String { - get {_containerID ?? String()} + get {return _containerID ?? String()} set {_containerID = newValue} } /// Returns true if `containerID` has been explicitly set. - public var hasContainerID: Bool {self._containerID != nil} + public var hasContainerID: Bool {return self._containerID != nil} /// Clears the value of `containerID`. Subsequent reads from it will return its default value. public mutating func clearContainerID() {self._containerID = nil} @@ -546,11 +542,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse: Sendabl public var exitCode: Int32 = 0 public var exitedAt: SwiftProtobuf.Google_Protobuf_Timestamp { - get {_exitedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} + get {return _exitedAt ?? SwiftProtobuf.Google_Protobuf_Timestamp()} set {_exitedAt = newValue} } /// Returns true if `exitedAt` has been explicitly set. - public var hasExitedAt: Bool {self._exitedAt != nil} + public var hasExitedAt: Bool {return self._exitedAt != nil} /// Clears the value of `exitedAt`. Subsequent reads from it will return its default value. public mutating func clearExitedAt() {self._exitedAt = nil} @@ -569,11 +565,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest: Sendab public var id: String = String() public var containerID: String { - get {_containerID ?? String()} + get {return _containerID ?? String()} set {_containerID = newValue} } /// Returns true if `containerID` has been explicitly set. - public var hasContainerID: Bool {self._containerID != nil} + public var hasContainerID: Bool {return self._containerID != nil} /// Clears the value of `containerID`. Subsequent reads from it will return its default value. public mutating func clearContainerID() {self._containerID = nil} @@ -606,11 +602,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest: Sendab public var id: String = String() public var containerID: String { - get {_containerID ?? String()} + get {return _containerID ?? String()} set {_containerID = newValue} } /// Returns true if `containerID` has been explicitly set. - public var hasContainerID: Bool {self._containerID != nil} + public var hasContainerID: Bool {return self._containerID != nil} /// Clears the value of `containerID`. Subsequent reads from it will return its default value. public mutating func clearContainerID() {self._containerID = nil} @@ -639,11 +635,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_StartProcessRequest: Sendabl public var id: String = String() public var containerID: String { - get {_containerID ?? String()} + get {return _containerID ?? String()} set {_containerID = newValue} } /// Returns true if `containerID` has been explicitly set. - public var hasContainerID: Bool {self._containerID != nil} + public var hasContainerID: Bool {return self._containerID != nil} /// Clears the value of `containerID`. Subsequent reads from it will return its default value. public mutating func clearContainerID() {self._containerID = nil} @@ -674,11 +670,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_KillProcessRequest: Sendable public var id: String = String() public var containerID: String { - get {_containerID ?? String()} + get {return _containerID ?? String()} set {_containerID = newValue} } /// Returns true if `containerID` has been explicitly set. - public var hasContainerID: Bool {self._containerID != nil} + public var hasContainerID: Bool {return self._containerID != nil} /// Clears the value of `containerID`. Subsequent reads from it will return its default value. public mutating func clearContainerID() {self._containerID = nil} @@ -711,11 +707,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest: Se public var id: String = String() public var containerID: String { - get {_containerID ?? String()} + get {return _containerID ?? String()} set {_containerID = newValue} } /// Returns true if `containerID` has been explicitly set. - public var hasContainerID: Bool {self._containerID != nil} + public var hasContainerID: Bool {return self._containerID != nil} /// Clears the value of `containerID`. Subsequent reads from it will return its default value. public mutating func clearContainerID() {self._containerID = nil} @@ -762,7 +758,7 @@ public struct Com_Apple_Containerization_Sandbox_V3_MkdirResponse: Sendable { public init() {} } -public struct Com_Apple_Containerization_Sandbox_V3_WriteFileRequest: Sendable { +public struct Com_Apple_Containerization_Sandbox_V3_WriteFileRequest: @unchecked 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. @@ -774,11 +770,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_WriteFileRequest: Sendable { public var mode: UInt32 = 0 public var flags: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest.WriteFileFlags { - get {_flags ?? Com_Apple_Containerization_Sandbox_V3_WriteFileRequest.WriteFileFlags()} + get {return _flags ?? Com_Apple_Containerization_Sandbox_V3_WriteFileRequest.WriteFileFlags()} set {_flags = newValue} } /// Returns true if `flags` has been explicitly set. - public var hasFlags: Bool {self._flags != nil} + public var hasFlags: Bool {return self._flags != nil} /// Clears the value of `flags`. Subsequent reads from it will return its default value. public mutating func clearFlags() {self._flags = nil} @@ -951,11 +947,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest: Sendable { public var up: Bool = false public var mtu: UInt32 { - get {_mtu ?? 0} + get {return _mtu ?? 0} set {_mtu = newValue} } /// Returns true if `mtu` has been explicitly set. - public var hasMtu: Bool {self._mtu != nil} + public var hasMtu: Bool {return self._mtu != nil} /// Clears the value of `mtu`. Subsequent reads from it will return its default value. public mutating func clearMtu() {self._mtu = nil} @@ -1060,11 +1056,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest: Sendabl public var nameservers: [String] = [] public var domain: String { - get {_domain ?? String()} + get {return _domain ?? String()} set {_domain = newValue} } /// Returns true if `domain` has been explicitly set. - public var hasDomain: Bool {self._domain != nil} + public var hasDomain: Bool {return self._domain != nil} /// Clears the value of `domain`. Subsequent reads from it will return its default value. public mutating func clearDomain() {self._domain = nil} @@ -1099,11 +1095,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest: Senda public var entries: [Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest.HostsEntry] = [] public var comment: String { - get {_comment ?? String()} + get {return _comment ?? String()} set {_comment = newValue} } /// Returns true if `comment` has been explicitly set. - public var hasComment: Bool {self._comment != nil} + public var hasComment: Bool {return self._comment != nil} /// Clears the value of `comment`. Subsequent reads from it will return its default value. public mutating func clearComment() {self._comment = nil} @@ -1119,11 +1115,11 @@ public struct Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest: Senda public var hostnames: [String] = [] public var comment: String { - get {_comment ?? String()} + get {return _comment ?? String()} set {_comment = newValue} } /// Returns true if `comment` has been explicitly set. - public var hasComment: Bool {self._comment != nil} + public var hasComment: Bool {return self._comment != nil} /// Clears the value of `comment`. Subsequent reads from it will return its default value. public mutating func clearComment() {self._comment = nil} @@ -1229,57 +1225,57 @@ public struct Com_Apple_Containerization_Sandbox_V3_ContainerStats: @unchecked S // methods supported on all messages. public var containerID: String { - get {_storage._containerID} + get {return _storage._containerID} set {_uniqueStorage()._containerID = newValue} } public var process: Com_Apple_Containerization_Sandbox_V3_ProcessStats { - get {_storage._process ?? Com_Apple_Containerization_Sandbox_V3_ProcessStats()} + get {return _storage._process ?? Com_Apple_Containerization_Sandbox_V3_ProcessStats()} set {_uniqueStorage()._process = newValue} } /// Returns true if `process` has been explicitly set. - public var hasProcess: Bool {_storage._process != nil} + public var hasProcess: Bool {return _storage._process != nil} /// Clears the value of `process`. Subsequent reads from it will return its default value. public mutating func clearProcess() {_uniqueStorage()._process = nil} public var memory: Com_Apple_Containerization_Sandbox_V3_MemoryStats { - get {_storage._memory ?? Com_Apple_Containerization_Sandbox_V3_MemoryStats()} + get {return _storage._memory ?? Com_Apple_Containerization_Sandbox_V3_MemoryStats()} set {_uniqueStorage()._memory = newValue} } /// Returns true if `memory` has been explicitly set. - public var hasMemory: Bool {_storage._memory != nil} + public var hasMemory: Bool {return _storage._memory != nil} /// Clears the value of `memory`. Subsequent reads from it will return its default value. public mutating func clearMemory() {_uniqueStorage()._memory = nil} public var cpu: Com_Apple_Containerization_Sandbox_V3_CPUStats { - get {_storage._cpu ?? Com_Apple_Containerization_Sandbox_V3_CPUStats()} + get {return _storage._cpu ?? Com_Apple_Containerization_Sandbox_V3_CPUStats()} set {_uniqueStorage()._cpu = newValue} } /// Returns true if `cpu` has been explicitly set. - public var hasCpu: Bool {_storage._cpu != nil} + public var hasCpu: Bool {return _storage._cpu != nil} /// Clears the value of `cpu`. Subsequent reads from it will return its default value. public mutating func clearCpu() {_uniqueStorage()._cpu = nil} public var blockIo: Com_Apple_Containerization_Sandbox_V3_BlockIOStats { - get {_storage._blockIo ?? Com_Apple_Containerization_Sandbox_V3_BlockIOStats()} + get {return _storage._blockIo ?? Com_Apple_Containerization_Sandbox_V3_BlockIOStats()} set {_uniqueStorage()._blockIo = newValue} } /// Returns true if `blockIo` has been explicitly set. - public var hasBlockIo: Bool {_storage._blockIo != nil} + public var hasBlockIo: Bool {return _storage._blockIo != nil} /// Clears the value of `blockIo`. Subsequent reads from it will return its default value. public mutating func clearBlockIo() {_uniqueStorage()._blockIo = nil} public var networks: [Com_Apple_Containerization_Sandbox_V3_NetworkStats] { - get {_storage._networks} + get {return _storage._networks} set {_uniqueStorage()._networks = newValue} } public var memoryEvents: Com_Apple_Containerization_Sandbox_V3_MemoryEventStats { - get {_storage._memoryEvents ?? Com_Apple_Containerization_Sandbox_V3_MemoryEventStats()} + get {return _storage._memoryEvents ?? Com_Apple_Containerization_Sandbox_V3_MemoryEventStats()} set {_uniqueStorage()._memoryEvents = newValue} } /// Returns true if `memoryEvents` has been explicitly set. - public var hasMemoryEvents: Bool {_storage._memoryEvents != nil} + public var hasMemoryEvents: Bool {return _storage._memoryEvents != nil} /// Clears the value of `memoryEvents`. Subsequent reads from it will return its default value. public mutating func clearMemoryEvents() {_uniqueStorage()._memoryEvents = nil} @@ -1451,12 +1447,24 @@ public struct Com_Apple_Containerization_Sandbox_V3_MemoryEventStats: Sendable { fileprivate let _protobuf_package = "com.apple.containerization.sandbox.v3" extension Com_Apple_Containerization_Sandbox_V3_StatCategory: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0STAT_CATEGORY_UNSPECIFIED\0\u{1}STAT_CATEGORY_PROCESS\0\u{1}STAT_CATEGORY_MEMORY\0\u{1}STAT_CATEGORY_CPU\0\u{1}STAT_CATEGORY_BLOCK_IO\0\u{1}STAT_CATEGORY_NETWORK\0\u{1}STAT_CATEGORY_MEMORY_EVENTS\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "STAT_CATEGORY_UNSPECIFIED"), + 1: .same(proto: "STAT_CATEGORY_PROCESS"), + 2: .same(proto: "STAT_CATEGORY_MEMORY"), + 3: .same(proto: "STAT_CATEGORY_CPU"), + 4: .same(proto: "STAT_CATEGORY_BLOCK_IO"), + 5: .same(proto: "STAT_CATEGORY_NETWORK"), + 6: .same(proto: "STAT_CATEGORY_MEMORY_EVENTS"), + ] } 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(bytecode: "\0\u{1}stdinPort\0\u{1}stdoutPort\0\u{1}stderrPort\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "stdinPort"), + 2: .same(proto: "stdoutPort"), + 3: .same(proto: "stderrPort"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1500,7 +1508,15 @@ 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(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 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 mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1579,7 +1595,10 @@ 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(bytecode: "\0\u{1}sec\0\u{1}usec\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "sec"), + 2: .same(proto: "usec"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1633,7 +1652,9 @@ 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(bytecode: "\0\u{1}settings\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "settings"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1682,7 +1703,13 @@ 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(bytecode: "\0\u{1}id\0\u{3}vsock_port\0\u{1}guestPath\0\u{1}guestSocketPermissions\0\u{1}action\0") + 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 mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1735,7 +1762,10 @@ 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(bytecode: "\0\u{2}\0INTO\0\u{1}OUT_OF\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "INTO"), + 1: .same(proto: "OUT_OF"), + ] } extension Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { @@ -1759,7 +1789,9 @@ 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(bytecode: "\0\u{1}id\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1808,7 +1840,12 @@ 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(bytecode: "\0\u{1}type\0\u{1}source\0\u{1}destination\0\u{1}options\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "source"), + 3: .same(proto: "destination"), + 4: .same(proto: "options"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1872,7 +1909,10 @@ 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(bytecode: "\0\u{1}path\0\u{1}flags\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "path"), + 2: .same(proto: "flags"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1926,7 +1966,10 @@ 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(bytecode: "\0\u{1}key\0\u{1}value\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "key"), + 2: .same(proto: "value"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1984,7 +2027,9 @@ 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(bytecode: "\0\u{1}key\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "key"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2014,7 +2059,9 @@ 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(bytecode: "\0\u{1}value\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2048,7 +2095,16 @@ 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(bytecode: "\0\u{1}id\0\u{1}containerID\0\u{1}stdin\0\u{1}stdout\0\u{1}stderr\0\u{1}ociRuntimePath\0\u{1}configuration\0\u{1}options\0") + 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: "ociRuntimePath"), + 7: .same(proto: "configuration"), + 8: .same(proto: "options"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2136,7 +2192,10 @@ 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(bytecode: "\0\u{1}id\0\u{1}containerID\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "containerID"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2175,7 +2234,10 @@ 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(bytecode: "\0\u{1}exitCode\0\u{3}exited_at\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "exitCode"), + 2: .standard(proto: "exited_at"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2214,7 +2276,12 @@ 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(bytecode: "\0\u{1}id\0\u{1}containerID\0\u{1}rows\0\u{1}columns\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "containerID"), + 3: .same(proto: "rows"), + 4: .same(proto: "columns"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2282,7 +2349,10 @@ 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(bytecode: "\0\u{1}id\0\u{1}containerID\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "containerID"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2340,7 +2410,10 @@ 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(bytecode: "\0\u{1}id\0\u{1}containerID\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "containerID"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2379,7 +2452,9 @@ 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(bytecode: "\0\u{1}pid\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "pid"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2409,7 +2484,11 @@ 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(bytecode: "\0\u{1}id\0\u{1}containerID\0\u{1}signal\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "containerID"), + 3: .same(proto: "signal"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2453,7 +2532,9 @@ 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(bytecode: "\0\u{1}result\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "result"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2483,7 +2564,10 @@ 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(bytecode: "\0\u{1}id\0\u{1}containerID\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "containerID"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2541,7 +2625,11 @@ 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(bytecode: "\0\u{1}path\0\u{1}all\0\u{1}perms\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "path"), + 2: .same(proto: "all"), + 3: .same(proto: "perms"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2600,7 +2688,12 @@ 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(bytecode: "\0\u{1}path\0\u{1}data\0\u{1}mode\0\u{1}flags\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "path"), + 2: .same(proto: "data"), + 3: .same(proto: "mode"), + 4: .same(proto: "flags"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2649,7 +2742,11 @@ 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(bytecode: "\0\u{3}create_parent_dirs\0\u{1}append\0\u{3}create_if_missing\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "create_parent_dirs"), + 2: .same(proto: "append"), + 3: .standard(proto: "create_if_missing"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2708,7 +2805,14 @@ extension Com_Apple_Containerization_Sandbox_V3_WriteFileResponse: SwiftProtobuf extension Com_Apple_Containerization_Sandbox_V3_CopyRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CopyRequest" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}direction\0\u{1}path\0\u{1}mode\0\u{3}create_parents\0\u{3}vsock_port\0\u{3}is_archive\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "direction"), + 2: .same(proto: "path"), + 3: .same(proto: "mode"), + 4: .standard(proto: "create_parents"), + 5: .standard(proto: "vsock_port"), + 6: .standard(proto: "is_archive"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2762,12 +2866,20 @@ extension Com_Apple_Containerization_Sandbox_V3_CopyRequest: SwiftProtobuf.Messa } extension Com_Apple_Containerization_Sandbox_V3_CopyRequest.Direction: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0COPY_IN\0\u{1}COPY_OUT\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "COPY_IN"), + 1: .same(proto: "COPY_OUT"), + ] } extension Com_Apple_Containerization_Sandbox_V3_CopyResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CopyResponse" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}status\0\u{3}is_archive\0\u{3}total_size\0\u{1}error\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "status"), + 2: .standard(proto: "is_archive"), + 3: .standard(proto: "total_size"), + 4: .same(proto: "error"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2811,12 +2923,19 @@ extension Com_Apple_Containerization_Sandbox_V3_CopyResponse: SwiftProtobuf.Mess } extension Com_Apple_Containerization_Sandbox_V3_CopyResponse.Status: SwiftProtobuf._ProtoNameProviding { - public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0METADATA\0\u{1}COMPLETE\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "METADATA"), + 1: .same(proto: "COMPLETE"), + ] } 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(bytecode: "\0\u{1}interface\0\u{1}up\0\u{1}mtu\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "interface"), + 2: .same(proto: "up"), + 3: .same(proto: "mtu"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2879,7 +2998,10 @@ 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(bytecode: "\0\u{1}interface\0\u{1}ipv4Address\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "interface"), + 2: .same(proto: "ipv4Address"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2933,7 +3055,11 @@ 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(bytecode: "\0\u{1}interface\0\u{1}dstIpv4Addr\0\u{1}srcIpv4Addr\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "interface"), + 2: .same(proto: "dstIpv4Addr"), + 3: .same(proto: "srcIpv4Addr"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -2992,7 +3118,10 @@ 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(bytecode: "\0\u{1}interface\0\u{1}ipv4Gateway\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "interface"), + 2: .same(proto: "ipv4Gateway"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3046,7 +3175,13 @@ 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(bytecode: "\0\u{1}location\0\u{1}nameservers\0\u{1}domain\0\u{1}searchDomains\0\u{1}options\0") + 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 mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3119,7 +3254,11 @@ 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(bytecode: "\0\u{1}location\0\u{1}entries\0\u{1}comment\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "location"), + 2: .same(proto: "entries"), + 3: .same(proto: "comment"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3163,7 +3302,11 @@ 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(bytecode: "\0\u{1}ipAddress\0\u{1}hostnames\0\u{1}comment\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "ipAddress"), + 2: .same(proto: "hostnames"), + 3: .same(proto: "comment"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3264,7 +3407,10 @@ 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(bytecode: "\0\u{1}pid\0\u{2}\u{2}signal\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "pid"), + 3: .same(proto: "signal"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3299,7 +3445,9 @@ 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(bytecode: "\0\u{1}result\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "result"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3329,7 +3477,10 @@ 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(bytecode: "\0\u{3}container_ids\0\u{1}categories\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "container_ids"), + 2: .same(proto: "categories"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3364,7 +3515,9 @@ 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(bytecode: "\0\u{1}containers\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "containers"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3394,7 +3547,15 @@ 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(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\u{3}memory_events\0") + 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"), + 7: .standard(proto: "memory_events"), + ] fileprivate class _StorageClass { var _containerID: String = String() @@ -3506,7 +3667,10 @@ 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(bytecode: "\0\u{1}current\0\u{1}limit\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "current"), + 2: .same(proto: "limit"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3541,7 +3705,19 @@ 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(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\u{3}inactive_file\0\u{1}anon\0") + 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"), + 10: .standard(proto: "inactive_file"), + 11: .same(proto: "anon"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3621,7 +3797,14 @@ 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(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 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 mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3676,7 +3859,9 @@ 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(bytecode: "\0\u{1}devices\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "devices"), + ] public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3706,7 +3891,14 @@ 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(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 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 mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3761,7 +3953,15 @@ 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(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 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 mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -3821,7 +4021,14 @@ extension Com_Apple_Containerization_Sandbox_V3_NetworkStats: SwiftProtobuf.Mess extension Com_Apple_Containerization_Sandbox_V3_MemoryEventStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".MemoryEventStats" - public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}low\0\u{1}high\0\u{1}max\0\u{1}oom\0\u{3}oom_kill\0\u{3}oom_group_kill\0") + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "low"), + 2: .same(proto: "high"), + 3: .same(proto: "max"), + 4: .same(proto: "oom"), + 5: .standard(proto: "oom_kill"), + 6: .standard(proto: "oom_group_kill"), + ] 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 7e580aa2..9e429c5a 100644 --- a/Sources/Containerization/VZVirtualMachineInstance.swift +++ b/Sources/Containerization/VZVirtualMachineInstance.swift @@ -125,7 +125,7 @@ extension VZVirtualMachineInstance: VirtualMachineInstance { try await self.vm.start(queue: self.queue) - let agent = try Vminitd( + let agent = Vminitd( connection: try await self.vm.waitForAgent(queue: self.queue), group: self.group ) @@ -190,7 +190,8 @@ extension VZVirtualMachineInstance: VirtualMachineInstance { port: Vminitd.port ) let handle = try conn.dupHandle() - return try Vminitd(connection: handle, group: self.group) + let agent = Vminitd(connection: handle, group: self.group) + return agent } catch { if let err = error as? ContainerizationError { throw err diff --git a/Sources/Containerization/Vminitd.swift b/Sources/Containerization/Vminitd.swift index cadce2c0..2a177d66 100644 --- a/Sources/Containerization/Vminitd.swift +++ b/Sources/Containerization/Vminitd.swift @@ -19,110 +19,31 @@ import ContainerizationExtras import ContainerizationOCI import ContainerizationOS import Foundation -import GRPCCore -import GRPCNIOTransportCore +import GRPC import NIOCore import NIOPosix -/// Buffers incoming bytes until the full gRPC HTTP/2 pipeline is configured, then replays them. -/// -/// This prevents the race condition where the vminitd server's initial HTTP/2 SETTINGS frame -/// arrives and is discarded before `configureGRPCClientPipeline` has finished installing -/// `ClientConnectionHandler`. -/// -/// The handler is added via `ClientBootstrap.channelInitializer`, which runs before -/// `registerAlreadyConfigured0` adds the fd to epoll/kqueue — guaranteeing it is in place -/// before any bytes can arrive on the socket. -/// -/// When `NIOHTTP2Handler` is added to the pipeline (inside `configureGRPCClientPipeline`), its -/// `handlerAdded` fires an outbound flush (the HTTP/2 client preface). We intercept that flush -/// and schedule a deferred removal via the event loop. Because `configureGRPCClientPipeline` runs -/// as a single synchronous event loop task, the deferred removal is guaranteed to run after that -/// entire task completes — i.e., after `ClientConnectionHandler` is also in the pipeline. -/// Buffered bytes are replayed atomically as part of the pipeline removal. -private final class HTTP2ConnectBufferingHandler: ChannelDuplexHandler, RemovableChannelHandler { - typealias InboundIn = ByteBuffer - typealias InboundOut = ByteBuffer - typealias OutboundIn = ByteBuffer - typealias OutboundOut = ByteBuffer - - private var removalScheduled = false - private var bufferedReads: [NIOAny] = [] - - func channelRead(context: ChannelHandlerContext, data: NIOAny) { - bufferedReads.append(data) - } - - func channelReadComplete(context: ChannelHandlerContext) { - // Suppress while buffering; a single readComplete is emitted after replay. - } - - func flush(context: ChannelHandlerContext) { - if !removalScheduled { - removalScheduled = true - // Defer removal to the next event loop task. configureGRPCClientPipeline runs as a - // single synchronous event loop task, so this deferred task is guaranteed to run - // after that whole task completes (including ClientConnectionHandler being added). - context.eventLoop.assumeIsolatedUnsafeUnchecked().execute { - context.pipeline.syncOperations.removeHandler(self, promise: nil) - } - } - context.flush() - } - - func removeHandler(context: ChannelHandlerContext, removalToken: ChannelHandlerContext.RemovalToken) { - var didRead = false - while !bufferedReads.isEmpty { - context.fireChannelRead(bufferedReads.removeFirst()) - didRead = true - } - if didRead { - context.fireChannelReadComplete() - } - context.leavePipeline(removalToken: removalToken) - } - - func channelInactive(context: ChannelHandlerContext) { - bufferedReads.removeAll() - context.fireChannelInactive() - } -} - /// 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: Com_Apple_Containerization_Sandbox_V3_SandboxContext.Client - private let grpcClient: GRPCClient - private let connectionTask: Task + let client: Client - public init(connection: FileHandle, group: any EventLoopGroup) throws { - let channel = try ClientBootstrap(group: group) - .channelInitializer { channel in - channel.eventLoop.makeCompletedFuture(withResultOf: { - try channel.pipeline.syncOperations.addHandler(HTTP2ConnectBufferingHandler()) - }) - } - .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() - } + public init(client: Client) { + self.client = client + } + + public init(connection: FileHandle, group: EventLoopGroup) { + self.client = .init(connection: connection, group: group) } /// Close the connection to the guest agent. public func close() async throws { - self.grpcClient.beginGracefulShutdown() - try await self.connectionTask.value + try await client.close() } } @@ -344,17 +265,17 @@ extension Vminitd: VirtualMachineAgent { $0.containerID = containerID } } - - var callOpts = GRPCCore.CallOptions.defaults + var callOpts: CallOptions? if let timeoutInSeconds { - callOpts.timeout = .seconds(timeoutInSeconds) + var copts = CallOptions() + copts.timeLimit = .timeout(.seconds(timeoutInSeconds)) + callOpts = copts } - do { - let resp = try await client.waitProcess(request, options: callOpts) + let resp = try await client.waitProcess(request, callOptions: callOpts) return ExitStatus(exitCode: resp.exitCode, exitedAt: resp.exitedAt.date) } catch { - if let err = error as? RPCError, err.code == .deadlineExceeded { + if let err = error as? GRPCError.RPCTimedOut { throw ContainerizationError( .timeout, message: "failed to wait for process exit within timeout of \(timeoutInSeconds!) seconds", @@ -540,7 +461,7 @@ extension Vminitd { mode: UInt32 = 0, createParents: Bool = false, isArchive: Bool = false, - onMetadata: @Sendable @escaping (CopyMetadata) -> Void = { _ in } + onMetadata: @Sendable (CopyMetadata) -> Void = { _ in } ) async throws { let request = Com_Apple_Containerization_Sandbox_V3_CopyRequest.with { $0.direction = direction @@ -551,23 +472,21 @@ extension Vminitd { $0.isArchive = isArchive } - try await client.copy( - request, - onResponse: { stream in - for try await response in stream.messages { - if !response.error.isEmpty { - throw ContainerizationError(.internalError, message: "copy: \(response.error)") - } - switch response.status { - case .metadata: - onMetadata(CopyMetadata(isArchive: response.isArchive, totalSize: response.totalSize)) - case .complete: - break - case .UNRECOGNIZED(let value): - throw ContainerizationError(.internalError, message: "copy: unrecognized response status \(value)") - } - } - }) + let stream = client.copy(request) + + for try await response in stream { + if !response.error.isEmpty { + throw ContainerizationError(.internalError, message: "copy: \(response.error)") + } + switch response.status { + case .metadata: + onMetadata(CopyMetadata(isArchive: response.isArchive, totalSize: response.totalSize)) + case .complete: + break + case .UNRECOGNIZED(let value): + throw ContainerizationError(.internalError, message: "copy: unrecognized response status \(value)") + } + } } } @@ -592,6 +511,22 @@ extension Hosts { } } +extension Vminitd.Client { + public init(connection: FileHandle, group: EventLoopGroup) { + var config = ClientConnection.Configuration.default( + target: .connectedSocket(connection.fileDescriptor), + eventLoopGroup: group + ) + config.connectionBackoff = nil + config.maximumReceiveMessageLength = Int(64.mib()) + self = .init(channel: ClientConnection(configuration: config)) + } + + public func close() async throws { + try await self.channel.close().get() + } +} + extension StatCategory { /// Convert StatCategory to proto enum values. func toProtoCategories() -> [Com_Apple_Containerization_Sandbox_V3_StatCategory] { diff --git a/scripts/install-hawkeye.sh b/scripts/install-hawkeye.sh index 29bd1f14..5b68ece6 100755 --- a/scripts/install-hawkeye.sh +++ b/scripts/install-hawkeye.sh @@ -17,6 +17,6 @@ if command -v .local/bin/hawkeye >/dev/null 2>&1; then echo "hawkeye already installed" else echo "Installing hawkeye" - export VERSION=v6.5.1 + export VERSION=v6.1.0 curl --proto '=https' --tlsv1.2 -LsSf https://github.com/korandoru/hawkeye/releases/download/${VERSION}/hawkeye-installer.sh | CARGO_HOME=.local sh -s -- --no-modify-path fi diff --git a/vminitd/.devcontainer/Dockerfile b/vminitd/.devcontainer/Dockerfile index 13cb6ff1..92cf57c0 100644 --- a/vminitd/.devcontainer/Dockerfile +++ b/vminitd/.devcontainer/Dockerfile @@ -1,9 +1,7 @@ -FROM swiftlang/swift:nightly-debian +FROM swift:6.2 RUN apt-get update \ && apt-get install make \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -RUN swift sdk install \ - https://download.swift.org/swift-6.3-branch/static-sdk/swift-6.3-DEVELOPMENT-SNAPSHOT-2026-03-05-a/swift-6.3-DEVELOPMENT-SNAPSHOT-2026-03-05-a_static-linux-0.1.0.artifactbundle.tar.gz \ - --checksum f19419ad6a90d0fe5bbf8a28fbc47217ce212633c28257fc6549162558e6f9b6 +RUN swift sdk install https://download.swift.org/swift-6.2.3-release/static-sdk/swift-6.2.3-RELEASE/swift-6.2.3-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz --checksum f30ec724d824ef43b5546e02ca06a8682dafab4b26a99fbb0e858c347e507a2c diff --git a/vminitd/Package.resolved b/vminitd/Package.resolved index 9f15cbf5..efd03457 100644 --- a/vminitd/Package.resolved +++ b/vminitd/Package.resolved @@ -1,40 +1,22 @@ { - "originHash" : "54ebc8fe946a633a3e5f0b92c3d29d5a5473e07aaa8e80c51e4e8f0c25b3ec42", + "originHash" : "db3e9fbb73707e38ad14f86a67eb82b8c1a92edeb98b8c6747530a33f8d87125", "pins" : [ { "identity" : "async-http-client", "kind" : "remoteSourceControl", "location" : "https://github.com/swift-server/async-http-client.git", "state" : { - "revision" : "c464bf94eac4273cad7424307a5dc7e44e361905", - "version" : "1.30.1" + "revision" : "60235983163d040f343a489f7e2e77c1918a8bd9", + "version" : "1.26.1" } }, { - "identity" : "grpc-swift-2", + "identity" : "grpc-swift", "kind" : "remoteSourceControl", - "location" : "https://github.com/grpc/grpc-swift-2.git", + "location" : "https://github.com/grpc/grpc-swift.git", "state" : { - "revision" : "f28854bc760a116e053fdfc4a48a9428c34625c0", - "version" : "2.3.0" - } - }, - { - "identity" : "grpc-swift-nio-transport", - "kind" : "remoteSourceControl", - "location" : "https://github.com/grpc/grpc-swift-nio-transport.git", - "state" : { - "revision" : "f37e0c2d293cea668b11e10e1fb1c24cb40781ff", - "version" : "2.4.4" - } - }, - { - "identity" : "grpc-swift-protobuf", - "kind" : "remoteSourceControl", - "location" : "https://github.com/grpc/grpc-swift-protobuf.git", - "state" : { - "revision" : "19153231a03c2fda1f4ea60da1b92a2cb9c011d8", - "version" : "2.2.0" + "revision" : "a56a157218877ef3e9625f7e1f7b2cb7e46ead1b", + "version" : "1.26.1" } }, { @@ -51,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser.git", "state" : { - "revision" : "c5d11a805e765f52ba34ec7284bd4fcd6ba68615", - "version" : "1.7.0" + "revision" : "011f0c765fb46d9cac61bca19be0527e99c98c8b", + "version" : "1.5.1" } }, { @@ -87,8 +69,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-certificates.git", "state" : { - "revision" : "f4cd9e78a1ec209b27e426a5f5c693675f95e75a", - "version" : "1.15.0" + "revision" : "999fd70c7803da89f3904d635a6815a2a7cd7585", + "version" : "1.10.0" } }, { @@ -109,15 +91,6 @@ "version" : "3.12.3" } }, - { - "identity" : "swift-distributed-tracing", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-distributed-tracing.git", - "state" : { - "revision" : "dc4030184203ffafbb2ec614352487235d747fe0", - "version" : "1.4.1" - } - }, { "identity" : "swift-http-structured-headers", "kind" : "remoteSourceControl", @@ -141,8 +114,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log.git", "state" : { - "revision" : "bbd81b6725ae874c69e9b8c8804d462356b55523", - "version" : "1.10.1" + "revision" : "3d8596ed08bd13520157f0355e35caed215ffbfa", + "version" : "1.6.3" } }, { @@ -150,8 +123,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio.git", "state" : { - "revision" : "4e8f4b1c9adaa59315c523540c1ff2b38adc20a9", - "version" : "2.87.0" + "revision" : "34d486b01cd891297ac615e40d5999536a1e138d", + "version" : "2.83.0" } }, { @@ -168,8 +141,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-http2.git", "state" : { - "revision" : "5e9e99ec96c53bc2c18ddd10c1e25a3cd97c55e5", - "version" : "1.38.0" + "revision" : "4281466512f63d1bd530e33f4aa6993ee7864be0", + "version" : "1.36.0" } }, { @@ -204,17 +177,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "86970144a0b86068c81ff48ee29b3f97cae0b879", - "version" : "1.36.0" - } - }, - { - "identity" : "swift-service-context", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-service-context.git", - "state" : { - "revision" : "d0997351b0c7779017f88e7a93bc30a1878d7f29", - "version" : "1.3.0" + "revision" : "102a647b573f60f73afdce5613a51d71349fe507", + "version" : "1.30.0" } }, { @@ -231,8 +195,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-system.git", "state" : { - "revision" : "7c6ad0fc39d0763e0b699210e4124afd5041c5df", - "version" : "1.6.4" + "revision" : "395a77f0aa927f0ff73941d7ac35f2b46d47c9db", + "version" : "1.6.3" } }, { diff --git a/vminitd/Package.swift b/vminitd/Package.swift index fe4b43db..11039778 100644 --- a/vminitd/Package.swift +++ b/vminitd/Package.swift @@ -27,13 +27,9 @@ let package = Package( .executable(name: "vmexec", targets: ["vmexec"]), ], dependencies: [ - .package(url: "https://github.com/apple/swift-argument-parser", from: "1.7.0"), - .package(url: "https://github.com/apple/swift-log.git", from: "1.10.1"), - .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.36.0"), - .package(url: "https://github.com/apple/swift-system.git", from: "1.6.4"), - .package(url: "https://github.com/grpc/grpc-swift-2.git", from: "2.3.0"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "2.4.4"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "2.2.0"), + .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-system.git", from: "1.6.3"), .package(name: "containerization", path: "../"), ], targets: [ @@ -60,9 +56,6 @@ let package = Package( .product(name: "ContainerizationIO", package: "containerization"), .product(name: "ContainerizationOS", package: "containerization"), .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"), "LCShim", "Cgroup", ] diff --git a/vminitd/Sources/vminitd/Application.swift b/vminitd/Sources/vminitd/Application.swift index 94f0ca44..a205b141 100644 --- a/vminitd/Sources/vminitd/Application.swift +++ b/vminitd/Sources/vminitd/Application.swift @@ -117,45 +117,8 @@ struct LogLevelOption: ParsableArguments { } func makeLogger(label: String, level: Logger.Level) -> Logger { - LoggingSystem.bootstrap { label in StderrLogHandler(label: label) } + LoggingSystem.bootstrap(StreamLogHandler.standardError) var log = Logger(label: label) log.logLevel = level return log } - -private struct StderrLogHandler: LogHandler { - let label: String - var logLevel: Logger.Level = .info - var metadata: Logger.Metadata = [:] - - subscript(metadataKey key: String) -> Logger.Metadata.Value? { - get { metadata[key] } - set { metadata[key] = newValue } - } - - func log( - level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?, - source: String, file: String, function: String, line: UInt - ) { - var merged = self.metadata - metadata?.forEach { merged[$0] = $1 } - let metaStr = merged.isEmpty ? "" : " \(merged.map { "\($0): \($1)" }.sorted().joined(separator: ", "))" - let ts = isoTimestamp() - let data = "\(ts) \(level) \(label):\(metaStr) \(message)\n".data(using: .utf8) ?? Data() - FileHandle.standardError.write(data) - } - - func isoTimestamp() -> String { - let date = Date() - var time = time_t(date.timeIntervalSince1970) - var ms = Int(date.timeIntervalSince1970 * 1000) % 1000 - if ms < 0 { ms += 1000 } - var tm = tm() - gmtime_r(&time, &tm) - let buf = withUnsafeTemporaryAllocation(of: CChar.self, capacity: 32) { ptr -> String in - strftime(ptr.baseAddress!, 32, "%Y-%m-%dT%H:%M:%S", &tm) - return String(cString: ptr.baseAddress!) - } - return String(format: "%@.%03dZ", buf, ms) - } -} diff --git a/vminitd/Sources/vminitd/ManagedProcess.swift b/vminitd/Sources/vminitd/ManagedProcess.swift index 2e351bfd..4ace4045 100644 --- a/vminitd/Sources/vminitd/ManagedProcess.swift +++ b/vminitd/Sources/vminitd/ManagedProcess.swift @@ -20,6 +20,7 @@ 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 3936a517..405ae42b 100644 --- a/vminitd/Sources/vminitd/Server+GRPC.swift +++ b/vminitd/Sources/vminitd/Server+GRPC.swift @@ -23,8 +23,7 @@ import ContainerizationNetlink import ContainerizationOCI import ContainerizationOS import Foundation -import GRPCCore -import GRPCProtobuf +import GRPC import Logging import NIOCore import NIOPosix @@ -47,9 +46,9 @@ private let _sync = Glibc.sync #endif extension ContainerizationError { - func toRPCError(operation: String) -> RPCError { + func toGRPCStatus(operation: String) -> GRPCStatus { let message = "\(operation): \(self)" - let code: RPCError.Code = { + let code: GRPCStatus.Code = { switch self.code { case .invalidArgument: return .invalidArgument @@ -75,14 +74,14 @@ extension ContainerizationError { return .internalError } }() - return RPCError(code: code, message: message, cause: self) + return GRPCStatus(code: code, message: message, cause: self) } } -extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServiceProtocol { +extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvider { func setTime( request: Com_Apple_Containerization_Sandbox_V3_SetTimeRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetTimeResponse { log.trace( "setTime", @@ -99,7 +98,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "failed to settimeofday", cause: error) + throw GRPCStatus(code: .internalError, message: "failed to settimeofday: \(error)") } return .init() @@ -107,7 +106,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func setupEmulator( request: Com_Apple_Containerization_Sandbox_V3_SetupEmulatorRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_SetupEmulatorResponse { log.debug( "setupEmulator", @@ -116,7 +115,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ ]) if !Binfmt.mounted() { - throw RPCError( + throw GRPCStatus( code: .internalError, message: "\(Binfmt.path) is not mounted" ) @@ -138,10 +137,9 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "setupEmulator: failed to register binfmt_misc entry", - cause: error + message: "setupEmulator: failed to register binfmt_misc entry: \(error)" ) } @@ -150,7 +148,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func sysctl( request: Com_Apple_Containerization_Sandbox_V3_SysctlRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_SysctlResponse { log.debug( "sysctl", @@ -162,7 +160,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ let sysctlPath = URL(fileURLWithPath: "/proc/sys/") for (k, v) in request.settings { guard let data = v.data(using: .ascii) else { - throw RPCError(code: .internalError, message: "failed to convert \(v) to data buffer for sysctl write") + throw GRPCStatus(code: .internalError, message: "failed to convert \(v) to data buffer for sysctl write") } let setting = @@ -179,10 +177,9 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "sysctl: failed to set sysctl", - cause: error + message: "sysctl: failed to set sysctl: \(error)" ) } @@ -191,7 +188,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func proxyVsock( request: Com_Apple_Containerization_Sandbox_V3_ProxyVsockRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ProxyVsockResponse { log.debug( "proxyVsock", @@ -221,10 +218,9 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "proxyVsock: failed to setup vsock proxy", - cause: error + message: "proxyVsock: failed to setup vsock proxy: \(error)" ) } @@ -241,7 +237,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func stopVsockProxy( request: Com_Apple_Containerization_Sandbox_V3_StopVsockProxyRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_StopVsockProxyResponse { log.debug( "stopVsockProxy", @@ -258,10 +254,9 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "stopVsockProxy: failed to stop vsock proxy", - cause: error + message: "stopVsockProxy: failed to stop vsock proxy: \(error)" ) } @@ -274,7 +269,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ return .init() } - func mkdir(request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, context: GRPCCore.ServerContext) + func mkdir(request: Com_Apple_Containerization_Sandbox_V3_MkdirRequest, context: GRPC.GRPCAsyncServerCallContext) async throws -> Com_Apple_Containerization_Sandbox_V3_MkdirResponse { log.debug( @@ -295,13 +290,13 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "mkdir", cause: error) + throw GRPCStatus(code: .internalError, message: "mkdir: \(error)") } return .init() } - func writeFile(request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, context: GRPCCore.ServerContext) + func writeFile(request: Com_Apple_Containerization_Sandbox_V3_WriteFileRequest, context: GRPC.GRPCAsyncServerCallContext) async throws -> Com_Apple_Containerization_Sandbox_V3_WriteFileResponse { log.debug( @@ -334,10 +329,9 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ let fd = open(request.path, flags, mode) guard fd != -1 else { let error = swiftErrno("open") - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "writeFile: failed to open file", - cause: error + message: "writeFile: failed to open file: \(error)" ) } @@ -349,13 +343,12 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - if error is RPCError { + if error is GRPCStatus { throw error } - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "writeFile", - cause: error + message: "writeFile: \(error)" ) } @@ -367,8 +360,8 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func copy( request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, - response: GRPCCore.RPCWriter, - context: GRPCCore.ServerContext + responseStream: GRPCAsyncResponseStreamWriter, + context: GRPC.GRPCAsyncServerCallContext ) async throws { let path = request.path let vsockPort = request.vsockPort @@ -387,31 +380,31 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ do { switch request.direction { case .copyIn: - try await handleCopyIn(request: request, response: response) + try await handleCopyIn(request: request, responseStream: responseStream) case .copyOut: - try await handleCopyOut(request: request, response: response) + try await handleCopyOut(request: request, responseStream: responseStream) case .UNRECOGNIZED(let value): - throw RPCError(code: .invalidArgument, message: "copy: unrecognized direction \(value)") + throw GRPCStatus(code: .invalidArgument, message: "copy: unrecognized direction \(value)") } } catch { log.error( - "copy failed", + "copy", metadata: [ "direction": "\(request.direction)", "path": "\(path)", "error": "\(error)", ]) - if error is RPCError { + if error is GRPCStatus { throw error } - throw RPCError(code: .internalError, message: "copy failed", cause: error) + throw GRPCStatus(code: .internalError, message: "copy: \(error)") } } /// Handle a COPY_IN request: connect to host vsock port, read data, write to guest filesystem. private func handleCopyIn( request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, - response: GRPCCore.RPCWriter + responseStream: GRPCAsyncResponseStreamWriter ) async throws { let path = request.path let isArchive = request.isArchive @@ -435,7 +428,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ let mode = request.mode > 0 ? mode_t(request.mode) : mode_t(0o644) let fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, mode) guard fd != -1 else { - throw RPCError( + throw GRPCStatus( code: .internalError, message: "copy: failed to open file '\(path)': \(swiftErrno("open"))" ) @@ -447,7 +440,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ let n = read(sockFd, &buf, buf.count) if n == 0 { break } guard n > 0 else { - throw RPCError( + throw GRPCStatus( code: .internalError, message: "copy: vsock read error: \(swiftErrno("read"))" ) @@ -458,7 +451,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ write(fd, ptr.baseAddress! + written, n - written) } guard w > 0 else { - throw RPCError( + throw GRPCStatus( code: .internalError, message: "copy: write error: \(swiftErrno("write"))" ) @@ -486,18 +479,18 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ log.debug("copy: copyIn complete", metadata: ["path": "\(path)", "isArchive": "\(isArchive)"]) // Send completion response. - try await response.write(.with { $0.status = .complete }) + try await responseStream.send(.with { $0.status = .complete }) } /// Handle a COPY_OUT request: stat path, send metadata, connect to host vsock port, write data. private func handleCopyOut( request: Com_Apple_Containerization_Sandbox_V3_CopyRequest, - response: GRPCCore.RPCWriter + responseStream: GRPCAsyncResponseStreamWriter ) async throws { let path = request.path var isDirectory: ObjCBool = false guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) else { - throw RPCError(code: .notFound, message: "copy: path not found '\(path)'") + throw GRPCStatus(code: .notFound, message: "copy: path not found '\(path)'") } let isArchive = isDirectory.boolValue @@ -511,7 +504,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ } // Send metadata response BEFORE connecting to vsock, so host knows what to expect. - try await response.write( + try await responseStream.send( .with { $0.status = .metadata $0.isArchive = isArchive @@ -535,7 +528,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ } else { let srcFd = open(path, O_RDONLY) guard srcFd != -1 else { - throw RPCError( + throw GRPCStatus( code: .internalError, message: "copy: failed to open '\(path)': \(swiftErrno("open"))" ) @@ -547,7 +540,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ let n = read(srcFd, &buf, buf.count) if n == 0 { break } guard n > 0 else { - throw RPCError( + throw GRPCStatus( code: .internalError, message: "copy: read error: \(swiftErrno("read"))" ) @@ -558,7 +551,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ write(sock.fileDescriptor, ptr.baseAddress! + written, n - written) } guard w > 0 else { - throw RPCError( + throw GRPCStatus( code: .internalError, message: "copy: vsock write error: \(swiftErrno("write"))" ) @@ -577,10 +570,10 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ ]) // Send completion response after vsock data transfer is done. - try await response.write(.with { $0.status = .complete }) + try await responseStream.send(.with { $0.status = .complete }) } - func mount(request: Com_Apple_Containerization_Sandbox_V3_MountRequest, context: GRPCCore.ServerContext) + func mount(request: Com_Apple_Containerization_Sandbox_V3_MountRequest, context: GRPC.GRPCAsyncServerCallContext) async throws -> Com_Apple_Containerization_Sandbox_V3_MountResponse { log.debug( @@ -611,11 +604,11 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "mount", cause: error) + throw GRPCStatus(code: .internalError, message: "mount: \(error)") } } - func umount(request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, context: GRPCCore.ServerContext) + func umount(request: Com_Apple_Containerization_Sandbox_V3_UmountRequest, context: GRPC.GRPCAsyncServerCallContext) async throws -> Com_Apple_Containerization_Sandbox_V3_UmountResponse { log.debug( @@ -641,7 +634,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .invalidArgument, message: "umount", cause: error) + throw GRPCStatus(code: .invalidArgument, message: "umount: \(error)") } break } @@ -651,7 +644,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ #endif } - func setenv(request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, context: GRPCCore.ServerContext) + func setenv(request: Com_Apple_Containerization_Sandbox_V3_SetenvRequest, context: GRPC.GRPCAsyncServerCallContext) async throws -> Com_Apple_Containerization_Sandbox_V3_SetenvResponse { log.debug( @@ -670,12 +663,12 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "error": "\(error)" ]) - throw RPCError(code: .invalidArgument, message: "setenv", cause: error) + throw GRPCStatus(code: .invalidArgument, message: "setenv: \(error)") } return .init() } - func getenv(request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, context: GRPCCore.ServerContext) + func getenv(request: Com_Apple_Containerization_Sandbox_V3_GetenvRequest, context: GRPC.GRPCAsyncServerCallContext) async throws -> Com_Apple_Containerization_Sandbox_V3_GetenvResponse { log.debug( @@ -693,7 +686,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ } func createProcess( - request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, context: GRPCCore.ServerContext + request: Com_Apple_Containerization_Sandbox_V3_CreateProcessRequest, context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_CreateProcessResponse { log.debug( "createProcess", @@ -780,7 +773,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(err)", ]) - throw err.toRPCError(operation: "createProcess: failed to create process") + throw err.toGRPCStatus(operation: "createProcess: failed to create process") } catch { log.error( "createProcess", @@ -789,16 +782,13 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(error)", ]) - if error is RPCError { - throw error - } - throw RPCError(code: .internalError, message: "createProcess", cause: error) + throw GRPCStatus(code: .internalError, message: "createProcess: failed to create process: \(error)") } } func killProcess( request: Com_Apple_Containerization_Sandbox_V3_KillProcessRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_KillProcessResponse { log.debug( "killProcess", @@ -828,7 +818,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(err)", ]) - throw err.toRPCError(operation: "killProcess: failed to kill process") + throw err.toGRPCStatus(operation: "killProcess: failed to kill process") } catch { log.error( "killProcess", @@ -837,12 +827,12 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw RPCError(code: .internalError, message: "killProcess: failed to kill process: \(error)") + throw GRPCStatus(code: .internalError, message: "killProcess: failed to kill process: \(error)") } } func deleteProcess( - request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, context: GRPCCore.ServerContext + request: Com_Apple_Containerization_Sandbox_V3_DeleteProcessRequest, context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_DeleteProcessResponse { log.debug( "deleteProcess", @@ -879,7 +869,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(err)", ]) - throw err.toRPCError(operation: "deleteProcess: failed to delete process") + throw err.toGRPCStatus(operation: "deleteProcess: failed to delete process") } catch { log.error( "deleteProcess", @@ -888,15 +878,12 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw RPCError( - code: .internalError, - message: "deleteProcess: \(error)" - ) + throw GRPCStatus(code: .internalError, message: "deleteProcess: failed to delete process: \(error)") } } func startProcess( - request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, context: GRPCCore.ServerContext + request: Com_Apple_Containerization_Sandbox_V3_StartProcessRequest, context: GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_StartProcessResponse { log.debug( "startProcess", @@ -927,7 +914,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(err)", ]) - throw err.toRPCError(operation: "startProcess: failed to start process") + throw err.toGRPCStatus(operation: "startProcess: failed to start process") } catch { log.error( "startProcess", @@ -936,16 +923,15 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "startProcess: failed to start process", - cause: error + message: "startProcess: failed to start process: \(error)" ) } } func resizeProcess( - request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, context: GRPCCore.ServerContext + request: Com_Apple_Containerization_Sandbox_V3_ResizeProcessRequest, context: GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ResizeProcessResponse { log.debug( "resizeProcess", @@ -976,7 +962,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(err)", ]) - throw err.toRPCError(operation: "resizeProcess: failed to resize process") + throw err.toGRPCStatus(operation: "resizeProcess: failed to resize process") } catch { log.error( "resizeProcess", @@ -985,10 +971,9 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "resizeProcess: failed to resize process", - cause: error + message: "resizeProcess: failed to resize process: \(error)" ) } @@ -996,7 +981,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ } func waitProcess( - request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, context: GRPCCore.ServerContext + request: Com_Apple_Containerization_Sandbox_V3_WaitProcessRequest, context: GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_WaitProcessResponse { log.debug( "waitProcess", @@ -1028,7 +1013,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(err)", ]) - throw err.toRPCError(operation: "waitProcess: failed to wait on process") + throw err.toGRPCStatus(operation: "waitProcess: failed to wait on process") } catch { log.error( "waitProcess", @@ -1037,16 +1022,15 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "waitProcess: failed to wait on process", - cause: error + message: "waitProcess: failed to wait on process: \(error)" ) } } func closeProcessStdin( - request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, context: GRPCCore.ServerContext + request: Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinRequest, context: GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_CloseProcessStdinResponse { log.debug( "closeProcessStdin", @@ -1076,7 +1060,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(err)", ]) - throw err.toRPCError(operation: "closeProcessStdin: failed to close process stdin") + throw err.toGRPCStatus(operation: "closeProcessStdin: failed to close process stdin") } catch { log.error( "closeProcessStdin", @@ -1085,16 +1069,15 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ "containerID": "\(request.containerID)", "error": "\(error)", ]) - throw RPCError( + throw GRPCStatus( code: .internalError, - message: "closeProcessStdin: failed to close process stdin", - cause: error + message: "closeProcessStdin: failed to close process stdin: \(error)" ) } } func ipLinkSet( - request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, context: GRPCCore.ServerContext + request: Com_Apple_Containerization_Sandbox_V3_IpLinkSetRequest, context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpLinkSetResponse { log.debug( "ipLinkSet", @@ -1114,14 +1097,14 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "ipLinkSet", cause: error) + throw GRPCStatus(code: .internalError, message: "ip-link-set: \(error)") } return .init() } func ipAddrAdd( - request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, context: GRPCCore.ServerContext + request: Com_Apple_Containerization_Sandbox_V3_IpAddrAddRequest, context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpAddrAddResponse { log.debug( "ipAddrAdd", @@ -1141,14 +1124,14 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "ipAddrAdd", cause: error) + throw GRPCStatus(code: .internalError, message: "failed to set IP address on interface \(request.interface): \(error)") } return .init() } func ipRouteAddLink( - request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, context: GRPCCore.ServerContext + request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkRequest, context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddLinkResponse { log.debug( "ipRouteAddLink", @@ -1174,7 +1157,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "ipRouteAddLink", cause: error) + throw GRPCStatus(code: .internalError, message: "ip-route-add-link: \(error)") } return .init() @@ -1182,7 +1165,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func ipRouteAddDefault( request: Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_IpRouteAddDefaultResponse { log.debug( "ipRouteAddDefault", @@ -1202,7 +1185,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "ipRouteAddDefault", cause: error) + throw GRPCStatus(code: .internalError, message: "failed to set default gateway on interface \(request.interface): \(error)") } return .init() @@ -1210,7 +1193,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func configureDns( request: Com_Apple_Containerization_Sandbox_V3_ConfigureDnsRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureDnsResponse { let domain = request.hasDomain ? request.domain : nil log.debug( @@ -1243,7 +1226,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "configureDns", cause: error) + throw GRPCStatus(code: .internalError, message: "failed to configure DNS at location \(request.location): \(error)") } return .init() @@ -1251,7 +1234,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func configureHosts( request: Com_Apple_Containerization_Sandbox_V3_ConfigureHostsRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ConfigureHostsResponse { log.debug( "configureHosts", @@ -1275,7 +1258,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "configureHosts", cause: error) + throw GRPCStatus(code: .internalError, message: "configureHosts: \(error)") } return .init() @@ -1283,7 +1266,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func containerStatistics( request: Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_ContainerStatisticsResponse { log.debug( "containerStatistics", @@ -1380,7 +1363,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ metadata: [ "error": "\(error)" ]) - throw RPCError(code: .internalError, message: "containerStatistics", cause: error) + throw GRPCStatus(code: .internalError, message: "containerStatistics: \(error)") } } @@ -1493,7 +1476,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func sync( request: Com_Apple_Containerization_Sandbox_V3_SyncRequest, - context: GRPCCore.ServerContext + context: GRPC.GRPCAsyncServerCallContext ) async throws -> Com_Apple_Containerization_Sandbox_V3_SyncResponse { log.debug("sync") @@ -1503,7 +1486,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContext.SimpleServ func kill( request: Com_Apple_Containerization_Sandbox_V3_KillRequest, - context: GRPCCore.ServerContext + context: GRPCAsyncServerCallContext ) 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 58bafe27..91defe53 100644 --- a/vminitd/Sources/vminitd/Server.swift +++ b/vminitd/Sources/vminitd/Server.swift @@ -16,9 +16,7 @@ import ContainerizationError import Foundation -import GRPCCore -import GRPCNIOTransportHTTP2 -import GRPCProtobuf +import GRPC import Logging import NIOCore import NIOPosix @@ -102,23 +100,21 @@ final class Initd: Sendable { metadata: [ "port": "\(port)" ]) - - let server = GRPCServer( - transport: .http2NIOPosix( - address: .vsock(contextID: .any, port: .init(port)), - transportSecurity: .plaintext - ), - services: [self] - ) - + let server = try await Server.start( + configuration: .default( + target: .vsockAddress(.init(cid: .any, port: .init(port))), + eventLoopGroup: self.group, + serviceProviders: [self]) + ).get() log.info( "gRPC API serving on vsock", metadata: [ "port": "\(port)" ]) - group.addTask { try await server.serve() } - + group.addTask { + try await server.onClose.get() + } try await group.next() log.info("closing gRPC server") group.cancelAll()