mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
42 lines
1.0 KiB
Swift
42 lines
1.0 KiB
Swift
// Generated code. Do not modify.
|
|
|
|
import CommonCorePublic
|
|
import Foundation
|
|
import Serialization
|
|
|
|
public final class DivVideoDataVideo {
|
|
public static let type: String = "video"
|
|
public let videoSources: [DivVideoDataVideoSource] // at least 1 elements
|
|
|
|
static let videoSourcesValidator: AnyArrayValueValidator<DivVideoDataVideoSource> =
|
|
makeArrayValidator(minItems: 1)
|
|
|
|
init(
|
|
videoSources: [DivVideoDataVideoSource]
|
|
) {
|
|
self.videoSources = videoSources
|
|
}
|
|
}
|
|
|
|
#if DEBUG
|
|
extension DivVideoDataVideo: Equatable {
|
|
public static func ==(lhs: DivVideoDataVideo, rhs: DivVideoDataVideo) -> Bool {
|
|
guard
|
|
lhs.videoSources == rhs.videoSources
|
|
else {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
}
|
|
#endif
|
|
|
|
extension DivVideoDataVideo: Serializable {
|
|
public func toDictionary() -> [String: ValidSerializationValue] {
|
|
var result: [String: ValidSerializationValue] = [:]
|
|
result["type"] = Self.type
|
|
result["video_sources"] = videoSources.map { $0.toDictionary() }
|
|
return result
|
|
}
|
|
}
|