syntax = "proto3";

package com.cognite.v1.timeseries.proto;

option java_multiple_files = true;

message Status {
    int64 code = 1;
    string symbol = 2;
}

message NumericDatapoint {
    int64 timestamp = 1;
    double value = 2;
    Status status = 3;
    bool nullValue = 4;
}

message NumericDatapoints {
    repeated NumericDatapoint datapoints = 1;
}

message StringDatapoint {
    int64 timestamp = 1;
    string value = 2;
    Status status = 3;
    bool nullValue = 4;
}

message StringDatapoints {
    repeated StringDatapoint datapoints = 1;
}

message AggregateDatapoint {
    int64 timestamp = 1;
    double average = 2;
    double max = 3;
    double min = 4;
    double count = 5;
    double sum = 6;
    double interpolation = 7;
    double stepInterpolation = 8;
    double continuousVariance = 9;
    double discreteVariance = 10;
    double totalVariation = 11;
    double countGood = 12;
    double countUncertain = 13;
    double countBad = 14;
    double durationGood = 15;
    double durationUncertain = 16;
    double durationBad = 17;
}

message AggregateDatapoints {
    repeated AggregateDatapoint datapoints = 1;
}
