Files
pkurchatov 149b80a37f Sendable DivData
commit_hash:ae183ed8d06f2c89c8693f59bedba49752638377
2025-01-16 16:25:07 +03:00

72 lines
1.8 KiB
Swift

// Generated code. Do not modify.
import Foundation
import Serialization
import VGSL
@frozen
public enum DivVariable: Sendable {
case stringVariable(StringVariable)
case numberVariable(NumberVariable)
case integerVariable(IntegerVariable)
case booleanVariable(BooleanVariable)
case colorVariable(ColorVariable)
case urlVariable(UrlVariable)
case dictVariable(DictVariable)
case arrayVariable(ArrayVariable)
public var value: Serializable {
switch self {
case let .stringVariable(value):
return value
case let .numberVariable(value):
return value
case let .integerVariable(value):
return value
case let .booleanVariable(value):
return value
case let .colorVariable(value):
return value
case let .urlVariable(value):
return value
case let .dictVariable(value):
return value
case let .arrayVariable(value):
return value
}
}
}
#if DEBUG
extension DivVariable: Equatable {
public static func ==(lhs: DivVariable, rhs: DivVariable) -> Bool {
switch (lhs, rhs) {
case let (.stringVariable(l), .stringVariable(r)):
return l == r
case let (.numberVariable(l), .numberVariable(r)):
return l == r
case let (.integerVariable(l), .integerVariable(r)):
return l == r
case let (.booleanVariable(l), .booleanVariable(r)):
return l == r
case let (.colorVariable(l), .colorVariable(r)):
return l == r
case let (.urlVariable(l), .urlVariable(r)):
return l == r
case let (.dictVariable(l), .dictVariable(r)):
return l == r
case let (.arrayVariable(l), .arrayVariable(r)):
return l == r
default:
return false
}
}
}
#endif
extension DivVariable: Serializable {
public func toDictionary() -> [String: ValidSerializationValue] {
return value.toDictionary()
}
}