Files

46 lines
1.4 KiB
Swift

//
// SearchIn.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct SearchIn: Sendable, Codable, ParameterConvertible, Hashable {
/** DocTypes restricts retrieval to a subset of the indexed knowledge doctypes (kb.page, kb.memory, kb.source). An empty or foreign list reads all of them. */
public var doctypes: [String]?
/** Limit bounds the hits returned. Default 10, maximum 50. */
public var limit: Int64?
/** Project narrows retrieval to one project scope. */
public var project: String?
/** Query is the natural-language question. Required. */
public var query: String?
public init(doctypes: [String]? = nil, limit: Int64? = nil, project: String? = nil, query: String? = nil) {
self.doctypes = doctypes
self.limit = limit
self.project = project
self.query = query
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case doctypes
case limit
case project
case query
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(doctypes, forKey: .doctypes)
try container.encodeIfPresent(limit, forKey: .limit)
try container.encodeIfPresent(project, forKey: .project)
try container.encodeIfPresent(query, forKey: .query)
}
}