mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
51 lines
2.0 KiB
Swift
51 lines
2.0 KiB
Swift
//
|
|
// O11yO11yRetentionSetIn.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yO11yRetentionSetIn: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** ColdStorageDurationDays is how old data must be before it moves, in days. */
|
|
public var coldStorageDurationDays: Int64?
|
|
/** ColdStorageVolume names the volume aged data moves to, when set. */
|
|
public var coldStorageVolume: String?
|
|
/** DefaultTTLDays is the retention for data no rule matches, in days. */
|
|
public var defaultTTLDays: Int64?
|
|
/** TTLConditions are ordered per-label rules; the first matching rule wins. */
|
|
public var ttlConditions: [O11yO11yRetentionRule]?
|
|
/** Type is the signal the policy applies to — traces, metrics or logs. */
|
|
public var type: String?
|
|
|
|
public init(coldStorageDurationDays: Int64? = nil, coldStorageVolume: String? = nil, defaultTTLDays: Int64? = nil, ttlConditions: [O11yO11yRetentionRule]? = nil, type: String? = nil) {
|
|
self.coldStorageDurationDays = coldStorageDurationDays
|
|
self.coldStorageVolume = coldStorageVolume
|
|
self.defaultTTLDays = defaultTTLDays
|
|
self.ttlConditions = ttlConditions
|
|
self.type = type
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case coldStorageDurationDays
|
|
case coldStorageVolume
|
|
case defaultTTLDays
|
|
case ttlConditions
|
|
case type
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(coldStorageDurationDays, forKey: .coldStorageDurationDays)
|
|
try container.encodeIfPresent(coldStorageVolume, forKey: .coldStorageVolume)
|
|
try container.encodeIfPresent(defaultTTLDays, forKey: .defaultTTLDays)
|
|
try container.encodeIfPresent(ttlConditions, forKey: .ttlConditions)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
}
|
|
}
|
|
|