Skip to content

Commit 546ca01

Browse files
committed
Rename Timestamp fields to follow Protobuf guidelines
- modification_time → update_time - from → from_time - to → to_time - until → until_time Aligns field names with Protobuf best practices for clarity and consistency. Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent ce7607f commit 546ca01

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

RELEASE_NOTES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ This update introduces the possibility to target specific types of batteries, in
88

99
* In the `TargetComponents` message, the field `components.component_categories` is now deprecated. See the upgrading section for details.
1010

11+
## Changes
12+
13+
* Renamed several `google.protobuf.Timestamp` fields in Protobuf messages to align with Google API Design Guide naming conventions (`*_time` suffix):
14+
* `DispatchMetadata.modification_time` is now `update_time`.
15+
* `TimeIntervalFilter.from` is now `from_time`.
16+
* `TimeIntervalFilter.to` is now `to_time`.
17+
* `RecurrenceRule.EndCriteria.until` is now `until_time`.
18+
* **Note:** This is a breaking change for clients using the old field names.
19+
1120
## Upgrading
1221

1322
* The `TargetComponents` message now accepts an optional `type` too. `.components.component_categories` is now deprecated. Instead `.components.component_categories_types`, a new `CategoryAndType` message that has a required `category` (`ComponentCategory`) and an optional `type` (`oneof BatteryType, EVChargerType, InverterType`) should be used.

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ message DispatchMetadata {
194194
// UTC Timestamp when the order was created.
195195
google.protobuf.Timestamp create_time = 2;
196196

197-
// UTC Timestamp of the last update to the order.
198-
google.protobuf.Timestamp modification_time = 3;
197+
// UTC time of the last update to the order.
198+
google.protobuf.Timestamp update_time = 3;
199199

200200
// UTC Timestamp when the dispatch will stop working.
201201
// Will be calculated internally based on the given: start_time,
@@ -206,11 +206,11 @@ message DispatchMetadata {
206206

207207
// Filter parameter for specifying multiple time intervals
208208
message TimeIntervalFilter {
209-
// Filter by time >= this UTC timestamp.
210-
google.protobuf.Timestamp from = 1;
209+
// Filter by time >= this UTC time.
210+
google.protobuf.Timestamp from_time = 1;
211211

212-
// Filter by time <= this UTC timestamp.
213-
google.protobuf.Timestamp to = 2;
212+
// Filter by time <= this UTC time.
213+
google.protobuf.Timestamp to_time = 2;
214214
}
215215

216216
// Parameters for filtering the dispatch list
@@ -476,7 +476,7 @@ message RecurrenceRule {
476476
// timestamp.
477477
// Note that the duration of the event is not considered in this value,
478478
// so the dispatch may end after the timestamp.
479-
google.protobuf.Timestamp until = 2;
479+
google.protobuf.Timestamp until_time = 2;
480480
}
481481
}
482482

0 commit comments

Comments
 (0)