mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
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.
51 lines
1.7 KiB
Swift
51 lines
1.7 KiB
Swift
//
|
|
// ShareView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ShareView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Backend is the local endpoint the share proxies to. */
|
|
public var backend: String?
|
|
/** BackendMode is how the tunnel serves the backend, e.g. proxy or web. */
|
|
public var backendMode: String?
|
|
/** CreatedAt is when the share was opened, unix seconds. */
|
|
public var createdAt: Int64?
|
|
/** Token is the share's own identifier, the leaf of its public URL. */
|
|
public var token: String?
|
|
/** URL is the share's public address, rendered from the deployment's URL template. */
|
|
public var url: String?
|
|
|
|
public init(backend: String? = nil, backendMode: String? = nil, createdAt: Int64? = nil, token: String? = nil, url: String? = nil) {
|
|
self.backend = backend
|
|
self.backendMode = backendMode
|
|
self.createdAt = createdAt
|
|
self.token = token
|
|
self.url = url
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case backend
|
|
case backendMode
|
|
case createdAt
|
|
case token
|
|
case url
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(backend, forKey: .backend)
|
|
try container.encodeIfPresent(backendMode, forKey: .backendMode)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(token, forKey: .token)
|
|
try container.encodeIfPresent(url, forKey: .url)
|
|
}
|
|
}
|
|
|