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

99 lines
3.9 KiB
Swift

//
// O11yO11yReductionRule.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct O11yO11yReductionRule: Sendable, Codable, ParameterConvertible, Hashable {
/** Active says whether the rule is in force. */
public var active: Bool?
/** CreatedAt is when the rule was created. */
public var createdAt: Date?
/** CreatedBy is who created it. */
public var createdBy: String?
/** EffectiveFrom is when the rule took effect. */
public var effectiveFrom: Date?
/** ID is the rule's id. */
public var id: String?
/** IngestedSamples is how many samples arrived while the rule was active. */
public var ingestedSamples: Int?
/** IngestedSeries is how many series arrived while the rule was active. */
public var ingestedSeries: Int?
/** Labels are the label names the rule matches. */
public var labels: [String]?
/** MatchType is drop or keep. */
public var matchType: String?
/** MetricName is the metric the rule governs. */
public var metricName: String?
/** RetainedSamples is how many of them were kept. */
public var retainedSamples: Int?
/** RetainedSeries is how many of them were kept. */
public var retainedSeries: Int?
/** UpdatedAt is when the rule last changed. */
public var updatedAt: Date?
/** UpdatedBy is who last changed it. */
public var updatedBy: String?
public init(active: Bool? = nil, createdAt: Date? = nil, createdBy: String? = nil, effectiveFrom: Date? = nil, id: String? = nil, ingestedSamples: Int? = nil, ingestedSeries: Int? = nil, labels: [String]? = nil, matchType: String? = nil, metricName: String? = nil, retainedSamples: Int? = nil, retainedSeries: Int? = nil, updatedAt: Date? = nil, updatedBy: String? = nil) {
self.active = active
self.createdAt = createdAt
self.createdBy = createdBy
self.effectiveFrom = effectiveFrom
self.id = id
self.ingestedSamples = ingestedSamples
self.ingestedSeries = ingestedSeries
self.labels = labels
self.matchType = matchType
self.metricName = metricName
self.retainedSamples = retainedSamples
self.retainedSeries = retainedSeries
self.updatedAt = updatedAt
self.updatedBy = updatedBy
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case active
case createdAt
case createdBy
case effectiveFrom
case id
case ingestedSamples
case ingestedSeries
case labels
case matchType
case metricName
case retainedSamples
case retainedSeries
case updatedAt
case updatedBy
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(active, forKey: .active)
try container.encodeIfPresent(createdAt, forKey: .createdAt)
try container.encodeIfPresent(createdBy, forKey: .createdBy)
try container.encodeIfPresent(effectiveFrom, forKey: .effectiveFrom)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(ingestedSamples, forKey: .ingestedSamples)
try container.encodeIfPresent(ingestedSeries, forKey: .ingestedSeries)
try container.encodeIfPresent(labels, forKey: .labels)
try container.encodeIfPresent(matchType, forKey: .matchType)
try container.encodeIfPresent(metricName, forKey: .metricName)
try container.encodeIfPresent(retainedSamples, forKey: .retainedSamples)
try container.encodeIfPresent(retainedSeries, forKey: .retainedSeries)
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
try container.encodeIfPresent(updatedBy, forKey: .updatedBy)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension O11yO11yReductionRule: Identifiable {}