Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/

// Copyright 2024-2025 Apple Inc. and the Swift Homomorphic Encryption project authors
// Copyright 2024-2026 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.
Expand Down Expand Up @@ -66,6 +66,34 @@ public struct Apple_SwiftHomomorphicEncryption_Pir_V1_KeywordDatabase: Sendable
public init() {}
}

/// Row in an index PIR database.
public struct Apple_SwiftHomomorphicEncryption_Pir_V1_IndexPirDatabaseRow: 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.

/// Value.
public var value: Data = Data()

public var unknownFields = SwiftProtobuf.UnknownStorage()

public init() {}
}

/// Input database for index PIR.
public struct Apple_SwiftHomomorphicEncryption_Pir_V1_IndexPirDatabase: 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 rows.
public var rows: [Apple_SwiftHomomorphicEncryption_Pir_V1_IndexPirDatabaseRow] = []

public var unknownFields = SwiftProtobuf.UnknownStorage()

public init() {}
}

// MARK: - Code below here is support for the SwiftProtobuf runtime.

fileprivate let _protobuf_package = "apple.swift_homomorphic_encryption.pir.v1"
Expand Down Expand Up @@ -134,3 +162,63 @@ extension Apple_SwiftHomomorphicEncryption_Pir_V1_KeywordDatabase: SwiftProtobuf
return true
}
}

extension Apple_SwiftHomomorphicEncryption_Pir_V1_IndexPirDatabaseRow: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".IndexPirDatabaseRow"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}value\0")

public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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.decodeSingularBytesField(value: &self.value) }()
default: break
}
}
}

public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.value.isEmpty {
try visitor.visitSingularBytesField(value: self.value, fieldNumber: 1)
}
try unknownFields.traverse(visitor: &visitor)
}

public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Pir_V1_IndexPirDatabaseRow, rhs: Apple_SwiftHomomorphicEncryption_Pir_V1_IndexPirDatabaseRow) -> Bool {
if lhs.value != rhs.value {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}

extension Apple_SwiftHomomorphicEncryption_Pir_V1_IndexPirDatabase: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".IndexPirDatabase"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}rows\0")

public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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.rows) }()
default: break
}
}
}

public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.rows.isEmpty {
try visitor.visitRepeatedMessageField(value: self.rows, fieldNumber: 1)
}
try unknownFields.traverse(visitor: &visitor)
}

public static func ==(lhs: Apple_SwiftHomomorphicEncryption_Pir_V1_IndexPirDatabase, rhs: Apple_SwiftHomomorphicEncryption_Pir_V1_IndexPirDatabase) -> Bool {
if lhs.rows != rhs.rows {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}