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.
49 lines
2.0 KiB
Swift
49 lines
2.0 KiB
Swift
//
|
|
// TeamRoomBind.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct TeamRoomBind: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Bindings REPLACES what the room is about, wholly. It is a replace and not a merge because a caller that cannot remove a binding would have no way to correct a wrong one, and an empty list sent explicitly is how a room is unbound. Absent (null) leaves the existing list alone. */
|
|
public var bindings: [String]?
|
|
/** ID is the room to bind, from the path. The URL is the authority; a body carrying another id cannot redirect the write. */
|
|
public var id: String?
|
|
/** Life sets the lifecycle intent: \"standing\" or \"bound\". Any other value is refused rather than stored, so a reader never has to interpret a third one. Empty leaves the current intent unchanged. */
|
|
public var life: String?
|
|
/** Space names the space holding the room. It is required, because a room id is unique only within one and searching every space for a matching id would make the write's target depend on iteration order. */
|
|
public var space: String?
|
|
|
|
public init(bindings: [String]? = nil, id: String? = nil, life: String? = nil, space: String? = nil) {
|
|
self.bindings = bindings
|
|
self.id = id
|
|
self.life = life
|
|
self.space = space
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case bindings
|
|
case id
|
|
case life
|
|
case space
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(bindings, forKey: .bindings)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(life, forKey: .life)
|
|
try container.encodeIfPresent(space, forKey: .space)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension TeamRoomBind: Identifiable {}
|