Skip to content

Commit 7ebe977

Browse files
committed
Rename component category fields for clarity
Add 'deprecated' suffix to old component_categories field and remove redundant '_types' suffix from component_categories_types field. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
1 parent 347f4e1 commit 7ebe977

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,13 @@ message DispatchFilter {
388388
message TargetComponents {
389389
// Wrapper for controlling dispatches with a set of component IDs
390390
// Required as we can't use `repeated` directly in a `oneof`
391-
message IdSet {
391+
message ElectricalComponentIdSelector {
392392
// Set of component IDs
393393
repeated uint64 ids = 1;
394394
}
395395

396-
// Deprecated: Use `CategoryTypeSet` instead
397-
message CategorySet {
396+
// Deprecated: Use `ElectricalComponentCategorySelector` instead
397+
message ElectricalComponentCategorySelectorDeprecated {
398398
option deprecated = true;
399399
// Set of component categories
400400
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components
@@ -403,15 +403,15 @@ message TargetComponents {
403403

404404
// Wrapper for controlling dispatches with a set of component categories and optional types
405405
// Required as we can't use `repeated` directly in a `oneof`
406-
message CategoryTypeSet {
406+
message ElectricalComponentCategorySelector {
407407
// Set of component categories
408-
repeated CategoryAndType categories = 1;
408+
repeated ComponentCategory categories = 1;
409409
}
410410

411411
// A tuple of a required category and an optional type
412412
// If a type is specified, it must be a valid type for the given category and
413413
// only components of that type will be targeted.
414-
message CategoryAndType {
414+
message ComponentCategory {
415415
// The category of the target component (required)
416416
frequenz.api.common.v1alpha8.microgrid.electrical_components
417417
.ElectricalComponentCategory category = 1;
@@ -437,15 +437,15 @@ message TargetComponents {
437437

438438
oneof components {
439439
// Set of component IDs
440-
IdSet component_ids = 1;
440+
ElectricalComponentIdSelector component_ids = 1;
441441

442442
// Deprecated: Component categories
443-
// Use `CategoryTypeSet` instead
443+
// Use `ElectricalComponentCategorySelector` instead
444444
// In future versions, this field will be removed.
445-
CategorySet component_categories = 2 [deprecated = true];
445+
ElectricalComponentCategorySelectorDeprecated component_categories_deprecated = 2 [deprecated = true];
446446

447447
// Component categories with optional types
448-
CategoryTypeSet component_categories_types = 3;
448+
ElectricalComponentCategorySelector component_categories = 3;
449449
}
450450
}
451451

0 commit comments

Comments
 (0)