mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
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.
69 lines
2.9 KiB
Swift
69 lines
2.9 KiB
Swift
//
|
|
// MarketItem.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct MarketItem: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var activated: Bool?
|
|
/** Category is that same listing's grouping. Free text chosen by the publisher, absent when there is no public listing or the publisher left it blank. */
|
|
public var category: String?
|
|
public var description: String?
|
|
public var dispatchable: Bool?
|
|
public var inputSchema: JSONValue?
|
|
/** Installed is whether the tool is activated for THIS caller's (org, project): the same bit as Activated, under the shop's name for it, which install and uninstall are the writes for. It is per caller, so one listing reads installed for one org and not for another. */
|
|
public var installed: Bool?
|
|
public var name: String?
|
|
public var price: Price?
|
|
public var source: String?
|
|
/** Title is the shop-window name, painted over the registry Name from the CHEAPEST public listing for this tool — several orgs may list the same one, and the row shown is the one a buyer would pay. Absent when no org has listed the tool publicly: that row is a plain capability, not an offer. */
|
|
public var title: String?
|
|
|
|
public init(activated: Bool? = nil, category: String? = nil, description: String? = nil, dispatchable: Bool? = nil, inputSchema: JSONValue? = nil, installed: Bool? = nil, name: String? = nil, price: Price? = nil, source: String? = nil, title: String? = nil) {
|
|
self.activated = activated
|
|
self.category = category
|
|
self.description = description
|
|
self.dispatchable = dispatchable
|
|
self.inputSchema = inputSchema
|
|
self.installed = installed
|
|
self.name = name
|
|
self.price = price
|
|
self.source = source
|
|
self.title = title
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case activated
|
|
case category
|
|
case description
|
|
case dispatchable
|
|
case inputSchema
|
|
case installed
|
|
case name
|
|
case price
|
|
case source
|
|
case title
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(activated, forKey: .activated)
|
|
try container.encodeIfPresent(category, forKey: .category)
|
|
try container.encodeIfPresent(description, forKey: .description)
|
|
try container.encodeIfPresent(dispatchable, forKey: .dispatchable)
|
|
try container.encodeIfPresent(inputSchema, forKey: .inputSchema)
|
|
try container.encodeIfPresent(installed, forKey: .installed)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(price, forKey: .price)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(title, forKey: .title)
|
|
}
|
|
}
|
|
|