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.
64 lines
2.4 KiB
Swift
64 lines
2.4 KiB
Swift
//
|
|
// Skill.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Skill: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Content is the SKILL.md body, markdown. */
|
|
public var content: String?
|
|
/** CreatedAt is when the skill was last written, Unix seconds. */
|
|
public var createdAt: Int64?
|
|
/** Description is the one-line summary discovery shows for the skill. */
|
|
public var description: String?
|
|
/** ID is the skill's id within the org. It is DERIVED from Name, so writing the same name again revises that skill rather than adding another. */
|
|
public var id: String?
|
|
/** Name is the skill's name: one lowercase path segment (a-z0-9, _ or -). */
|
|
public var name: String?
|
|
/** Org is the org that authored the skill — the validated caller's, never a value the body supplied. */
|
|
public var org: String?
|
|
/** Source is the repository the skill was read from, \"<project>/<name>\" or \"<name>\"; empty for a skill written through the API. A push replaces every skill of its source at once, so a skill leaves when its file does. */
|
|
public var source: String?
|
|
|
|
public init(content: String? = nil, createdAt: Int64? = nil, description: String? = nil, id: String? = nil, name: String? = nil, org: String? = nil, source: String? = nil) {
|
|
self.content = content
|
|
self.createdAt = createdAt
|
|
self.description = description
|
|
self.id = id
|
|
self.name = name
|
|
self.org = org
|
|
self.source = source
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case content
|
|
case createdAt
|
|
case description
|
|
case id
|
|
case name
|
|
case org
|
|
case source
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(content, forKey: .content)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(description, forKey: .description)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(org, forKey: .org)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension Skill: Identifiable {}
|