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.
60 lines
2.6 KiB
Swift
60 lines
2.6 KiB
Swift
//
|
|
// O11yIncidentioConfig.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yIncidentioConfig: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var notifierConfig: O11yNotifierConfig?
|
|
public var alertSourceToken: JSONValue?
|
|
public var alertSourceTokenFile: String?
|
|
public var httpConfig: O11yHTTPClientConfig?
|
|
/** MaxAlerts is the maximum number of alerts to be sent per incident.io message. Alerts exceeding this threshold will be truncated. Setting this to 0 allows an unlimited number of alerts. Note that if the payload exceeds incident.io's size limits, you will receive a 429 response and alerts will not be ingested. */
|
|
public var maxAlerts: Int?
|
|
/** Timeout is the maximum time allowed to invoke incident.io. Setting this to 0 does not impose a timeout. */
|
|
public var timeout: Int64?
|
|
public var url: JSONValue?
|
|
public var urlFile: String?
|
|
|
|
public init(notifierConfig: O11yNotifierConfig? = nil, alertSourceToken: JSONValue? = nil, alertSourceTokenFile: String? = nil, httpConfig: O11yHTTPClientConfig? = nil, maxAlerts: Int? = nil, timeout: Int64? = nil, url: JSONValue? = nil, urlFile: String? = nil) {
|
|
self.notifierConfig = notifierConfig
|
|
self.alertSourceToken = alertSourceToken
|
|
self.alertSourceTokenFile = alertSourceTokenFile
|
|
self.httpConfig = httpConfig
|
|
self.maxAlerts = maxAlerts
|
|
self.timeout = timeout
|
|
self.url = url
|
|
self.urlFile = urlFile
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case notifierConfig = "NotifierConfig"
|
|
case alertSourceToken = "alert_source_token"
|
|
case alertSourceTokenFile = "alert_source_token_file"
|
|
case httpConfig = "http_config"
|
|
case maxAlerts = "max_alerts"
|
|
case timeout
|
|
case url
|
|
case urlFile = "url_file"
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(notifierConfig, forKey: .notifierConfig)
|
|
try container.encodeIfPresent(alertSourceToken, forKey: .alertSourceToken)
|
|
try container.encodeIfPresent(alertSourceTokenFile, forKey: .alertSourceTokenFile)
|
|
try container.encodeIfPresent(httpConfig, forKey: .httpConfig)
|
|
try container.encodeIfPresent(maxAlerts, forKey: .maxAlerts)
|
|
try container.encodeIfPresent(timeout, forKey: .timeout)
|
|
try container.encodeIfPresent(url, forKey: .url)
|
|
try container.encodeIfPresent(urlFile, forKey: .urlFile)
|
|
}
|
|
}
|
|
|