// Generated code. Do not modify. import Foundation import Serialization import VGSL public final class DivTextRangeMaskSolid: Sendable { public static let type: String = "solid" public let color: Expression public let isEnabled: Expression // default value: true public func resolveColor(_ resolver: ExpressionResolver) -> Color? { resolver.resolveColor(color) } public func resolveIsEnabled(_ resolver: ExpressionResolver) -> Bool { resolver.resolveNumeric(isEnabled) ?? true } public convenience init(dictionary: [String: Any], context: ParsingContext) throws { self.init( color: try dictionary.getExpressionField("color", transform: Color.color(withHexString:), context: context), isEnabled: try dictionary.getOptionalExpressionField("is_enabled", context: context) ) } init( color: Expression, isEnabled: Expression? = nil ) { self.color = color self.isEnabled = isEnabled ?? .value(true) } } #if DEBUG extension DivTextRangeMaskSolid: Equatable { public static func ==(lhs: DivTextRangeMaskSolid, rhs: DivTextRangeMaskSolid) -> Bool { guard lhs.color == rhs.color, lhs.isEnabled == rhs.isEnabled else { return false } return true } } #endif extension DivTextRangeMaskSolid: Serializable { @_optimize(size) public func toDictionary() -> [String: ValidSerializationValue] { var result: [String: ValidSerializationValue] = [:] result["type"] = Self.type result["color"] = color.toValidSerializationValue() result["is_enabled"] = isEnabled.toValidSerializationValue() return result } }