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

46 lines
1.6 KiB
Swift

//
// PostEventRequest.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public enum PostEventRequest: Sendable, Codable, ParameterConvertible, Hashable {
case typeCaptureBatch(CaptureBatch)
case typeCaptureEvent(CaptureEvent)
case typeInsightsBody(InsightsBody)
case typeArrayOfCaptureEvent([CaptureEvent])
public func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
switch self {
case .typeCaptureBatch(let value):
try container.encode(value)
case .typeCaptureEvent(let value):
try container.encode(value)
case .typeInsightsBody(let value):
try container.encode(value)
case .typeArrayOfCaptureEvent(let value):
try container.encode(value)
}
}
public init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
if let value = try? container.decode(CaptureBatch.self) {
self = .typeCaptureBatch(value)
} else if let value = try? container.decode(CaptureEvent.self) {
self = .typeCaptureEvent(value)
} else if let value = try? container.decode(InsightsBody.self) {
self = .typeInsightsBody(value)
} else if let value = try? container.decode([CaptureEvent].self) {
self = .typeArrayOfCaptureEvent(value)
} else {
throw DecodingError.typeMismatch(Self.Type.self, .init(codingPath: decoder.codingPath, debugDescription: "Unable to decode instance of PostEventRequest"))
}
}
}