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.
46 lines
1.4 KiB
Swift
46 lines
1.4 KiB
Swift
//
|
|
// DestinationField.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct DestinationField: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** a sample value of the right shape (\"G-XXXXXXX\"), when one helps */
|
|
public var example: String?
|
|
/** the camelCase key on both the connect body and the stored config */
|
|
public var key: String?
|
|
/** human label for the console card's input */
|
|
public var label: String?
|
|
/** when true, a connect that leaves it empty is refused 400 */
|
|
public var _required: Bool?
|
|
|
|
public init(example: String? = nil, key: String? = nil, label: String? = nil, _required: Bool? = nil) {
|
|
self.example = example
|
|
self.key = key
|
|
self.label = label
|
|
self._required = _required
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case example
|
|
case key
|
|
case label
|
|
case _required = "required"
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(example, forKey: .example)
|
|
try container.encodeIfPresent(key, forKey: .key)
|
|
try container.encodeIfPresent(label, forKey: .label)
|
|
try container.encodeIfPresent(_required, forKey: ._required)
|
|
}
|
|
}
|
|
|