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.
36 lines
896 B
Swift
36 lines
896 B
Swift
//
|
|
// Backend.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Backend: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** URL is the upstream server, http(s)://host[:port]. */
|
|
public var url: String?
|
|
/** Weight is this member's share of the round-robin; must be >= 0. */
|
|
public var weight: Int64?
|
|
|
|
public init(url: String? = nil, weight: Int64? = nil) {
|
|
self.url = url
|
|
self.weight = weight
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case url
|
|
case weight
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(url, forKey: .url)
|
|
try container.encodeIfPresent(weight, forKey: .weight)
|
|
}
|
|
}
|
|
|