Skip to content

Commit

Permalink
feat: add JSONStreamSync
Browse files Browse the repository at this point in the history
  • Loading branch information
tklockau committed Nov 4, 2024
1 parent 183729a commit 4e261d6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions raillabel/json_format/stream_sync.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4e261d6

Please sign in to comment.