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.
66 lines
2.7 KiB
Swift
66 lines
2.7 KiB
Swift
//
|
|
// PublishReq.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct PublishReq: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Category groups the listing in the shop window. */
|
|
public var category: String?
|
|
/** Currency denominates Price. */
|
|
public var currency: String?
|
|
/** Description is the long copy, clipped at 4096 characters. */
|
|
public var description: String?
|
|
/** Price is the per-call price as a decimal USD string, exact to 18 places — \"0.0025\" is a quarter of a cent and stays one. Empty or \"0\" (the default) publishes it free; any positive price makes the listing monetized and requires Recipient. */
|
|
public var price: String?
|
|
/** Public makes the listing discoverable by other orgs. Private otherwise. */
|
|
public var _public: Bool?
|
|
/** Recipient is the seller's payout wallet ID, in the publishing org — the wallet x402 pays. Required for a monetized listing. */
|
|
public var recipient: String?
|
|
/** Title is the shop-window name, 1-200 characters. Required. */
|
|
public var title: String?
|
|
/** Tool is the registry name of the capability being offered. It must already resolve in the publisher's own scope — there are no phantom listings. */
|
|
public var tool: String?
|
|
|
|
public init(category: String? = nil, currency: String? = nil, description: String? = nil, price: String? = nil, _public: Bool? = nil, recipient: String? = nil, title: String? = nil, tool: String? = nil) {
|
|
self.category = category
|
|
self.currency = currency
|
|
self.description = description
|
|
self.price = price
|
|
self._public = _public
|
|
self.recipient = recipient
|
|
self.title = title
|
|
self.tool = tool
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case category
|
|
case currency
|
|
case description
|
|
case price
|
|
case _public = "public"
|
|
case recipient
|
|
case title
|
|
case tool
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(category, forKey: .category)
|
|
try container.encodeIfPresent(currency, forKey: .currency)
|
|
try container.encodeIfPresent(description, forKey: .description)
|
|
try container.encodeIfPresent(price, forKey: .price)
|
|
try container.encodeIfPresent(_public, forKey: ._public)
|
|
try container.encodeIfPresent(recipient, forKey: .recipient)
|
|
try container.encodeIfPresent(title, forKey: .title)
|
|
try container.encodeIfPresent(tool, forKey: .tool)
|
|
}
|
|
}
|
|
|