Skip to content

Commit 02bafdd

Browse files
committed
Split ActionGroup into base class and PersistedActionGroup subclass
1 parent 0c4299c commit 02bafdd

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

pyoverkiz/models.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,19 +509,25 @@ class ActionGroup:
509509
"""
510510

511511
actions: list[Action] = field(factory=list)
512-
creation_time: int | None = None
513-
last_update_time: int | None = None
514512
label: str | None = field(repr=obfuscate_string, default=None)
515513
metadata: str | None = None
516514
shortcut: bool | None = None
517515
notification_type_mask: int | None = None
518516
notification_condition: str | None = None
519517
notification_text: str | None = None
520518
notification_title: str | None = None
521-
oid: str | None = field(repr=obfuscate_id, default=None)
519+
520+
521+
@define(kw_only=True)
522+
class PersistedActionGroup(ActionGroup):
523+
"""A server-persisted action group returned by the /actionGroups endpoint."""
524+
525+
oid: str = field(repr=obfuscate_id)
526+
creation_time: int = 0
527+
last_update_time: int = 0
522528

523529
@property
524-
def id(self) -> str | None:
530+
def id(self) -> str:
525531
"""Alias for oid."""
526532
return self.oid
527533

0 commit comments

Comments
 (0)