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.
143 lines
6.4 KiB
Swift
143 lines
6.4 KiB
Swift
//
|
|
// O11yWaterfallSpan.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yWaterfallSpan: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var attributes: [String: JSONValue]?
|
|
/** Calculated fields https://o11y.io/docs/traces-management/guides/derived-fields-spans */
|
|
public var dbName: String?
|
|
public var dbOperation: String?
|
|
public var durationNano: Int?
|
|
public var events: [O11yEvent]?
|
|
public var externalHttpMethod: String?
|
|
public var externalHttpUrl: String?
|
|
public var flags: Int?
|
|
public var hasChildren: Bool?
|
|
public var hasError: Bool?
|
|
public var httpHost: String?
|
|
public var httpMethod: String?
|
|
public var httpUrl: String?
|
|
public var isRemote: String?
|
|
public var kindString: String?
|
|
public var level: Int?
|
|
public var name: String?
|
|
public var parentSpanId: String?
|
|
public var references: [O11yOtelSpanRef]?
|
|
public var resource: [String: String]?
|
|
public var responseStatusCode: String?
|
|
public var spanId: String?
|
|
public var statusCode: Int?
|
|
public var statusCodeString: String?
|
|
public var statusMessage: String?
|
|
public var subTreeNodeCount: Int?
|
|
public var timeUnix: Int?
|
|
public var traceId: String?
|
|
public var traceState: String?
|
|
|
|
public init(attributes: [String: JSONValue]? = nil, dbName: String? = nil, dbOperation: String? = nil, durationNano: Int? = nil, events: [O11yEvent]? = nil, externalHttpMethod: String? = nil, externalHttpUrl: String? = nil, flags: Int? = nil, hasChildren: Bool? = nil, hasError: Bool? = nil, httpHost: String? = nil, httpMethod: String? = nil, httpUrl: String? = nil, isRemote: String? = nil, kindString: String? = nil, level: Int? = nil, name: String? = nil, parentSpanId: String? = nil, references: [O11yOtelSpanRef]? = nil, resource: [String: String]? = nil, responseStatusCode: String? = nil, spanId: String? = nil, statusCode: Int? = nil, statusCodeString: String? = nil, statusMessage: String? = nil, subTreeNodeCount: Int? = nil, timeUnix: Int? = nil, traceId: String? = nil, traceState: String? = nil) {
|
|
self.attributes = attributes
|
|
self.dbName = dbName
|
|
self.dbOperation = dbOperation
|
|
self.durationNano = durationNano
|
|
self.events = events
|
|
self.externalHttpMethod = externalHttpMethod
|
|
self.externalHttpUrl = externalHttpUrl
|
|
self.flags = flags
|
|
self.hasChildren = hasChildren
|
|
self.hasError = hasError
|
|
self.httpHost = httpHost
|
|
self.httpMethod = httpMethod
|
|
self.httpUrl = httpUrl
|
|
self.isRemote = isRemote
|
|
self.kindString = kindString
|
|
self.level = level
|
|
self.name = name
|
|
self.parentSpanId = parentSpanId
|
|
self.references = references
|
|
self.resource = resource
|
|
self.responseStatusCode = responseStatusCode
|
|
self.spanId = spanId
|
|
self.statusCode = statusCode
|
|
self.statusCodeString = statusCodeString
|
|
self.statusMessage = statusMessage
|
|
self.subTreeNodeCount = subTreeNodeCount
|
|
self.timeUnix = timeUnix
|
|
self.traceId = traceId
|
|
self.traceState = traceState
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case attributes
|
|
case dbName = "db_name"
|
|
case dbOperation = "db_operation"
|
|
case durationNano = "duration_nano"
|
|
case events
|
|
case externalHttpMethod = "external_http_method"
|
|
case externalHttpUrl = "external_http_url"
|
|
case flags
|
|
case hasChildren = "has_children"
|
|
case hasError = "has_error"
|
|
case httpHost = "http_host"
|
|
case httpMethod = "http_method"
|
|
case httpUrl = "http_url"
|
|
case isRemote = "is_remote"
|
|
case kindString = "kind_string"
|
|
case level
|
|
case name
|
|
case parentSpanId = "parent_span_id"
|
|
case references
|
|
case resource
|
|
case responseStatusCode = "response_status_code"
|
|
case spanId = "span_id"
|
|
case statusCode = "status_code"
|
|
case statusCodeString = "status_code_string"
|
|
case statusMessage = "status_message"
|
|
case subTreeNodeCount = "sub_tree_node_count"
|
|
case timeUnix = "time_unix"
|
|
case traceId = "trace_id"
|
|
case traceState = "trace_state"
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(attributes, forKey: .attributes)
|
|
try container.encodeIfPresent(dbName, forKey: .dbName)
|
|
try container.encodeIfPresent(dbOperation, forKey: .dbOperation)
|
|
try container.encodeIfPresent(durationNano, forKey: .durationNano)
|
|
try container.encodeIfPresent(events, forKey: .events)
|
|
try container.encodeIfPresent(externalHttpMethod, forKey: .externalHttpMethod)
|
|
try container.encodeIfPresent(externalHttpUrl, forKey: .externalHttpUrl)
|
|
try container.encodeIfPresent(flags, forKey: .flags)
|
|
try container.encodeIfPresent(hasChildren, forKey: .hasChildren)
|
|
try container.encodeIfPresent(hasError, forKey: .hasError)
|
|
try container.encodeIfPresent(httpHost, forKey: .httpHost)
|
|
try container.encodeIfPresent(httpMethod, forKey: .httpMethod)
|
|
try container.encodeIfPresent(httpUrl, forKey: .httpUrl)
|
|
try container.encodeIfPresent(isRemote, forKey: .isRemote)
|
|
try container.encodeIfPresent(kindString, forKey: .kindString)
|
|
try container.encodeIfPresent(level, forKey: .level)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(parentSpanId, forKey: .parentSpanId)
|
|
try container.encodeIfPresent(references, forKey: .references)
|
|
try container.encodeIfPresent(resource, forKey: .resource)
|
|
try container.encodeIfPresent(responseStatusCode, forKey: .responseStatusCode)
|
|
try container.encodeIfPresent(spanId, forKey: .spanId)
|
|
try container.encodeIfPresent(statusCode, forKey: .statusCode)
|
|
try container.encodeIfPresent(statusCodeString, forKey: .statusCodeString)
|
|
try container.encodeIfPresent(statusMessage, forKey: .statusMessage)
|
|
try container.encodeIfPresent(subTreeNodeCount, forKey: .subTreeNodeCount)
|
|
try container.encodeIfPresent(timeUnix, forKey: .timeUnix)
|
|
try container.encodeIfPresent(traceId, forKey: .traceId)
|
|
try container.encodeIfPresent(traceState, forKey: .traceState)
|
|
}
|
|
}
|
|
|