mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
41 lines
1.0 KiB
Swift
41 lines
1.0 KiB
Swift
// Generated code. Do not modify.
|
|
|
|
@testable import DivKit
|
|
|
|
import Foundation
|
|
import Serialization
|
|
import VGSL
|
|
|
|
public final class EntityWithEntityProperty {
|
|
public static let type: String = "entity_with_entity_property"
|
|
public let entity: Entity // default value: .entityWithStringEnumProperty(EntityWithStringEnumProperty(property: .value(.second)))
|
|
|
|
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 {
|
|
public func toDictionary() -> [String: ValidSerializationValue] {
|
|
var result: [String: ValidSerializationValue] = [:]
|
|
result["type"] = Self.type
|
|
result["entity"] = entity.toDictionary()
|
|
return result
|
|
}
|
|
}
|