Files
swift-sdk/Sources/Hanzo/Models/O11yO11yOccurrence.swift
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
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.
2026-08-23 10:04:41 -07:00

116 lines
4.5 KiB
Swift

//
// O11yO11yOccurrence.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct O11yO11yOccurrence: Sendable, Codable, ParameterConvertible, Hashable {
/** Culprit is where it came from. */
public var culprit: String?
/** Environment is the deployment it happened in. */
public var environment: String?
/** EventID is the occurrence's id. */
public var eventId: String?
/** Fingerprint is the grouping key it was bucketed by. */
public var fingerprint: String?
/** Frames are the stack, innermost first. */
public var frames: [O11yO11yOccurrenceFrame]?
/** Level is its severity, e.g. error, warning, info. */
public var level: String?
/** Platform is the reporting runtime. */
public var platform: String?
/** Release is the version that produced it. */
public var release: String?
/** ServerName is the host that reported it. */
public var serverName: String?
/** ServiceName is the service that reported it. */
public var serviceName: String?
/** SpanID is the span it belonged to. */
public var spanId: String?
/** Tags are the reporter's own key/value labels. */
public var tags: [String: String]?
/** Timestamp is when the error happened. */
public var timestamp: Date?
/** TraceID is the trace it belonged to. */
public var traceId: String?
/** Transaction is the operation it happened in. */
public var transaction: String?
/** Type is the exception type. */
public var type: String?
/** User is the affected end-user context, when the reporter attached one. */
public var user: O11yO11yEventUser?
/** Value is the exception value. */
public var value: String?
public init(culprit: String? = nil, environment: String? = nil, eventId: String? = nil, fingerprint: String? = nil, frames: [O11yO11yOccurrenceFrame]? = nil, level: String? = nil, platform: String? = nil, release: String? = nil, serverName: String? = nil, serviceName: String? = nil, spanId: String? = nil, tags: [String: String]? = nil, timestamp: Date? = nil, traceId: String? = nil, transaction: String? = nil, type: String? = nil, user: O11yO11yEventUser? = nil, value: String? = nil) {
self.culprit = culprit
self.environment = environment
self.eventId = eventId
self.fingerprint = fingerprint
self.frames = frames
self.level = level
self.platform = platform
self.release = release
self.serverName = serverName
self.serviceName = serviceName
self.spanId = spanId
self.tags = tags
self.timestamp = timestamp
self.traceId = traceId
self.transaction = transaction
self.type = type
self.user = user
self.value = value
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case culprit
case environment
case eventId
case fingerprint
case frames
case level
case platform
case release
case serverName
case serviceName
case spanId
case tags
case timestamp
case traceId
case transaction
case type
case user
case value
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(culprit, forKey: .culprit)
try container.encodeIfPresent(environment, forKey: .environment)
try container.encodeIfPresent(eventId, forKey: .eventId)
try container.encodeIfPresent(fingerprint, forKey: .fingerprint)
try container.encodeIfPresent(frames, forKey: .frames)
try container.encodeIfPresent(level, forKey: .level)
try container.encodeIfPresent(platform, forKey: .platform)
try container.encodeIfPresent(release, forKey: .release)
try container.encodeIfPresent(serverName, forKey: .serverName)
try container.encodeIfPresent(serviceName, forKey: .serviceName)
try container.encodeIfPresent(spanId, forKey: .spanId)
try container.encodeIfPresent(tags, forKey: .tags)
try container.encodeIfPresent(timestamp, forKey: .timestamp)
try container.encodeIfPresent(traceId, forKey: .traceId)
try container.encodeIfPresent(transaction, forKey: .transaction)
try container.encodeIfPresent(type, forKey: .type)
try container.encodeIfPresent(user, forKey: .user)
try container.encodeIfPresent(value, forKey: .value)
}
}