diff --git a/nuon/models/__init__.py b/nuon/models/__init__.py index cf31a8a8..3a043208 100644 --- a/nuon/models/__init__.py +++ b/nuon/models/__init__.py @@ -102,7 +102,6 @@ from .app_install_component_links import AppInstallComponentLinks from .app_install_component_statuses import AppInstallComponentStatuses from .app_install_config import AppInstallConfig -from .app_install_config_component_toggles import AppInstallConfigComponentToggles from .app_install_config_update import AppInstallConfigUpdate from .app_install_deploy import AppInstallDeploy from .app_install_deploy_outputs import AppInstallDeployOutputs @@ -824,7 +823,6 @@ "AppInstallComponentLinks", "AppInstallComponentStatuses", "AppInstallConfig", - "AppInstallConfigComponentToggles", "AppInstallConfigUpdate", "AppInstallDeploy", "AppInstallDeployOutputs", diff --git a/nuon/models/app_install_component.py b/nuon/models/app_install_component.py index ef42b0f3..71588583 100644 --- a/nuon/models/app_install_component.py +++ b/nuon/models/app_install_component.py @@ -30,6 +30,9 @@ class AppInstallComponent: created_at (str | Unset): created_by_id (str | Unset): drifted_object (AppDriftedObject | Unset): + enabled (bool | 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): @@ -47,6 +50,7 @@ class AppInstallComponent: created_at: str | Unset = UNSET created_by_id: str | Unset = UNSET drifted_object: AppDriftedObject | Unset = UNSET + enabled: bool | Unset = UNSET helm_chart: AppHelmChart | Unset = UNSET id: str | Unset = UNSET install_deploys: list[AppInstallDeploy] | Unset = UNSET @@ -74,6 +78,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.drifted_object, Unset): drifted_object = self.drifted_object.to_dict() + enabled = self.enabled + helm_chart: dict[str, Any] | Unset = UNSET if not isinstance(self.helm_chart, Unset): helm_chart = self.helm_chart.to_dict() @@ -120,6 +126,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: @@ -174,6 +182,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: drifted_object = AppDriftedObject.from_dict(_drifted_object) + enabled = d.pop("enabled", UNSET) + _helm_chart = d.pop("helm_chart", UNSET) helm_chart: AppHelmChart | Unset if isinstance(_helm_chart, Unset): @@ -227,6 +237,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, diff --git a/nuon/models/app_install_config.py b/nuon/models/app_install_config.py index bba67c4c..624c7fe3 100644 --- a/nuon/models/app_install_config.py +++ b/nuon/models/app_install_config.py @@ -10,7 +10,6 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.app_install_config_component_toggles import AppInstallConfigComponentToggles from ..models.config_custom_nested_stack import ConfigCustomNestedStack from ..models.github_com_nuonco_nuon_pkg_labels_labels import GithubComNuoncoNuonPkgLabelsLabels @@ -23,7 +22,6 @@ class AppInstallConfig: """ Attributes: approval_option (AppInstallApprovalOption | Unset): - component_toggles (AppInstallConfigComponentToggles | Unset): created_at (str | Unset): created_by_id (str | Unset): custom_nested_stacks (list[ConfigCustomNestedStack] | Unset): @@ -37,7 +35,6 @@ class AppInstallConfig: """ approval_option: AppInstallApprovalOption | Unset = UNSET - component_toggles: AppInstallConfigComponentToggles | Unset = UNSET created_at: str | Unset = UNSET created_by_id: str | Unset = UNSET custom_nested_stacks: list[ConfigCustomNestedStack] | Unset = UNSET @@ -55,10 +52,6 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.approval_option, Unset): approval_option = self.approval_option.value - component_toggles: dict[str, Any] | Unset = UNSET - if not isinstance(self.component_toggles, Unset): - component_toggles = self.component_toggles.to_dict() - created_at = self.created_at created_by_id = self.created_by_id @@ -91,8 +84,6 @@ def to_dict(self) -> dict[str, Any]: field_dict.update({}) if approval_option is not UNSET: field_dict["approval_option"] = approval_option - if component_toggles is not UNSET: - field_dict["component_toggles"] = component_toggles if created_at is not UNSET: field_dict["created_at"] = created_at if created_by_id is not UNSET: @@ -118,7 +109,6 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.app_install_config_component_toggles import AppInstallConfigComponentToggles from ..models.config_custom_nested_stack import ConfigCustomNestedStack from ..models.github_com_nuonco_nuon_pkg_labels_labels import GithubComNuoncoNuonPkgLabelsLabels @@ -130,13 +120,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: approval_option = AppInstallApprovalOption(_approval_option) - _component_toggles = d.pop("component_toggles", UNSET) - component_toggles: AppInstallConfigComponentToggles | Unset - if isinstance(_component_toggles, Unset): - component_toggles = UNSET - else: - component_toggles = AppInstallConfigComponentToggles.from_dict(_component_toggles) - created_at = d.pop("created_at", UNSET) created_by_id = d.pop("created_by_id", UNSET) @@ -171,7 +154,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_install_config = cls( approval_option=approval_option, - component_toggles=component_toggles, created_at=created_at, created_by_id=created_by_id, custom_nested_stacks=custom_nested_stacks, diff --git a/nuon/models/app_install_config_component_toggles.py b/nuon/models/app_install_config_component_toggles.py deleted file mode 100644 index d290a11e..00000000 --- a/nuon/models/app_install_config_component_toggles.py +++ /dev/null @@ -1,47 +0,0 @@ -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="AppInstallConfigComponentToggles") - - -@_attrs_define -class AppInstallConfigComponentToggles: - """ """ - - additional_properties: dict[str, bool] = _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_install_config_component_toggles = cls() - - app_install_config_component_toggles.additional_properties = d - return app_install_config_component_toggles - - @property - def additional_keys(self) -> list[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> bool: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: bool) -> 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 diff --git a/nuon/models/service_toggle_install_component_request.py b/nuon/models/service_toggle_install_component_request.py index 622c62cc..10763238 100644 --- a/nuon/models/service_toggle_install_component_request.py +++ b/nuon/models/service_toggle_install_component_request.py @@ -15,30 +15,26 @@ class ServiceToggleInstallComponentRequest: """ Attributes: - enabled (bool | Unset): - plan_only (bool | Unset): + enabled (bool): role (str | Unset): """ - enabled: bool | Unset = UNSET - plan_only: bool | Unset = UNSET + enabled: bool role: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: enabled = self.enabled - plan_only = self.plan_only - role = self.role field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) - if enabled is not UNSET: - field_dict["enabled"] = enabled - if plan_only is not UNSET: - field_dict["plan_only"] = plan_only + field_dict.update( + { + "enabled": enabled, + } + ) if role is not UNSET: field_dict["role"] = role @@ -47,15 +43,12 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - enabled = d.pop("enabled", UNSET) - - plan_only = d.pop("plan_only", UNSET) + enabled = d.pop("enabled") role = d.pop("role", UNSET) service_toggle_install_component_request = cls( enabled=enabled, - plan_only=plan_only, role=role, ) diff --git a/pyproject.toml b/pyproject.toml index 1e56e6c8..014a718a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nuon" -version = "0.19.1015" +version = "0.19.1016" description = "A client library for accessing Nuon" authors = [] requires-python = ">=3.11" diff --git a/version.txt b/version.txt index 4c9113eb..b6ed42ea 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.19.1015 +0.19.1016