Maintenance¤
Maintenance
dataclass
¤
Maintenance(
planned: tuple[PlannedTask, ...] = (),
completed: tuple[CompletedTask, ...] = (),
)
Represents the maintenance element in an equipment register.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
planned
|
tuple[PlannedTask, ...]
|
Maintenance tasks that are planned to be performed. |
()
|
completed
|
tuple[CompletedTask, ...]
|
Maintenance tasks that have been completed. |
()
|
completed
class-attribute
instance-attribute
¤
completed: tuple[CompletedTask, ...] = ()
Maintenance tasks that have been completed.
planned
class-attribute
instance-attribute
¤
planned: tuple[PlannedTask, ...] = ()
Maintenance tasks that are planned to be performed.
from_xml
classmethod
¤
from_xml(element: Element[str]) -> Maintenance
Convert an XML element into a Maintenance instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element
|
Element[str]
|
A maintenance XML element from an equipment register. |
required |
Returns:
Type | Description |
---|---|
Maintenance
|
The Maintenance instance. |
to_xml ¤
Convert the Maintenance class into an XML element.
Returns:
Type | Description |
---|---|
Element[str]
|
The Maintenance as an XML element. |