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.
151 lines
6.2 KiB
Swift
151 lines
6.2 KiB
Swift
//
|
|
// O11yO11yEvent.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yO11yEvent: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Culprit is where it came from — the function or route blamed for it. */
|
|
public var culprit: String?
|
|
/** Environment is the deployment it happened in. */
|
|
public var environment: String?
|
|
/** EventID is its own id. */
|
|
public var eventId: String?
|
|
/** Fingerprint is the grouping key that puts like errors in one issue. */
|
|
public var fingerprint: String?
|
|
/** Frames are the stack, innermost first. */
|
|
public var frames: [O11yO11yFrame]?
|
|
/** Handled says whether the application caught it. */
|
|
public var handled: Bool?
|
|
/** Level is its severity, e.g. error, warning, info. */
|
|
public var level: String?
|
|
/** Message is the human-readable message. */
|
|
public var message: String?
|
|
/** OrgID is the org that owns it. */
|
|
public var orgId: String?
|
|
/** Platform is the reporting runtime, e.g. go, python, javascript. */
|
|
public var platform: String?
|
|
/** ProjectID is the project it was captured for. */
|
|
public var projectId: String?
|
|
/** ReceivedAt is when it arrived here. */
|
|
public var receivedAt: Date?
|
|
/** 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, as the reporter recorded it. */
|
|
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?
|
|
/** UserEmail is that user's email, when attached. */
|
|
public var userEmail: String?
|
|
/** UserID identifies the affected end user, when the reporter attached one. */
|
|
public var userId: String?
|
|
/** UserIP is that user's address, when attached. */
|
|
public var userIp: String?
|
|
/** Value is the exception value. */
|
|
public var value: String?
|
|
|
|
public init(culprit: String? = nil, environment: String? = nil, eventId: String? = nil, fingerprint: String? = nil, frames: [O11yO11yFrame]? = nil, handled: Bool? = nil, level: String? = nil, message: String? = nil, orgId: String? = nil, platform: String? = nil, projectId: String? = nil, receivedAt: Date? = 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, userEmail: String? = nil, userId: String? = nil, userIp: String? = nil, value: String? = nil) {
|
|
self.culprit = culprit
|
|
self.environment = environment
|
|
self.eventId = eventId
|
|
self.fingerprint = fingerprint
|
|
self.frames = frames
|
|
self.handled = handled
|
|
self.level = level
|
|
self.message = message
|
|
self.orgId = orgId
|
|
self.platform = platform
|
|
self.projectId = projectId
|
|
self.receivedAt = receivedAt
|
|
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.userEmail = userEmail
|
|
self.userId = userId
|
|
self.userIp = userIp
|
|
self.value = value
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case culprit
|
|
case environment
|
|
case eventId
|
|
case fingerprint
|
|
case frames
|
|
case handled
|
|
case level
|
|
case message
|
|
case orgId
|
|
case platform
|
|
case projectId
|
|
case receivedAt
|
|
case release
|
|
case serverName
|
|
case serviceName
|
|
case spanId
|
|
case tags
|
|
case timestamp
|
|
case traceId
|
|
case transaction
|
|
case type
|
|
case userEmail
|
|
case userId
|
|
case userIp
|
|
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(handled, forKey: .handled)
|
|
try container.encodeIfPresent(level, forKey: .level)
|
|
try container.encodeIfPresent(message, forKey: .message)
|
|
try container.encodeIfPresent(orgId, forKey: .orgId)
|
|
try container.encodeIfPresent(platform, forKey: .platform)
|
|
try container.encodeIfPresent(projectId, forKey: .projectId)
|
|
try container.encodeIfPresent(receivedAt, forKey: .receivedAt)
|
|
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(userEmail, forKey: .userEmail)
|
|
try container.encodeIfPresent(userId, forKey: .userId)
|
|
try container.encodeIfPresent(userIp, forKey: .userIp)
|
|
try container.encodeIfPresent(value, forKey: .value)
|
|
}
|
|
}
|
|
|