// Copyright 2016 Prometheus Team
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// This file was taken from https://github.com/prometheus/prometheus/blob/master/prompb/remote.proto
// and modified to include only the relevant definitions for Remote Write (removing Read)
// Also removed usage of nullable annotation of GoGo - Go lang library for generating code from protobuf
// which is not relevant for us (also since those files are not in the source, and a few hours
// weren't enough to try to get `make proto` to actually work on the prometheus repo)

syntax = "proto3";


message Sample {
  double value    = 1;
  // Asaf: Renamed to TimestampMillis from Timestamp to clarify this is millisecond unit
  int64 timestampMillis = 2;
}

// TimeSeries represents samples and labels for a single time series.
message TimeSeries {
  repeated Label labels   = 1 ;
  repeated Sample samples = 2 ;
}

message Label {
  string name  = 1;
  string value = 2;
}

message WriteRequest {
  repeated TimeSeries timeseries = 1 ;
}