diff --git a/raillabel/json_format/stream_sync.py b/raillabel/json_format/stream_sync.py new file mode 100644 index 0000000..0be704c --- /dev/null +++ b/raillabel/json_format/stream_sync.py @@ -0,0 +1,27 @@ +# Copyright DB InfraGO AG and contributors +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +from decimal import Decimal + +from pydantic import BaseModel + + +class JSONStreamSync(BaseModel): + """Syncronization information of a stream in a frame.""" + + stream_properties: JSONStreamSyncProperties + uri: str | None + + +class JSONStreamSyncProperties(BaseModel): + """The sync information.""" + + sync: JSONStreamSyncTimestamp + + +class JSONStreamSyncTimestamp(BaseModel): + """The timestamp of a stream sync.""" + + timestamp: Decimal | str