-
Notifications
You must be signed in to change notification settings - Fork 2
/
temporary_data_proto2.proto
39 lines (35 loc) · 1.53 KB
/
temporary_data_proto2.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2021 OTA Insight Ltd
//
// 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.
syntax = "proto2";
package main;
option go_package = "github.com/OTA-Insight/bqwriter/internal/test/main";
// NOTE: The proto well-known types aren't yet properly supported,
// and Timestamp is among them. The public docs have a section on wire format conversions:
// https://cloud.google.com/bigquery/docs/write-api#data_type_conversions.
// Short answer: use an int64 with epoch-micros for fields that have the Timestamp type...
// import "google/protobuf/timestamp.proto";
message TemporaryDataParameterProto2 {
optional string name = 1;
optional string value = 2;
}
message TemporaryDataProto2 {
optional string name = 1;
optional int64 uuid = 2;
// NOTE: should be of type google.protobuf.Timestamp,
// but these known types aren't supported yet, instead it needs to be
// sent over the wire as microseconds epoch
optional int64 timestamp = 3;
optional bool truth = 4;
repeated TemporaryDataParameterProto2 parameters = 5;
}