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.
61 lines
2.5 KiB
Swift
61 lines
2.5 KiB
Swift
//
|
|
// O11yO11yReductionRulePreview.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yO11yReductionRulePreview: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AffectedAssets are the dashboards and alerts the rule would touch. */
|
|
public var affectedAssets: [O11yO11yAffectedAsset]?
|
|
/** CurrentRetainedSeries is how many survive the rules in force today. */
|
|
public var currentRetainedSeries: Int?
|
|
/** DroppedLabels are the labels the rule would drop. */
|
|
public var droppedLabels: [String]?
|
|
/** EffectiveFrom is when the rule would take effect. */
|
|
public var effectiveFrom: Date?
|
|
/** IngestedSeries is how many series the metric ingests today. */
|
|
public var ingestedSeries: Int?
|
|
/** ReductionPercent is the estimated reduction, in percent. */
|
|
public var reductionPercent: Double?
|
|
/** RetainedSeries is how many would survive with the candidate rule. */
|
|
public var retainedSeries: Int?
|
|
|
|
public init(affectedAssets: [O11yO11yAffectedAsset]? = nil, currentRetainedSeries: Int? = nil, droppedLabels: [String]? = nil, effectiveFrom: Date? = nil, ingestedSeries: Int? = nil, reductionPercent: Double? = nil, retainedSeries: Int? = nil) {
|
|
self.affectedAssets = affectedAssets
|
|
self.currentRetainedSeries = currentRetainedSeries
|
|
self.droppedLabels = droppedLabels
|
|
self.effectiveFrom = effectiveFrom
|
|
self.ingestedSeries = ingestedSeries
|
|
self.reductionPercent = reductionPercent
|
|
self.retainedSeries = retainedSeries
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case affectedAssets
|
|
case currentRetainedSeries
|
|
case droppedLabels
|
|
case effectiveFrom
|
|
case ingestedSeries
|
|
case reductionPercent
|
|
case retainedSeries
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(affectedAssets, forKey: .affectedAssets)
|
|
try container.encodeIfPresent(currentRetainedSeries, forKey: .currentRetainedSeries)
|
|
try container.encodeIfPresent(droppedLabels, forKey: .droppedLabels)
|
|
try container.encodeIfPresent(effectiveFrom, forKey: .effectiveFrom)
|
|
try container.encodeIfPresent(ingestedSeries, forKey: .ingestedSeries)
|
|
try container.encodeIfPresent(reductionPercent, forKey: .reductionPercent)
|
|
try container.encodeIfPresent(retainedSeries, forKey: .retainedSeries)
|
|
}
|
|
}
|
|
|