Files
sdk/Sources/Hanzo/Models/DataroomPageStat.swift

46 lines
1.5 KiB
Swift

//
// DataroomPageStat.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct DataroomPageStat: Sendable, Codable, ParameterConvertible, Hashable {
/** AvgDuration is totalDuration divided by views, rounded; 0 when unviewed. */
public var avgDuration: Int64?
/** PageNumber is the page these counts are for. */
public var pageNumber: Int64?
/** TotalDuration is the summed dwell measure reported for the page. */
public var totalDuration: Int64?
/** Views is how many times the page was viewed. */
public var views: Int64?
public init(avgDuration: Int64? = nil, pageNumber: Int64? = nil, totalDuration: Int64? = nil, views: Int64? = nil) {
self.avgDuration = avgDuration
self.pageNumber = pageNumber
self.totalDuration = totalDuration
self.views = views
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case avgDuration
case pageNumber
case totalDuration
case views
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(avgDuration, forKey: .avgDuration)
try container.encodeIfPresent(pageNumber, forKey: .pageNumber)
try container.encodeIfPresent(totalDuration, forKey: .totalDuration)
try container.encodeIfPresent(views, forKey: .views)
}
}