Files
divkit/client/ios/DivKitTests/Entities/generated_sources/EntityWithComplexPropertyWithDefaultValue.swift
denlvovich e001d74afe Update to VGSL6.0
4f8b5f480ade3f347d5f0a2d01a1618069bcb846
2024-07-12 20:33:42 +03:00

76 lines
2.0 KiB
Swift

// Generated code. Do not modify.
@testable import DivKit
import Foundation
import Serialization
import VGSL
public final class EntityWithComplexPropertyWithDefaultValue {
public final class Property {
public let value: Expression<String>
public func resolveValue(_ resolver: ExpressionResolver) -> String? {
resolver.resolveString(value)
}
init(
value: Expression<String>
) {
self.value = value
}
}
public static let type: String = "entity_with_complex_property_with_default_value"
public let property: Property // default value: EntityWithComplexPropertyWithDefaultValue.Property(value: .value("Default text"))
init(
property: Property? = nil
) {
self.property = property ?? EntityWithComplexPropertyWithDefaultValue.Property(value: .value("Default text"))
}
}
#if DEBUG
extension EntityWithComplexPropertyWithDefaultValue: Equatable {
public static func ==(lhs: EntityWithComplexPropertyWithDefaultValue, rhs: EntityWithComplexPropertyWithDefaultValue) -> Bool {
guard
lhs.property == rhs.property
else {
return false
}
return true
}
}
#endif
extension EntityWithComplexPropertyWithDefaultValue: Serializable {
public func toDictionary() -> [String: ValidSerializationValue] {
var result: [String: ValidSerializationValue] = [:]
result["type"] = Self.type
result["property"] = property.toDictionary()
return result
}
}
#if DEBUG
extension EntityWithComplexPropertyWithDefaultValue.Property: Equatable {
public static func ==(lhs: EntityWithComplexPropertyWithDefaultValue.Property, rhs: EntityWithComplexPropertyWithDefaultValue.Property) -> Bool {
guard
lhs.value == rhs.value
else {
return false
}
return true
}
}
#endif
extension EntityWithComplexPropertyWithDefaultValue.Property: Serializable {
public func toDictionary() -> [String: ValidSerializationValue] {
var result: [String: ValidSerializationValue] = [:]
result["value"] = value.toValidSerializationValue()
return result
}
}