-
Notifications
You must be signed in to change notification settings - Fork 2
/
simulation_service.proto
99 lines (82 loc) · 3.35 KB
/
simulation_service.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
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
98
99
syntax = "proto3";
package hiber.simulation;
import "base.proto";
import "modem.proto";
import "simulation.proto";
option java_multiple_files = false;
option java_package = "global.hiber.api.grpc.simulation";
option java_outer_classname = "SimulationServiceApi";
option go_package = ".;hiber";
/* Service to directly simulate device values.
* These simulations skip the entire message pipeline and directly insert values for devices.
* This can help with API integration and with demonstrations.
*/
service ValueSimulationService {
rpc ListValueSimulations (List.Request) returns (List.Response);
rpc UpdateValueSimulations (Update.Request) returns (Update.Response);
rpc DisableValueSimulations (Delete.Request) returns (Delete.Response);
}
message List {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
/* Select the modems to list. Optional, when omitted or empty everything is included. */
optional modem.ModemSelection modems = 2;
optional Pagination pagination = 3;
}
message Response {
repeated ValueSimulation simulations = 1;
Request request = 2;
Pagination.Result pagination = 3;
}
}
/* Create or update the modem value simulation for a selection of modems. */
message Update {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
/* Modems to create or update the value simulation for. */
modem.ModemSelection modems = 2;
/* Simulation is done using the configured output fields of a parser. */
string parser_identifier = 3;
/* List of fields to set simulation for. Number of values do not have to be the same for all fields. */
repeated ValueSimulation.ValueRotation values = 4;
oneof location {
/* Randomize modem location within the given area. */
Area random_location_in_area = 5;
/* Replace the list of locations to rotate through.
* This does not have to match the length of the message value rotation, if any.
* Note that this **replaces** the entire list of values, to ensure the order is maintained.
*/
ValueSimulation.LocationRotation replace_location_rotation = 6;
}
}
message Response {
repeated ValueSimulation simulations = 1;
Request request = 2;
}
}
message Delete {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
/* Apply deletion on simulations for devices/modems referenced by this ModemSelection. */
modem.ModemSelection modems = 2;
oneof field {
bool remove_all = 3;
/* Remove only the listed specific fields */
ValueSimulationSelection fields = 4;
}
}
message Response {
uint32 deleted = 1;
Request request = 2;
}
}
/* Selection for specific ValueSimulations. */
message ValueSimulationSelection {
/* Include only the listed specific fields */
repeated string fields = 1;
/* When set to true, includes location simulation */
optional bool location = 2;
}