Files
Chirag Aggarwal 7f801a9ed5 feat: SDK update for version 19.0.0 (#123)
* chore: update Apple SDK to 18.3.0

* chore: update Apple SDK to 18.3.0

* chore: update Apple SDK to 19.0.0

* docs: state the SDK targets Appwrite server version 2.0.x

* fix: regenerate with the latest sdk-generator and add auto image gravity
2026-09-07 10:48:33 -07:00

44 lines
925 B
Swift

import Foundation
import JSONCodable
/// AlgoBcrypt
open class AlgoBcrypt: Codable {
enum CodingKeys: String, CodingKey {
case type = "type"
}
/// Algo type.
public let type: String
init(
type: String
) {
self.type = type
}
public required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.type = try container.decode(String.self, forKey: .type)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(type, forKey: .type)
}
public func toMap() -> [String: Any] {
return [
"type": type as Any
]
}
public static func from(map: [String: Any]) -> AlgoBcrypt {
return AlgoBcrypt(
type: map["type"] as! String
)
}
}