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

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)
}
}