mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
66 lines
2.8 KiB
Swift
66 lines
2.8 KiB
Swift
//
|
|
// MemoryEntry.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct MemoryEntry: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Actor is the validated user id that last wrote this entry by hand. Empty on an entry an engine produced, and on one written before attribution existed. */
|
|
public var actor: String?
|
|
/** Glossary is the glossary VERSION the entry was translated under — the digest version() derives from the terms, so changing a term changes the key and the stale rendering can never be served. */
|
|
public var glossaryVersion: String?
|
|
/** Source is the ORIGINAL string this entry translates. Part of the identity. */
|
|
public var source: String?
|
|
/** State is the entry's position on the review ladder: machine, suggested, approved or published. */
|
|
public var state: String?
|
|
/** Target is the target language tag (BCP-47, e.g. \"es\" or \"pt-BR\"). Part of the identity. */
|
|
public var target: String?
|
|
/** Text is the stored translation. A memory hit returns it verbatim, which is the idempotence contract. */
|
|
public var text: String?
|
|
/** Tier is the engine tier the entry belongs to, quality or bulk. Part of the identity: the two tiers keep separate renderings of the same source. */
|
|
public var tier: String?
|
|
/** UpdatedAt is the unix second the entry last changed. */
|
|
public var updatedAt: Int64?
|
|
|
|
public init(actor: String? = nil, glossaryVersion: String? = nil, source: String? = nil, state: String? = nil, target: String? = nil, text: String? = nil, tier: String? = nil, updatedAt: Int64? = nil) {
|
|
self.actor = actor
|
|
self.glossaryVersion = glossaryVersion
|
|
self.source = source
|
|
self.state = state
|
|
self.target = target
|
|
self.text = text
|
|
self.tier = tier
|
|
self.updatedAt = updatedAt
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case actor
|
|
case glossaryVersion = "glossary_version"
|
|
case source
|
|
case state
|
|
case target
|
|
case text
|
|
case tier
|
|
case updatedAt = "updated_at"
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(actor, forKey: .actor)
|
|
try container.encodeIfPresent(glossaryVersion, forKey: .glossaryVersion)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(state, forKey: .state)
|
|
try container.encodeIfPresent(target, forKey: .target)
|
|
try container.encodeIfPresent(text, forKey: .text)
|
|
try container.encodeIfPresent(tier, forKey: .tier)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
}
|
|
}
|
|
|