Files
divkit/client/ios/DivKitTests/Entities/generated_sources/EntityWithEntityProperty.swift
T
feldspar e234cd83fa Added untyped template resolver
commit_hash:299c999f2d6caad74d8568059e890770d7a6b1f2
2026-02-13 12:08:22 +03:00

49 lines
1.3 KiB
Swift

// Generated code. Do not modify.
@testable import DivKit
import Foundation
import Serialization
import VGSL
import enum DivKit.Expression
public final class EntityWithEntityProperty: Sendable {
public static let type: String = "entity_with_entity_property"
public let entity: Entity // default value: .entityWithStringEnumProperty(EntityWithStringEnumProperty(property: .value(.second)))
public convenience init(dictionary: [String: Any], context: ParsingContext) throws {
self.init(
entity: try dictionary.getOptionalField("entity", transform: { (dict: [String: Any]) in try Entity(dictionary: dict, context: context) })
)
}
init(
entity: Entity? = nil
) {
self.entity = entity ?? .entityWithStringEnumProperty(EntityWithStringEnumProperty(property: .value(.second)))
}
}
#if DEBUG
extension EntityWithEntityProperty: Equatable {
public static func ==(lhs: EntityWithEntityProperty, rhs: EntityWithEntityProperty) -> Bool {
guard
lhs.entity == rhs.entity
else {
return false
}
return true
}
}
#endif
extension EntityWithEntityProperty: Serializable {
@_optimize(size)
public func toDictionary() -> [String: ValidSerializationValue] {
var result: [String: ValidSerializationValue] = [:]
result["type"] = Self.type
result["entity"] = entity.toDictionary()
return result
}
}