Skip to content

Commit e1f255d

Browse files
Move "Dispatch" message definition to the top
This is the main "object" produced by the API, so it has been moved near to the top of the definitions file, for visibility. Signed-off-by: Stefan Brus <[email protected]>
1 parent dcba322 commit e1f255d

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

proto/frequenz/api/dispatch/dispatch.proto

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,42 @@ service DispatchService {
4242
}
4343
}
4444

45+
// Message representing one dispatch
46+
message Dispatch {
47+
// The dispatch identifier
48+
uint64 id = 1;
49+
50+
// The microgrid identifier
51+
uint64 microgrid_id = 2;
52+
53+
// The dispatch type.
54+
// Contains user-defined information about what "type" of dispatch this is.
55+
// Downstream applications that consume the dispatch API are responsible for
56+
// understanding and processing this field.
57+
string type = 3;
58+
59+
// The start time
60+
google.protobuf.Timestamp start_time = 4;
61+
62+
// The end time
63+
google.protobuf.Timestamp end_time = 5;
64+
65+
// The component selector
66+
DispatchComponentSelector selector = 6;
67+
68+
// The creation time
69+
google.protobuf.Timestamp create_time = 7;
70+
71+
// The "active" status
72+
bool is_active = 8;
73+
74+
// The "dry run" status
75+
bool is_dry_run = 9;
76+
77+
// The dispatch payload
78+
google.protobuf.Struct payload = 10;
79+
}
80+
4581
// Filter parameter for specifying multiple time intervals
4682
message TimeIntervalFilter {
4783
// Filter by start_time >= this timestamp
@@ -99,41 +135,6 @@ message DispatchFilter {
99135
optional bool is_dry_run = 7;
100136
}
101137

102-
// Message representing one dispatch
103-
message Dispatch {
104-
// The dispatch identifier
105-
uint64 id = 1;
106-
107-
// The microgrid identifier
108-
uint64 microgrid_id = 2;
109-
110-
// The dispatch type.
111-
// Contains user-defined information about what "type" of dispatch this is.
112-
// Downstream applications that consume the dispatch API are responsible for
113-
// understanding and processing this field.
114-
string type = 3;
115-
116-
// The start time
117-
google.protobuf.Timestamp start_time = 4;
118-
119-
// The end time
120-
google.protobuf.Timestamp end_time = 5;
121-
122-
// The component selector
123-
DispatchComponentSelector selector = 6;
124-
125-
// The creation time
126-
google.protobuf.Timestamp create_time = 7;
127-
128-
// The "active" status
129-
bool is_active = 8;
130-
131-
// The "dry run" status
132-
bool is_dry_run = 9;
133-
134-
// The dispatch payload
135-
google.protobuf.Struct payload = 10;
136-
}
137138

138139
// A list of dispatches
139140
message DispatchList {

0 commit comments

Comments
 (0)