Skip to content

Commit 82160b8

Browse files
committed
Use TimeIntervalFilter from common-api
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent 4787b1f commit 82160b8

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

proto/frequenz/api/dispatch/v1/dispatch.proto

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import "frequenz/api/common/v1/microgrid/components/ev_charger.proto";
2323
import "frequenz/api/common/v1/microgrid/components/inverter.proto";
2424
import "frequenz/api/common/v1/pagination/pagination_info.proto";
2525
import "frequenz/api/common/v1/pagination/pagination_params.proto";
26+
import "frequenz/api/common/v1/types/time_interval_filter.proto";
2627

2728
// Service providing operations related to dispatching microgrid components.
2829
//
@@ -204,15 +205,6 @@ message DispatchMetadata {
204205
google.protobuf.Timestamp end_time = 4;
205206
}
206207

207-
// Filter parameter for specifying multiple time intervals
208-
message TimeIntervalFilter {
209-
// Filter by time >= this UTC time.
210-
google.protobuf.Timestamp from_time = 1;
211-
212-
// Filter by time <= this UTC time.
213-
google.protobuf.Timestamp to_time = 2;
214-
}
215-
216208
// Parameters for filtering the dispatch list
217209
message DispatchFilter {
218210
// Recurrence filters
@@ -304,14 +296,14 @@ message DispatchFilter {
304296

305297
// Optional filter by start time.
306298
// If no interval is provided, all dispatches will be returned.
307-
TimeIntervalFilter start_time_interval = 6;
299+
frequenz.api.common.v1.types.TimeIntervalFilter start_time_interval = 6;
308300

309301
// Optional filter by end time
310302
// Filter dispatches based on their explicit end time.
311-
TimeIntervalFilter end_time_interval = 7;
303+
frequenz.api.common.v1.types.TimeIntervalFilter end_time_interval = 7;
312304

313305
// Optional filter by update time
314-
TimeIntervalFilter update_time_interval = 8;
306+
frequenz.api.common.v1.types.TimeIntervalFilter update_time_interval = 8;
315307
}
316308

317309
// Parameter for controlling which components a dispatch applies to

0 commit comments

Comments
 (0)