Files
divkit/client/ios/DivKit/generated_sources/DivTextRangeMaskSolid.swift
T
pkurchatov 149b80a37f Sendable DivData
commit_hash:ae183ed8d06f2c89c8693f59bedba49752638377
2025-01-16 16:25:07 +03:00

52 lines
1.3 KiB
Swift

// 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<Color>
public let isEnabled: Expression<Bool> // default value: true
public func resolveColor(_ resolver: ExpressionResolver) -> Color? {
resolver.resolveColor(color)
}
public func resolveIsEnabled(_ resolver: ExpressionResolver) -> Bool {
resolver.resolveNumeric(isEnabled) ?? true
}
init(
color: Expression<Color>,
isEnabled: Expression<Bool>? = 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 {
public func toDictionary() -> [String: ValidSerializationValue] {
var result: [String: ValidSerializationValue] = [:]
result["type"] = Self.type
result["color"] = color.toValidSerializationValue()
result["is_enabled"] = isEnabled.toValidSerializationValue()
return result
}
}