//
// SensorEvent.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//

//import Foundation
//
///** An event generated by a participant interacting with the LAMP app. */
//
//public struct SensorEvent<T>: Codable where T: Codable {
//
//    /** The UNIX Epoch date-time representation: number of milliseconds since 1/1/1970 12:00 AM. */
//    public var timestamp: UInt64
//    /** The type of the sensor event. */
//    public var sensor: String?
//    /** The item information recorded within the sensor event. */
//    public var data: T?
//
//    public init(timestamp: Double, sensor: String?, data: T?) {
//        self.timestamp = UInt64(timestamp)
//        self.sensor = sensor
//        self.data = data
//    }
//
//}

//
// SensorEvent.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//

import Foundation
//import AnyCodable

/** An event generated by a participant interacting with the LAMP app. */
//public struct SensorEvent: Codable {
//
//    /** The UNIX Epoch date-time representation: number of milliseconds since 1/1/1970 12:00 AM. */
//    public var timestamp: UInt64
//    /** The type of the sensor event. */
//    public var sensor: String?
//    /** The item information recorded within the sensor event. */
//    public var data: AnyCodable?
//
//    public init(timestamp: Double, sensor: String? = nil, data: AnyCodable? = nil) {
//        self.timestamp = UInt64(timestamp)
//        self.sensor = sensor
//        self.data = data
//    }
//}

import Foundation

/** An event generated by a participant interacting with the LAMP app. */

public struct SensorEvent<T>: Codable where T: Codable {

    /** The UNIX Epoch date-time representation: number of milliseconds since 1/1/1970 12:00 AM. */
    public var timestamp: UInt64
    /** The type of the sensor event. */
    public var sensor: String?
    /** The item information recorded within the sensor event. */
    public var data: T?

    public init(timestamp: Double, sensor: String?, data: T?) {
        self.timestamp = UInt64(timestamp)
        self.sensor = sensor
        self.data = data
    }

}
