-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinteractions.proto
More file actions
97 lines (85 loc) · 2.52 KB
/
interactions.proto
File metadata and controls
97 lines (85 loc) · 2.52 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
syntax = "proto3";
package Corona;
option csharp_namespace = "CovidSafe.API.v20200611.Protos";
// Geographic location at a point in time;
message Area {
// Geographic location coordinates;
Location location = 1;
// Radius, in meters, of coordinate coverage;
float radius_meters = 2;
// Alert start time;
int64 begin_time = 3;
// Alert end time;
int64 end_time = 4;
}
// Geographic location;
message Location {
// Latitude;
double latitude = 1;
// Longitude;
double longitude = 2;
}
// Message metadata object;
message MessageInfo {
// Unique Message identifier;
string message_id = 1;
// Message timestamp;
int64 message_timestamp = 2;
}
// Phone -> Server;
// Request for metadata of added or updated messages based on client timestamp;
message MessageListRequest {
// Region targeted by request;
Region region = 1;
// Timestamp of most recent API request from the client;
int64 last_query_time = 2;
}
// Server -> Phone;
// Collection of MessageInfo matching MessageListRequest;
message MessageListResponse {
// Matching Message metadata collection;
repeated MessageInfo message_info = 1;
// Latest Message timestamp included in the MessageInfo collection;
int64 max_response_timestamp = 2;
}
// Phone -> Server GetMessages(new_message_ids);
// Request to download the details of given query ids;
message MessageRequest {
// Collection of Message metadata, used to pull specific Message objects;
repeated MessageInfo requested_queries = 1;
}
// Server -> Phone (list of messages corresponding to touch points where
// infection can occur);
message MessageResponse {
// Collection of Narrowcast messages matching MessageRequest criteria
repeated NarrowcastMessage narrowcast_messages = 1;
}
// Phone <-> Server;
// Narrowcast Message object;
message NarrowcastMessage {
// Message displayed to user on match;
string user_message = 1;
// Area of infection risk;
Area area = 2;
}
// Geographic region quantized by precision of lat/long;
message Region {
// Latitude source, no decimal;
int32 latitude_prefix = 1;
// Longitude source, no decimal;
int32 longitude_prefix = 2;
// Mantissa mask/precision bits;
int32 precision = 3;
}
// Request error message;
message RequestValidationResult {
// Collection of individual request validation failures;
repeated RequestValidationFailure failures = 1;
}
// Individual request failure message;
message RequestValidationFailure {
// Validation error message;
string message = 1;
// Name of parameter failing validation;
string property = 2;
}