Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
The projection these were generated from predated the compute migration, so
they described /v1/visor — which the API serves at zero paths now.

No /v1/visor path survives here.
2026-09-05 18:55:38 -07:00

69 lines
3.0 KiB
Swift

//
// Number.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Number: Sendable, Codable, ParameterConvertible, Hashable {
/** Capable is what the number can carry: any of \"voice\", \"sms\", \"mms\", \"fax\". A number missing \"sms\" cannot send one no matter what this platform does. */
public var capable: [String]?
/** Country is the ISO 3166-1 alpha-2 code the number is issued under. Numbering is national, so this is what makes a search answerable at all. */
public var country: String?
/** Currency is the ISO 4217 code Monthly is denominated in. Without it the number beside it means nothing, so the two are always read together. */
public var currency: String?
/** E164 is the number in E.164: a leading + and digits only, no spaces or dashes. That is what a carrier accepts and what a search result must be bought by. */
public var e164: String?
/** ID is the carrier's handle for the number, and the id every route here addresses it by. It is not the number itself — see E164. */
public var id: String?
/** Monthly is the recurring rental in the MINOR unit of Currency (cents for USD), exactly as the carrier quoted it. It is a price, not a charge: nothing is billed by this field. */
public var monthly: Int64?
/** Org is the tenant holding the number. A search result carries none — nobody holds it yet — which is how an available number is told from a held one. */
public var org: String?
/** Type is what kind of number it is: \"local\", \"national\", \"tollfree\" or \"mobile\". It decides both price and what a carrier will let it originate. */
public var type: String?
public init(capable: [String]? = nil, country: String? = nil, currency: String? = nil, e164: String? = nil, id: String? = nil, monthly: Int64? = nil, org: String? = nil, type: String? = nil) {
self.capable = capable
self.country = country
self.currency = currency
self.e164 = e164
self.id = id
self.monthly = monthly
self.org = org
self.type = type
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case capable
case country
case currency
case e164
case id
case monthly
case org
case type
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(capable, forKey: .capable)
try container.encodeIfPresent(country, forKey: .country)
try container.encodeIfPresent(currency, forKey: .currency)
try container.encodeIfPresent(e164, forKey: .e164)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(monthly, forKey: .monthly)
try container.encodeIfPresent(org, forKey: .org)
try container.encodeIfPresent(type, forKey: .type)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension Number: Identifiable {}