ValueWithTimestamp

@Serializable
data class ValueWithTimestamp<T>(val value: T, val timestamp: Instant? = null, val unit: String? = null)(source)

A generic value wrapper with timestamp and optional unit.

Type Parameters

T

The type of the value

Constructors

Link copied to clipboard
constructor(value: T, timestamp: Instant? = null, unit: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "timestamp")
val timestamp: Instant?

Instant when the value was recorded

Link copied to clipboard
@SerialName(value = "unit")
val unit: String?

Optional unit of measurement (e.g., "km", "liters")

Link copied to clipboard
@SerialName(value = "value")
val value: T

The actual value