Files
swift-sdk/Sources/Hanzo/Models/O11yO11yLogRecord.swift
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

94 lines
4.1 KiB
Swift

//
// O11yO11yLogRecord.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct O11yO11yLogRecord: Sendable, Codable, ParameterConvertible, Hashable {
/** AttributesBool are the record's boolean attributes. */
public var attributesBool: [String: Bool]?
/** AttributesFloat are the record's float attributes. */
public var attributesFloat: [String: Double]?
/** AttributesInt are the record's integer attributes. */
public var attributesInt: [String: Int64]?
/** AttributesString are the record's string attributes. */
public var attributesString: [String: String]?
/** Body is the record's body. */
public var body: String?
/** ID is the record's id. */
public var id: String?
/** ResourcesString are the record's string resource attributes. */
public var resourcesString: [String: String]?
/** SeverityNumber is the record's severity as a number. */
public var severityNumber: Int?
/** SeverityText is the record's severity as text, e.g. ERROR. */
public var severityText: String?
/** SpanID is the span the record belongs to. */
public var spanId: String?
/** Timestamp is the record's time as a nanosecond epoch. */
public var timestamp: Int?
/** TraceFlags are the record's trace flags. */
public var traceFlags: Int?
/** TraceID is the trace the record belongs to. */
public var traceId: String?
public init(attributesBool: [String: Bool]? = nil, attributesFloat: [String: Double]? = nil, attributesInt: [String: Int64]? = nil, attributesString: [String: String]? = nil, body: String? = nil, id: String? = nil, resourcesString: [String: String]? = nil, severityNumber: Int? = nil, severityText: String? = nil, spanId: String? = nil, timestamp: Int? = nil, traceFlags: Int? = nil, traceId: String? = nil) {
self.attributesBool = attributesBool
self.attributesFloat = attributesFloat
self.attributesInt = attributesInt
self.attributesString = attributesString
self.body = body
self.id = id
self.resourcesString = resourcesString
self.severityNumber = severityNumber
self.severityText = severityText
self.spanId = spanId
self.timestamp = timestamp
self.traceFlags = traceFlags
self.traceId = traceId
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case attributesBool = "attributes_bool"
case attributesFloat = "attributes_float"
case attributesInt = "attributes_int"
case attributesString = "attributes_string"
case body
case id
case resourcesString = "resources_string"
case severityNumber = "severity_number"
case severityText = "severity_text"
case spanId = "span_id"
case timestamp
case traceFlags = "trace_flags"
case traceId = "trace_id"
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(attributesBool, forKey: .attributesBool)
try container.encodeIfPresent(attributesFloat, forKey: .attributesFloat)
try container.encodeIfPresent(attributesInt, forKey: .attributesInt)
try container.encodeIfPresent(attributesString, forKey: .attributesString)
try container.encodeIfPresent(body, forKey: .body)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(resourcesString, forKey: .resourcesString)
try container.encodeIfPresent(severityNumber, forKey: .severityNumber)
try container.encodeIfPresent(severityText, forKey: .severityText)
try container.encodeIfPresent(spanId, forKey: .spanId)
try container.encodeIfPresent(timestamp, forKey: .timestamp)
try container.encodeIfPresent(traceFlags, forKey: .traceFlags)
try container.encodeIfPresent(traceId, forKey: .traceId)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension O11yO11yLogRecord: Identifiable {}