Files
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
The forge tree held the package scaffolding and none of the generated sources —
2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply
absent, so anything depending on this copy had a package that compiled to
nothing usable.

Generated from the current API document rather than reconciled with the other
copy: a client is a function of the spec, so regenerating answers "which history
wins" without anyone having to choose. .spec-lock records which document, so the
next reader can tell.
2026-08-23 10:04:41 -07:00

71 lines
2.8 KiB
Swift

//
// ScoreReq.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct ScoreReq: Sendable, Codable, ParameterConvertible, Hashable {
/** Comment is the grader's reasoning, truncated at 2000 characters. */
public var comment: String?
/** DataType is NUMERIC, CATEGORICAL or BOOLEAN. A declared rubric overrides it — a caller cannot claim a type the org's rubric contradicts. */
public var dataType: String?
/** ItemID attaches the score to one graded example. */
public var datasetItemId: String?
/** Dataset attaches the score to one dataset. */
public var datasetName: String?
/** Name is the score name. A rubric of the same name, if the org has declared one, decides this score's type and the values it may take. */
public var name: String
/** RunName attaches the score to one run. */
public var runName: String?
/** StringValue is the label of a CATEGORICAL score, which must be one the rubric allows. */
public var stringValue: String?
/** TraceID attaches the score to one model call. */
public var traceId: String?
/** Value is the numeric score, which must be finite: NaN and Inf are refused. A BOOLEAN score takes 0 or 1. */
public var value: Double?
public init(comment: String? = nil, dataType: String? = nil, datasetItemId: String? = nil, datasetName: String? = nil, name: String, runName: String? = nil, stringValue: String? = nil, traceId: String? = nil, value: Double? = nil) {
self.comment = comment
self.dataType = dataType
self.datasetItemId = datasetItemId
self.datasetName = datasetName
self.name = name
self.runName = runName
self.stringValue = stringValue
self.traceId = traceId
self.value = value
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case comment
case dataType
case datasetItemId
case datasetName
case name
case runName
case stringValue
case traceId
case value
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(comment, forKey: .comment)
try container.encodeIfPresent(dataType, forKey: .dataType)
try container.encodeIfPresent(datasetItemId, forKey: .datasetItemId)
try container.encodeIfPresent(datasetName, forKey: .datasetName)
try container.encode(name, forKey: .name)
try container.encodeIfPresent(runName, forKey: .runName)
try container.encodeIfPresent(stringValue, forKey: .stringValue)
try container.encodeIfPresent(traceId, forKey: .traceId)
try container.encodeIfPresent(value, forKey: .value)
}
}