public function toArray()
    {
        return [
            [
                'endpoint' => $this->endpoint->toArray(),
                'timestamp' => $this->startTimestamp,
                'value' => $this->values[0]
            ],
            [
                'endpoint' => $this->endpoint->toArray(),
                'timestamp' => $this->endTimestamp,
                'value' => $this->values[1]
            ]
        ];
    }