64 lines
1.7 KiB
Python
64 lines
1.7 KiB
Python
from __future__ import annotations
|
|
|
|
from datetime import date, datetime
|
|
from typing import Literal
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
GrbRefreshLayerStatus = Literal[
|
|
"current",
|
|
"update_available",
|
|
"not_loaded",
|
|
"review_required",
|
|
"remote_unavailable",
|
|
]
|
|
|
|
|
|
class GrbRefreshLayerPlan(BaseModel):
|
|
theme: Literal["buildings", "roads", "water", "parcels"]
|
|
display_name: str
|
|
collections: list[str]
|
|
temporal_series_key: str
|
|
status: GrbRefreshLayerStatus
|
|
local_dataset_id: UUID | None = None
|
|
local_source_version: str | None = None
|
|
local_observed_at: datetime | None = None
|
|
local_imported_at: datetime | None = None
|
|
local_feature_count: int | None = None
|
|
local_size_bytes: int | None = None
|
|
retained_after_refresh: bool = True
|
|
action_message: str
|
|
|
|
|
|
class GrbRefreshPlanSummary(BaseModel):
|
|
layer_count: int
|
|
current_count: int
|
|
update_available_count: int
|
|
not_loaded_count: int
|
|
review_required_count: int
|
|
remote_unavailable_count: int
|
|
new_dataset_count_if_applied: int
|
|
retained_dataset_count: int
|
|
current_feature_count: int
|
|
current_size_bytes: int
|
|
|
|
|
|
class GrbRefreshPlan(BaseModel):
|
|
project_id: UUID
|
|
scope: str
|
|
generated_at: datetime
|
|
remote_status: str
|
|
remote_version: str | None = None
|
|
remote_edition_date: date | None = None
|
|
catalog_checked_at: datetime | None = None
|
|
summary: GrbRefreshPlanSummary
|
|
layers: list[GrbRefreshLayerPlan]
|
|
execution_mode: Literal["operator_stage_then_apply"] = "operator_stage_then_apply"
|
|
staging_required: bool = True
|
|
automatic_import: bool = False
|
|
destructive_replacement: bool = False
|
|
message: str
|
|
limitations: list[str]
|