"""
An abstract Class for all classes
"""
+import uuid
from abc import ABC, abstractmethod
from typing import Any, TypedDict, cast
class ITop(TypedDict):
id: str
name: str
+ type: str
administrativeState: AdministrativeState
operationalState: OperationalState
lifeCycleState: LifeCycleState
default_value: ITop = {
"id": "be5229af-2660-4bae-8f2c-b9d0f788fad1",
"name": "NoName",
+ "type": "NoType",
"administrativeState": AdministrativeState.LOCKED,
"operationalState": OperationalState.DISABLED,
"lifeCycleState": LifeCycleState.PLANNED,
itop: ITop = self._to_itop_data(data)
self._id: str = itop["id"]
self._name: str = itop["name"]
+ self._type: str = itop["type"]
self._administrativeState: AdministrativeState = itop[
"administrativeState"
]
@property
def id(self) -> str:
- return self._id
+ return str(uuid.uuid5(uuid.NAMESPACE_DNS, self.name))
@id.setter
def id(self, value: str) -> None:
def name(self, value: str) -> None:
self._name = value
+ @property
+ def type(self) -> str:
+ return self._type
+
+ @type.setter
+ def type(self, value: str) -> None:
+ self._type = value
+
@property
def administrativeState(self) -> AdministrativeState:
return self._administrativeState