feat(scada): require complete authorized investigation evidence
This commit is contained in:
+14
-2
@@ -106,8 +106,20 @@ class WindowInput(PageInput):
|
||||
|
||||
|
||||
class ScadaInput(WindowInput):
|
||||
device_ids: list[Id] = Field(min_length=1, max_length=20)
|
||||
field: Literal["monitored_value", "cleaned_value"] = "monitored_value"
|
||||
device_ids: list[Id] | None = Field(
|
||||
default=None, min_length=1, max_length=20,
|
||||
description="Omit to read the complete SCADA catalogue and all authorized readings in the window; explicit IDs select a paginated detail query.",
|
||||
)
|
||||
field: Literal["monitored_value", "cleaned_value"] = Field(
|
||||
default="monitored_value",
|
||||
description="Field for explicit-device detail queries; complete all-device reads return both raw and cleaned values.",
|
||||
)
|
||||
|
||||
@model_validator(mode="after")
|
||||
def complete_query_starts_at_zero(self):
|
||||
if self.device_ids is None and self.offset:
|
||||
raise ValueError("All-device SCADA queries read every page internally; offset must be zero")
|
||||
return self
|
||||
|
||||
|
||||
class BaselineSeriesInput(WindowInput):
|
||||
|
||||
Reference in New Issue
Block a user