diff --git a/nuon/models/__init__.py b/nuon/models/__init__.py index 3661dd03..f2ced8fd 100644 --- a/nuon/models/__init__.py +++ b/nuon/models/__init__.py @@ -670,6 +670,7 @@ from .state_install_state import StateInstallState from .state_install_state_inputs import StateInstallStateInputs from .state_org_state import StateOrgState +from .state_partial_name import StatePartialName from .state_runner_state import StateRunnerState from .state_sandbox_state import StateSandboxState from .state_sandbox_state_outputs import StateSandboxStateOutputs @@ -1313,6 +1314,7 @@ "StateInstallState", "StateInstallStateInputs", "StateOrgState", + "StatePartialName", "StateRunnerState", "StateSandboxState", "StateSandboxStateOutputs", diff --git a/nuon/models/app_install_state.py b/nuon/models/app_install_state.py index 6b2db3d8..527a0df5 100644 --- a/nuon/models/app_install_state.py +++ b/nuon/models/app_install_state.py @@ -7,6 +7,7 @@ from attrs import field as _attrs_field from ..models.app_install_state_generate_source import AppInstallStateGenerateSource +from ..models.state_partial_name import StatePartialName from ..types import UNSET, Unset if TYPE_CHECKING: @@ -28,6 +29,8 @@ class AppInstallState: id (str | Unset): install_id (str | Unset): stale_at (GenericsNullTime | Unset): + stale_partials (list[StatePartialName] | Unset): StalePartials lists which state partials are stale and need + regeneration on next read. triggered_by_id (str | Unset): triggered_by_type (str | Unset): updated_at (str | Unset): @@ -42,6 +45,7 @@ class AppInstallState: id: str | Unset = UNSET install_id: str | Unset = UNSET stale_at: GenericsNullTime | Unset = UNSET + stale_partials: list[StatePartialName] | Unset = UNSET triggered_by_id: str | Unset = UNSET triggered_by_type: str | Unset = UNSET updated_at: str | Unset = UNSET @@ -69,6 +73,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.stale_at, Unset): stale_at = self.stale_at.to_dict() + stale_partials: list[str] | Unset = UNSET + if not isinstance(self.stale_partials, Unset): + stale_partials = [] + for stale_partials_item_data in self.stale_partials: + stale_partials_item = stale_partials_item_data.value + stale_partials.append(stale_partials_item) + triggered_by_id = self.triggered_by_id triggered_by_type = self.triggered_by_type @@ -96,6 +107,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["install_id"] = install_id if stale_at is not UNSET: field_dict["stale_at"] = stale_at + if stale_partials is not UNSET: + field_dict["stale_partials"] = stale_partials if triggered_by_id is not UNSET: field_dict["triggered_by_id"] = triggered_by_id if triggered_by_type is not UNSET: @@ -138,6 +151,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: stale_at = GenericsNullTime.from_dict(_stale_at) + _stale_partials = d.pop("stale_partials", UNSET) + stale_partials: list[StatePartialName] | Unset = UNSET + if _stale_partials is not UNSET: + stale_partials = [] + for stale_partials_item_data in _stale_partials: + stale_partials_item = StatePartialName(stale_partials_item_data) + + stale_partials.append(stale_partials_item) + triggered_by_id = d.pop("triggered_by_id", UNSET) triggered_by_type = d.pop("triggered_by_type", UNSET) @@ -155,6 +177,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id=id, install_id=install_id, stale_at=stale_at, + stale_partials=stale_partials, triggered_by_id=triggered_by_id, triggered_by_type=triggered_by_type, updated_at=updated_at, diff --git a/nuon/models/state_partial_name.py b/nuon/models/state_partial_name.py new file mode 100644 index 00000000..d1f9ff49 --- /dev/null +++ b/nuon/models/state_partial_name.py @@ -0,0 +1,18 @@ +from enum import Enum + + +class StatePartialName(str, Enum): + ACTIONS = "actions" + APP = "app" + CLOUD = "cloud" + COMPONENTS = "components" + DOMAIN = "domain" + INPUTS = "inputs" + ORG = "org" + RUNNER = "runner" + SANDBOX = "sandbox" + SECRETS = "secrets" + STACK = "stack" + + def __str__(self) -> str: + return str(self.value) diff --git a/pyproject.toml b/pyproject.toml index d759508f..c7620162 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nuon" -version = "0.19.987" +version = "0.19.988" description = "A client library for accessing Nuon" authors = [] requires-python = ">=3.11" diff --git a/version.txt b/version.txt index b970383d..1da21cf6 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.19.987 +0.19.988