2016-02-10 12:31:39 -08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
message Int {
|
|
|
|
int64 data = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message String {
|
|
|
|
string data = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Double {
|
2016-06-03 12:21:16 -07:00
|
|
|
double data = 1;
|
2016-02-10 12:31:39 -08:00
|
|
|
}
|
|
|
|
|
2016-06-03 12:11:30 -07:00
|
|
|
// Empty used to represent a None object
|
|
|
|
message Empty {
|
|
|
|
}
|
|
|
|
|
2016-06-03 12:21:16 -07:00
|
|
|
message Bool {
|
|
|
|
bool data = 1;
|
|
|
|
}
|
|
|
|
|
2016-06-10 16:32:48 -07:00
|
|
|
message Ref {
|
|
|
|
uint64 data = 1;
|
|
|
|
}
|
|
|
|
|
2016-02-10 12:31:39 -08:00
|
|
|
message PyObj {
|
2016-02-22 13:55:06 -08:00
|
|
|
bytes data = 1;
|
2016-02-10 12:31:39 -08:00
|
|
|
}
|
|
|
|
|
2016-02-22 13:55:06 -08:00
|
|
|
// Union of possible object types
|
2016-02-10 12:31:39 -08:00
|
|
|
message Obj {
|
|
|
|
String string_data = 1;
|
|
|
|
Int int_data = 2;
|
|
|
|
Double double_data = 3;
|
2016-06-03 12:21:16 -07:00
|
|
|
Bool bool_data = 10;
|
2016-03-15 18:30:11 -07:00
|
|
|
Tuple tuple_data = 7;
|
2016-03-10 12:35:31 -08:00
|
|
|
List list_data = 4;
|
2016-03-24 23:35:38 -07:00
|
|
|
Dict dict_data = 8;
|
2016-03-10 12:35:31 -08:00
|
|
|
Array array_data = 5;
|
2016-06-03 12:11:30 -07:00
|
|
|
Empty empty_data = 9;
|
2016-06-10 16:32:48 -07:00
|
|
|
Ref objref_data = 11;
|
2016-03-10 12:35:31 -08:00
|
|
|
PyObj pyobj_data = 6;
|
2016-02-10 12:31:39 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
message List {
|
2016-03-10 12:35:31 -08:00
|
|
|
repeated Obj elem = 1;
|
2016-02-10 12:31:39 -08:00
|
|
|
}
|
|
|
|
|
2016-03-15 18:30:11 -07:00
|
|
|
message Tuple {
|
|
|
|
repeated Obj elem = 1;
|
|
|
|
}
|
|
|
|
|
2016-03-24 23:35:38 -07:00
|
|
|
message DictEntry {
|
|
|
|
Obj key = 1;
|
|
|
|
Obj value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Dict {
|
|
|
|
repeated DictEntry elem = 1;
|
|
|
|
}
|
|
|
|
|
2016-02-10 12:31:39 -08:00
|
|
|
message Value {
|
2016-03-25 13:46:12 -07:00
|
|
|
uint64 ref = 1; // For pass by reference
|
|
|
|
Obj obj = 2; // For pass by value
|
2016-02-10 12:31:39 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
message Array {
|
|
|
|
repeated uint64 shape = 1;
|
2016-03-15 13:06:51 -07:00
|
|
|
sint64 dtype = 2;
|
2016-06-23 18:39:02 -07:00
|
|
|
bool is_scalar = 8;
|
2016-03-15 13:06:51 -07:00
|
|
|
repeated double double_data = 3;
|
|
|
|
repeated float float_data = 4;
|
|
|
|
repeated sint64 int_data = 5;
|
|
|
|
repeated uint64 uint_data = 6;
|
|
|
|
repeated uint64 objref_data = 7;
|
2016-02-10 12:31:39 -08:00
|
|
|
}
|