Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions case_mapping/uco/observable.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,12 @@ def __init__(
self._bool_vars(**{"uco-observable:isSecure": is_secure})


class Device(ObservableObject):
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
self["@type"] = "uco-observable:Device"


class File(ObservableObject):
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion example.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _next_timestamp() -> datetime:
############################################
# A DeviceFacet and a OperatingSystemFacet #
############################################
device_camera = uco.observable.ObservableObject()
device_camera = uco.observable.Device()
manufacturer_nikon = uco.identity.Organization(name="Nikon")
bundle.append_to_uco_object(manufacturer_nikon)
device1 = uco.observable.DeviceFacet(manufacturer=manufacturer_nikon, model="D750")
Expand Down