From 2c79cd4b40d0f9993f023813501c83731c3439d3 Mon Sep 17 00:00:00 2001 From: Fabian Boemer Date: Wed, 28 Aug 2024 11:29:40 -0700 Subject: [PATCH] Update protos --- Package.swift | 1 - .../ConversionApi.swift | 12 +- ...orphic_encryption_api_pir_v1_api.pb.swift} | 88 ++-- ...orphic_encryption_api_pir_v1_pir.pb.swift} | 42 +- ...ryption_api_shared_v1_api_shared.pb.swift} | 36 +- .../ConversionApi.swift | 6 +- ...orphic_encryption_api_pnns_v1_api.pb.swift | 485 ++++++++++++++++++ ...phic_encryption_api_pnns_v1_pnns.pb.swift} | 42 +- ...ryption_api_shared_v1_api_shared.pb.swift} | 36 +- Utilities/generate-protobuf-files.sh | 9 +- swift-homomorphic-encryption-protobuf | 2 +- 11 files changed, 621 insertions(+), 138 deletions(-) rename Sources/PrivateInformationRetrievalProtobuf/generated/{apple_swift_homomorphic_encryption_api_v1_api.pb.swift => apple_swift_homomorphic_encryption_api_pir_v1_api.pb.swift} (80%) rename Sources/PrivateInformationRetrievalProtobuf/generated/{apple_swift_homomorphic_encryption_api_v1_api_pir.pb.swift => apple_swift_homomorphic_encryption_api_pir_v1_pir.pb.swift} (92%) rename Sources/PrivateInformationRetrievalProtobuf/generated/{apple_swift_homomorphic_encryption_api_v1_api_evaluation_key.pb.swift => apple_swift_homomorphic_encryption_api_shared_v1_api_shared.pb.swift} (86%) create mode 100644 Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_pnns_v1_api.pb.swift rename Sources/PrivateNearestNeighborsSearchProtobuf/generated/{apple_swift_homomorphic_encryption_api_v1_api_pnns.pb.swift => apple_swift_homomorphic_encryption_api_pnns_v1_pnns.pb.swift} (90%) rename Sources/PrivateNearestNeighborsSearchProtobuf/generated/{apple_swift_homomorphic_encryption_api_v1_api_evaluation_key.pb.swift => apple_swift_homomorphic_encryption_api_shared_v1_api_shared.pb.swift} (86%) diff --git a/Package.swift b/Package.swift index 3c84a378..43cf3caa 100644 --- a/Package.swift +++ b/Package.swift @@ -113,7 +113,6 @@ let package = Package( .product(name: "SwiftProtobuf", package: "swift-protobuf")], exclude: ["generated/README.md", "protobuf_module_mappings.txtpb"], swiftSettings: librarySettings), - .target( name: "TestUtilities", dependencies: [ diff --git a/Sources/PrivateInformationRetrievalProtobuf/ConversionApi.swift b/Sources/PrivateInformationRetrievalProtobuf/ConversionApi.swift index 76f7e860..3b419f48 100644 --- a/Sources/PrivateInformationRetrievalProtobuf/ConversionApi.swift +++ b/Sources/PrivateInformationRetrievalProtobuf/ConversionApi.swift @@ -16,7 +16,7 @@ import HomomorphicEncryption import HomomorphicEncryptionProtobuf import PrivateInformationRetrieval -extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse { /// Converts the protobuf object to a native type. /// - Parameter context: Context to associate with the native type. /// - Returns: The converted native type. @@ -36,8 +36,8 @@ extension Response { /// Converts the native object into a protobuf object. /// - Returns: The converted protobuf object. /// - Throws: Error upon unsupported object. - public func proto() throws -> Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse { - try Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse.with { pirResponse in + public func proto() throws -> Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse { + try Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse.with { pirResponse in pirResponse.replies = try ciphertexts.map { reply in try reply.map { try $0.serialize(forDecryption: true) }.proto() } @@ -45,7 +45,7 @@ extension Response { } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig { /// Converts the protobuf object to a native type. /// - Parameters: /// - batchSize: Number of queries in a batch. @@ -65,8 +65,8 @@ extension IndexPirParameter { /// Converts the native object into a protobuf object. /// - Parameter shardID: Optional identifier to associate with the shard /// - Returns: The converted protobuf object. - public func proto(shardID: String = "") -> Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig { - Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig.with { shardConfig in + public func proto(shardID: String = "") -> Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig { + Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig.with { shardConfig in shardConfig.numEntries = UInt64(entryCount) shardConfig.entrySize = UInt64(entrySizeInBytes) shardConfig.dimensions = dimensions.map(UInt64.init) diff --git a/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api.pb.swift b/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_pir_v1_api.pb.swift similarity index 80% rename from Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api.pb.swift rename to Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_pir_v1_api.pb.swift index 49fe920f..a3693568 100644 --- a/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api.pb.swift +++ b/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_pir_v1_api.pb.swift @@ -2,7 +2,7 @@ // swift-format-ignore-file // // Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: apple/swift_homomorphic_encryption/api/v1/api.proto +// Source: apple/swift_homomorphic_encryption/api/pir/v1/api.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ @@ -35,7 +35,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP } /// Request for server side configurations. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_ConfigRequest: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_ConfigRequest: 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. @@ -50,19 +50,19 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_ConfigRequest: Sendable { } /// Usecase configuration. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_Config: @unchecked Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Config: @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. /// Configuration. - public var config: Apple_SwiftHomomorphicEncryption_Api_V1_Config.OneOf_Config? = nil + public var config: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Config.OneOf_Config? = nil /// Configuration for a PIR usecase. - public var pirConfig: Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig { + public var pirConfig: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRConfig { get { if case .pirConfig(let v)? = config {return v} - return Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig() + return Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRConfig() } set {config = .pirConfig(newValue)} } @@ -75,7 +75,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_Config: @unchecked Sendabl /// Configuration. public enum OneOf_Config: Equatable, Sendable { /// Configuration for a PIR usecase. - case pirConfig(Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig) + case pirConfig(Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRConfig) } @@ -83,16 +83,16 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_Config: @unchecked Sendabl } /// Server side configurations. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_ConfigResponse: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_ConfigResponse: 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. /// usecases with associated configurations. - public var configs: Dictionary = [:] + public var configs: Dictionary = [:] /// Configuration & status of evaluation keys. - public var keyInfo: [Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus] = [] + public var keyInfo: [Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() @@ -100,13 +100,13 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_ConfigResponse: Sendable { } /// Container for multiple requests. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_Requests: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Requests: 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. /// Requests. - public var requests: [Apple_SwiftHomomorphicEncryption_Api_V1_Request] = [] + public var requests: [Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Request] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() @@ -114,13 +114,13 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_Requests: Sendable { } /// Container for multiple responses. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_Responses: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Responses: 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. /// Responses. - public var responses: [Apple_SwiftHomomorphicEncryption_Api_V1_Response] = [] + public var responses: [Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Response] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() @@ -128,7 +128,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_Responses: Sendable { } /// Generic request. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_Request: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Request: 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. @@ -137,13 +137,13 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_Request: Sendable { public var usecase: String = String() /// Generic request. - public var request: Apple_SwiftHomomorphicEncryption_Api_V1_Request.OneOf_Request? = nil + public var request: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Request.OneOf_Request? = nil /// PIR request. - public var pirRequest: Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest { + public var pirRequest: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRRequest { get { if case .pirRequest(let v)? = request {return v} - return Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest() + return Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRRequest() } set {request = .pirRequest(newValue)} } @@ -153,7 +153,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_Request: Sendable { /// Generic request. public enum OneOf_Request: Equatable, Sendable { /// PIR request. - case pirRequest(Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest) + case pirRequest(Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRRequest) } @@ -161,19 +161,19 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_Request: Sendable { } /// Generic response. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_Response: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Response: 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. /// Generic response. - public var response: Apple_SwiftHomomorphicEncryption_Api_V1_Response.OneOf_Response? = nil + public var response: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Response.OneOf_Response? = nil /// Response to a `PIRRequest`. - public var pirResponse: Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse { + public var pirResponse: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse { get { if case .pirResponse(let v)? = response {return v} - return Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse() + return Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse() } set {response = .pirResponse(newValue)} } @@ -183,7 +183,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_Response: Sendable { /// Generic response. public enum OneOf_Response: Equatable, Sendable { /// Response to a `PIRRequest`. - case pirResponse(Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse) + case pirResponse(Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse) } @@ -192,9 +192,9 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_Response: Sendable { // MARK: - Code below here is support for the SwiftProtobuf runtime. -fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.v1" +fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.pir.v1" -extension Apple_SwiftHomomorphicEncryption_Api_V1_ConfigRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_ConfigRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ConfigRequest" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "usecases"), @@ -219,14 +219,14 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_ConfigRequest: SwiftProtobuf.M try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_ConfigRequest, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_ConfigRequest) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_ConfigRequest, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_ConfigRequest) -> Bool { if lhs.usecases != rhs.usecases {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".Config" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "pir_config"), @@ -240,7 +240,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Config: SwiftProtobuf.Message, // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { - var v: Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig? + var v: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRConfig? var hadOneofValue = false if let current = self.config { hadOneofValue = true @@ -272,7 +272,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Config: SwiftProtobuf.Message, try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_Config, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_Config) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Config, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Config) -> Bool { if lhs.config != rhs.config {return false} if lhs.configID != rhs.configID {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -280,7 +280,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Config: SwiftProtobuf.Message, } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_ConfigResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_ConfigResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ConfigResponse" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "configs"), @@ -293,7 +293,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_ConfigResponse: SwiftProtobuf. // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { - case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.configs) }() + case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.configs) }() case 2: try { try decoder.decodeRepeatedMessageField(value: &self.keyInfo) }() default: break } @@ -302,7 +302,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_ConfigResponse: SwiftProtobuf. public func traverse(visitor: inout V) throws { if !self.configs.isEmpty { - try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.configs, fieldNumber: 1) + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.configs, fieldNumber: 1) } if !self.keyInfo.isEmpty { try visitor.visitRepeatedMessageField(value: self.keyInfo, fieldNumber: 2) @@ -310,7 +310,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_ConfigResponse: SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_ConfigResponse, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_ConfigResponse) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_ConfigResponse, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_ConfigResponse) -> Bool { if lhs.configs != rhs.configs {return false} if lhs.keyInfo != rhs.keyInfo {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -318,7 +318,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_ConfigResponse: SwiftProtobuf. } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_Requests: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Requests: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".Requests" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "requests"), @@ -343,14 +343,14 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Requests: SwiftProtobuf.Messag try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_Requests, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_Requests) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Requests, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Requests) -> Bool { if lhs.requests != rhs.requests {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_Responses: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Responses: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".Responses" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "responses"), @@ -375,14 +375,14 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Responses: SwiftProtobuf.Messa try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_Responses, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_Responses) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Responses, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Responses) -> Bool { if lhs.responses != rhs.responses {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_Request: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Request: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".Request" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "usecase"), @@ -397,7 +397,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Request: SwiftProtobuf.Message switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.usecase) }() case 2: try { - var v: Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest? + var v: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRRequest? var hadOneofValue = false if let current = self.request { hadOneofValue = true @@ -428,7 +428,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Request: SwiftProtobuf.Message try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_Request, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_Request) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Request, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Request) -> Bool { if lhs.usecase != rhs.usecase {return false} if lhs.request != rhs.request {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -436,7 +436,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Request: SwiftProtobuf.Message } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_Response: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Response: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".Response" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "pir_response"), @@ -449,7 +449,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Response: SwiftProtobuf.Messag // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { - var v: Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse? + var v: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse? var hadOneofValue = false if let current = self.response { hadOneofValue = true @@ -477,7 +477,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_Response: SwiftProtobuf.Messag try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_Response, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_Response) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Response, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_Response) -> Bool { if lhs.response != rhs.response {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true diff --git a/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_pir.pb.swift b/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_pir_v1_pir.pb.swift similarity index 92% rename from Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_pir.pb.swift rename to Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_pir_v1_pir.pb.swift index 0766f2f9..0fa56413 100644 --- a/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_pir.pb.swift +++ b/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_pir_v1_pir.pb.swift @@ -2,7 +2,7 @@ // swift-format-ignore-file // // Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: apple/swift_homomorphic_encryption/api/v1/api_pir.proto +// Source: apple/swift_homomorphic_encryption/api/pir/v1/pir.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ @@ -37,7 +37,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP } /// Configuration for one shard of the PIR database. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig: 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. @@ -91,7 +91,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig: Sendable { } /// Configuration for one PIR usecase. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig: @unchecked Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRConfig: @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. @@ -107,7 +107,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig: @unchecked Send public mutating func clearEncryptionParameters() {self._encryptionParameters = nil} /// Configuration for each shard. - public var shardConfigs: [Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig] = [] + public var shardConfigs: [Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig] = [] /// Parameters specific to KeywordPIR. public var keywordPirParams: Apple_SwiftHomomorphicEncryption_Pir_V1_KeywordPirParameters { @@ -137,7 +137,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig: @unchecked Send } /// PIR Request. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest: @unchecked Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRRequest: @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. @@ -156,8 +156,8 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest: @unchecked Sen public mutating func clearQuery() {self._query = nil} /// Evaluation key metadata. - public var evaluationKeyMetadata: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata { - get {return _evaluationKeyMetadata ?? Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata()} + public var evaluationKeyMetadata: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata { + get {return _evaluationKeyMetadata ?? Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata()} set {_evaluationKeyMetadata = newValue} } /// Returns true if `evaluationKeyMetadata` has been explicitly set. @@ -179,8 +179,8 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest: @unchecked Sen public mutating func clearShardID() {self._shardID = nil} /// If set, evaluation key to query with. Will override evaluation key stored server-side. - public var evaluationKey: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey { - get {return _evaluationKey ?? Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey()} + public var evaluationKey: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey { + get {return _evaluationKey ?? Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey()} set {_evaluationKey = newValue} } /// Returns true if `evaluationKey` has been explicitly set. @@ -193,13 +193,13 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest: @unchecked Sen public init() {} fileprivate var _query: Apple_SwiftHomomorphicEncryption_Pir_V1_EncryptedIndices? = nil - fileprivate var _evaluationKeyMetadata: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata? = nil + fileprivate var _evaluationKeyMetadata: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata? = nil fileprivate var _shardID: String? = nil - fileprivate var _evaluationKey: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey? = nil + fileprivate var _evaluationKey: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey? = nil } /// PIR Response. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse: 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. @@ -214,9 +214,9 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse: Sendable { // MARK: - Code below here is support for the SwiftProtobuf runtime. -fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.v1" +fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.pir.v1" -extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".PIRShardConfig" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "num_entries"), @@ -270,7 +270,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig: SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig) -> Bool { if lhs.numEntries != rhs.numEntries {return false} if lhs.entrySize != rhs.entrySize {return false} if lhs.dimensions != rhs.dimensions {return false} @@ -282,7 +282,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRShardConfig: SwiftProtobuf. } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".PIRConfig" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "encryption_parameters"), @@ -336,7 +336,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig: SwiftProtobuf.Messa try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRConfig, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRConfig) -> Bool { if lhs._encryptionParameters != rhs._encryptionParameters {return false} if lhs.shardConfigs != rhs.shardConfigs {return false} if lhs._keywordPirParams != rhs._keywordPirParams {return false} @@ -348,7 +348,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRConfig: SwiftProtobuf.Messa } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".PIRRequest" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "shard_index"), @@ -402,7 +402,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest: SwiftProtobuf.Mess try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRRequest, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRRequest) -> Bool { if lhs.shardIndex != rhs.shardIndex {return false} if lhs._query != rhs._query {return false} if lhs._evaluationKeyMetadata != rhs._evaluationKeyMetadata {return false} @@ -414,7 +414,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRRequest: SwiftProtobuf.Mess } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".PIRResponse" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "replies"), @@ -439,7 +439,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse: SwiftProtobuf.Mes try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_PIRResponse) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse, rhs: Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRResponse) -> Bool { if lhs.replies != rhs.replies {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true diff --git a/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_evaluation_key.pb.swift b/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_shared_v1_api_shared.pb.swift similarity index 86% rename from Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_evaluation_key.pb.swift rename to Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_shared_v1_api_shared.pb.swift index 63d88421..a2b55397 100644 --- a/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_evaluation_key.pb.swift +++ b/Sources/PrivateInformationRetrievalProtobuf/generated/apple_swift_homomorphic_encryption_api_shared_v1_api_shared.pb.swift @@ -2,7 +2,7 @@ // swift-format-ignore-file // // Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: apple/swift_homomorphic_encryption/api/v1/api_evaluation_key.proto +// Source: apple/swift_homomorphic_encryption/api/shared/v1/api_shared.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ @@ -37,7 +37,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP } /// Evaluation key metadata. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: @unchecked Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata: @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. @@ -54,7 +54,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: @un } /// Status of the evaluation key. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus: 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. @@ -80,13 +80,13 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: Sendable { } /// Container for multiple evaluation keys. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeys: 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. /// Evaluation keys. - public var keys: [Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey] = [] + public var keys: [Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() @@ -94,14 +94,14 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys: Sendable { } /// Evaluation key upload. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey: 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. /// Metadata for the key. - public var metadata: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata { - get {return _metadata ?? Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata()} + public var metadata: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata { + get {return _metadata ?? Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata()} set {_metadata = newValue} } /// Returns true if `metadata` has been explicitly set. @@ -123,15 +123,15 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey: Sendable { public init() {} - fileprivate var _metadata: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata? = nil + fileprivate var _metadata: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata? = nil fileprivate var _evaluationKey: HomomorphicEncryptionProtobuf.Apple_SwiftHomomorphicEncryption_V1_SerializedEvaluationKey? = nil } // MARK: - Code below here is support for the SwiftProtobuf runtime. -fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.v1" +fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.shared.v1" -extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".EvaluationKeyMetadata" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "timestamp"), @@ -161,7 +161,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: SwiftPr try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata, rhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata) -> Bool { if lhs.timestamp != rhs.timestamp {return false} if lhs.identifier != rhs.identifier {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -169,7 +169,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: SwiftPr } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".KeyStatus" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "timestamp"), @@ -203,7 +203,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: SwiftProtobuf.Messa try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus, rhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus) -> Bool { if lhs.timestamp != rhs.timestamp {return false} if lhs._keyConfig != rhs._keyConfig {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -211,7 +211,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: SwiftProtobuf.Messa } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeys: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".EvaluationKeys" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "keys"), @@ -236,14 +236,14 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys: SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeys, rhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeys) -> Bool { if lhs.keys != rhs.keys {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".EvaluationKey" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "metadata"), @@ -277,7 +277,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey: SwiftProtobuf.M try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey, rhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey) -> Bool { if lhs._metadata != rhs._metadata {return false} if lhs._evaluationKey != rhs._evaluationKey {return false} if lhs.unknownFields != rhs.unknownFields {return false} diff --git a/Sources/PrivateNearestNeighborsSearchProtobuf/ConversionApi.swift b/Sources/PrivateNearestNeighborsSearchProtobuf/ConversionApi.swift index cf1500b0..21245da6 100644 --- a/Sources/PrivateNearestNeighborsSearchProtobuf/ConversionApi.swift +++ b/Sources/PrivateNearestNeighborsSearchProtobuf/ConversionApi.swift @@ -18,7 +18,7 @@ import HomomorphicEncryption import HomomorphicEncryptionProtobuf import PrivateNearestNeighborsSearch -extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse { +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse { /// Converts the protobuf object to a native type. /// - Parameter context: Context to associate with the native type. /// - Returns: The converted native type. @@ -39,8 +39,8 @@ extension Response { /// Converts the native object into a protobuf object. /// - Returns: The converted protobuf object. /// - Throws: Error upon unsupported object. - public func proto() throws -> Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse { - try Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse.with { pnnsResponse in + public func proto() throws -> Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse { + try Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse.with { pnnsResponse in pnnsResponse.reply = try ciphertextMatrices.map { matrix in try matrix.serialize(forDecryption: true).proto() } diff --git a/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_pnns_v1_api.pb.swift b/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_pnns_v1_api.pb.swift new file mode 100644 index 00000000..22ea88d5 --- /dev/null +++ b/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_pnns_v1_api.pb.swift @@ -0,0 +1,485 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: apple/swift_homomorphic_encryption/api/pnns/v1/api.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +// Copyright 2024 Apple Inc. and the Swift Homomorphic Encryption project authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +/// Request for server side configurations. +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_ConfigRequest: 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. + + /// List of usecases to fetch configs for. + /// When set to empty array, all configs will be returned. + public var usecases: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +/// Usecase configuration. +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Config: @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. + + /// Configuration. + public var config: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Config.OneOf_Config? = nil + + /// Configuration for a PNNS usecase. + public var pnnsConfig: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSConfig { + get { + if case .pnnsConfig(let v)? = config {return v} + return Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSConfig() + } + set {config = .pnnsConfig(newValue)} + } + + /// Unique identifier for the configuration. + public var configID: Data = Data() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + /// Configuration. + public enum OneOf_Config: Equatable, Sendable { + /// Configuration for a PNNS usecase. + case pnnsConfig(Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSConfig) + + } + + public init() {} +} + +/// Server side configurations. +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_ConfigResponse: 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. + + /// usecases with associated configurations. + public var configs: Dictionary = [:] + + /// Configuration & status of evaluation keys. + public var keyInfo: [Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +/// Container for multiple requests. +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Requests: 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. + + /// Requests. + public var requests: [Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Request] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +/// Container for multiple responses. +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Responses: 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. + + /// Responses. + public var responses: [Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Response] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +/// Generic request. +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Request: 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. + + /// Usecase identifier. + public var usecase: String = String() + + /// Generic request. + public var request: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Request.OneOf_Request? = nil + + /// PNNS request. + public var pnnsRequest: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest { + get { + if case .pnnsRequest(let v)? = request {return v} + return Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest() + } + set {request = .pnnsRequest(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + /// Generic request. + public enum OneOf_Request: Equatable, Sendable { + /// PNNS request. + case pnnsRequest(Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest) + + } + + public init() {} +} + +/// Generic response. +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Response: 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. + + /// Generic response. + public var response: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Response.OneOf_Response? = nil + + /// Response to a `PNNSRequest`. + public var pnnsResponse: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSResponse { + get { + if case .pnnsResponse(let v)? = response {return v} + return Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSResponse() + } + set {response = .pnnsResponse(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + /// Generic response. + public enum OneOf_Response: Equatable, Sendable { + /// Response to a `PNNSRequest`. + case pnnsResponse(Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSResponse) + + } + + public init() {} +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.pnns.v1" + +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_ConfigRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".ConfigRequest" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "usecases"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedStringField(value: &self.usecases) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.usecases.isEmpty { + try visitor.visitRepeatedStringField(value: self.usecases, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_ConfigRequest, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_ConfigRequest) -> Bool { + if lhs.usecases != rhs.usecases {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Config: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".Config" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 2: .standard(proto: "pnns_config"), + 3: .standard(proto: "config_id"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 2: try { + var v: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSConfig? + var hadOneofValue = false + if let current = self.config { + hadOneofValue = true + if case .pnnsConfig(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.config = .pnnsConfig(v) + } + }() + case 3: try { try decoder.decodeSingularBytesField(value: &self.configID) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if case .pnnsConfig(let v)? = self.config { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + if !self.configID.isEmpty { + try visitor.visitSingularBytesField(value: self.configID, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Config, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Config) -> Bool { + if lhs.config != rhs.config {return false} + if lhs.configID != rhs.configID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_ConfigResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".ConfigResponse" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "configs"), + 2: .standard(proto: "key_info"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.configs) }() + case 2: try { try decoder.decodeRepeatedMessageField(value: &self.keyInfo) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.configs.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.configs, fieldNumber: 1) + } + if !self.keyInfo.isEmpty { + try visitor.visitRepeatedMessageField(value: self.keyInfo, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_ConfigResponse, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_ConfigResponse) -> Bool { + if lhs.configs != rhs.configs {return false} + if lhs.keyInfo != rhs.keyInfo {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Requests: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".Requests" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "requests"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.requests) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.requests.isEmpty { + try visitor.visitRepeatedMessageField(value: self.requests, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Requests, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Requests) -> Bool { + if lhs.requests != rhs.requests {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Responses: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".Responses" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "responses"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.responses) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.responses.isEmpty { + try visitor.visitRepeatedMessageField(value: self.responses, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Responses, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Responses) -> Bool { + if lhs.responses != rhs.responses {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Request: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".Request" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "usecase"), + 3: .standard(proto: "pnns_request"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.usecase) }() + case 3: try { + var v: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest? + var hadOneofValue = false + if let current = self.request { + hadOneofValue = true + if case .pnnsRequest(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.request = .pnnsRequest(v) + } + }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if !self.usecase.isEmpty { + try visitor.visitSingularStringField(value: self.usecase, fieldNumber: 1) + } + try { if case .pnnsRequest(let v)? = self.request { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Request, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Request) -> Bool { + if lhs.usecase != rhs.usecase {return false} + if lhs.request != rhs.request {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Response: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".Response" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 2: .standard(proto: "pnns_response"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 2: try { + var v: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSResponse? + var hadOneofValue = false + if let current = self.response { + hadOneofValue = true + if case .pnnsResponse(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.response = .pnnsResponse(v) + } + }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if case .pnnsResponse(let v)? = self.response { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Response, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_Response) -> Bool { + if lhs.response != rhs.response {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_pnns.pb.swift b/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_pnns_v1_pnns.pb.swift similarity index 90% rename from Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_pnns.pb.swift rename to Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_pnns_v1_pnns.pb.swift index b2c88a82..0c159503 100644 --- a/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_pnns.pb.swift +++ b/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_pnns_v1_pnns.pb.swift @@ -2,7 +2,7 @@ // swift-format-ignore-file // // Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: apple/swift_homomorphic_encryption/api/v1/api_pnns.proto +// Source: apple/swift_homomorphic_encryption/api/pnns/v1/pnns.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ @@ -37,7 +37,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP } /// Configuration for one PNNS usecase. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSConfig: @unchecked Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSConfig: @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. @@ -87,7 +87,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSConfig: @unchecked Sen } /// PNNS Request -public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSRequest: @unchecked Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: @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. @@ -99,8 +99,8 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSRequest: @unchecked Se public var query: [Apple_SwiftHomomorphicEncryption_Pnns_V1_SerializedCiphertextMatrix] = [] /// Key metadata - public var evaluationKeyMetadata: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata { - get {return _evaluationKeyMetadata ?? Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata()} + public var evaluationKeyMetadata: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata { + get {return _evaluationKeyMetadata ?? Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata()} set {_evaluationKeyMetadata = newValue} } /// Returns true if `evaluationKeyMetadata` has been explicitly set. @@ -112,8 +112,8 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSRequest: @unchecked Se public var configID: Data = Data() /// If set, evaluation key to query with. Will override evaluation key stored server-side - public var evaluationKey: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey { - get {return _evaluationKey ?? Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey()} + public var evaluationKey: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey { + get {return _evaluationKey ?? Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey()} set {_evaluationKey = newValue} } /// Returns true if `evaluationKey` has been explicitly set. @@ -125,12 +125,12 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSRequest: @unchecked Se public init() {} - fileprivate var _evaluationKeyMetadata: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata? = nil - fileprivate var _evaluationKey: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey? = nil + fileprivate var _evaluationKeyMetadata: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata? = nil + fileprivate var _evaluationKey: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey? = nil } /// PNNS Shard Response -public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse: @unchecked Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse: @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. @@ -150,13 +150,13 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse: @unchec } /// PNNS Response -public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSResponse: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSResponse: 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. /// PNNS responses from shards - public var shardResponses: [Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse] = [] + public var shardResponses: [Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() @@ -165,9 +165,9 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_PNNSResponse: Sendable { // MARK: - Code below here is support for the SwiftProtobuf runtime. -fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.v1" +fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.pnns.v1" -extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".PNNSConfig" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "encryption_parameters"), @@ -226,7 +226,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSConfig: SwiftProtobuf.Mess try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_PNNSConfig, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_PNNSConfig) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSConfig, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSConfig) -> Bool { if lhs._encryptionParameters != rhs._encryptionParameters {return false} if lhs.scalingFactor != rhs.scalingFactor {return false} if lhs._plaintextPacking != rhs._plaintextPacking {return false} @@ -239,7 +239,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSConfig: SwiftProtobuf.Mess } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".PNNSRequest" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "shard_indices"), @@ -288,7 +288,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSRequest: SwiftProtobuf.Mes try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_PNNSRequest, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_PNNSRequest) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest) -> Bool { if lhs.shardIndices != rhs.shardIndices {return false} if lhs.query != rhs.query {return false} if lhs._evaluationKeyMetadata != rhs._evaluationKeyMetadata {return false} @@ -299,7 +299,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSRequest: SwiftProtobuf.Mes } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".PNNSShardResponse" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "reply"), @@ -334,7 +334,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse: SwiftProtob try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse) -> Bool { if lhs.reply != rhs.reply {return false} if lhs.entryIds != rhs.entryIds {return false} if lhs.entryMetadatas != rhs.entryMetadatas {return false} @@ -343,7 +343,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSShardResponse: SwiftProtob } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".PNNSResponse" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "shard_responses"), @@ -368,7 +368,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_PNNSResponse: SwiftProtobuf.Me try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_PNNSResponse, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_PNNSResponse) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSResponse, rhs: Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSResponse) -> Bool { if lhs.shardResponses != rhs.shardResponses {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true diff --git a/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_evaluation_key.pb.swift b/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_shared_v1_api_shared.pb.swift similarity index 86% rename from Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_evaluation_key.pb.swift rename to Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_shared_v1_api_shared.pb.swift index 63d88421..a2b55397 100644 --- a/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_v1_api_evaluation_key.pb.swift +++ b/Sources/PrivateNearestNeighborsSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_shared_v1_api_shared.pb.swift @@ -2,7 +2,7 @@ // swift-format-ignore-file // // Generated by the Swift generator plugin for the protocol buffer compiler. -// Source: apple/swift_homomorphic_encryption/api/v1/api_evaluation_key.proto +// Source: apple/swift_homomorphic_encryption/api/shared/v1/api_shared.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ @@ -37,7 +37,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP } /// Evaluation key metadata. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: @unchecked Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata: @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. @@ -54,7 +54,7 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: @un } /// Status of the evaluation key. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus: 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. @@ -80,13 +80,13 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: Sendable { } /// Container for multiple evaluation keys. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeys: 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. /// Evaluation keys. - public var keys: [Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey] = [] + public var keys: [Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() @@ -94,14 +94,14 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys: Sendable { } /// Evaluation key upload. -public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey: Sendable { +public struct Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey: 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. /// Metadata for the key. - public var metadata: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata { - get {return _metadata ?? Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata()} + public var metadata: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata { + get {return _metadata ?? Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata()} set {_metadata = newValue} } /// Returns true if `metadata` has been explicitly set. @@ -123,15 +123,15 @@ public struct Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey: Sendable { public init() {} - fileprivate var _metadata: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata? = nil + fileprivate var _metadata: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata? = nil fileprivate var _evaluationKey: HomomorphicEncryptionProtobuf.Apple_SwiftHomomorphicEncryption_V1_SerializedEvaluationKey? = nil } // MARK: - Code below here is support for the SwiftProtobuf runtime. -fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.v1" +fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.api.shared.v1" -extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".EvaluationKeyMetadata" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "timestamp"), @@ -161,7 +161,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: SwiftPr try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata, rhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata) -> Bool { if lhs.timestamp != rhs.timestamp {return false} if lhs.identifier != rhs.identifier {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -169,7 +169,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeyMetadata: SwiftPr } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".KeyStatus" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "timestamp"), @@ -203,7 +203,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: SwiftProtobuf.Messa try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus, rhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_KeyStatus) -> Bool { if lhs.timestamp != rhs.timestamp {return false} if lhs._keyConfig != rhs._keyConfig {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -211,7 +211,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_KeyStatus: SwiftProtobuf.Messa } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeys: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".EvaluationKeys" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "keys"), @@ -236,14 +236,14 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys: SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKeys) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeys, rhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeys) -> Bool { if lhs.keys != rhs.keys {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { +extension Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".EvaluationKey" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "metadata"), @@ -277,7 +277,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey: SwiftProtobuf.M try unknownFields.traverse(visitor: &visitor) } - public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey, rhs: Apple_SwiftHomomorphicEncryption_Api_V1_EvaluationKey) -> Bool { + public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey, rhs: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey) -> Bool { if lhs._metadata != rhs._metadata {return false} if lhs._evaluationKey != rhs._evaluationKey {return false} if lhs.unknownFields != rhs.unknownFields {return false} diff --git a/Utilities/generate-protobuf-files.sh b/Utilities/generate-protobuf-files.sh index e1421120..b74c1478 100755 --- a/Utilities/generate-protobuf-files.sh +++ b/Utilities/generate-protobuf-files.sh @@ -14,9 +14,8 @@ echo "Removing PrivateInformationRetrievalProtobuf swift protobuf files" rm ../Sources/PrivateInformationRetrievalProtobuf/generated/*.pb.swift echo "Regenerating PrivateInformationRetrievalProtobuf swift protobuf files" find apple/swift_homomorphic_encryption/pir/ \ - apple/swift_homomorphic_encryption/api/v1/api.proto \ - apple/swift_homomorphic_encryption/api/v1/api_pir.proto \ - apple/swift_homomorphic_encryption/api/v1/api_evaluation_key.proto \ + apple/swift_homomorphic_encryption/api/shared/v1/ \ + apple/swift_homomorphic_encryption/api/pir/v1/ \ -name "*.proto" -exec protoc \ --swift_opt=ProtoPathModuleMappings=../Sources/PrivateInformationRetrievalProtobuf/protobuf_module_mappings.txtpb \ --swift_opt=Visibility=Public \ @@ -27,8 +26,8 @@ echo "Removing PrivateNearestNeighborsSearchProtobuf swift protobuf files" rm ../Sources/PrivateNearestNeighborsSearchProtobuf/generated/*.pb.swift echo "Regenerating PrivateNearestNeighborsSearchProtobuf swift protobuf files" find apple/swift_homomorphic_encryption/pnns/ \ - apple/swift_homomorphic_encryption/api/v1/api_pnns.proto \ - apple/swift_homomorphic_encryption/api/v1/api_evaluation_key.proto \ + apple/swift_homomorphic_encryption/api/shared/v1/ \ + apple/swift_homomorphic_encryption/api/pnns/v1/ \ -name "*.proto" -exec protoc \ --swift_opt=ProtoPathModuleMappings=../Sources/PrivateNearestNeighborsSearchProtobuf/protobuf_module_mappings.txtpb \ --swift_opt=Visibility=Public \ diff --git a/swift-homomorphic-encryption-protobuf b/swift-homomorphic-encryption-protobuf index 99f53532..5c9cfe44 160000 --- a/swift-homomorphic-encryption-protobuf +++ b/swift-homomorphic-encryption-protobuf @@ -1 +1 @@ -Subproject commit 99f53532ab7ee4b22720dd4bdbef0b1a564435ac +Subproject commit 5c9cfe445e48a26c8792fe58849dc0530ee0313b