@@ -182,29 +182,40 @@ enum DataType {
182
182
183
183
message Payload {
184
184
185
+ message TypedValue {
186
+ optional DataType datatype = 1;
187
+ optional bool is_null = 2;
188
+
189
+ oneof value {
190
+ int32 int32_value = 3;
191
+ int64 int64_value = 4;
192
+ uint32 uint32_value = 5;
193
+ uint64 uint64_value = 6;
194
+ float float_value = 7;
195
+ double double_value = 8;
196
+ bool boolean_value = 9;
197
+ string string_value = 10;
198
+ bytes bytes_value = 11;
199
+ DataSet dataset_value = 12;
200
+ Template template_value = 13;
201
+ PropertySet propertyset_value = 14;
202
+ PropertySetList propertysets_value = 15;
203
+ TypedValueExtension extension_value = 16;
204
+ }
205
+
206
+ message TypedValueExtension {
207
+ extensions 1 to max;
208
+ }
209
+
210
+ extensions 17 to max;
211
+ }
212
+
185
213
message Template {
186
214
187
215
message Parameter {
188
- optional string name = 1;
189
- optional uint32 type = 2;
190
-
191
- oneof value {
192
- int32 int32_value = 3;
193
- int64 int64_value = 4;
194
- uint32 uint32_value = 5;
195
- uint64 uint64_value = 6;
196
- float float_value = 7;
197
- double double_value = 8;
198
- bool boolean_value = 9;
199
- string string_value = 10;
200
- bytes bytes_value = 11;
201
-
202
- ParameterValueExtension extension_value = 12;
203
- }
204
-
205
- message ParameterValueExtension {
206
- extensions 1 to max;
207
- }
216
+ optional string name = 1;
217
+ optional TypedValue typed_value = 2;
218
+ extensions 3 to max;
208
219
}
209
220
210
221
optional string version = 1; // The version of the Template to prevent mismatches
@@ -218,8 +229,8 @@ message Payload {
218
229
message DataSet {
219
230
220
231
message Column {
221
- optional string name = 1;
222
- optional uint32 type = 2;
232
+ optional string name = 1;
233
+ optional DataType datatype = 2;
223
234
224
235
// Only one type of repeated value shall be used per Column
225
236
repeated uint32 int_values = 3 [packed=true];
@@ -236,37 +247,9 @@ message Payload {
236
247
extensions 2 to max;
237
248
}
238
249
239
- message PropertyValue {
240
-
241
- optional uint32 type = 1;
242
- optional bool is_null = 2;
243
-
244
- oneof value {
245
- int32 int32_value = 3;
246
- int64 int64_value = 4;
247
- uint32 uint32_value = 5;
248
- uint64 uint64_value = 6;
249
- float float_value = 7;
250
- double double_value = 8;
251
- bool boolean_value = 9;
252
- string string_value = 10;
253
- bytes bytes_value = 11; // Bytes, File
254
- DataSet dataset_value = 12;
255
- PropertySet propertyset_value = 13;
256
- PropertySetList propertysets_value = 14; // List of Property Values
257
- PropertyValueExtension extension_value = 15;
258
- }
259
-
260
- message PropertyValueExtension {
261
- extensions 1 to max;
262
- }
263
-
264
- extensions 16 to max;
265
- }
266
-
267
250
message PropertySet {
268
251
repeated string keys = 1; // Names of the properties
269
- repeated PropertyValue values = 2;
252
+ repeated TypedValue values = 2; // The Property Values
270
253
extensions 3 to max;
271
254
}
272
255
@@ -309,27 +292,8 @@ message Payload {
309
292
optional bool is_null = 8; // If this is null - explicitly say so rather than using -1, false, etc for some datatypes.
310
293
optional MetaData metadata = 9; // Metadata for the Metric
311
294
optional PropertySet properties = 10; // Properties of the Metric
312
-
313
- oneof value {
314
- int32 int32_value = 11;
315
- int64 int64_value = 12;
316
- uint32 uint32_value = 13;
317
- uint64 uint64_value = 14;
318
- float float_value = 15;
319
- double double_value = 16;
320
- bool boolean_value = 17;
321
- string string_value = 18;
322
- bytes bytes_value = 19; // Bytes, File
323
- DataSet dataset_value = 20;
324
- Template template_value = 21;
325
- MetricValueExtension extension_value = 22;
326
- }
327
-
328
- message MetricValueExtension {
329
- extensions 1 to max;
330
- }
331
-
332
- extensions 23 to max;
295
+ optional TypedValue value = 11;
296
+ extensions 12 to max;
333
297
}
334
298
335
299
optional uint64 timestamp = 1; // Timestamp at message sending time
0 commit comments