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.
56 lines
2.3 KiB
Swift
56 lines
2.3 KiB
Swift
//
|
|
// PromptMeta.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct PromptMeta: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Labels is the creator's free-form taxonomy, stored as given after trimming and de-duplication. Always present, `[]` when none — never null. */
|
|
public var labels: [String]?
|
|
/** LastUpdatedAt is when the newest version was appended, RFC 3339 UTC. Empty only if the record carries no timestamp at all. */
|
|
public var lastUpdatedAt: String?
|
|
/** Name is the prompt's org-unique handle and the URL segment it is fetched by: GET /v1/prompt/<name>. */
|
|
public var name: String?
|
|
/** Tags is the second free-form taxonomy under the same rules as Labels. Nothing in this service interprets either; they are yours to organize by. */
|
|
public var tags: [String]?
|
|
/** Type labels the template's kind, \"text\" unless the creator said otherwise. It is the CURRENT version's type; earlier versions may carry a different one. */
|
|
public var type: String?
|
|
/** Versions lists every version NUMBER this prompt has, newest first, capped at the last 100. The highest is the current one. (On a metrics row the same key is a count, not a list.) */
|
|
public var versions: [Int64]?
|
|
|
|
public init(labels: [String]? = nil, lastUpdatedAt: String? = nil, name: String? = nil, tags: [String]? = nil, type: String? = nil, versions: [Int64]? = nil) {
|
|
self.labels = labels
|
|
self.lastUpdatedAt = lastUpdatedAt
|
|
self.name = name
|
|
self.tags = tags
|
|
self.type = type
|
|
self.versions = versions
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case labels
|
|
case lastUpdatedAt
|
|
case name
|
|
case tags
|
|
case type
|
|
case versions
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(labels, forKey: .labels)
|
|
try container.encodeIfPresent(lastUpdatedAt, forKey: .lastUpdatedAt)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(tags, forKey: .tags)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
try container.encodeIfPresent(versions, forKey: .versions)
|
|
}
|
|
}
|
|
|