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.
70 lines
2.3 KiB
Swift
70 lines
2.3 KiB
Swift
//
|
|
// DocField.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct DocField: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var _default: String?
|
|
public var fetchFrom: String?
|
|
public var fieldname: String?
|
|
public var fieldtype: String?
|
|
public var hidden: Bool?
|
|
public var inListView: Bool?
|
|
public var label: String?
|
|
public var options: String?
|
|
public var readOnly: Bool?
|
|
public var reqd: Bool?
|
|
public var unique: Bool?
|
|
|
|
public init(_default: String? = nil, fetchFrom: String? = nil, fieldname: String? = nil, fieldtype: String? = nil, hidden: Bool? = nil, inListView: Bool? = nil, label: String? = nil, options: String? = nil, readOnly: Bool? = nil, reqd: Bool? = nil, unique: Bool? = nil) {
|
|
self._default = _default
|
|
self.fetchFrom = fetchFrom
|
|
self.fieldname = fieldname
|
|
self.fieldtype = fieldtype
|
|
self.hidden = hidden
|
|
self.inListView = inListView
|
|
self.label = label
|
|
self.options = options
|
|
self.readOnly = readOnly
|
|
self.reqd = reqd
|
|
self.unique = unique
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case _default = "default"
|
|
case fetchFrom
|
|
case fieldname
|
|
case fieldtype
|
|
case hidden
|
|
case inListView
|
|
case label
|
|
case options
|
|
case readOnly
|
|
case reqd
|
|
case unique
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(_default, forKey: ._default)
|
|
try container.encodeIfPresent(fetchFrom, forKey: .fetchFrom)
|
|
try container.encodeIfPresent(fieldname, forKey: .fieldname)
|
|
try container.encodeIfPresent(fieldtype, forKey: .fieldtype)
|
|
try container.encodeIfPresent(hidden, forKey: .hidden)
|
|
try container.encodeIfPresent(inListView, forKey: .inListView)
|
|
try container.encodeIfPresent(label, forKey: .label)
|
|
try container.encodeIfPresent(options, forKey: .options)
|
|
try container.encodeIfPresent(readOnly, forKey: .readOnly)
|
|
try container.encodeIfPresent(reqd, forKey: .reqd)
|
|
try container.encodeIfPresent(unique, forKey: .unique)
|
|
}
|
|
}
|
|
|