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.
71 lines
2.3 KiB
Swift
71 lines
2.3 KiB
Swift
//
|
|
// Outcome.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Outcome: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** true on the baseline arm; its own lift and stats are zero */
|
|
public var control: Bool?
|
|
/** of those, how many fired the metric event */
|
|
public var converted: Int64?
|
|
/** subjects the arm enrolled — the denominator */
|
|
public var exposed: Int64?
|
|
/** relative to control: (rate-ctrl)/ctrl */
|
|
public var lift: Double?
|
|
/** two-tailed p vs control */
|
|
public var pValue: Double?
|
|
/** converted over exposed */
|
|
public var rate: Double?
|
|
/** pValue < alpha */
|
|
public var significant: Bool?
|
|
/** the arm this row measures */
|
|
public var variant: String?
|
|
/** two-proportion z vs control */
|
|
public var z: Double?
|
|
|
|
public init(control: Bool? = nil, converted: Int64? = nil, exposed: Int64? = nil, lift: Double? = nil, pValue: Double? = nil, rate: Double? = nil, significant: Bool? = nil, variant: String? = nil, z: Double? = nil) {
|
|
self.control = control
|
|
self.converted = converted
|
|
self.exposed = exposed
|
|
self.lift = lift
|
|
self.pValue = pValue
|
|
self.rate = rate
|
|
self.significant = significant
|
|
self.variant = variant
|
|
self.z = z
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case control
|
|
case converted
|
|
case exposed
|
|
case lift
|
|
case pValue
|
|
case rate
|
|
case significant
|
|
case variant
|
|
case z
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(control, forKey: .control)
|
|
try container.encodeIfPresent(converted, forKey: .converted)
|
|
try container.encodeIfPresent(exposed, forKey: .exposed)
|
|
try container.encodeIfPresent(lift, forKey: .lift)
|
|
try container.encodeIfPresent(pValue, forKey: .pValue)
|
|
try container.encodeIfPresent(rate, forKey: .rate)
|
|
try container.encodeIfPresent(significant, forKey: .significant)
|
|
try container.encodeIfPresent(variant, forKey: .variant)
|
|
try container.encodeIfPresent(z, forKey: .z)
|
|
}
|
|
}
|
|
|