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.
140 lines
5.9 KiB
Swift
140 lines
5.9 KiB
Swift
//
|
|
// O11ySlackConfig.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11ySlackConfig: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var notifierConfig: O11yNotifierConfig?
|
|
public var actions: [O11ySlackAction]?
|
|
public var apiUrl: JSONValue?
|
|
public var apiUrlFile: String?
|
|
public var appToken: JSONValue?
|
|
public var appTokenFile: String?
|
|
public var appUrl: JSONValue?
|
|
public var callbackId: String?
|
|
/** Slack channel override, (like #other-channel or @username). */
|
|
public var channel: String?
|
|
public var color: String?
|
|
public var fallback: String?
|
|
public var fields: [O11ySlackField]?
|
|
public var footer: String?
|
|
public var httpConfig: O11yHTTPClientConfig?
|
|
public var iconEmoji: String?
|
|
public var iconUrl: String?
|
|
public var imageUrl: String?
|
|
public var linkNames: Bool?
|
|
public var messageText: String?
|
|
public var mrkdwnIn: [String]?
|
|
public var pretext: String?
|
|
public var shortFields: Bool?
|
|
public var text: String?
|
|
public var thumbUrl: String?
|
|
/** Timeout is the maximum time allowed to invoke the slack. Setting this to 0 does not impose a timeout. */
|
|
public var timeout: Int64?
|
|
public var title: String?
|
|
public var titleLink: String?
|
|
public var username: String?
|
|
|
|
public init(notifierConfig: O11yNotifierConfig? = nil, actions: [O11ySlackAction]? = nil, apiUrl: JSONValue? = nil, apiUrlFile: String? = nil, appToken: JSONValue? = nil, appTokenFile: String? = nil, appUrl: JSONValue? = nil, callbackId: String? = nil, channel: String? = nil, color: String? = nil, fallback: String? = nil, fields: [O11ySlackField]? = nil, footer: String? = nil, httpConfig: O11yHTTPClientConfig? = nil, iconEmoji: String? = nil, iconUrl: String? = nil, imageUrl: String? = nil, linkNames: Bool? = nil, messageText: String? = nil, mrkdwnIn: [String]? = nil, pretext: String? = nil, shortFields: Bool? = nil, text: String? = nil, thumbUrl: String? = nil, timeout: Int64? = nil, title: String? = nil, titleLink: String? = nil, username: String? = nil) {
|
|
self.notifierConfig = notifierConfig
|
|
self.actions = actions
|
|
self.apiUrl = apiUrl
|
|
self.apiUrlFile = apiUrlFile
|
|
self.appToken = appToken
|
|
self.appTokenFile = appTokenFile
|
|
self.appUrl = appUrl
|
|
self.callbackId = callbackId
|
|
self.channel = channel
|
|
self.color = color
|
|
self.fallback = fallback
|
|
self.fields = fields
|
|
self.footer = footer
|
|
self.httpConfig = httpConfig
|
|
self.iconEmoji = iconEmoji
|
|
self.iconUrl = iconUrl
|
|
self.imageUrl = imageUrl
|
|
self.linkNames = linkNames
|
|
self.messageText = messageText
|
|
self.mrkdwnIn = mrkdwnIn
|
|
self.pretext = pretext
|
|
self.shortFields = shortFields
|
|
self.text = text
|
|
self.thumbUrl = thumbUrl
|
|
self.timeout = timeout
|
|
self.title = title
|
|
self.titleLink = titleLink
|
|
self.username = username
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case notifierConfig = "NotifierConfig"
|
|
case actions
|
|
case apiUrl = "api_url"
|
|
case apiUrlFile = "api_url_file"
|
|
case appToken = "app_token"
|
|
case appTokenFile = "app_token_file"
|
|
case appUrl = "app_url"
|
|
case callbackId = "callback_id"
|
|
case channel
|
|
case color
|
|
case fallback
|
|
case fields
|
|
case footer
|
|
case httpConfig = "http_config"
|
|
case iconEmoji = "icon_emoji"
|
|
case iconUrl = "icon_url"
|
|
case imageUrl = "image_url"
|
|
case linkNames = "link_names"
|
|
case messageText = "message_text"
|
|
case mrkdwnIn = "mrkdwn_in"
|
|
case pretext
|
|
case shortFields = "short_fields"
|
|
case text
|
|
case thumbUrl = "thumb_url"
|
|
case timeout
|
|
case title
|
|
case titleLink = "title_link"
|
|
case username
|
|
}
|
|
|
|
// 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(actions, forKey: .actions)
|
|
try container.encodeIfPresent(apiUrl, forKey: .apiUrl)
|
|
try container.encodeIfPresent(apiUrlFile, forKey: .apiUrlFile)
|
|
try container.encodeIfPresent(appToken, forKey: .appToken)
|
|
try container.encodeIfPresent(appTokenFile, forKey: .appTokenFile)
|
|
try container.encodeIfPresent(appUrl, forKey: .appUrl)
|
|
try container.encodeIfPresent(callbackId, forKey: .callbackId)
|
|
try container.encodeIfPresent(channel, forKey: .channel)
|
|
try container.encodeIfPresent(color, forKey: .color)
|
|
try container.encodeIfPresent(fallback, forKey: .fallback)
|
|
try container.encodeIfPresent(fields, forKey: .fields)
|
|
try container.encodeIfPresent(footer, forKey: .footer)
|
|
try container.encodeIfPresent(httpConfig, forKey: .httpConfig)
|
|
try container.encodeIfPresent(iconEmoji, forKey: .iconEmoji)
|
|
try container.encodeIfPresent(iconUrl, forKey: .iconUrl)
|
|
try container.encodeIfPresent(imageUrl, forKey: .imageUrl)
|
|
try container.encodeIfPresent(linkNames, forKey: .linkNames)
|
|
try container.encodeIfPresent(messageText, forKey: .messageText)
|
|
try container.encodeIfPresent(mrkdwnIn, forKey: .mrkdwnIn)
|
|
try container.encodeIfPresent(pretext, forKey: .pretext)
|
|
try container.encodeIfPresent(shortFields, forKey: .shortFields)
|
|
try container.encodeIfPresent(text, forKey: .text)
|
|
try container.encodeIfPresent(thumbUrl, forKey: .thumbUrl)
|
|
try container.encodeIfPresent(timeout, forKey: .timeout)
|
|
try container.encodeIfPresent(title, forKey: .title)
|
|
try container.encodeIfPresent(titleLink, forKey: .titleLink)
|
|
try container.encodeIfPresent(username, forKey: .username)
|
|
}
|
|
}
|
|
|