Files
sdk/Sources/Hanzo/Models/ApprovePairingIn.swift

36 lines
1.0 KiB
Swift

//
// ApprovePairingIn.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct ApprovePairingIn: Sendable, Codable, ParameterConvertible, Hashable {
/** Channel is the transport the request came in on: discord, slack, teams, telegram or whatsapp. */
public var channel: String?
/** Code is the pairing code from GET /v1/channels/pairing. It is a capability: holding it is what authorises the approval, alongside org admin. */
public var code: String?
public init(channel: String? = nil, code: String? = nil) {
self.channel = channel
self.code = code
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case channel
case code
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(channel, forKey: .channel)
try container.encodeIfPresent(code, forKey: .code)
}
}