Skip to content

Commit 71b634c

Browse files
committed
Add shard_ids to PNNSRequest
1 parent 047881f commit 71b634c

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

Sources/PrivateNearestNeighborSearchProtobuf/generated/apple_swift_homomorphic_encryption_api_pnns_v1_pnns.pb.swift

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// For information on using the generated types, please see the documentation:
99
// https://github.com/apple/swift-protobuf/
1010

11-
// Copyright 2024 Apple Inc. and the Swift Homomorphic Encryption project authors
11+
// Copyright 2024-2025 Apple Inc. and the Swift Homomorphic Encryption project authors
1212
//
1313
// Licensed under the Apache License, Version 2.0 (the "License");
1414
// you may not use this file except in compliance with the License.
@@ -87,19 +87,19 @@ public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSConfig: @unchecke
8787
fileprivate var _queryPacking: Apple_SwiftHomomorphicEncryption_Pnns_V1_MatrixPacking? = nil
8888
}
8989

90-
/// PNNS Request
90+
/// PNNS Request.
9191
public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: @unchecked Sendable {
9292
// SwiftProtobuf.Message conformance is added in an extension below. See the
9393
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
9494
// methods supported on all messages.
9595

96-
/// optionally, the shard indices where this request should be routed
96+
/// Optionally, the shard indices where this request should be routed.
9797
public var shardIndices: [UInt32] = []
9898

99-
/// Encrypted query, one per plaintext CRT component
99+
/// Encrypted query, one per plaintext CRT component.
100100
public var query: [Apple_SwiftHomomorphicEncryption_Pnns_V1_SerializedCiphertextMatrix] = []
101101

102-
/// Key metadata
102+
/// Key metadata.
103103
public var evaluationKeyMetadata: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata {
104104
get {return _evaluationKeyMetadata ?? Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKeyMetadata()}
105105
set {_evaluationKeyMetadata = newValue}
@@ -109,10 +109,10 @@ public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: @uncheck
109109
/// Clears the value of `evaluationKeyMetadata`. Subsequent reads from it will return its default value.
110110
public mutating func clearEvaluationKeyMetadata() {self._evaluationKeyMetadata = nil}
111111

112-
/// Identifier for the PNNSConfig used to construct the query
112+
/// Identifier for the PNNSConfig used to construct the query.
113113
public var configID: Data = Data()
114114

115-
/// If set, evaluation key to query with. Will override evaluation key stored server-side
115+
/// If set, evaluation key to query with. Will override evaluation key stored server-side.
116116
public var evaluationKey: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey {
117117
get {return _evaluationKey ?? Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey()}
118118
set {_evaluationKey = newValue}
@@ -122,6 +122,10 @@ public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: @uncheck
122122
/// Clears the value of `evaluationKey`. Subsequent reads from it will return its default value.
123123
public mutating func clearEvaluationKey() {self._evaluationKey = nil}
124124

125+
/// Optionally, the shard identifiers where this request should be routed.
126+
/// If set, will override `shard_indices`.
127+
public var shardIds: [String] = []
128+
125129
public var unknownFields = SwiftProtobuf.UnknownStorage()
126130

127131
public init() {}
@@ -130,33 +134,33 @@ public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: @uncheck
130134
fileprivate var _evaluationKey: Apple_SwiftHomomorphicEncryption_Api_Shared_V1_EvaluationKey? = nil
131135
}
132136

133-
/// PNNS Shard Response
137+
/// PNNS Shard Response.
134138
public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse: @unchecked Sendable {
135139
// SwiftProtobuf.Message conformance is added in an extension below. See the
136140
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
137141
// methods supported on all messages.
138142

139-
/// Encrypted reply, one per plaintext CRT component
143+
/// Encrypted reply, one per plaintext CRT component.
140144
public var reply: [Apple_SwiftHomomorphicEncryption_Pnns_V1_SerializedCiphertextMatrix] = []
141145

142-
/// A list of entry identifiers the server computed similarities for
146+
/// A list of entry identifiers the server computed similarities for.
143147
public var entryIds: [UInt64] = []
144148

145-
/// Metadata for each entry in the database
149+
/// Metadata for each entry in the database.
146150
public var entryMetadatas: [Data] = []
147151

148152
public var unknownFields = SwiftProtobuf.UnknownStorage()
149153

150154
public init() {}
151155
}
152156

153-
/// PNNS Response
157+
/// PNNS Response.
154158
public struct Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSResponse: Sendable {
155159
// SwiftProtobuf.Message conformance is added in an extension below. See the
156160
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
157161
// methods supported on all messages.
158162

159-
/// PNNS responses from shards
163+
/// PNNS responses from shards.
160164
public var shardResponses: [Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSShardResponse] = []
161165

162166
public var unknownFields = SwiftProtobuf.UnknownStorage()
@@ -248,6 +252,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: SwiftProtobu
248252
3: .standard(proto: "evaluation_key_metadata"),
249253
4: .standard(proto: "config_id"),
250254
5: .standard(proto: "evaluation_key"),
255+
6: .standard(proto: "shard_ids"),
251256
]
252257

253258
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -261,6 +266,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: SwiftProtobu
261266
case 3: try { try decoder.decodeSingularMessageField(value: &self._evaluationKeyMetadata) }()
262267
case 4: try { try decoder.decodeSingularBytesField(value: &self.configID) }()
263268
case 5: try { try decoder.decodeSingularMessageField(value: &self._evaluationKey) }()
269+
case 6: try { try decoder.decodeRepeatedStringField(value: &self.shardIds) }()
264270
default: break
265271
}
266272
}
@@ -286,6 +292,9 @@ extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: SwiftProtobu
286292
try { if let v = self._evaluationKey {
287293
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
288294
} }()
295+
if !self.shardIds.isEmpty {
296+
try visitor.visitRepeatedStringField(value: self.shardIds, fieldNumber: 6)
297+
}
289298
try unknownFields.traverse(visitor: &visitor)
290299
}
291300

@@ -295,6 +304,7 @@ extension Apple_SwiftHomomorphicEncryption_Api_Pnns_V1_PNNSRequest: SwiftProtobu
295304
if lhs._evaluationKeyMetadata != rhs._evaluationKeyMetadata {return false}
296305
if lhs.configID != rhs.configID {return false}
297306
if lhs._evaluationKey != rhs._evaluationKey {return false}
307+
if lhs.shardIds != rhs.shardIds {return false}
298308
if lhs.unknownFields != rhs.unknownFields {return false}
299309
return true
300310
}

0 commit comments

Comments
 (0)