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.
51 lines
1.8 KiB
Swift
51 lines
1.8 KiB
Swift
//
|
|
// CallInput.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct CallInput: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Agent hands the answered call to a Hanzo assistant by name instead of connecting it to a person. Empty places an ordinary call. */
|
|
public var agent: String?
|
|
/** From is the number to call FROM, in E.164. It must be one this org holds. */
|
|
public var from: String?
|
|
/** Record is a per-call flag rather than a product. Where a recording lands and how long it is kept is the org's retention policy, not this call's. */
|
|
public var record: Bool?
|
|
/** To is the number to call, in E.164. */
|
|
public var to: String?
|
|
/** Webhook is a URL the carrier posts this call's events to as it progresses. Empty means the call's outcome is only visible by reading it back. */
|
|
public var webhook: String?
|
|
|
|
public init(agent: String? = nil, from: String? = nil, record: Bool? = nil, to: String? = nil, webhook: String? = nil) {
|
|
self.agent = agent
|
|
self.from = from
|
|
self.record = record
|
|
self.to = to
|
|
self.webhook = webhook
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case agent
|
|
case from
|
|
case record
|
|
case to
|
|
case webhook
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(agent, forKey: .agent)
|
|
try container.encodeIfPresent(from, forKey: .from)
|
|
try container.encodeIfPresent(record, forKey: .record)
|
|
try container.encodeIfPresent(to, forKey: .to)
|
|
try container.encodeIfPresent(webhook, forKey: .webhook)
|
|
}
|
|
}
|
|
|