Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions nuon/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
AppRunnerJobExecutionOutputsOutputsAdditionalProperty,
)
from .app_runner_job_execution_result import AppRunnerJobExecutionResult
from .app_runner_job_execution_result_composite_error import AppRunnerJobExecutionResultCompositeError
from .app_runner_job_execution_result_error_metadata import AppRunnerJobExecutionResultErrorMetadata
from .app_runner_job_execution_status import AppRunnerJobExecutionStatus
from .app_runner_job_group import AppRunnerJobGroup
Expand Down Expand Up @@ -280,6 +281,7 @@
from .cctx_signal_context import CctxSignalContext
from .client_conversation import ClientConversation
from .compositeerrors_composite_error_data import CompositeerrorsCompositeErrorData
from .compositeerrors_hints import CompositeerrorsHints
from .compositeerrors_section import CompositeerrorsSection
from .compositeerrors_severity import CompositeerrorsSeverity
from .config_app_policy_engine import ConfigAppPolicyEngine
Expand Down Expand Up @@ -931,6 +933,7 @@
"AppRunnerJobExecutionOutputsOutputs",
"AppRunnerJobExecutionOutputsOutputsAdditionalProperty",
"AppRunnerJobExecutionResult",
"AppRunnerJobExecutionResultCompositeError",
"AppRunnerJobExecutionResultErrorMetadata",
"AppRunnerJobExecutionStatus",
"AppRunnerJobGroup",
Expand Down Expand Up @@ -1000,6 +1003,7 @@
"CctxSignalContext",
"ClientConversation",
"CompositeerrorsCompositeErrorData",
"CompositeerrorsHints",
"CompositeerrorsSection",
"CompositeerrorsSeverity",
"ConfigAppPolicyEngine",
Expand Down
24 changes: 23 additions & 1 deletion nuon/models/app_install_component.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from typing import TYPE_CHECKING, Any, TypeVar, cast

from attrs import define as _attrs_define
from attrs import field as _attrs_field
Expand Down Expand Up @@ -30,6 +30,9 @@ class AppInstallComponent:
created_at (str | Unset):
created_by_id (str | Unset):
drifted_object (AppDriftedObject | Unset):
enabled (bool | None | Unset): Enabled is the resolved enabled/disabled state for a toggleable component
on this install (from the synthetic enabled install input, falling back to
the component's default_enabled). It is nil for non-toggleable components.
helm_chart (AppHelmChart | Unset):
id (str | Unset):
install_deploys (list[AppInstallDeploy] | Unset):
Expand All @@ -47,6 +50,7 @@ class AppInstallComponent:
created_at: str | Unset = UNSET
created_by_id: str | Unset = UNSET
drifted_object: AppDriftedObject | Unset = UNSET
enabled: bool | None | Unset = UNSET
helm_chart: AppHelmChart | Unset = UNSET
id: str | Unset = UNSET
install_deploys: list[AppInstallDeploy] | Unset = UNSET
Expand Down Expand Up @@ -74,6 +78,12 @@ def to_dict(self) -> dict[str, Any]:
if not isinstance(self.drifted_object, Unset):
drifted_object = self.drifted_object.to_dict()

enabled: bool | None | Unset
if isinstance(self.enabled, Unset):
enabled = UNSET
else:
enabled = self.enabled

helm_chart: dict[str, Any] | Unset = UNSET
if not isinstance(self.helm_chart, Unset):
helm_chart = self.helm_chart.to_dict()
Expand Down Expand Up @@ -120,6 +130,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["created_by_id"] = created_by_id
if drifted_object is not UNSET:
field_dict["drifted_object"] = drifted_object
if enabled is not UNSET:
field_dict["enabled"] = enabled
if helm_chart is not UNSET:
field_dict["helm_chart"] = helm_chart
if id is not UNSET:
Expand Down Expand Up @@ -174,6 +186,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
else:
drifted_object = AppDriftedObject.from_dict(_drifted_object)

def _parse_enabled(data: object) -> bool | None | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(bool | None | Unset, data)

enabled = _parse_enabled(d.pop("enabled", UNSET))

_helm_chart = d.pop("helm_chart", UNSET)
helm_chart: AppHelmChart | Unset
if isinstance(_helm_chart, Unset):
Expand Down Expand Up @@ -227,6 +248,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
created_at=created_at,
created_by_id=created_by_id,
drifted_object=drifted_object,
enabled=enabled,
helm_chart=helm_chart,
id=id,
install_deploys=install_deploys,
Expand Down
18 changes: 18 additions & 0 deletions nuon/models/app_install_sandbox_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from ..models.app_policy_report import AppPolicyReport
from ..models.app_runner_job import AppRunnerJob
from ..models.app_workflow import AppWorkflow
from ..models.compositeerrors_composite_error_data import CompositeerrorsCompositeErrorData


T = TypeVar("T", bound="AppInstallSandboxRun")
Expand All @@ -31,6 +32,7 @@ class AppInstallSandboxRun:
action_workflow_runs (list[AppInstallActionWorkflowRun] | Unset):
app_sandbox_config (AppAppSandboxConfig | Unset):
applied_at (str | Unset): AppliedAt is set when the apply runner job completes successfully.
composite_error (CompositeerrorsCompositeErrorData | Unset):
created_at (str | Unset):
created_by (AppAccount | Unset):
created_by_id (str | Unset):
Expand All @@ -56,6 +58,7 @@ class AppInstallSandboxRun:
action_workflow_runs: list[AppInstallActionWorkflowRun] | Unset = UNSET
app_sandbox_config: AppAppSandboxConfig | Unset = UNSET
applied_at: str | Unset = UNSET
composite_error: CompositeerrorsCompositeErrorData | Unset = UNSET
created_at: str | Unset = UNSET
created_by: AppAccount | Unset = UNSET
created_by_id: str | Unset = UNSET
Expand Down Expand Up @@ -92,6 +95,10 @@ def to_dict(self) -> dict[str, Any]:

applied_at = self.applied_at

composite_error: dict[str, Any] | Unset = UNSET
if not isinstance(self.composite_error, Unset):
composite_error = self.composite_error.to_dict()

created_at = self.created_at

created_by: dict[str, Any] | Unset = UNSET
Expand Down Expand Up @@ -163,6 +170,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["app_sandbox_config"] = app_sandbox_config
if applied_at is not UNSET:
field_dict["applied_at"] = applied_at
if composite_error is not UNSET:
field_dict["composite_error"] = composite_error
if created_at is not UNSET:
field_dict["created_at"] = created_at
if created_by is not UNSET:
Expand Down Expand Up @@ -217,6 +226,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.app_policy_report import AppPolicyReport
from ..models.app_runner_job import AppRunnerJob
from ..models.app_workflow import AppWorkflow
from ..models.compositeerrors_composite_error_data import CompositeerrorsCompositeErrorData

d = dict(src_dict)
_action_workflow_runs = d.pop("action_workflow_runs", UNSET)
Expand All @@ -237,6 +247,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

applied_at = d.pop("applied_at", UNSET)

_composite_error = d.pop("composite_error", UNSET)
composite_error: CompositeerrorsCompositeErrorData | Unset
if isinstance(_composite_error, Unset):
composite_error = UNSET
else:
composite_error = CompositeerrorsCompositeErrorData.from_dict(_composite_error)

created_at = d.pop("created_at", UNSET)

_created_by = d.pop("created_by", UNSET)
Expand Down Expand Up @@ -325,6 +342,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
action_workflow_runs=action_workflow_runs,
app_sandbox_config=app_sandbox_config,
applied_at=applied_at,
composite_error=composite_error,
created_at=created_at,
created_by=created_by,
created_by_id=created_by_id,
Expand Down
23 changes: 23 additions & 0 deletions nuon/models/app_runner_job_execution_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from ..types import UNSET, Unset

if TYPE_CHECKING:
from ..models.app_runner_job_execution_result_composite_error import AppRunnerJobExecutionResultCompositeError
from ..models.app_runner_job_execution_result_error_metadata import AppRunnerJobExecutionResultErrorMetadata


Expand All @@ -19,6 +20,12 @@
class AppRunnerJobExecutionResult:
"""
Attributes:
composite_error (AppRunnerJobExecutionResultCompositeError | Unset): CompositeError is the typed, structured
error parsed from this execution's
failure output at write time. It is the canonical, execution-scoped store
for runner-driven composite errors: strictly 1:1 with the attempt and
never reused, so it cannot go stale across retries. Aggregate rows derive
their displayed error from the latest relevant result; they do not own it.
contents (str | Unset):
contents_display (str | Unset):
contents_display_gzip (str | Unset):
Expand All @@ -34,6 +41,7 @@ class AppRunnerJobExecutionResult:
updated_at (str | Unset):
"""

composite_error: AppRunnerJobExecutionResultCompositeError | Unset = UNSET
contents: str | Unset = UNSET
contents_display: str | Unset = UNSET
contents_display_gzip: str | Unset = UNSET
Expand All @@ -50,6 +58,10 @@ class AppRunnerJobExecutionResult:
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
composite_error: dict[str, Any] | Unset = UNSET
if not isinstance(self.composite_error, Unset):
composite_error = self.composite_error.to_dict()

contents = self.contents

contents_display = self.contents_display
Expand Down Expand Up @@ -81,6 +93,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if composite_error is not UNSET:
field_dict["composite_error"] = composite_error
if contents is not UNSET:
field_dict["contents"] = contents
if contents_display is not UNSET:
Expand Down Expand Up @@ -112,9 +126,17 @@ def to_dict(self) -> dict[str, Any]:

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.app_runner_job_execution_result_composite_error import AppRunnerJobExecutionResultCompositeError
from ..models.app_runner_job_execution_result_error_metadata import AppRunnerJobExecutionResultErrorMetadata

d = dict(src_dict)
_composite_error = d.pop("composite_error", UNSET)
composite_error: AppRunnerJobExecutionResultCompositeError | Unset
if isinstance(_composite_error, Unset):
composite_error = UNSET
else:
composite_error = AppRunnerJobExecutionResultCompositeError.from_dict(_composite_error)

contents = d.pop("contents", UNSET)

contents_display = d.pop("contents_display", UNSET)
Expand Down Expand Up @@ -147,6 +169,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
updated_at = d.pop("updated_at", UNSET)

app_runner_job_execution_result = cls(
composite_error=composite_error,
contents=contents,
contents_display=contents_display,
contents_display_gzip=contents_display_gzip,
Expand Down
53 changes: 53 additions & 0 deletions nuon/models/app_runner_job_execution_result_composite_error.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
from __future__ import annotations

from collections.abc import Mapping
from typing import Any, TypeVar

from attrs import define as _attrs_define
from attrs import field as _attrs_field

T = TypeVar("T", bound="AppRunnerJobExecutionResultCompositeError")


@_attrs_define
class AppRunnerJobExecutionResultCompositeError:
"""CompositeError is the typed, structured error parsed from this execution's
failure output at write time. It is the canonical, execution-scoped store
for runner-driven composite errors: strictly 1:1 with the attempt and
never reused, so it cannot go stale across retries. Aggregate rows derive
their displayed error from the latest relevant result; they do not own it.

"""

additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)

return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
app_runner_job_execution_result_composite_error = cls()

app_runner_job_execution_result_composite_error.additional_properties = d
return app_runner_job_execution_result_composite_error

@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())

def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]

def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value

def __delitem__(self, key: str) -> None:
del self.additional_properties[key]

def __contains__(self, key: str) -> bool:
return key in self.additional_properties
Loading
Loading