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
//
|
|
// MessageInput.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct MessageInput: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** From is the number to send FROM, in E.164. It must be one this org holds and it must be sms-capable. */
|
|
public var from: String?
|
|
/** Media are URLs to attach. A message with any is an MMS to the carrier — the distinction is the carrier's to make, not something the caller declares. */
|
|
public var media: [String]?
|
|
/** Text is the message body. It may be empty when Media carries the message. */
|
|
public var text: String?
|
|
/** To is the number to send to, in E.164. */
|
|
public var to: String?
|
|
|
|
public init(from: String? = nil, media: [String]? = nil, text: String? = nil, to: String? = nil) {
|
|
self.from = from
|
|
self.media = media
|
|
self.text = text
|
|
self.to = to
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case from
|
|
case media
|
|
case text
|
|
case to
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(from, forKey: .from)
|
|
try container.encodeIfPresent(media, forKey: .media)
|
|
try container.encodeIfPresent(text, forKey: .text)
|
|
try container.encodeIfPresent(to, forKey: .to)
|
|
}
|
|
}
|
|
|