mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The lock sat at 574d1f1d while the product moved on. The team surface stopped at rooms — no messages path, no way to open one — so anything built on this client had to reach past it with its own HTTP calls, which is the duplication a generated client exists to prevent.
56 lines
2.5 KiB
Swift
56 lines
2.5 KiB
Swift
//
|
|
// AllowlistPutIn.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct AllowlistPutIn: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AccessGroups REPLACES the org's named access groups, as group name -> channel -> entries. Absent or null leaves them alone. */
|
|
public var accessGroups: [String: [String: [String]]]?
|
|
/** Channel is the transport to edit: discord, github, linear, slack, teams, telegram or whatsapp. Required; an unknown value is a 404. */
|
|
public var channel: String?
|
|
/** DM REPLACES the config-managed DM allow entries. Absent or null leaves them alone; an empty list clears them. It never touches senders approved through pairing — a policy edit cannot revoke an approved pairing. */
|
|
public var dm: [String]?
|
|
/** DMPolicy sets how direct messages are admitted: \"pairing\" (a person must be approved first), \"allowlist\" (only listed senders) or \"open\". Empty leaves it unchanged. */
|
|
public var dmPolicy: String?
|
|
/** Group REPLACES the config-managed group allow entries. Absent or null leaves them alone; an empty list clears them. */
|
|
public var group: [String]?
|
|
/** GroupPolicy sets how group and thread rooms are admitted: \"open\", \"allowlist\" or \"disabled\". Empty leaves it unchanged. */
|
|
public var groupPolicy: String?
|
|
|
|
public init(accessGroups: [String: [String: [String]]]? = nil, channel: String? = nil, dm: [String]? = nil, dmPolicy: String? = nil, group: [String]? = nil, groupPolicy: String? = nil) {
|
|
self.accessGroups = accessGroups
|
|
self.channel = channel
|
|
self.dm = dm
|
|
self.dmPolicy = dmPolicy
|
|
self.group = group
|
|
self.groupPolicy = groupPolicy
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case accessGroups
|
|
case channel
|
|
case dm
|
|
case dmPolicy
|
|
case group
|
|
case groupPolicy
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(accessGroups, forKey: .accessGroups)
|
|
try container.encodeIfPresent(channel, forKey: .channel)
|
|
try container.encodeIfPresent(dm, forKey: .dm)
|
|
try container.encodeIfPresent(dmPolicy, forKey: .dmPolicy)
|
|
try container.encodeIfPresent(group, forKey: .group)
|
|
try container.encodeIfPresent(groupPolicy, forKey: .groupPolicy)
|
|
}
|
|
}
|
|
|