Skip to content

Commit b381f11

Browse files
committed
Update proto types to alpha8
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent bf1c380 commit b381f11

File tree

2 files changed

+28
-27
lines changed

2 files changed

+28
-27
lines changed

RELEASE_NOTES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
## Summary
44

5-
<!-- Here goes a general summary of what this release is about -->
5+
- Updated all `frequenz.api.common` imports from `v1` to `v1alpha8`.
6+
- Removed the `TimeIntervalFilter` message, replacing its usage with the new `frequenz.api.common.v1alpha8.types.Interval` type.
7+
- In the `DispatchFilter` message, the `start_time_interval`, `end_time_interval`, and `update_time_interval` fields were updated to use the new `Interval` type.
8+
- In the `TargetComponents` message:
9+
- The `CategorySet` message's `categories` field was updated to use the new `ElectricalComponentCategory` enum.
10+
- The `CategoryAndType` message's `category` field was also updated to use the new `ElectricalComponentCategory` enum, and the nested `battery`, `inverter`, and `ev_charger` fields were updated to use their corresponding new types.
11+
- The `ListMicrogridDispatchesRequest` message's `pagination_params` field was updated to use the new `PaginationParams` type.
12+
- The `ListMicrogridDispatchesResponse` message's `pagination_info` field was updated to use the new `PaginationInfo` type.
13+
614

715
## Upgrading
816

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

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ import "google/protobuf/field_mask.proto";
1717
import "google/protobuf/struct.proto";
1818
import "google/protobuf/timestamp.proto";
1919

20-
import "frequenz/api/common/v1/microgrid/components/battery.proto";
21-
import "frequenz/api/common/v1/microgrid/components/components.proto";
22-
import "frequenz/api/common/v1/microgrid/components/ev_charger.proto";
23-
import "frequenz/api/common/v1/microgrid/components/inverter.proto";
24-
import "frequenz/api/common/v1/pagination/pagination_info.proto";
25-
import "frequenz/api/common/v1/pagination/pagination_params.proto";
20+
import "frequenz/api/common/v1alpha8/microgrid/electrical_components/electrical_components.proto";
21+
import "frequenz/api/common/v1alpha8/pagination/pagination_info.proto";
22+
import "frequenz/api/common/v1alpha8/pagination/pagination_params.proto";
23+
import "frequenz/api/common/v1alpha8/types/interval.proto";
2624

2725
// Service providing operations related to dispatching microgrid components.
2826
//
@@ -204,15 +202,6 @@ message DispatchMetadata {
204202
google.protobuf.Timestamp end_time = 4;
205203
}
206204

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-
216205
// Parameters for filtering the dispatch list
217206
message DispatchFilter {
218207
// Recurrence filters
@@ -304,14 +293,14 @@ message DispatchFilter {
304293

305294
// Optional filter by start time.
306295
// If no interval is provided, all dispatches will be returned.
307-
TimeIntervalFilter start_time_interval = 6;
296+
frequenz.api.common.v1alpha8.types.Interval start_time_interval = 6;
308297

309298
// Optional filter by end time
310299
// Filter dispatches based on their explicit end time.
311-
TimeIntervalFilter end_time_interval = 7;
300+
frequenz.api.common.v1alpha8.types.Interval end_time_interval = 7;
312301

313302
// Optional filter by update time
314-
TimeIntervalFilter update_time_interval = 8;
303+
frequenz.api.common.v1alpha8.types.Interval update_time_interval = 8;
315304
}
316305

317306
// Parameter for controlling which components a dispatch applies to
@@ -336,11 +325,11 @@ message TargetComponents {
336325
repeated uint64 ids = 1;
337326
}
338327

339-
340328
// Deprecated: Use `CategoryTypeSet` instead
341329
message CategorySet {
342330
// Set of component categories
343-
repeated frequenz.api.common.v1.microgrid.components.ComponentCategory categories = 1;
331+
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components
332+
.ElectricalComponentCategory categories = 1;
344333
}
345334

346335
// Wrapper for controlling dispatches with a set of component categories and optional types
@@ -355,21 +344,25 @@ message TargetComponents {
355344
// only components of that type will be targeted.
356345
message CategoryAndType {
357346
// The category of the target component (required)
358-
frequenz.api.common.v1.microgrid.components.ComponentCategory category = 1;
347+
frequenz.api.common.v1alpha8.microgrid.electrical_components
348+
.ElectricalComponentCategory category = 1;
359349

360350
// The type of the target component (optional)
361351
oneof type {
362352
// The type of battery
363353
// Only applicable if the category is COMPONENT_CATEGORY_BATTERY
364-
frequenz.api.common.v1.microgrid.components.BatteryType battery = 2;
354+
frequenz.api.common.v1alpha8.microgrid.electrical_components.BatteryType
355+
battery = 2;
365356

366357
// The type of solar array
367358
// Only applicable if the category is COMPONENT_CATEGORY_INVERTER
368-
frequenz.api.common.v1.microgrid.components.InverterType inverter = 3;
359+
frequenz.api.common.v1alpha8.microgrid.electrical_components.InverterType
360+
inverter = 3;
369361

370362
// The type of EV charger
371363
// Only applicable if the category is COMPONENT_CATEGORY_EV_CHARGER
372-
frequenz.api.common.v1.microgrid.components.EvChargerType ev_charger = 4;
364+
frequenz.api.common.v1alpha8.microgrid.electrical_components.EvChargerType
365+
ev_charger = 4;
373366
}
374367
}
375368

@@ -577,7 +570,7 @@ message ListMicrogridDispatchesRequest {
577570
// Should be populated in subsequent requests by the `next_page_token` found in
578571
// the `pagination_info` in the response.
579572
// The tokens stays valid indefinitely.
580-
frequenz.api.common.v1.pagination.PaginationParams pagination_params = 4;
573+
frequenz.api.common.v1alpha8.pagination.PaginationParams pagination_params = 4;
581574
}
582575

583576
// A list of dispatches
@@ -589,7 +582,7 @@ message ListMicrogridDispatchesResponse {
589582
// total_items: Total amount of entries found by the list request.
590583
// next_page_token: Token that can be used to request the next page.
591584
// Will be unset if no further pages exist.
592-
frequenz.api.common.v1.pagination.PaginationInfo pagination_info = 2;
585+
frequenz.api.common.v1alpha8.pagination.PaginationInfo pagination_info = 2;
593586
}
594587

595588

0 commit comments

Comments
 (0)