File tree Expand file tree Collapse file tree 4 files changed +41
-2
lines changed
src/frequenz/client/common/v1alpha8 Expand file tree Collapse file tree 4 files changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ This release introduces the `v1alpha8` module to support a new API version.
1111## New Features
1212
1313- Provide access to new API using new ` v1alpha8 ` module.
14- <!-- Here goes the main new features and examples or instructions on how to use them -->
14+ - Mapping for the new ` Event ` message has been added.
1515
1616## Bug Fixes
1717
Original file line number Diff line number Diff line change 11# License: MIT
2- # Copyright © 2023 Frequenz Energy-as-a-Service GmbH
2+ # Copyright © 2025 Frequenz Energy-as-a-Service GmbH
33
44"""Frequenz microgrid definition."""
55
Original file line number Diff line number Diff line change 1+ # License: MIT
2+ # Copyright © 2025 Frequenz Energy-as-a-Service GmbH
3+
4+ """Type wrappers for the generated protobuf messages."""
5+
6+
7+ from enum import Enum
8+
9+ # pylint: disable-next=no-name-in-module
10+ from frequenz .api .common .v1alpha8 .streaming import event_pb2 as PBEvent
11+
12+
13+ class Event (Enum ):
14+ """Enum representing the type of streaming event."""
15+
16+ EVENT_UNSPECIFIED = PBEvent .EVENT_UNSPECIFIED
17+ """Unspecified event type."""
18+
19+ EVENT_CREATED = PBEvent .EVENT_CREATED
20+ """Event when a new resource is created."""
21+
22+ EVENT_UPDATED = PBEvent .EVENT_UPDATED
23+ """Event when an existing resource is updated."""
24+
25+ EVENT_DELETED = PBEvent .EVENT_DELETED
26+ """Event when a resource is deleted."""
Original file line number Diff line number Diff line change 1+ # License: MIT
2+ # Copyright © 2025 Frequenz Energy-as-a-Service GmbH
3+
4+ """Tests for the frequenz.client.common.v1alpha8.streaming package."""
5+
6+ from frequenz .client .common .enum_proto import enum_from_proto
7+ from frequenz .client .common .v1alpha8 .streaming import Event
8+
9+
10+ def test_event_enum () -> None :
11+ """Test the Event enum."""
12+ for event in Event :
13+ assert enum_from_proto (event .value , Event ) == event
You can’t perform that action at this time.
0 commit comments