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.
85 lines
4.1 KiB
Swift
85 lines
4.1 KiB
Swift
//
|
|
// O11yHTTPClientConfig.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yHTTPClientConfig: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** The HTTP authorization credentials for the targets. */
|
|
public var authorization: O11yAuthorization?
|
|
/** The HTTP basic authentication credentials for the targets. */
|
|
public var basicAuth: O11yBasicAuth?
|
|
public var bearerToken: JSONValue?
|
|
/** The bearer token file for the targets. Deprecated in favour of Authorization.CredentialsFile. */
|
|
public var bearerTokenFile: String?
|
|
/** EnableHTTP2 specifies whether the client should configure HTTP2. The omitempty flag is not set, because it would be hidden from the marshalled configuration when set to false. */
|
|
public var enableHttp2: Bool?
|
|
/** FollowRedirects specifies whether the client should follow HTTP 3xx redirects. The omitempty flag is not set, because it would be hidden from the marshalled configuration when set to false. */
|
|
public var followRedirects: Bool?
|
|
public var httpHeaders: JSONValue?
|
|
public var noProxy: String?
|
|
/** The OAuth2 client credentials used to fetch a token for the targets. */
|
|
public var oauth2: O11yOAuth2?
|
|
public var proxyConnectHeader: [String: [JSONValue]]?
|
|
public var proxyFromEnvironment: Bool?
|
|
public var proxyUrl: JSONValue?
|
|
/** TLSConfig to use to connect to the targets. */
|
|
public var tlsConfig: O11yTLSConfig?
|
|
|
|
public init(authorization: O11yAuthorization? = nil, basicAuth: O11yBasicAuth? = nil, bearerToken: JSONValue? = nil, bearerTokenFile: String? = nil, enableHttp2: Bool? = nil, followRedirects: Bool? = nil, httpHeaders: JSONValue? = nil, noProxy: String? = nil, oauth2: O11yOAuth2? = nil, proxyConnectHeader: [String: [JSONValue]]? = nil, proxyFromEnvironment: Bool? = nil, proxyUrl: JSONValue? = nil, tlsConfig: O11yTLSConfig? = nil) {
|
|
self.authorization = authorization
|
|
self.basicAuth = basicAuth
|
|
self.bearerToken = bearerToken
|
|
self.bearerTokenFile = bearerTokenFile
|
|
self.enableHttp2 = enableHttp2
|
|
self.followRedirects = followRedirects
|
|
self.httpHeaders = httpHeaders
|
|
self.noProxy = noProxy
|
|
self.oauth2 = oauth2
|
|
self.proxyConnectHeader = proxyConnectHeader
|
|
self.proxyFromEnvironment = proxyFromEnvironment
|
|
self.proxyUrl = proxyUrl
|
|
self.tlsConfig = tlsConfig
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case authorization
|
|
case basicAuth = "basic_auth"
|
|
case bearerToken = "bearer_token"
|
|
case bearerTokenFile = "bearer_token_file"
|
|
case enableHttp2 = "enable_http2"
|
|
case followRedirects = "follow_redirects"
|
|
case httpHeaders = "http_headers"
|
|
case noProxy = "no_proxy"
|
|
case oauth2
|
|
case proxyConnectHeader = "proxy_connect_header"
|
|
case proxyFromEnvironment = "proxy_from_environment"
|
|
case proxyUrl = "proxy_url"
|
|
case tlsConfig = "tls_config"
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(authorization, forKey: .authorization)
|
|
try container.encodeIfPresent(basicAuth, forKey: .basicAuth)
|
|
try container.encodeIfPresent(bearerToken, forKey: .bearerToken)
|
|
try container.encodeIfPresent(bearerTokenFile, forKey: .bearerTokenFile)
|
|
try container.encodeIfPresent(enableHttp2, forKey: .enableHttp2)
|
|
try container.encodeIfPresent(followRedirects, forKey: .followRedirects)
|
|
try container.encodeIfPresent(httpHeaders, forKey: .httpHeaders)
|
|
try container.encodeIfPresent(noProxy, forKey: .noProxy)
|
|
try container.encodeIfPresent(oauth2, forKey: .oauth2)
|
|
try container.encodeIfPresent(proxyConnectHeader, forKey: .proxyConnectHeader)
|
|
try container.encodeIfPresent(proxyFromEnvironment, forKey: .proxyFromEnvironment)
|
|
try container.encodeIfPresent(proxyUrl, forKey: .proxyUrl)
|
|
try container.encodeIfPresent(tlsConfig, forKey: .tlsConfig)
|
|
}
|
|
}
|
|
|