diff --git a/nuon/api/accounts/__init__.py b/nuon/api/accounts/__init__.py new file mode 100644 index 00000000..2d7c0b23 --- /dev/null +++ b/nuon/api/accounts/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/nuon/api/accounts/complete_user_journey.py b/nuon/api/accounts/complete_user_journey.py new file mode 100644 index 00000000..f5dd7ded --- /dev/null +++ b/nuon/api/accounts/complete_user_journey.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + journey_name: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/account/user-journeys/{journey_name}/complete", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Complete all steps in a specific user journey + + Mark all remaining steps in the specified user journey as complete + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Complete all steps in a specific user journey + + Mark all remaining steps in the specified user journey as complete + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + journey_name=journey_name, + client=client, + ).parsed + + +async def asyncio_detailed( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Complete all steps in a specific user journey + + Mark all remaining steps in the specified user journey as complete + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Complete all steps in a specific user journey + + Mark all remaining steps in the specified user journey as complete + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + journey_name=journey_name, + client=client, + ) + ).parsed diff --git a/nuon/api/accounts/create_user_journey.py b/nuon/api/accounts/create_user_journey.py new file mode 100644 index 00000000..3d91f21c --- /dev/null +++ b/nuon/api/accounts/create_user_journey.py @@ -0,0 +1,188 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.service_create_user_journey_request import ServiceCreateUserJourneyRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateUserJourneyRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/account/user-journeys", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppAccount.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateUserJourneyRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Create a new user journey for account + + Add a new user journey with steps to track user progress + + Args: + body (ServiceCreateUserJourneyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateUserJourneyRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Create a new user journey for account + + Add a new user journey with steps to track user progress + + Args: + body (ServiceCreateUserJourneyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateUserJourneyRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Create a new user journey for account + + Add a new user journey with steps to track user progress + + Args: + body (ServiceCreateUserJourneyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateUserJourneyRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Create a new user journey for account + + Add a new user journey with steps to track user progress + + Args: + body (ServiceCreateUserJourneyRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/accounts/get_current_account.py b/nuon/api/accounts/get_current_account.py new file mode 100644 index 00000000..b66fbe3c --- /dev/null +++ b/nuon/api/accounts/get_current_account.py @@ -0,0 +1,147 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/account", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Get current account + + Get the current account with user journeys and other data + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Get current account + + Get the current account with user journeys and other data + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Get current account + + Get the current account with user journeys and other data + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Get current account + + Get the current account with user journeys and other data + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/accounts/get_user_journeys.py b/nuon/api/accounts/get_user_journeys.py new file mode 100644 index 00000000..47ef0efa --- /dev/null +++ b/nuon/api/accounts/get_user_journeys.py @@ -0,0 +1,160 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_user_journey import AppUserJourney +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/account/user-journeys", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppUserJourney"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppUserJourney.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppUserJourney"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppUserJourney"]]]: + """Get user journeys + + Get all user journeys for the current user account + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppUserJourney']]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppUserJourney"]]]: + """Get user journeys + + Get all user journeys for the current user account + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppUserJourney']] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppUserJourney"]]]: + """Get user journeys + + Get all user journeys for the current user account + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppUserJourney']]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppUserJourney"]]]: + """Get user journeys + + Get all user journeys for the current user account + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppUserJourney']] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/nuon/api/accounts/reset_user_journey.py b/nuon/api/accounts/reset_user_journey.py new file mode 100644 index 00000000..8c50d2db --- /dev/null +++ b/nuon/api/accounts/reset_user_journey.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + journey_name: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/account/user-journeys/{journey_name}/reset", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Reset user journey steps + + Reset all steps in a specified user journey by setting their completion status to false + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Reset user journey steps + + Reset all steps in a specified user journey by setting their completion status to false + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + journey_name=journey_name, + client=client, + ).parsed + + +async def asyncio_detailed( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Reset user journey steps + + Reset all steps in a specified user journey by setting their completion status to false + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + journey_name: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Reset user journey steps + + Reset all steps in a specified user journey by setting their completion status to false + + Args: + journey_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + journey_name=journey_name, + client=client, + ) + ).parsed diff --git a/nuon/api/accounts/update_user_journey_step.py b/nuon/api/accounts/update_user_journey_step.py new file mode 100644 index 00000000..79d77ea1 --- /dev/null +++ b/nuon/api/accounts/update_user_journey_step.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_account import AppAccount +from ...models.service_update_user_journey_step_request import ServiceUpdateUserJourneyStepRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + journey_name: str, + step_name: str, + *, + body: ServiceUpdateUserJourneyStepRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/account/user-journeys/{journey_name}/steps/{step_name}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppAccount, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppAccount.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppAccount, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + journey_name: str, + step_name: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateUserJourneyStepRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Update user journey step completion status + + Mark a user journey step as complete or incomplete + + Args: + journey_name (str): + step_name (str): + body (ServiceUpdateUserJourneyStepRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + step_name=step_name, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + journey_name: str, + step_name: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateUserJourneyStepRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Update user journey step completion status + + Mark a user journey step as complete or incomplete + + Args: + journey_name (str): + step_name (str): + body (ServiceUpdateUserJourneyStepRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return sync_detailed( + journey_name=journey_name, + step_name=step_name, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + journey_name: str, + step_name: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateUserJourneyStepRequest, +) -> Response[Union[AppAccount, StderrErrResponse]]: + """Update user journey step completion status + + Mark a user journey step as complete or incomplete + + Args: + journey_name (str): + step_name (str): + body (ServiceUpdateUserJourneyStepRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppAccount, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + journey_name=journey_name, + step_name=step_name, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + journey_name: str, + step_name: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateUserJourneyStepRequest, +) -> Optional[Union[AppAccount, StderrErrResponse]]: + """Update user journey step completion status + + Mark a user journey step as complete or incomplete + + Args: + journey_name (str): + step_name (str): + body (ServiceUpdateUserJourneyStepRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppAccount, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + journey_name=journey_name, + step_name=step_name, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/create_action_config.py b/nuon/api/actions/create_action_config.py new file mode 100644 index 00000000..9b35b245 --- /dev/null +++ b/nuon/api/actions/create_action_config.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.service_create_action_workflow_config_request import ServiceCreateActionWorkflowConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, + *, + body: ServiceCreateActionWorkflowConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/actions/{action_id}/configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppActionWorkflowConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action config + + Args: + app_id (str): + action_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action config + + Args: + app_id (str): + action_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action config + + Args: + app_id (str): + action_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateActionWorkflowConfigRequest, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """create action config + + Args: + app_id (str): + action_id (str): + body (ServiceCreateActionWorkflowConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/create_app_action.py b/nuon/api/actions/create_app_action.py new file mode 100644 index 00000000..ff5b1fb0 --- /dev/null +++ b/nuon/api/actions/create_app_action.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.service_create_app_action_request import ServiceCreateAppActionRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppActionRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/actions", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppActionWorkflow.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action + + Args: + app_id (str): + body (ServiceCreateAppActionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action + + Args: + app_id (str): + body (ServiceCreateAppActionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action + + Args: + app_id (str): + body (ServiceCreateAppActionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppActionRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """create an app action + + Args: + app_id (str): + body (ServiceCreateAppActionRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/create_app_action_workflow.py b/nuon/api/actions/create_app_action_workflow.py index 753a4564..26dbb267 100644 --- a/nuon/api/actions/create_app_action_workflow.py +++ b/nuon/api/actions/create_app_action_workflow.py @@ -81,7 +81,7 @@ def sync_detailed( client: AuthenticatedClient, body: ServiceCreateAppActionWorkflowRequest, ) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """create an app + """create an app action workflow Args: app_id (str): @@ -113,7 +113,7 @@ def sync( client: AuthenticatedClient, body: ServiceCreateAppActionWorkflowRequest, ) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """create an app + """create an app action workflow Args: app_id (str): @@ -140,7 +140,7 @@ async def asyncio_detailed( client: AuthenticatedClient, body: ServiceCreateAppActionWorkflowRequest, ) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """create an app + """create an app action workflow Args: app_id (str): @@ -170,7 +170,7 @@ async def asyncio( client: AuthenticatedClient, body: ServiceCreateAppActionWorkflowRequest, ) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """create an app + """create an app action workflow Args: app_id (str): diff --git a/nuon/api/actions/create_install_action_run.py b/nuon/api/actions/create_install_action_run.py new file mode 100644 index 00000000..64df569e --- /dev/null +++ b/nuon/api/actions/create_install_action_run.py @@ -0,0 +1,203 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_create_install_action_workflow_run_request import ServiceCreateInstallActionWorkflowRunRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + *, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/installs/{install_id}/actions/runs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 201: + response_201 = cast(str, response.json()) + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Response[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + install_id=install_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Response[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateInstallActionWorkflowRunRequest, +) -> Optional[Union[StderrErrResponse, str]]: + """create an action workflow run for an install + + AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses + currently install id to lookup related appworkflowconfigId + + Args: + install_id (str): + body (ServiceCreateInstallActionWorkflowRunRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/actions/delete_action.py b/nuon/api/actions/delete_action.py new file mode 100644 index 00000000..ef684ab7 --- /dev/null +++ b/nuon/api/actions/delete_action.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + action_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/actions/{action_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an action + + Args: + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + action_id=action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an action + + Args: + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + action_id=action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete an action + + Args: + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + action_id=action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete an action + + Args: + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + action_id=action_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/delete_action_workflow.py b/nuon/api/actions/delete_action_workflow.py index a2a139d7..45d874f3 100644 --- a/nuon/api/actions/delete_action_workflow.py +++ b/nuon/api/actions/delete_action_workflow.py @@ -68,7 +68,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[StderrErrResponse, bool]]: - """delete an app + """delete an action workflow Args: action_workflow_id (str): @@ -97,7 +97,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[StderrErrResponse, bool]]: - """delete an app + """delete an action workflow Args: action_workflow_id (str): @@ -121,7 +121,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[StderrErrResponse, bool]]: - """delete an app + """delete an action workflow Args: action_workflow_id (str): @@ -148,7 +148,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[StderrErrResponse, bool]]: - """delete an app + """delete an action workflow Args: action_workflow_id (str): diff --git a/nuon/api/actions/get_action_latest_config.py b/nuon/api/actions/get_action_latest_config.py new file mode 100644 index 00000000..dae854db --- /dev/null +++ b/nuon/api/actions/get_action_latest_config.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/actions/{action_id}/latest-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflowConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action workflow's latest config + + Return the latest config for an action workflow. + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_action_workflow.py b/nuon/api/actions/get_action_workflow.py index 2433963c..0f9bf8cb 100644 --- a/nuon/api/actions/get_action_workflow.py +++ b/nuon/api/actions/get_action_workflow.py @@ -70,7 +70,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow + """get an app action workflow by action workflow id Args: action_workflow_id (str): @@ -99,7 +99,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow + """get an app action workflow by action workflow id Args: action_workflow_id (str): @@ -123,7 +123,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow + """get an app action workflow by action workflow id Args: action_workflow_id (str): @@ -150,7 +150,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: - """get an app action workflow + """get an app action workflow by action workflow id Args: action_workflow_id (str): diff --git a/nuon/api/actions/get_action_workflow_configs.py b/nuon/api/actions/get_action_workflow_configs.py index e1bbe7ac..b99c8a57 100644 --- a/nuon/api/actions/get_action_workflow_configs.py +++ b/nuon/api/actions/get_action_workflow_configs.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: """get action workflow for an app @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: """get action workflow for an app @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: """get action workflow for an app @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: """get action workflow for an app @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/actions/get_action_workflows.py b/nuon/api/actions/get_action_workflows.py index 35ddbd91..12db8f94 100644 --- a/nuon/api/actions/get_action_workflows.py +++ b/nuon/api/actions/get_action_workflows.py @@ -17,12 +17,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["q"] = q @@ -41,7 +36,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -102,7 +96,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: """get action workflows for an app @@ -112,7 +105,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -128,7 +120,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -146,7 +137,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: """get action workflows for an app @@ -156,7 +146,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,7 +162,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -185,7 +173,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: """get action workflows for an app @@ -195,7 +182,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -211,7 +197,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -227,7 +212,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: """get action workflows for an app @@ -237,7 +221,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -255,6 +238,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/actions/get_app_action.py b/nuon/api/actions/get_app_action.py new file mode 100644 index 00000000..38f697c4 --- /dev/null +++ b/nuon/api/actions/get_app_action.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/actions/{action_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """get an app action workflow by action workflow id + + Args: + app_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_app_action_config.py b/nuon/api/actions/get_app_action_config.py new file mode 100644 index 00000000..8041e30a --- /dev/null +++ b/nuon/api/actions/get_app_action_config.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, + action_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/actions/{action_id}/configs/{action_config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppActionWorkflowConfig.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + action_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action config + + Args: + app_id (str): + action_id (str): + action_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + action_config_id=action_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + action_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action config + + Args: + app_id (str): + action_id (str): + action_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + action_config_id=action_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + action_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action config + + Args: + app_id (str): + action_id (str): + action_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + action_config_id=action_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + action_config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + """get an app action config + + Args: + app_id (str): + action_id (str): + action_config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflowConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + action_config_id=action_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_app_action_configs.py b/nuon/api/actions/get_app_action_configs.py new file mode 100644 index 00000000..66a76acf --- /dev/null +++ b/nuon/api/actions/get_app_action_configs.py @@ -0,0 +1,240 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow_config import AppActionWorkflowConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + action_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/action/{action_id}/configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppActionWorkflowConfig.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + app_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppActionWorkflowConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + app_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppActionWorkflowConfig']] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + app_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppActionWorkflowConfig']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + """get action workflow for an app + + Args: + app_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppActionWorkflowConfig']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_recent_runs.py b/nuon/api/actions/get_install_action_recent_runs.py new file mode 100644 index 00000000..6e5f6992 --- /dev/null +++ b/nuon/api/actions/get_install_action_recent_runs.py @@ -0,0 +1,235 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + action_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/{action_id}/recent-runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_id=action_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + action_id=action_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_id=action_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get recent runs for an action workflow by install id + + Args: + install_id (str): + action_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + action_id=action_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_run.py b/nuon/api/actions/get_install_action_run.py new file mode 100644 index 00000000..517a693e --- /dev/null +++ b/nuon/api/actions/get_install_action_run.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow_run import AppInstallActionWorkflowRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + run_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/runs/{run_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflowRun.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRun, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + """get action workflow runs by install id and run id + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRun, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_run_step.py b/nuon/api/actions/get_install_action_run_step.py new file mode 100644 index 00000000..17655826 --- /dev/null +++ b/nuon/api/actions/get_install_action_run_step.py @@ -0,0 +1,205 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow_run_step import AppInstallActionWorkflowRunStep +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + run_id: str, + step_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/runs/{run_id}/steps/{step_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflowRunStep.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + step_id=step_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + run_id=run_id, + step_id=step_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + step_id=step_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + run_id: str, + step_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + """get action workflow run step by install id and step id + + Get an install action workflow run step. + + Args: + install_id (str): + run_id (str): + step_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + run_id=run_id, + step_id=step_id, + client=client, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_runs.py b/nuon/api/actions/get_install_action_runs.py new file mode 100644 index 00000000..a1093e94 --- /dev/null +++ b/nuon/api/actions/get_install_action_runs.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow_run import AppInstallActionWorkflowRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallActionWorkflowRun.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflowRun']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflowRun']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflowRun']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + """get action workflow runs by install id + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflowRun']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_recent_runs.py b/nuon/api/actions/get_install_action_workflow_recent_runs.py index 79a6e21a..d25957c0 100644 --- a/nuon/api/actions/get_install_action_workflow_recent_runs.py +++ b/nuon/api/actions/get_install_action_workflow_recent_runs.py @@ -17,12 +17,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -39,7 +34,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -95,7 +89,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: """get recent runs for an action workflow by install id @@ -105,7 +98,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -121,7 +113,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: """get recent runs for an action workflow by install id @@ -149,7 +139,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -166,7 +155,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -178,7 +166,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: """get recent runs for an action workflow by install id @@ -188,7 +175,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -204,7 +190,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -220,7 +205,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: """get recent runs for an action workflow by install id @@ -230,7 +214,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -248,6 +231,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/actions/get_install_action_workflow_runs.py b/nuon/api/actions/get_install_action_workflow_runs.py index e61c86ca..b0a18fb3 100644 --- a/nuon/api/actions/get_install_action_workflow_runs.py +++ b/nuon/api/actions/get_install_action_workflow_runs.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: """get action workflow runs by install id @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: """get action workflow runs by install id @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: """get action workflow runs by install id @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: """get action workflow runs by install id @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/actions/get_install_action_workflows_latest_runs.py b/nuon/api/actions/get_install_action_workflows_latest_runs.py index 8ddcd813..ecb5c9c7 100644 --- a/nuon/api/actions/get_install_action_workflows_latest_runs.py +++ b/nuon/api/actions/get_install_action_workflows_latest_runs.py @@ -18,12 +18,7 @@ def _get_kwargs( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["trigger_types"] = trigger_types @@ -44,7 +39,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -106,7 +100,6 @@ def sync_detailed( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: """get latest runs for all action workflows by install id @@ -117,7 +110,6 @@ def sync_detailed( limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -134,7 +126,6 @@ def sync_detailed( limit=limit, page=page, q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -153,7 +144,6 @@ def sync( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: """get latest runs for all action workflows by install id @@ -164,7 +154,6 @@ def sync( limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -182,7 +171,6 @@ def sync( limit=limit, page=page, q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -195,7 +183,6 @@ async def asyncio_detailed( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: """get latest runs for all action workflows by install id @@ -206,7 +193,6 @@ async def asyncio_detailed( limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -223,7 +209,6 @@ async def asyncio_detailed( limit=limit, page=page, q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -240,7 +225,6 @@ async def asyncio( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: """get latest runs for all action workflows by install id @@ -251,7 +235,6 @@ async def asyncio( limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -270,6 +253,5 @@ async def asyncio( limit=limit, page=page, q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/actions/get_install_actions_latest_runs.py b/nuon/api/actions/get_install_actions_latest_runs.py new file mode 100644 index 00000000..947a37d4 --- /dev/null +++ b/nuon/api/actions/get_install_actions_latest_runs.py @@ -0,0 +1,257 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["trigger_types"] = trigger_types + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params["q"] = q + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/latest-runs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallActionWorkflow.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + trigger_types: Union[Unset, str] = UNSET, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, + q: Union[Unset, str] = UNSET, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get latest runs for all action workflows by install id + + Args: + install_id (str): + trigger_types (Union[Unset, str]): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + q (Union[Unset, str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + trigger_types=trigger_types, + offset=offset, + limit=limit, + page=page, + q=q, + ) + ).parsed diff --git a/nuon/api/actions/update_app_action.py b/nuon/api/actions/update_app_action.py new file mode 100644 index 00000000..503c7b26 --- /dev/null +++ b/nuon/api/actions/update_app_action.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_action_workflow import AppActionWorkflow +from ...models.service_update_action_workflow_request import ServiceUpdateActionWorkflowRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + action_id: str, + *, + body: ServiceUpdateActionWorkflowRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/apps/{app_id}/actions/{action_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppActionWorkflow.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app action + + Args: + app_id (str): + action_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app action + + Args: + app_id (str): + action_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + action_id=action_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app action + + Args: + app_id (str): + action_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + action_id=action_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + action_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateActionWorkflowRequest, +) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + """patch an app action + + Args: + app_id (str): + action_id (str): + body (ServiceUpdateActionWorkflowRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + action_id=action_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/get_app_branch_app_configs.py b/nuon/api/apps/get_app_branch_app_configs.py index c604544b..b7a9f756 100644 --- a/nuon/api/apps/get_app_branch_app_configs.py +++ b/nuon/api/apps/get_app_branch_app_configs.py @@ -17,12 +17,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -39,7 +34,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -100,7 +94,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: """get app branch app configs @@ -110,7 +103,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,7 +118,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -144,7 +135,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: """get app branch app configs @@ -154,7 +144,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,7 +160,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -183,7 +171,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: """get app branch app configs @@ -193,7 +180,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -209,7 +195,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -225,7 +210,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: """get app branch app configs @@ -235,7 +219,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -253,6 +236,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/apps/get_app_branches.py b/nuon/api/apps/get_app_branches.py index 74e79ba0..83687a65 100644 --- a/nuon/api/apps/get_app_branches.py +++ b/nuon/api/apps/get_app_branches.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: """get app branches @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: """get app branches @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: """get app branches @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: """get app branches @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/apps/get_app_configs.py b/nuon/api/apps/get_app_configs.py index 6821edcf..86fd623d 100644 --- a/nuon/api/apps/get_app_configs.py +++ b/nuon/api/apps/get_app_configs.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: """get app configs @@ -109,7 +102,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +116,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -141,7 +132,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: """get app configs @@ -152,7 +142,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +157,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -179,7 +167,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: """get app configs @@ -190,7 +177,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -205,7 +191,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -220,7 +205,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: """get app configs @@ -231,7 +215,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -248,6 +231,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/apps/get_app_input_configs.py b/nuon/api/apps/get_app_input_configs.py index 09fc58fe..d6326fba 100644 --- a/nuon/api/apps/get_app_input_configs.py +++ b/nuon/api/apps/get_app_input_configs.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: """get app input configs @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: """get app input configs @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: """get app input configs @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: """get app input configs @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/apps/get_app_runner_configs.py b/nuon/api/apps/get_app_runner_configs.py index 09ade96f..dbc0f9e8 100644 --- a/nuon/api/apps/get_app_runner_configs.py +++ b/nuon/api/apps/get_app_runner_configs.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: """get app runner configs @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: """get app runner configs @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: """get app runner configs @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: """get app runner configs @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/apps/get_app_sandbox_configs.py b/nuon/api/apps/get_app_sandbox_configs.py index ebd13c2f..0f52ba44 100644 --- a/nuon/api/apps/get_app_sandbox_configs.py +++ b/nuon/api/apps/get_app_sandbox_configs.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: """get app sandbox configs @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: """get app sandbox configs @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: """get app sandbox configs @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: """get app sandbox configs @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/apps/get_app_secrets.py b/nuon/api/apps/get_app_secrets.py index 0c57cc9f..28f49914 100644 --- a/nuon/api/apps/get_app_secrets.py +++ b/nuon/api/apps/get_app_secrets.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: """get app secrets @@ -111,7 +104,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,7 +118,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -143,7 +134,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: """get app secrets @@ -156,7 +146,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,7 +161,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -183,7 +171,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: """get app secrets @@ -196,7 +183,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -211,7 +197,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -226,7 +211,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: """get app secrets @@ -239,7 +223,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -256,6 +239,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/apps/get_apps.py b/nuon/api/apps/get_apps.py index aa275ae5..b4fff9ff 100644 --- a/nuon/api/apps/get_apps.py +++ b/nuon/api/apps/get_apps.py @@ -16,12 +16,7 @@ def _get_kwargs( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -40,7 +35,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -100,7 +94,6 @@ def sync_detailed( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppApp"]]]: """get all apps for the current org @@ -109,7 +102,6 @@ def sync_detailed( q (Union[Unset, str]): limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +116,6 @@ def sync_detailed( q=q, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -141,7 +132,6 @@ def sync( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: """get all apps for the current org @@ -150,7 +140,6 @@ def sync( q (Union[Unset, str]): limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -166,7 +155,6 @@ def sync( q=q, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -177,7 +165,6 @@ async def asyncio_detailed( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppApp"]]]: """get all apps for the current org @@ -186,7 +173,6 @@ async def asyncio_detailed( q (Union[Unset, str]): limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -201,7 +187,6 @@ async def asyncio_detailed( q=q, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -216,7 +201,6 @@ async def asyncio( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: """get all apps for the current org @@ -225,7 +209,6 @@ async def asyncio( q (Union[Unset, str]): limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -242,6 +225,5 @@ async def asyncio( q=q, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/apps/get_latest_app_break_glass_config.py b/nuon/api/apps/get_latest_app_break_glass_config.py index 4179dfd0..237425b2 100644 --- a/nuon/api/apps/get_latest_app_break_glass_config.py +++ b/nuon/api/apps/get_latest_app_break_glass_config.py @@ -70,7 +70,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get latest app input config + """get latest app break glass config Get the latest break glass config for an app. @@ -101,7 +101,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get latest app input config + """get latest app break glass config Get the latest break glass config for an app. @@ -127,7 +127,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get latest app input config + """get latest app break glass config Get the latest break glass config for an app. @@ -156,7 +156,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: - """get latest app input config + """get latest app break glass config Get the latest break glass config for an app. diff --git a/nuon/api/components/build_all_components.py b/nuon/api/components/build_all_components.py new file mode 100644 index 00000000..e7a1cc36 --- /dev/null +++ b/nuon/api/components/build_all_components.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.service_build_all_components_request import ServiceBuildAllComponentsRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceBuildAllComponentsRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/build-all", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + if response.status_code == 201: + response_201 = [] + _response_201 = response.json() + for response_201_item_data in _response_201: + response_201_item = AppComponentBuild.from_dict(response_201_item_data) + + response_201.append(response_201_item) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceBuildAllComponentsRequest, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """create component build + + Args: + app_id (str): + body (ServiceBuildAllComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceBuildAllComponentsRequest, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """create component build + + Args: + app_id (str): + body (ServiceBuildAllComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceBuildAllComponentsRequest, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """create component build + + Args: + app_id (str): + body (ServiceBuildAllComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceBuildAllComponentsRequest, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """create component build + + Args: + app_id (str): + body (ServiceBuildAllComponentsRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_component_build.py b/nuon/api/components/create_app_component_build.py new file mode 100644 index 00000000..4fbfa030 --- /dev/null +++ b/nuon/api/components/create_app_component_build.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.service_create_component_build_request import ServiceCreateComponentBuildRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateComponentBuildRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/builds", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppComponentBuild.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + app_id (str): + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + app_id (str): + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + app_id (str): + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateComponentBuildRequest, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """create component build + + Args: + app_id (str): + component_id (str): + body (ServiceCreateComponentBuildRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_docker_build_component_config.py b/nuon/api/components/create_app_docker_build_component_config.py new file mode 100644 index 00000000..d0f4c067 --- /dev/null +++ b/nuon/api/components/create_app_docker_build_component_config.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_docker_build_component_config import AppDockerBuildComponentConfig +from ...models.service_create_docker_build_component_config_request import ( + ServiceCreateDockerBuildComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/docker-build", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppDockerBuildComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppDockerBuildComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateDockerBuildComponentConfigRequest, +) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + """create a docker build component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateDockerBuildComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppDockerBuildComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_helm_component_config.py b/nuon/api/components/create_app_helm_component_config.py new file mode 100644 index 00000000..9ffc2ee4 --- /dev/null +++ b/nuon/api/components/create_app_helm_component_config.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_helm_component_config import AppHelmComponentConfig +from ...models.service_create_helm_component_config_request import ServiceCreateHelmComponentConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateHelmComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/helm", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppHelmComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppHelmComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppHelmComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppHelmComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateHelmComponentConfigRequest, +) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + """create a helm component config + + Create a helm component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateHelmComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppHelmComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_kubernetes_manifest_component_config.py b/nuon/api/components/create_app_kubernetes_manifest_component_config.py new file mode 100644 index 00000000..383bbf42 --- /dev/null +++ b/nuon/api/components/create_app_kubernetes_manifest_component_config.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig +from ...models.service_create_kubernetes_manifest_component_config_request import ( + ServiceCreateKubernetesManifestComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/kubernetes-manifest", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppKubernetesManifestComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateKubernetesManifestComponentConfigRequest, +) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + """create a kubernetes manifest component config + + Args: + app_id (str): + component_id (str): + body (ServiceCreateKubernetesManifestComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/create_app_terraform_module_component_config.py b/nuon/api/components/create_app_terraform_module_component_config.py new file mode 100644 index 00000000..90d82ed0 --- /dev/null +++ b/nuon/api/components/create_app_terraform_module_component_config.py @@ -0,0 +1,216 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_module_component_config import AppTerraformModuleComponentConfig +from ...models.service_create_terraform_module_component_config_request import ( + ServiceCreateTerraformModuleComponentConfigRequest, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/terraform-module", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppTerraformModuleComponentConfig.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformModuleComponentConfig, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformModuleComponentConfigRequest, +) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + """create a terraform component config + + Create a terraform component config. + + Args: + app_id (str): + component_id (str): + body (ServiceCreateTerraformModuleComponentConfigRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformModuleComponentConfig, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/components/delete_app_component.py b/nuon/api/components/delete_app_component.py new file mode 100644 index 00000000..902bc99c --- /dev/null +++ b/nuon/api/components/delete_app_component.py @@ -0,0 +1,182 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/apps/{app_id}/components/{component_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, bool]]: + if response.status_code == 200: + response_200 = cast(bool, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, bool]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, bool]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, bool]]: + """delete a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, bool] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_build.py b/nuon/api/components/get_app_component_build.py new file mode 100644 index 00000000..d2e3b574 --- /dev/null +++ b/nuon/api/components/get_app_component_build.py @@ -0,0 +1,205 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + build_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/builds/{build_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentBuild.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + app_id (str): + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + build_id=build_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + app_id (str): + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + build_id=build_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + app_id (str): + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + build_id=build_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + build_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get a build for a component + + Returns builds for one or all components in an app. + + Args: + app_id (str): + component_id (str): + build_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + build_id=build_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_builds.py b/nuon/api/components/get_app_component_builds.py new file mode 100644 index 00000000..4d4d13a4 --- /dev/null +++ b/nuon/api/components/get_app_component_builds.py @@ -0,0 +1,240 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/builds", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponentBuild.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentBuild']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + """get builds for components + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentBuild']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_config.py b/nuon/api/components/get_app_component_config.py new file mode 100644 index 00000000..f0bed02f --- /dev/null +++ b/nuon/api/components/get_app_component_config.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_config_connection import AppComponentConfigConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/{config_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentConfigConnection.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + app_id (str): + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + config_id=config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + app_id (str): + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + config_id=config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + app_id (str): + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + config_id=config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + config_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get a config for a component + + Args: + app_id (str): + component_id (str): + config_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + config_id=config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_configs.py b/nuon/api/components/get_app_component_configs.py new file mode 100644 index 00000000..055dad5c --- /dev/null +++ b/nuon/api/components/get_app_component_configs.py @@ -0,0 +1,240 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_config_connection import AppComponentConfigConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponentConfigConnection.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentConfigConnection']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentConfigConnection']] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponentConfigConnection']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + """get all configs for a component + + Args: + app_id (str): + component_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponentConfigConnection']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_dependencies.py b/nuon/api/components/get_app_component_dependencies.py new file mode 100644 index 00000000..fd92e74c --- /dev/null +++ b/nuon/api/components/get_app_component_dependencies.py @@ -0,0 +1,189 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/dependencies", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppComponent.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppComponent']]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + """get a component's dependencies + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppComponent']] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_dependents.py b/nuon/api/components/get_app_component_dependents.py new file mode 100644 index 00000000..d5d2d5b8 --- /dev/null +++ b/nuon/api/components/get_app_component_dependents.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_component_children import ServiceComponentChildren +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/dependents", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + if response.status_code == 200: + response_200 = ServiceComponentChildren.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceComponentChildren, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceComponentChildren, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceComponentChildren, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + """get a component's children + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceComponentChildren, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_latest_build.py b/nuon/api/components/get_app_component_latest_build.py new file mode 100644 index 00000000..aba730b2 --- /dev/null +++ b/nuon/api/components/get_app_component_latest_build.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_build import AppComponentBuild +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/builds/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentBuild.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentBuild, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + """get latest build for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentBuild, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_component_latest_config.py b/nuon/api/components/get_app_component_latest_config.py new file mode 100644 index 00000000..dc35db41 --- /dev/null +++ b/nuon/api/components/get_app_component_latest_config.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component_config_connection import AppComponentConfigConnection +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/components/{component_id}/configs/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponentConfigConnection.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponentConfigConnection, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + """get latest config for a component + + Args: + app_id (str): + component_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponentConfigConnection, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + ) + ).parsed diff --git a/nuon/api/components/get_app_components.py b/nuon/api/components/get_app_components.py index 8f1bd222..4df2ea92 100644 --- a/nuon/api/components/get_app_components.py +++ b/nuon/api/components/get_app_components.py @@ -15,21 +15,19 @@ def _get_kwargs( *, q: Union[Unset, str] = UNSET, types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["q"] = q params["types"] = types + params["component_ids"] = component_ids + params["offset"] = offset params["limit"] = limit @@ -44,7 +42,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -103,10 +100,10 @@ def sync_detailed( client: AuthenticatedClient, q: Union[Unset, str] = UNSET, types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: """get all components for an app @@ -114,10 +111,10 @@ def sync_detailed( app_id (str): q (Union[Unset, str]): types (Union[Unset, str]): + component_ids (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -131,10 +128,10 @@ def sync_detailed( app_id=app_id, q=q, types=types, + component_ids=component_ids, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -150,10 +147,10 @@ def sync( client: AuthenticatedClient, q: Union[Unset, str] = UNSET, types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: """get all components for an app @@ -161,10 +158,10 @@ def sync( app_id (str): q (Union[Unset, str]): types (Union[Unset, str]): + component_ids (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -179,10 +176,10 @@ def sync( client=client, q=q, types=types, + component_ids=component_ids, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -192,10 +189,10 @@ async def asyncio_detailed( client: AuthenticatedClient, q: Union[Unset, str] = UNSET, types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: """get all components for an app @@ -203,10 +200,10 @@ async def asyncio_detailed( app_id (str): q (Union[Unset, str]): types (Union[Unset, str]): + component_ids (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -220,10 +217,10 @@ async def asyncio_detailed( app_id=app_id, q=q, types=types, + component_ids=component_ids, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -237,10 +234,10 @@ async def asyncio( client: AuthenticatedClient, q: Union[Unset, str] = UNSET, types: Union[Unset, str] = UNSET, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: """get all components for an app @@ -248,10 +245,10 @@ async def asyncio( app_id (str): q (Union[Unset, str]): types (Union[Unset, str]): + component_ids (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -267,9 +264,9 @@ async def asyncio( client=client, q=q, types=types, + component_ids=component_ids, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/components/get_component_builds.py b/nuon/api/components/get_component_builds.py index 137e7485..40405cc3 100644 --- a/nuon/api/components/get_component_builds.py +++ b/nuon/api/components/get_component_builds.py @@ -17,12 +17,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["component_id"] = component_id @@ -43,7 +38,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -104,7 +98,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: """get builds for components @@ -114,7 +107,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -130,7 +122,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -148,7 +139,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: """get builds for components @@ -158,7 +148,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,7 +164,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -187,7 +175,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: """get builds for components @@ -197,7 +184,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -213,7 +199,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -229,7 +214,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: """get builds for components @@ -239,7 +223,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -257,6 +240,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/components/get_component_config.py b/nuon/api/components/get_component_config.py index 18936383..6de96fb6 100644 --- a/nuon/api/components/get_component_config.py +++ b/nuon/api/components/get_component_config.py @@ -72,7 +72,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get all configs for a component + """get a config for a component Args: component_id (str): @@ -104,7 +104,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get all configs for a component + """get a config for a component Args: component_id (str): @@ -131,7 +131,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get all configs for a component + """get a config for a component Args: component_id (str): @@ -161,7 +161,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: - """get all configs for a component + """get a config for a component Args: component_id (str): diff --git a/nuon/api/components/get_component_configs.py b/nuon/api/components/get_component_configs.py index 16b4f1a7..7b1d1e03 100644 --- a/nuon/api/components/get_component_configs.py +++ b/nuon/api/components/get_component_configs.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: """get all configs for a component @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: """get all configs for a component @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: """get all configs for a component @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: """get all configs for a component @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/components/get_org_components.py b/nuon/api/components/get_org_components.py index 84ed48cf..953dd651 100644 --- a/nuon/api/components/get_org_components.py +++ b/nuon/api/components/get_org_components.py @@ -12,17 +12,15 @@ def _get_kwargs( *, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} + params["component_ids"] = component_ids + params["offset"] = offset params["limit"] = limit @@ -37,7 +35,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -93,18 +90,18 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: """get all components for an org Args: + component_ids (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -115,10 +112,10 @@ def sync_detailed( """ kwargs = _get_kwargs( + component_ids=component_ids, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -131,18 +128,18 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: """get all components for an org Args: + component_ids (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,28 +151,28 @@ def sync( return sync_detailed( client=client, + component_ids=component_ids, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: """get all components for an org Args: + component_ids (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -186,10 +183,10 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + component_ids=component_ids, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -200,18 +197,18 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + component_ids: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: """get all components for an org Args: + component_ids (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -224,9 +221,9 @@ async def asyncio( return ( await asyncio_detailed( client=client, + component_ids=component_ids, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/components/update_app_component.py b/nuon/api/components/update_app_component.py new file mode 100644 index 00000000..3e48bf9f --- /dev/null +++ b/nuon/api/components/update_app_component.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_component import AppComponent +from ...models.service_update_component_request import ServiceUpdateComponentRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + component_id: str, + *, + body: ServiceUpdateComponentRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": f"/v1/apps/{app_id}/components/{component_id}", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppComponent, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppComponent.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppComponent, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + app_id (str): + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + app_id (str): + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return sync_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Response[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + app_id (str): + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppComponent, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + app_id=app_id, + component_id=component_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + component_id: str, + *, + client: AuthenticatedClient, + body: ServiceUpdateComponentRequest, +) -> Optional[Union[AppComponent, StderrErrResponse]]: + """update a component + + Args: + app_id (str): + component_id (str): + body (ServiceUpdateComponentRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppComponent, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + app_id=app_id, + component_id=component_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installers/get_installers.py b/nuon/api/installers/get_installers.py index 5e71c543..a9546faa 100644 --- a/nuon/api/installers/get_installers.py +++ b/nuon/api/installers/get_installers.py @@ -15,12 +15,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -37,7 +32,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -96,7 +90,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: """get installers for current org @@ -106,7 +99,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -120,7 +112,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -136,7 +127,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: """get installers for current org @@ -146,7 +136,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -161,7 +150,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -171,7 +159,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: """get installers for current org @@ -181,7 +168,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -195,7 +181,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -209,7 +194,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: """get installers for current org @@ -219,7 +203,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -235,6 +218,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/create_install_workflow_step_approval_response.py b/nuon/api/installs/create_install_component_deploy.py similarity index 54% rename from nuon/api/installs/create_install_workflow_step_approval_response.py rename to nuon/api/installs/create_install_component_deploy.py index ce01f5b9..68af65a2 100644 --- a/nuon/api/installs/create_install_workflow_step_approval_response.py +++ b/nuon/api/installs/create_install_component_deploy.py @@ -5,26 +5,23 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step_approval_response import AppWorkflowStepApprovalResponse -from ...models.service_create_workflow_step_approval_response_request import ( - ServiceCreateWorkflowStepApprovalResponseRequest, -) +from ...models.app_install_deploy import AppInstallDeploy +from ...models.service_create_install_component_deploy_request import ServiceCreateInstallComponentDeployRequest from ...models.stderr_err_response import StderrErrResponse from ...types import Response def _get_kwargs( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, + install_id: str, + component_id: str, *, - body: ServiceCreateWorkflowStepApprovalResponseRequest, + body: ServiceCreateInstallComponentDeployRequest, ) -> dict[str, Any]: headers: dict[str, Any] = {} _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/install-workflows/{install_workflow_id}/steps/{install_workflow_step_id}/approvals/{approval_id}/response", + "url": f"/v1/installs/{install_id}/components/{component_id}/deploys", } _kwargs["json"] = body.to_dict() @@ -37,9 +34,9 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: if response.status_code == 201: - response_201 = AppWorkflowStepApprovalResponse.from_dict(response.json()) + response_201 = AppInstallDeploy.from_dict(response.json()) return response_201 if response.status_code == 400: @@ -70,7 +67,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,33 +77,30 @@ def _build_response( def sync_detailed( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, + install_id: str, + component_id: str, *, client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: + body: ServiceCreateInstallComponentDeployRequest, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: """deploy a build to an install Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): + install_id (str): + component_id (str): + body (ServiceCreateInstallComponentDeployRequest): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]] + Response[Union[AppInstallDeploy, StderrErrResponse]] """ kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, + install_id=install_id, + component_id=component_id, body=body, ) @@ -118,66 +112,60 @@ def sync_detailed( def sync( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, + install_id: str, + component_id: str, *, client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: + body: ServiceCreateInstallComponentDeployRequest, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: """deploy a build to an install Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): + install_id (str): + component_id (str): + body (ServiceCreateInstallComponentDeployRequest): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStepApprovalResponse, StderrErrResponse] + Union[AppInstallDeploy, StderrErrResponse] """ return sync_detailed( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, + install_id=install_id, + component_id=component_id, client=client, body=body, ).parsed async def asyncio_detailed( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, + install_id: str, + component_id: str, *, client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: + body: ServiceCreateInstallComponentDeployRequest, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: """deploy a build to an install Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): + install_id (str): + component_id (str): + body (ServiceCreateInstallComponentDeployRequest): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]] + Response[Union[AppInstallDeploy, StderrErrResponse]] """ kwargs = _get_kwargs( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, + install_id=install_id, + component_id=component_id, body=body, ) @@ -187,34 +175,31 @@ async def asyncio_detailed( async def asyncio( - install_workflow_id: str, - install_workflow_step_id: str, - approval_id: str, + install_id: str, + component_id: str, *, client: AuthenticatedClient, - body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: + body: ServiceCreateInstallComponentDeployRequest, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: """deploy a build to an install Args: - install_workflow_id (str): - install_workflow_step_id (str): - approval_id (str): - body (ServiceCreateWorkflowStepApprovalResponseRequest): + install_id (str): + component_id (str): + body (ServiceCreateInstallComponentDeployRequest): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStepApprovalResponse, StderrErrResponse] + Union[AppInstallDeploy, StderrErrResponse] """ return ( await asyncio_detailed( - install_workflow_id=install_workflow_id, - install_workflow_step_id=install_workflow_step_id, - approval_id=approval_id, + install_id=install_id, + component_id=component_id, client=client, body=body, ) diff --git a/nuon/api/installs/create_workflow_step_approval_response.py b/nuon/api/installs/create_workflow_step_approval_response.py index 45b08899..732da53e 100644 --- a/nuon/api/installs/create_workflow_step_approval_response.py +++ b/nuon/api/installs/create_workflow_step_approval_response.py @@ -5,10 +5,12 @@ from ... import errors from ...client import AuthenticatedClient, Client -from ...models.app_workflow_step_approval_response import AppWorkflowStepApprovalResponse from ...models.service_create_workflow_step_approval_response_request import ( ServiceCreateWorkflowStepApprovalResponseRequest, ) +from ...models.service_create_workflow_step_approval_response_response import ( + ServiceCreateWorkflowStepApprovalResponseResponse, +) from ...models.stderr_err_response import StderrErrResponse from ...types import Response @@ -37,9 +39,9 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: +) -> Optional[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: if response.status_code == 201: - response_201 = AppWorkflowStepApprovalResponse.from_dict(response.json()) + response_201 = ServiceCreateWorkflowStepApprovalResponseResponse.from_dict(response.json()) return response_201 if response.status_code == 400: @@ -70,7 +72,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: +) -> Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -86,8 +88,10 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install +) -> Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + """Create an approval response for a workflow step. + + Create a response for an approval for an action workflow step. Args: workflow_id (str): @@ -100,7 +104,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]] + Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]] """ kwargs = _get_kwargs( @@ -124,8 +128,10 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install +) -> Optional[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + """Create an approval response for a workflow step. + + Create a response for an approval for an action workflow step. Args: workflow_id (str): @@ -138,7 +144,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStepApprovalResponse, StderrErrResponse] + Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse] """ return sync_detailed( @@ -157,8 +163,10 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install +) -> Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + """Create an approval response for a workflow step. + + Create a response for an approval for an action workflow step. Args: workflow_id (str): @@ -171,7 +179,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]] + Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]] """ kwargs = _get_kwargs( @@ -193,8 +201,10 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[AppWorkflowStepApprovalResponse, StderrErrResponse]]: - """deploy a build to an install +) -> Optional[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + """Create an approval response for a workflow step. + + Create a response for an approval for an action workflow step. Args: workflow_id (str): @@ -207,7 +217,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStepApprovalResponse, StderrErrResponse] + Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse] """ return ( diff --git a/nuon/api/installs/generate_cli_install_config.py b/nuon/api/installs/generate_cli_install_config.py new file mode 100644 index 00000000..356d3b00 --- /dev/null +++ b/nuon/api/installs/generate_cli_install_config.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from io import BytesIO +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import File, Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/generate-cli-install-config", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[File, StderrErrResponse]]: + if response.status_code == 200: + response_200 = File(payload=BytesIO(response.content)) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.content) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.content) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.content) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.content) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.content) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[File, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[File, StderrErrResponse]]: + """generate an install config to be used with CLI + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[File, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[File, StderrErrResponse]]: + """generate an install config to be used with CLI + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[File, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[File, StderrErrResponse]]: + """generate an install config to be used with CLI + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[File, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[File, StderrErrResponse]]: + """generate an install config to be used with CLI + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[File, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_app_installs.py b/nuon/api/installs/get_app_installs.py index d1abe4a4..12061b3b 100644 --- a/nuon/api/installs/get_app_installs.py +++ b/nuon/api/installs/get_app_installs.py @@ -17,12 +17,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["q"] = q @@ -41,7 +36,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -102,7 +96,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: """get all installs for an app @@ -112,7 +105,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -128,7 +120,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -146,7 +137,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: """get all installs for an app @@ -156,7 +146,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -173,7 +162,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -185,7 +173,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: """get all installs for an app @@ -195,7 +182,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -211,7 +197,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -227,7 +212,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: """get all installs for an app @@ -237,7 +221,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -255,6 +238,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_drifted_objects.py b/nuon/api/installs/get_drifted_objects.py new file mode 100644 index 00000000..90ff5242 --- /dev/null +++ b/nuon/api/installs/get_drifted_objects.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_drifted_object import AppDriftedObject +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/drifted-objects", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppDriftedObject"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppDriftedObject.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppDriftedObject"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppDriftedObject"]]]: + """get drifted objects for an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppDriftedObject']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppDriftedObject"]]]: + """get drifted objects for an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppDriftedObject']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, list["AppDriftedObject"]]]: + """get drifted objects for an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppDriftedObject']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, list["AppDriftedObject"]]]: + """get drifted objects for an install + + Args: + install_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppDriftedObject']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install.py b/nuon/api/installs/get_install.py index 4b4ce73e..d66ee92c 100644 --- a/nuon/api/installs/get_install.py +++ b/nuon/api/installs/get_install.py @@ -7,15 +7,24 @@ from ...client import AuthenticatedClient, Client from ...models.app_install import AppInstall from ...models.stderr_err_response import StderrErrResponse -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( install_id: str, + *, + include_drifted_objects: Union[Unset, bool] = False, ) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["include_drifted_objects"] = include_drifted_objects + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: dict[str, Any] = { "method": "get", "url": f"/v1/installs/{install_id}", + "params": params, } return _kwargs @@ -69,6 +78,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, + include_drifted_objects: Union[Unset, bool] = False, ) -> Response[Union[AppInstall, StderrErrResponse]]: """get an install @@ -79,6 +89,7 @@ def sync_detailed( Args: install_id (str): + include_drifted_objects (Union[Unset, bool]): Default: False. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -90,6 +101,7 @@ def sync_detailed( kwargs = _get_kwargs( install_id=install_id, + include_drifted_objects=include_drifted_objects, ) response = client.get_httpx_client().request( @@ -103,6 +115,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, + include_drifted_objects: Union[Unset, bool] = False, ) -> Optional[Union[AppInstall, StderrErrResponse]]: """get an install @@ -113,6 +126,7 @@ def sync( Args: install_id (str): + include_drifted_objects (Union[Unset, bool]): Default: False. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -125,6 +139,7 @@ def sync( return sync_detailed( install_id=install_id, client=client, + include_drifted_objects=include_drifted_objects, ).parsed @@ -132,6 +147,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, + include_drifted_objects: Union[Unset, bool] = False, ) -> Response[Union[AppInstall, StderrErrResponse]]: """get an install @@ -142,6 +158,7 @@ async def asyncio_detailed( Args: install_id (str): + include_drifted_objects (Union[Unset, bool]): Default: False. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,6 +170,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( install_id=install_id, + include_drifted_objects=include_drifted_objects, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -164,6 +182,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, + include_drifted_objects: Union[Unset, bool] = False, ) -> Optional[Union[AppInstall, StderrErrResponse]]: """get an install @@ -174,6 +193,7 @@ async def asyncio( Args: install_id (str): + include_drifted_objects (Union[Unset, bool]): Default: False. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -187,5 +207,6 @@ async def asyncio( await asyncio_detailed( install_id=install_id, client=client, + include_drifted_objects=include_drifted_objects, ) ).parsed diff --git a/nuon/api/installs/get_install_action.py b/nuon/api/installs/get_install_action.py new file mode 100644 index 00000000..6113b2f4 --- /dev/null +++ b/nuon/api/installs/get_install_action.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + action_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions/{action_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallActionWorkflow.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action + + Get an install action workflow. + + Args: + install_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_id=action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action + + Get an install action workflow. + + Args: + install_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + action_id=action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action + + Get an install action workflow. + + Args: + install_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + action_id=action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + action_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + """get an install action + + Get an install action workflow. + + Args: + install_id (str): + action_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallActionWorkflow, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + action_id=action_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_action_workflows.py b/nuon/api/installs/get_install_action_workflows.py index 1c61d1ee..dc61bab3 100644 --- a/nuon/api/installs/get_install_action_workflows.py +++ b/nuon/api/installs/get_install_action_workflows.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: """get an installs action workflows @@ -109,7 +102,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +116,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -141,7 +132,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: """get an installs action workflows @@ -152,7 +142,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +157,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -179,7 +167,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: """get an installs action workflows @@ -190,7 +177,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -205,7 +191,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -220,7 +205,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: """get an installs action workflows @@ -231,7 +215,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -248,6 +231,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_install_actions.py b/nuon/api/installs/get_install_actions.py new file mode 100644 index 00000000..5c1be6da --- /dev/null +++ b/nuon/api/installs/get_install_actions.py @@ -0,0 +1,235 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_action_workflow import AppInstallActionWorkflow +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/actions", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallActionWorkflow.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallActionWorkflow']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + """get an installs action workflows + + Get install action workflows. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallActionWorkflow']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_component_deploy.py b/nuon/api/installs/get_install_component_deploy.py new file mode 100644 index 00000000..d2465153 --- /dev/null +++ b/nuon/api/installs/get_install_component_deploy.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + component_id: str, + deploy_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components/{component_id}/deploys/{deploy_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallDeploy.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + component_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + component_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + deploy_id=deploy_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + component_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + component_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + component_id=component_id, + deploy_id=deploy_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + component_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + component_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallDeploy, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + component_id=component_id, + deploy_id=deploy_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + component_id: str, + deploy_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + """get an install deploy + + Args: + install_id (str): + component_id (str): + deploy_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallDeploy, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + component_id=component_id, + deploy_id=deploy_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_component_deploys.py b/nuon/api/installs/get_install_component_deploys.py index 63e55797..1646368d 100644 --- a/nuon/api/installs/get_install_component_deploys.py +++ b/nuon/api/installs/get_install_component_deploys.py @@ -17,12 +17,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -39,7 +34,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -100,7 +94,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: """get an install components deploys @@ -110,7 +103,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,7 +118,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -144,7 +135,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: """get an install components deploys @@ -154,7 +144,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,7 +160,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -183,7 +171,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: """get an install components deploys @@ -193,7 +180,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -209,7 +195,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -225,7 +210,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: """get an install components deploys @@ -235,7 +219,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -253,6 +236,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_install_components.py b/nuon/api/installs/get_install_components.py index 08fd4b77..1c99fc90 100644 --- a/nuon/api/installs/get_install_components.py +++ b/nuon/api/installs/get_install_components.py @@ -13,16 +13,17 @@ def _get_kwargs( install_id: str, *, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} + params["types"] = types + + params["q"] = q + params["offset"] = offset params["limit"] = limit @@ -35,7 +36,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -92,17 +92,19 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: """get an installs components Args: install_id (str): + types (Union[Unset, str]): + q (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -114,9 +116,10 @@ def sync_detailed( kwargs = _get_kwargs( install_id=install_id, + types=types, + q=q, offset=offset, limit=limit, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -130,17 +133,19 @@ def sync( install_id: str, *, client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: """get an installs components Args: install_id (str): + types (Union[Unset, str]): + q (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,9 +158,10 @@ def sync( return sync_detailed( install_id=install_id, client=client, + types=types, + q=q, offset=offset, limit=limit, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -163,17 +169,19 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: """get an installs components Args: install_id (str): + types (Union[Unset, str]): + q (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -185,9 +193,10 @@ async def asyncio_detailed( kwargs = _get_kwargs( install_id=install_id, + types=types, + q=q, offset=offset, limit=limit, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -199,17 +208,19 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, + types: Union[Unset, str] = UNSET, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: """get an installs components Args: install_id (str): + types (Union[Unset, str]): + q (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -223,8 +234,9 @@ async def asyncio( await asyncio_detailed( install_id=install_id, client=client, + types=types, + q=q, offset=offset, limit=limit, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_install_components_deploys.py b/nuon/api/installs/get_install_components_deploys.py new file mode 100644 index 00000000..00356438 --- /dev/null +++ b/nuon/api/installs/get_install_components_deploys.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_deploy import AppInstallDeploy +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/components/deploys", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallDeploy.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallDeploy']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallDeploy']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallDeploy']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + """get all deploys to an install + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallDeploy']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_components_summary.py b/nuon/api/installs/get_install_components_summary.py index 1e3d1df4..dd101822 100644 --- a/nuon/api/installs/get_install_components_summary.py +++ b/nuon/api/installs/get_install_components_summary.py @@ -18,12 +18,7 @@ def _get_kwargs( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["types"] = types @@ -44,7 +39,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -106,7 +100,6 @@ def sync_detailed( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: """get an installs components summary @@ -117,7 +110,6 @@ def sync_detailed( limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -134,7 +126,6 @@ def sync_detailed( limit=limit, page=page, q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -153,7 +144,6 @@ def sync( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: """get an installs components summary @@ -164,7 +154,6 @@ def sync( limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -182,7 +171,6 @@ def sync( limit=limit, page=page, q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -195,7 +183,6 @@ async def asyncio_detailed( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: """get an installs components summary @@ -206,7 +193,6 @@ async def asyncio_detailed( limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -223,7 +209,6 @@ async def asyncio_detailed( limit=limit, page=page, q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -240,7 +225,6 @@ async def asyncio( limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, q: Union[Unset, str] = UNSET, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: """get an installs components summary @@ -251,7 +235,6 @@ async def asyncio( limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. q (Union[Unset, str]): - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -270,6 +253,5 @@ async def asyncio( limit=limit, page=page, q=q, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_install_deploys.py b/nuon/api/installs/get_install_deploys.py index a8047539..19c01b2c 100644 --- a/nuon/api/installs/get_install_deploys.py +++ b/nuon/api/installs/get_install_deploys.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: """get all deploys to an install @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: """get all deploys to an install @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: """get all deploys to an install @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: """get all deploys to an install @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_install_events.py b/nuon/api/installs/get_install_events.py index 90eeb06d..d9813009 100644 --- a/nuon/api/installs/get_install_events.py +++ b/nuon/api/installs/get_install_events.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallEvent"]]]: """get events for an install @@ -111,7 +104,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -126,7 +118,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -143,7 +134,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallEvent"]]]: """get events for an install @@ -156,7 +146,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -172,7 +161,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -183,7 +171,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallEvent"]]]: """get events for an install @@ -196,7 +183,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -211,7 +197,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -226,7 +211,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallEvent"]]]: """get events for an install @@ -239,7 +223,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -256,6 +239,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_install_inputs.py b/nuon/api/installs/get_install_inputs.py index 96242548..76d652fb 100644 --- a/nuon/api/installs/get_install_inputs.py +++ b/nuon/api/installs/get_install_inputs.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallInputs"]]]: """get an installs inputs @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallInputs"]]]: """get an installs inputs @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallInputs"]]]: """get an installs inputs @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallInputs"]]]: """get an installs inputs @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_install_latest_deploy.py b/nuon/api/installs/get_install_latest_deploy.py index c0bb3436..40c74881 100644 --- a/nuon/api/installs/get_install_latest_deploy.py +++ b/nuon/api/installs/get_install_latest_deploy.py @@ -70,7 +70,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy + """get an install's latest deploy Args: install_id (str): @@ -99,7 +99,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy + """get an install's latest deploy Args: install_id (str): @@ -123,7 +123,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy + """get an install's latest deploy Args: install_id (str): @@ -150,7 +150,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: - """get an install deploy + """get an install's latest deploy Args: install_id (str): diff --git a/nuon/api/installs/get_install_sandbox_run_v2.py b/nuon/api/installs/get_install_sandbox_run_v2.py new file mode 100644 index 00000000..a0b8ac3c --- /dev/null +++ b/nuon/api/installs/get_install_sandbox_run_v2.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_sandbox_run import AppInstallSandboxRun +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + install_id: str, + run_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/sandbox-runs/{run_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppInstallSandboxRun.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallSandboxRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallSandboxRun, StderrErrResponse] + """ + + return sync_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ).parsed + + +async def asyncio_detailed( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppInstallSandboxRun, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + run_id=run_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + run_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + """get an install sandbox run + + Args: + install_id (str): + run_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppInstallSandboxRun, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + run_id=run_id, + client=client, + ) + ).parsed diff --git a/nuon/api/installs/get_install_sandbox_runs.py b/nuon/api/installs/get_install_sandbox_runs.py index 273feca6..05680687 100644 --- a/nuon/api/installs/get_install_sandbox_runs.py +++ b/nuon/api/installs/get_install_sandbox_runs.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: """get an installs sandbox runs @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: """get an installs sandbox runs @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: """get an installs sandbox runs @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: """get an installs sandbox runs @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_install_state_history.py b/nuon/api/installs/get_install_state_history.py new file mode 100644 index 00000000..a9bfc30a --- /dev/null +++ b/nuon/api/installs/get_install_state_history.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install_state import AppInstallState +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + install_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/installs/{install_id}/state-history", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppInstallState"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppInstallState.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppInstallState"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallState"]]]: + """Get install state history. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallState']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallState"]]]: + """Get install state history. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallState']] + """ + + return sync_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppInstallState"]]]: + """Get install state history. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppInstallState']]] + """ + + kwargs = _get_kwargs( + install_id=install_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + install_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppInstallState"]]]: + """Get install state history. + + Args: + install_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppInstallState']] + """ + + return ( + await asyncio_detailed( + install_id=install_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/installs/get_install_workflow_steps.py b/nuon/api/installs/get_install_workflow_steps.py index 042bed39..7cdd4868 100644 --- a/nuon/api/installs/get_install_workflow_steps.py +++ b/nuon/api/installs/get_install_workflow_steps.py @@ -75,7 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get an install workflow step + """get all of the steps for a given install workflow Return all steps for a workflow. @@ -106,7 +106,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get an install workflow step + """get all of the steps for a given install workflow Return all steps for a workflow. @@ -132,7 +132,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get an install workflow step + """get all of the steps for a given install workflow Return all steps for a workflow. @@ -161,7 +161,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get an install workflow step + """get all of the steps for a given install workflow Return all steps for a workflow. diff --git a/nuon/api/installs/get_org_installs.py b/nuon/api/installs/get_org_installs.py index ab52b5f6..254ab42a 100644 --- a/nuon/api/installs/get_org_installs.py +++ b/nuon/api/installs/get_org_installs.py @@ -16,12 +16,7 @@ def _get_kwargs( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -40,7 +35,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -100,7 +94,6 @@ def sync_detailed( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: """get all installs for an org @@ -109,7 +102,6 @@ def sync_detailed( q (Union[Unset, str]): limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +116,6 @@ def sync_detailed( q=q, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -141,7 +132,6 @@ def sync( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: """get all installs for an org @@ -150,7 +140,6 @@ def sync( q (Union[Unset, str]): limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -166,7 +155,6 @@ def sync( q=q, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -177,7 +165,6 @@ async def asyncio_detailed( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: """get all installs for an org @@ -186,7 +173,6 @@ async def asyncio_detailed( q (Union[Unset, str]): limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -201,7 +187,6 @@ async def asyncio_detailed( q=q, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -216,7 +201,6 @@ async def asyncio( q: Union[Unset, str] = UNSET, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: """get all installs for an org @@ -225,7 +209,6 @@ async def asyncio( q (Union[Unset, str]): limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -242,6 +225,5 @@ async def asyncio( q=q, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/installs/get_workflow_step_approval_contents.py b/nuon/api/installs/get_workflow_step_approval_contents.py index 1dbb6e9f..75ffeb3b 100644 --- a/nuon/api/installs/get_workflow_step_approval_contents.py +++ b/nuon/api/installs/get_workflow_step_approval_contents.py @@ -1,10 +1,11 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, Optional, Union import httpx from ... import errors from ...client import AuthenticatedClient, Client +from ...models.get_workflow_step_approval_contents_response_200 import GetWorkflowStepApprovalContentsResponse200 from ...models.stderr_err_response import StderrErrResponse from ...types import Response @@ -24,9 +25,9 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list[int]]]: +) -> Optional[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: if response.status_code == 200: - response_200 = cast(list[int], response.json()) + response_200 = GetWorkflowStepApprovalContentsResponse200.from_dict(response.json()) return response_200 if response.status_code == 400: @@ -57,7 +58,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list[int]]]: +) -> Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,7 +73,7 @@ def sync_detailed( approval_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list[int]]]: +) -> Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: """get a workflow step approval contents Return the contents of a json plan for an approval (compressed). @@ -87,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list[int]]] + Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]] """ kwargs = _get_kwargs( @@ -109,7 +110,7 @@ def sync( approval_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list[int]]]: +) -> Optional[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: """get a workflow step approval contents Return the contents of a json plan for an approval (compressed). @@ -124,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list[int]] + Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse] """ return sync_detailed( @@ -141,7 +142,7 @@ async def asyncio_detailed( approval_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list[int]]]: +) -> Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: """get a workflow step approval contents Return the contents of a json plan for an approval (compressed). @@ -156,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list[int]]] + Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]] """ kwargs = _get_kwargs( @@ -176,7 +177,7 @@ async def asyncio( approval_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list[int]]]: +) -> Optional[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: """get a workflow step approval contents Return the contents of a json plan for an approval (compressed). @@ -191,7 +192,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list[int]] + Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse] """ return ( diff --git a/nuon/api/installs/get_workflow_steps.py b/nuon/api/installs/get_workflow_steps.py index 9ac3de69..c1f3f49c 100644 --- a/nuon/api/installs/get_workflow_steps.py +++ b/nuon/api/installs/get_workflow_steps.py @@ -75,7 +75,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get a workflow step + """get all of the steps for a given workflow Return all steps for a workflow. @@ -106,7 +106,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get a workflow step + """get all of the steps for a given workflow Return all steps for a workflow. @@ -132,7 +132,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get a workflow step + """get all of the steps for a given workflow Return all steps for a workflow. @@ -161,7 +161,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: - """get a workflow step + """get all of the steps for a given workflow Return all steps for a workflow. diff --git a/nuon/api/installs/get_workflows.py b/nuon/api/installs/get_workflows.py index bb1e4691..f4622fe1 100644 --- a/nuon/api/installs/get_workflows.py +++ b/nuon/api/installs/get_workflows.py @@ -16,12 +16,11 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -30,6 +29,14 @@ def _get_kwargs( params["page"] = page + params["planonly"] = planonly + + params["type"] = type_ + + params["created_at_gte"] = created_at_gte + + params["created_at_lte"] = created_at_lte + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -38,7 +45,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +104,10 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppWorkflow"]]]: """get workflows @@ -109,7 +118,10 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): + planonly (Union[Unset, bool]): Default: True. + type_ (Union[Unset, str]): + created_at_gte (Union[Unset, str]): + created_at_lte (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +136,10 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, + planonly=planonly, + type_=type_, + created_at_gte=created_at_gte, + created_at_lte=created_at_lte, ) response = client.get_httpx_client().request( @@ -141,7 +156,10 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppWorkflow"]]]: """get workflows @@ -152,7 +170,10 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): + planonly (Union[Unset, bool]): Default: True. + type_ (Union[Unset, str]): + created_at_gte (Union[Unset, str]): + created_at_lte (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +189,10 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, + planonly=planonly, + type_=type_, + created_at_gte=created_at_gte, + created_at_lte=created_at_lte, ).parsed @@ -179,7 +203,10 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppWorkflow"]]]: """get workflows @@ -190,7 +217,10 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): + planonly (Union[Unset, bool]): Default: True. + type_ (Union[Unset, str]): + created_at_gte (Union[Unset, str]): + created_at_lte (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -205,7 +235,10 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, + planonly=planonly, + type_=type_, + created_at_gte=created_at_gte, + created_at_lte=created_at_lte, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -220,7 +253,10 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, + planonly: Union[Unset, bool] = True, + type_: Union[Unset, str] = UNSET, + created_at_gte: Union[Unset, str] = UNSET, + created_at_lte: Union[Unset, str] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppWorkflow"]]]: """get workflows @@ -231,7 +267,10 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): + planonly (Union[Unset, bool]): Default: True. + type_ (Union[Unset, str]): + created_at_gte (Union[Unset, str]): + created_at_lte (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -248,6 +287,9 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, + planonly=planonly, + type_=type_, + created_at_gte=created_at_gte, + created_at_lte=created_at_lte, ) ).parsed diff --git a/nuon/api/installs/retry_workflow_step.py b/nuon/api/installs/retry_workflow_step.py new file mode 100644 index 00000000..e80c977d --- /dev/null +++ b/nuon/api/installs/retry_workflow_step.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_retry_workflow_by_id_response import ServiceRetryWorkflowByIDResponse +from ...models.service_retry_workflow_step_response import ServiceRetryWorkflowStepResponse +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workflow_id: str, + step_id: str, + *, + body: ServiceRetryWorkflowStepResponse, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/workflows/{workflow_id}/step/{step_id}/retry", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + if response.status_code == 201: + response_201 = ServiceRetryWorkflowByIDResponse.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + step_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowStepResponse, +) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + step_id (str): + body (ServiceRetryWorkflowStepResponse): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + step_id=step_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workflow_id: str, + step_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowStepResponse, +) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + step_id (str): + body (ServiceRetryWorkflowStepResponse): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] + """ + + return sync_detailed( + workflow_id=workflow_id, + step_id=step_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + workflow_id: str, + step_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowStepResponse, +) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + step_id (str): + body (ServiceRetryWorkflowStepResponse): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workflow_id=workflow_id, + step_id=step_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workflow_id: str, + step_id: str, + *, + client: AuthenticatedClient, + body: ServiceRetryWorkflowStepResponse, +) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + """rerun the workflow steps starting from input step id, can be used to retry a failed step + + Args: + workflow_id (str): + step_id (str): + body (ServiceRetryWorkflowStepResponse): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + step_id=step_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/update_install_config.py b/nuon/api/installs/update_install_config.py index 865f015b..3e126ef2 100644 --- a/nuon/api/installs/update_install_config.py +++ b/nuon/api/installs/update_install_config.py @@ -83,7 +83,7 @@ def sync_detailed( client: AuthenticatedClient, body: ServiceUpdateInstallConfigRequest, ) -> Response[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config + """update an install config Args: install_id (str): @@ -118,7 +118,7 @@ def sync( client: AuthenticatedClient, body: ServiceUpdateInstallConfigRequest, ) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config + """update an install config Args: install_id (str): @@ -148,7 +148,7 @@ async def asyncio_detailed( client: AuthenticatedClient, body: ServiceUpdateInstallConfigRequest, ) -> Response[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config + """update an install config Args: install_id (str): @@ -181,7 +181,7 @@ async def asyncio( client: AuthenticatedClient, body: ServiceUpdateInstallConfigRequest, ) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: - """create an install config + """update an install config Args: install_id (str): diff --git a/nuon/api/orgs/get_org_acounts.py b/nuon/api/orgs/get_org_acounts.py index 00ed48c2..0e366525 100644 --- a/nuon/api/orgs/get_org_acounts.py +++ b/nuon/api/orgs/get_org_acounts.py @@ -15,12 +15,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -37,7 +32,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -91,7 +85,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[AppAccount, StderrErrResponse]]: """Get user accounts for current org @@ -99,7 +92,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -113,7 +105,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -129,7 +120,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[AppAccount, StderrErrResponse]]: """Get user accounts for current org @@ -137,7 +127,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -152,7 +141,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -162,7 +150,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[AppAccount, StderrErrResponse]]: """Get user accounts for current org @@ -170,7 +157,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -184,7 +170,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -198,7 +183,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[AppAccount, StderrErrResponse]]: """Get user accounts for current org @@ -206,7 +190,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -222,6 +205,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/orgs/get_org_invites.py b/nuon/api/orgs/get_org_invites.py index f149afa9..48e369d3 100644 --- a/nuon/api/orgs/get_org_invites.py +++ b/nuon/api/orgs/get_org_invites.py @@ -15,12 +15,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -37,7 +32,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -96,7 +90,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: """Return org invites @@ -106,7 +99,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -120,7 +112,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -136,7 +127,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: """Return org invites @@ -146,7 +136,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -161,7 +150,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -171,7 +159,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: """Return org invites @@ -181,7 +168,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -195,7 +181,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -209,7 +194,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: """Return org invites @@ -219,7 +203,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -235,6 +218,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/orgs/get_orgs.py b/nuon/api/orgs/get_orgs.py index 623f2c28..28903731 100644 --- a/nuon/api/orgs/get_orgs.py +++ b/nuon/api/orgs/get_orgs.py @@ -12,17 +12,15 @@ def _get_kwargs( *, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} + params["q"] = q + params["offset"] = offset params["limit"] = limit @@ -37,7 +35,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -93,18 +90,18 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: """Return current user's orgs Args: + q (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -115,10 +112,10 @@ def sync_detailed( """ kwargs = _get_kwargs( + q=q, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -131,18 +128,18 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: """Return current user's orgs Args: + q (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,28 +151,28 @@ def sync( return sync_detailed( client=client, + q=q, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: """Return current user's orgs Args: + q (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -186,10 +183,10 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + q=q, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -200,18 +197,18 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, + q: Union[Unset, str] = UNSET, offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: """Return current user's orgs Args: + q (Union[Unset, str]): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -224,9 +221,9 @@ async def asyncio( return ( await asyncio_detailed( client=client, + q=q, offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/releases/get_app_releases.py b/nuon/api/releases/get_app_releases.py index 04967a6d..356b612c 100644 --- a/nuon/api/releases/get_app_releases.py +++ b/nuon/api/releases/get_app_releases.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: """get all releases for an app @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: """get all releases for an app @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: """get all releases for an app @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: """get all releases for an app @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/releases/get_component_releases.py b/nuon/api/releases/get_component_releases.py index cec8059d..71e84513 100644 --- a/nuon/api/releases/get_component_releases.py +++ b/nuon/api/releases/get_component_releases.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: """get all releases for a component @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: """get all releases for a component @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: """get all releases for a component @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: """get all releases for a component @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/releases/get_release_steps.py b/nuon/api/releases/get_release_steps.py index ab5edc00..8cde182a 100644 --- a/nuon/api/releases/get_release_steps.py +++ b/nuon/api/releases/get_release_steps.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,16 +92,14 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - """get a release + """get a release's steps Args: release_id (str): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,16 +130,14 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - """get a release + """get a release's steps Args: release_id (str): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,16 +163,14 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - """get a release + """get a release's steps Args: release_id (str): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,16 +199,14 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: - """get a release + """get a release's steps Args: release_id (str): offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/runners/create_terraform_workspace_v2.py b/nuon/api/runners/create_terraform_workspace_v2.py new file mode 100644 index 00000000..fa8d3ab3 --- /dev/null +++ b/nuon/api/runners/create_terraform_workspace_v2.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace import AppTerraformWorkspace +from ...models.service_create_terraform_workspace_request import ServiceCreateTerraformWorkspaceRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateTerraformWorkspaceRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/terraform-workspaces", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + if response.status_code == 201: + response_201 = AppTerraformWorkspace.from_dict(response.json()) + + return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspace, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspace, StderrErrResponse] + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspace, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ServiceCreateTerraformWorkspaceRequest, +) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + """create terraform workspace + + Args: + body (ServiceCreateTerraformWorkspaceRequest): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspace, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/runners/delete_terraform_workspace.py b/nuon/api/runners/delete_terraform_workspace.py index 37aab94d..b9118fe7 100644 --- a/nuon/api/runners/delete_terraform_workspace.py +++ b/nuon/api/runners/delete_terraform_workspace.py @@ -15,7 +15,7 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "delete", - "url": f"/v1/terraform-workspace/{workspace_id}", + "url": f"/v1/terraform-workspaces/{workspace_id}", } return _kwargs diff --git a/nuon/api/runners/get_latest_runner_heart_beat.py b/nuon/api/runners/get_latest_runner_heart_beat.py new file mode 100644 index 00000000..a46d615f --- /dev/null +++ b/nuon/api/runners/get_latest_runner_heart_beat.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.service_latest_runner_heart_beats import ServiceLatestRunnerHeartBeats +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}/heart-beats/latest", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + if response.status_code == 200: + response_200 = ServiceLatestRunnerHeartBeats.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + """get a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + """get a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceLatestRunnerHeartBeats, StderrErrResponse] + """ + + return sync_detailed( + runner_id=runner_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + """get a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + """get a runner + + + + Args: + runner_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[ServiceLatestRunnerHeartBeats, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_job_composite_plan.py b/nuon/api/runners/get_runner_job_composite_plan.py new file mode 100644 index 00000000..724a7761 --- /dev/null +++ b/nuon/api/runners/get_runner_job_composite_plan.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.plantypes_composite_plan import PlantypesCompositePlan +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_job_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runner-jobs/{runner_job_id}/composite-plan", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[PlantypesCompositePlan, StderrErrResponse]]: + if response.status_code == 200: + response_200 = PlantypesCompositePlan.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[PlantypesCompositePlan, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[PlantypesCompositePlan, StderrErrResponse]]: + """get runner job composite plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[PlantypesCompositePlan, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[PlantypesCompositePlan, StderrErrResponse]]: + """get runner job composite plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[PlantypesCompositePlan, StderrErrResponse] + """ + + return sync_detailed( + runner_job_id=runner_job_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[PlantypesCompositePlan, StderrErrResponse]]: + """get runner job composite plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[PlantypesCompositePlan, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_job_id=runner_job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[PlantypesCompositePlan, StderrErrResponse]]: + """get runner job composite plan + + Return a plan for a runner job. + + Args: + runner_job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[PlantypesCompositePlan, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_job_id=runner_job_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_job_plan_v2.py b/nuon/api/runners/get_runner_job_plan_v2.py new file mode 100644 index 00000000..a2e13ea5 --- /dev/null +++ b/nuon/api/runners/get_runner_job_plan_v2.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + job_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runner/{runner_id}/jobs/{job_id}/plan", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, str]]: + if response.status_code == 200: + response_200 = cast(str, response.json()) + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + job_id=job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return sync_detailed( + runner_id=runner_id, + job_id=job_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, str]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + job_id=job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[StderrErrResponse, str]]: + """get runner job plan + + Return a plan for a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, str] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + job_id=job_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_job_v2.py b/nuon/api/runners/get_runner_job_v2.py new file mode 100644 index 00000000..acafd0f5 --- /dev/null +++ b/nuon/api/runners/get_runner_job_v2.py @@ -0,0 +1,192 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_runner_job import AppRunnerJob +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + runner_id: str, + job_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/runners/{runner_id}/jobs/{job_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppRunnerJob.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJob, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + job_id=job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJob, StderrErrResponse] + """ + + return sync_detailed( + runner_id=runner_id, + job_id=job_id, + client=client, + ).parsed + + +async def asyncio_detailed( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppRunnerJob, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + runner_id=runner_id, + job_id=job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + runner_id: str, + job_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + """get runner job + + Return a runner job. + + Args: + runner_id (str): + job_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppRunnerJob, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + runner_id=runner_id, + job_id=job_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_runner_jobs.py b/nuon/api/runners/get_runner_jobs.py index a3ec3001..043b5017 100644 --- a/nuon/api/runners/get_runner_jobs.py +++ b/nuon/api/runners/get_runner_jobs.py @@ -20,12 +20,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["group"] = group @@ -50,7 +45,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -114,7 +108,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: """get runner jobs @@ -129,7 +122,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -148,7 +140,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -169,7 +160,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: """get runner jobs @@ -184,7 +174,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -204,7 +193,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -219,7 +207,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: """get runner jobs @@ -234,7 +221,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -253,7 +239,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -272,7 +257,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: """get runner jobs @@ -287,7 +271,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -308,6 +291,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/runners/get_runner_latest_heart_beat.py b/nuon/api/runners/get_runner_latest_heart_beat.py index 7d5e6e61..61170a4b 100644 --- a/nuon/api/runners/get_runner_latest_heart_beat.py +++ b/nuon/api/runners/get_runner_latest_heart_beat.py @@ -70,7 +70,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: - """get a runner + """get the latest heartbeats for a runner @@ -101,7 +101,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: - """get a runner + """get the latest heartbeats for a runner @@ -127,7 +127,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: - """get a runner + """get the latest heartbeats for a runner @@ -156,7 +156,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: - """get a runner + """get the latest heartbeats for a runner diff --git a/nuon/api/runners/get_runner_recent_health_checks.py b/nuon/api/runners/get_runner_recent_health_checks.py index 9dab4df3..d90e7f88 100644 --- a/nuon/api/runners/get_runner_recent_health_checks.py +++ b/nuon/api/runners/get_runner_recent_health_checks.py @@ -16,7 +16,6 @@ def _get_kwargs( window: Union[Unset, str] = "1h", offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -31,8 +30,6 @@ def _get_kwargs( params["limit"] = limit - params["page"] = page - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -101,7 +98,6 @@ def sync_detailed( window: Union[Unset, str] = "1h", offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: """get recent health checks @@ -113,7 +109,6 @@ def sync_detailed( window (Union[Unset, str]): Default: '1h'. offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. x_nuon_pagination_enabled (Union[Unset, bool]): Raises: @@ -129,7 +124,6 @@ def sync_detailed( window=window, offset=offset, limit=limit, - page=page, x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) @@ -147,7 +141,6 @@ def sync( window: Union[Unset, str] = "1h", offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: """get recent health checks @@ -159,7 +152,6 @@ def sync( window (Union[Unset, str]): Default: '1h'. offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. x_nuon_pagination_enabled (Union[Unset, bool]): Raises: @@ -176,7 +168,6 @@ def sync( window=window, offset=offset, limit=limit, - page=page, x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -188,7 +179,6 @@ async def asyncio_detailed( window: Union[Unset, str] = "1h", offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: """get recent health checks @@ -200,7 +190,6 @@ async def asyncio_detailed( window (Union[Unset, str]): Default: '1h'. offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. x_nuon_pagination_enabled (Union[Unset, bool]): Raises: @@ -216,7 +205,6 @@ async def asyncio_detailed( window=window, offset=offset, limit=limit, - page=page, x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) @@ -232,7 +220,6 @@ async def asyncio( window: Union[Unset, str] = "1h", offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: """get recent health checks @@ -244,7 +231,6 @@ async def asyncio( window (Union[Unset, str]): Default: '1h'. offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. x_nuon_pagination_enabled (Union[Unset, bool]): Raises: @@ -262,7 +248,6 @@ async def asyncio( window=window, offset=offset, limit=limit, - page=page, x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/runners/get_terraform_states.py b/nuon/api/runners/get_terraform_states.py index b8a4ba1b..a4afc9b5 100644 --- a/nuon/api/runners/get_terraform_states.py +++ b/nuon/api/runners/get_terraform_states.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: """get terraform states @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: """get terraform states @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: """get terraform states @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: """get terraform states @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/runners/get_terraform_states_v2.py b/nuon/api/runners/get_terraform_states_v2.py new file mode 100644 index 00000000..4e4b7231 --- /dev/null +++ b/nuon/api/runners/get_terraform_states_v2.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspace/{workspace_id}/states", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformWorkspaceState.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceState']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceState']] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceState']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + """get terraform states + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceState']] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace.py b/nuon/api/runners/get_terraform_workspace.py index 17ea418a..9751df34 100644 --- a/nuon/api/runners/get_terraform_workspace.py +++ b/nuon/api/runners/get_terraform_workspace.py @@ -15,7 +15,7 @@ def _get_kwargs( ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/terraform-workspace/{workspace_id}", + "url": f"/v1/terraform-workspaces/{workspace_id}", } return _kwargs diff --git a/nuon/api/runners/get_terraform_workspace_state_by_idv2.py b/nuon/api/runners/get_terraform_workspace_state_by_idv2.py new file mode 100644 index 00000000..1a9b84e6 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_state_by_idv2.py @@ -0,0 +1,184 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state import AppTerraformWorkspaceState +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspaces/{workspace_id}/states/{state_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + if response.status_code == 200: + response_200 = AppTerraformWorkspaceState.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + """get terraform state by ID + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[AppTerraformWorkspaceState, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_state_json_resources_v2.py b/nuon/api/runners/get_terraform_workspace_state_json_resources_v2.py new file mode 100644 index 00000000..2a987421 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_state_json_resources_v2.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_terraform_workspace_state_json_resources_v2_response_200 import ( + GetTerraformWorkspaceStateJSONResourcesV2Response200, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspace/{workspace_id}/state-json/{state_id}/resources", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GetTerraformWorkspaceStateJSONResourcesV2Response200.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + r"""get terraform state resources. This output is similar to \"terraform state list\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_states_json.py b/nuon/api/runners/get_terraform_workspace_states_json.py index 5ba82128..6f5ba956 100644 --- a/nuon/api/runners/get_terraform_workspace_states_json.py +++ b/nuon/api/runners/get_terraform_workspace_states_json.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: """get terraform states json @@ -107,7 +100,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -122,7 +114,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -139,7 +130,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: """get terraform states json @@ -148,7 +138,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -164,7 +153,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -175,7 +163,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: """get terraform states json @@ -184,7 +171,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,7 +185,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -214,7 +199,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: """get terraform states json @@ -223,7 +207,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -240,6 +223,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_states_json_by_idv2.py b/nuon/api/runners/get_terraform_workspace_states_json_by_idv2.py new file mode 100644 index 00000000..ce9ec0b3 --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_states_json_by_idv2.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_terraform_workspace_states_json_by_idv2_response_200 import ( + GetTerraformWorkspaceStatesJSONByIDV2Response200, +) +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + workspace_id: str, + state_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspaces/{workspace_id}/state-json/{state_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + if response.status_code == 200: + response_200 = GetTerraformWorkspaceStatesJSONByIDV2Response200.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse] + """ + + return sync_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + state_id=state_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + state_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + r"""get terraform state json by id. This output is same as \"terraform show --json\" + + Args: + workspace_id (str): + state_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + state_id=state_id, + client=client, + ) + ).parsed diff --git a/nuon/api/runners/get_terraform_workspace_states_jsonv2.py b/nuon/api/runners/get_terraform_workspace_states_jsonv2.py new file mode 100644 index 00000000..e476f0be --- /dev/null +++ b/nuon/api/runners/get_terraform_workspace_states_jsonv2.py @@ -0,0 +1,227 @@ +from http import HTTPStatus +from typing import Any, Optional, Union + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_terraform_workspace_state_json import AppTerraformWorkspaceStateJSON +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + workspace_id: str, + *, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["offset"] = offset + + params["limit"] = limit + + params["page"] = page + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/terraform-workspaces/{workspace_id}/state-json", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = AppTerraformWorkspaceStateJSON.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']] + """ + + return sync_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ).parsed + + +async def asyncio_detailed( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']]] + """ + + kwargs = _get_kwargs( + workspace_id=workspace_id, + offset=offset, + limit=limit, + page=page, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + workspace_id: str, + *, + client: AuthenticatedClient, + offset: Union[Unset, int] = 0, + limit: Union[Unset, int] = 10, + page: Union[Unset, int] = 0, +) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + """get terraform states json + + Args: + workspace_id (str): + offset (Union[Unset, int]): Default: 0. + limit (Union[Unset, int]): Default: 10. + page (Union[Unset, int]): Default: 0. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[StderrErrResponse, list['AppTerraformWorkspaceStateJSON']] + """ + + return ( + await asyncio_detailed( + workspace_id=workspace_id, + client=client, + offset=offset, + limit=limit, + page=page, + ) + ).parsed diff --git a/nuon/api/runners/update_runner_mng.py b/nuon/api/runners/update_runner_mng.py index 8d0800a2..ea7aa5f7 100644 --- a/nuon/api/runners/update_runner_mng.py +++ b/nuon/api/runners/update_runner_mng.py @@ -79,7 +79,7 @@ def sync_detailed( client: AuthenticatedClient, body: ServiceMngUpdateRequest, ) -> Response[Union[StderrErrResponse, bool]]: - """shut down an install runner management process + """update an install runner via the mng process Args: runner_id (str): @@ -111,7 +111,7 @@ def sync( client: AuthenticatedClient, body: ServiceMngUpdateRequest, ) -> Optional[Union[StderrErrResponse, bool]]: - """shut down an install runner management process + """update an install runner via the mng process Args: runner_id (str): @@ -138,7 +138,7 @@ async def asyncio_detailed( client: AuthenticatedClient, body: ServiceMngUpdateRequest, ) -> Response[Union[StderrErrResponse, bool]]: - """shut down an install runner management process + """update an install runner via the mng process Args: runner_id (str): @@ -168,7 +168,7 @@ async def asyncio( client: AuthenticatedClient, body: ServiceMngUpdateRequest, ) -> Optional[Union[StderrErrResponse, bool]]: - """shut down an install runner management process + """update an install runner via the mng process Args: runner_id (str): diff --git a/nuon/api/runners/update_runner_settings.py b/nuon/api/runners/update_runner_settings.py index 5fbc831c..7d6a7d1e 100644 --- a/nuon/api/runners/update_runner_settings.py +++ b/nuon/api/runners/update_runner_settings.py @@ -81,7 +81,7 @@ def sync_detailed( client: AuthenticatedClient, body: ServiceUpdateRunnerSettingsRequest, ) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: - """update a runner job execution + """update a runner's settings via its runner settings group Args: runner_id (str): @@ -113,7 +113,7 @@ def sync( client: AuthenticatedClient, body: ServiceUpdateRunnerSettingsRequest, ) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: - """update a runner job execution + """update a runner's settings via its runner settings group Args: runner_id (str): @@ -140,7 +140,7 @@ async def asyncio_detailed( client: AuthenticatedClient, body: ServiceUpdateRunnerSettingsRequest, ) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: - """update a runner job execution + """update a runner's settings via its runner settings group Args: runner_id (str): @@ -170,7 +170,7 @@ async def asyncio( client: AuthenticatedClient, body: ServiceUpdateRunnerSettingsRequest, ) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: - """update a runner job execution + """update a runner's settings via its runner settings group Args: runner_id (str): diff --git a/nuon/api/runnersrunner/get_runner.py b/nuon/api/runnersrunner/get_runner.py index 3c2429af..8e7e2463 100644 --- a/nuon/api/runnersrunner/get_runner.py +++ b/nuon/api/runnersrunner/get_runner.py @@ -70,7 +70,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppRunner, StderrErrResponse]]: - """get a runner + """get a runner by id Return a runner. @@ -101,7 +101,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[AppRunner, StderrErrResponse]]: - """get a runner + """get a runner by id Return a runner. @@ -127,7 +127,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[AppRunner, StderrErrResponse]]: - """get a runner + """get a runner by id Return a runner. @@ -156,7 +156,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[AppRunner, StderrErrResponse]]: - """get a runner + """get a runner by id Return a runner. diff --git a/nuon/api/runnersrunner/get_runner_job_executions.py b/nuon/api/runnersrunner/get_runner_job_executions.py index 49372fce..7042efcc 100644 --- a/nuon/api/runnersrunner/get_runner_job_executions.py +++ b/nuon/api/runnersrunner/get_runner_job_executions.py @@ -16,12 +16,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -38,7 +33,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -98,7 +92,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: """get runner job executions @@ -109,7 +102,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +116,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -141,7 +132,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: """get runner job executions @@ -152,7 +142,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -168,7 +157,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -179,7 +167,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: """get runner job executions @@ -190,7 +177,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -205,7 +191,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -220,7 +205,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: """get runner job executions @@ -231,7 +215,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -248,6 +231,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/api/vcs/delete_vcs_connection.py b/nuon/api/vcs/delete_vcs_connection.py new file mode 100644 index 00000000..ba41ab77 --- /dev/null +++ b/nuon/api/vcs/delete_vcs_connection.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + connection_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/vcs/connections/{connection_id}", + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[Union[Any, StderrErrResponse]]: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[Union[Any, StderrErrResponse]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[Any, StderrErrResponse]]: + """Deletes a VCS connection + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + connection_id=connection_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[Any, StderrErrResponse]]: + """Deletes a VCS connection + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, StderrErrResponse] + """ + + return sync_detailed( + connection_id=connection_id, + client=client, + ).parsed + + +async def asyncio_detailed( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Response[Union[Any, StderrErrResponse]]: + """Deletes a VCS connection + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Union[Any, StderrErrResponse]] + """ + + kwargs = _get_kwargs( + connection_id=connection_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + connection_id: str, + *, + client: AuthenticatedClient, +) -> Optional[Union[Any, StderrErrResponse]]: + """Deletes a VCS connection + + Args: + connection_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Union[Any, StderrErrResponse] + """ + + return ( + await asyncio_detailed( + connection_id=connection_id, + client=client, + ) + ).parsed diff --git a/nuon/api/vcs/get_org_vcs_connections.py b/nuon/api/vcs/get_org_vcs_connections.py index 37449de4..7c2ab538 100644 --- a/nuon/api/vcs/get_org_vcs_connections.py +++ b/nuon/api/vcs/get_org_vcs_connections.py @@ -15,12 +15,7 @@ def _get_kwargs( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> dict[str, Any]: - headers: dict[str, Any] = {} - if not isinstance(x_nuon_pagination_enabled, Unset): - headers["x-nuon-pagination-enabled"] = "true" if x_nuon_pagination_enabled else "false" - params: dict[str, Any] = {} params["offset"] = offset @@ -37,7 +32,6 @@ def _get_kwargs( "params": params, } - _kwargs["headers"] = headers return _kwargs @@ -96,7 +90,6 @@ def sync_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: """get vcs connection for an org @@ -104,7 +97,6 @@ def sync_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -118,7 +110,6 @@ def sync_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = client.get_httpx_client().request( @@ -134,7 +125,6 @@ def sync( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: """get vcs connection for an org @@ -142,7 +132,6 @@ def sync( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -157,7 +146,6 @@ def sync( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ).parsed @@ -167,7 +155,6 @@ async def asyncio_detailed( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: """get vcs connection for an org @@ -175,7 +162,6 @@ async def asyncio_detailed( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -189,7 +175,6 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -203,7 +188,6 @@ async def asyncio( offset: Union[Unset, int] = 0, limit: Union[Unset, int] = 10, page: Union[Unset, int] = 0, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, ) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: """get vcs connection for an org @@ -211,7 +195,6 @@ async def asyncio( offset (Union[Unset, int]): Default: 0. limit (Union[Unset, int]): Default: 10. page (Union[Unset, int]): Default: 0. - x_nuon_pagination_enabled (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -227,6 +210,5 @@ async def asyncio( offset=offset, limit=limit, page=page, - x_nuon_pagination_enabled=x_nuon_pagination_enabled, ) ).parsed diff --git a/nuon/models/__init__.py b/nuon/models/__init__.py index 6d574099..8caa8bc0 100644 --- a/nuon/models/__init__.py +++ b/nuon/models/__init__.py @@ -35,6 +35,7 @@ from .app_app_stack_config import AppAppStackConfig from .app_aws_account import AppAWSAccount from .app_aws_stack_outputs import AppAWSStackOutputs +from .app_aws_stack_outputs_break_glass_role_arns import AppAWSStackOutputsBreakGlassRoleArns from .app_awsecr_image_config import AppAWSECRImageConfig from .app_awsiam_role_type import AppAWSIAMRoleType from .app_azure_account import AppAzureAccount @@ -54,6 +55,7 @@ from .app_connected_github_vcs_config import AppConnectedGithubVCSConfig from .app_docker_build_component_config import AppDockerBuildComponentConfig from .app_docker_build_component_config_env_vars import AppDockerBuildComponentConfigEnvVars +from .app_drifted_object import AppDriftedObject from .app_external_image_component_config import AppExternalImageComponentConfig from .app_helm_chart import AppHelmChart from .app_helm_component_config import AppHelmComponentConfig @@ -85,15 +87,18 @@ from .app_install_inputs_redacted_values import AppInstallInputsRedactedValues from .app_install_inputs_values import AppInstallInputsValues from .app_install_links import AppInstallLinks +from .app_install_metadata import AppInstallMetadata from .app_install_sandbox import AppInstallSandbox from .app_install_sandbox_run import AppInstallSandboxRun from .app_install_sandbox_run_outputs import AppInstallSandboxRunOutputs from .app_install_stack import AppInstallStack from .app_install_stack_outputs import AppInstallStackOutputs from .app_install_stack_outputs_data import AppInstallStackOutputsData +from .app_install_stack_outputs_data_contents import AppInstallStackOutputsDataContents from .app_install_stack_version import AppInstallStackVersion from .app_install_stack_version_run import AppInstallStackVersionRun from .app_install_stack_version_run_data import AppInstallStackVersionRunData +from .app_install_stack_version_run_data_contents import AppInstallStackVersionRunDataContents from .app_install_state import AppInstallState from .app_installer import AppInstaller from .app_installer_metadata import AppInstallerMetadata @@ -102,6 +107,7 @@ from .app_job_component_config_env_vars import AppJobComponentConfigEnvVars from .app_json_map import AppJSONMap from .app_kubernetes_manifest_component_config import AppKubernetesManifestComponentConfig +from .app_latest_runner_heart_beat import AppLatestRunnerHeartBeat from .app_log_stream import AppLogStream from .app_log_stream_attrs import AppLogStreamAttrs from .app_notifications_config import AppNotificationsConfig @@ -164,6 +170,9 @@ from .app_terraform_workspace_lock import AppTerraformWorkspaceLock from .app_terraform_workspace_state import AppTerraformWorkspaceState from .app_terraform_workspace_state_json import AppTerraformWorkspaceStateJSON +from .app_user_journey import AppUserJourney +from .app_user_journey_step import AppUserJourneyStep +from .app_user_journey_step_metadata import AppUserJourneyStepMetadata from .app_vcs_connection import AppVCSConnection from .app_vcs_connection_commit import AppVCSConnectionCommit from .app_waitlist import AppWaitlist @@ -181,22 +190,87 @@ from .app_workflow_step_response_type import AppWorkflowStepResponseType from .app_workflow_type import AppWorkflowType from .config_app_policy_type import ConfigAppPolicyType +from .configs_oci_registry_auth import ConfigsOCIRegistryAuth +from .configs_oci_registry_repository import ConfigsOCIRegistryRepository +from .configs_oci_registry_type import ConfigsOCIRegistryType +from .credentials_assume_role_config import CredentialsAssumeRoleConfig +from .credentials_service_principal_credentials import CredentialsServicePrincipalCredentials +from .credentials_static_credentials import CredentialsStaticCredentials +from .generics_null_time import GenericsNullTime from .get_app_config_template_type import GetAppConfigTemplateType from .get_config_schema_response_200 import GetConfigSchemaResponse200 from .get_install_component_outputs_response_200 import GetInstallComponentOutputsResponse200 from .get_terraform_workspace_state_json_resources_response_200 import ( GetTerraformWorkspaceStateJSONResourcesResponse200, ) +from .get_terraform_workspace_state_json_resources_v2_response_200 import ( + GetTerraformWorkspaceStateJSONResourcesV2Response200, +) from .get_terraform_workspace_states_json_by_id_response_200 import GetTerraformWorkspaceStatesJSONByIDResponse200 +from .get_terraform_workspace_states_json_by_idv2_response_200 import GetTerraformWorkspaceStatesJSONByIDV2Response200 +from .get_workflow_step_approval_contents_response_200 import GetWorkflowStepApprovalContentsResponse200 +from .github_com_powertoolsdev_mono_pkg_aws_credentials_config import GithubComPowertoolsdevMonoPkgAwsCredentialsConfig +from .github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, +) from .github_com_powertoolsdev_mono_pkg_types_state_state import GithubComPowertoolsdevMonoPkgTypesStateState from .github_com_powertoolsdev_mono_pkg_types_state_state_components import ( GithubComPowertoolsdevMonoPkgTypesStateStateComponents, ) from .helpers_create_install_config_params import HelpersCreateInstallConfigParams +from .helpers_install_metadata import HelpersInstallMetadata +from .iam_static_credentials import IamStaticCredentials +from .iam_two_step_config import IamTwoStepConfig +from .kube_cluster_info import KubeClusterInfo +from .kube_cluster_info_env_vars import KubeClusterInfoEnvVars from .lock_terraform_workspace_body import LockTerraformWorkspaceBody from .outputs_secret_sync_output import OutputsSecretSyncOutput from .permissions_permission import PermissionsPermission from .permissions_set import PermissionsSet +from .plantypes_action_workflow_run_plan import PlantypesActionWorkflowRunPlan +from .plantypes_action_workflow_run_plan_attrs import PlantypesActionWorkflowRunPlanAttrs +from .plantypes_action_workflow_run_plan_builtin_env_vars import PlantypesActionWorkflowRunPlanBuiltinEnvVars +from .plantypes_action_workflow_run_plan_override_env_vars import PlantypesActionWorkflowRunPlanOverrideEnvVars +from .plantypes_action_workflow_run_step_plan import PlantypesActionWorkflowRunStepPlan +from .plantypes_action_workflow_run_step_plan_attrs import PlantypesActionWorkflowRunStepPlanAttrs +from .plantypes_action_workflow_run_step_plan_interpolated_env_vars import ( + PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars, +) +from .plantypes_build_plan import PlantypesBuildPlan +from .plantypes_composite_plan import PlantypesCompositePlan +from .plantypes_container_image_pull_plan import PlantypesContainerImagePullPlan +from .plantypes_deploy_plan import PlantypesDeployPlan +from .plantypes_docker_build_plan import PlantypesDockerBuildPlan +from .plantypes_docker_build_plan_build_args import PlantypesDockerBuildPlanBuildArgs +from .plantypes_git_source import PlantypesGitSource +from .plantypes_helm_build_plan import PlantypesHelmBuildPlan +from .plantypes_helm_build_plan_labels import PlantypesHelmBuildPlanLabels +from .plantypes_helm_deploy_plan import PlantypesHelmDeployPlan +from .plantypes_helm_sandbox_mode import PlantypesHelmSandboxMode +from .plantypes_helm_value import PlantypesHelmValue +from .plantypes_kubernetes_manifest_deploy_plan import PlantypesKubernetesManifestDeployPlan +from .plantypes_kubernetes_sandbox_mode import PlantypesKubernetesSandboxMode +from .plantypes_kubernetes_secret_sync import PlantypesKubernetesSecretSync +from .plantypes_noop_deploy_plan import PlantypesNoopDeployPlan +from .plantypes_sandbox_mode import PlantypesSandboxMode +from .plantypes_sandbox_mode_outputs import PlantypesSandboxModeOutputs +from .plantypes_sandbox_run_plan import PlantypesSandboxRunPlan +from .plantypes_sandbox_run_plan_env_vars import PlantypesSandboxRunPlanEnvVars +from .plantypes_sandbox_run_plan_policies import PlantypesSandboxRunPlanPolicies +from .plantypes_sandbox_run_plan_vars import PlantypesSandboxRunPlanVars +from .plantypes_sync_oci_plan import PlantypesSyncOCIPlan +from .plantypes_sync_secrets_plan import PlantypesSyncSecretsPlan +from .plantypes_terraform_backend import PlantypesTerraformBackend +from .plantypes_terraform_build_plan import PlantypesTerraformBuildPlan +from .plantypes_terraform_build_plan_labels import PlantypesTerraformBuildPlanLabels +from .plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks +from .plantypes_terraform_deploy_hooks_env_vars import PlantypesTerraformDeployHooksEnvVars +from .plantypes_terraform_deploy_plan import PlantypesTerraformDeployPlan +from .plantypes_terraform_deploy_plan_env_vars import PlantypesTerraformDeployPlanEnvVars +from .plantypes_terraform_deploy_plan_policies import PlantypesTerraformDeployPlanPolicies +from .plantypes_terraform_deploy_plan_vars import PlantypesTerraformDeployPlanVars +from .plantypes_terraform_local_archive import PlantypesTerraformLocalArchive +from .plantypes_terraform_sandbox_mode import PlantypesTerraformSandboxMode from .refs_ref import RefsRef from .refs_ref_type import RefsRefType from .service_app_awsiam_policy_config import ServiceAppAWSIAMPolicyConfig @@ -208,6 +282,7 @@ from .service_app_policy_config import ServiceAppPolicyConfig from .service_app_secret_config import ServiceAppSecretConfig from .service_aws_ecr_image_config_request import ServiceAwsECRImageConfigRequest +from .service_build_all_components_request import ServiceBuildAllComponentsRequest from .service_cancel_runner_job_request import ServiceCancelRunnerJobRequest from .service_cli_config import ServiceCLIConfig from .service_component_children import ServiceComponentChildren @@ -222,6 +297,7 @@ ServiceCreateActionWorkflowConfigStepRequestEnvVars, ) from .service_create_action_workflow_config_trigger_request import ServiceCreateActionWorkflowConfigTriggerRequest +from .service_create_app_action_request import ServiceCreateAppActionRequest from .service_create_app_action_workflow_request import ServiceCreateAppActionWorkflowRequest from .service_create_app_branch_request import ServiceCreateAppBranchRequest from .service_create_app_break_glass_config_request import ServiceCreateAppBreakGlassConfigRequest @@ -257,6 +333,7 @@ from .service_create_install_action_workflow_run_request_run_env_vars import ( ServiceCreateInstallActionWorkflowRunRequestRunEnvVars, ) +from .service_create_install_component_deploy_request import ServiceCreateInstallComponentDeployRequest from .service_create_install_config_request import ServiceCreateInstallConfigRequest from .service_create_install_deploy_request import ServiceCreateInstallDeployRequest from .service_create_install_inputs_request import ServiceCreateInstallInputsRequest @@ -283,7 +360,10 @@ ServiceCreateTerraformModuleComponentConfigRequestVariables, ) from .service_create_terraform_workspace_request import ServiceCreateTerraformWorkspaceRequest +from .service_create_user_journey_request import ServiceCreateUserJourneyRequest +from .service_create_user_journey_step_req import ServiceCreateUserJourneyStepReq from .service_create_workflow_step_approval_response_request import ServiceCreateWorkflowStepApprovalResponseRequest +from .service_create_workflow_step_approval_response_response import ServiceCreateWorkflowStepApprovalResponseResponse from .service_deploy_install_components_request import ServiceDeployInstallComponentsRequest from .service_deprovision_install_request import ServiceDeprovisionInstallRequest from .service_deprovision_install_sandbox_request import ServiceDeprovisionInstallSandboxRequest @@ -291,9 +371,11 @@ from .service_forget_install_request import ServiceForgetInstallRequest from .service_graceful_shutdown_request import ServiceGracefulShutdownRequest from .service_install_phone_home_request import ServiceInstallPhoneHomeRequest +from .service_latest_runner_heart_beats import ServiceLatestRunnerHeartBeats from .service_mng_shut_down_request import ServiceMngShutDownRequest from .service_mng_update_request import ServiceMngUpdateRequest from .service_mng_vm_shut_down_request import ServiceMngVMShutDownRequest +from .service_patch_install_config_params import ServicePatchInstallConfigParams from .service_public_git_vcs_action_workflow_config_request import ServicePublicGitVCSActionWorkflowConfigRequest from .service_public_git_vcs_config_request import ServicePublicGitVCSConfigRequest from .service_public_git_vcs_sandbox_config_request import ServicePublicGitVCSSandboxConfigRequest @@ -306,6 +388,7 @@ from .service_retry_workflow_by_id_response import ServiceRetryWorkflowByIDResponse from .service_retry_workflow_request import ServiceRetryWorkflowRequest from .service_retry_workflow_response import ServiceRetryWorkflowResponse +from .service_retry_workflow_step_response import ServiceRetryWorkflowStepResponse from .service_runner_connection_status import ServiceRunnerConnectionStatus from .service_sync_secrets_request import ServiceSyncSecretsRequest from .service_teardown_install_component_request import ServiceTeardownInstallComponentRequest @@ -323,6 +406,7 @@ from .service_update_installer_request_metadata import ServiceUpdateInstallerRequestMetadata from .service_update_org_request import ServiceUpdateOrgRequest from .service_update_runner_settings_request import ServiceUpdateRunnerSettingsRequest +from .service_update_user_journey_step_request import ServiceUpdateUserJourneyStepRequest from .service_update_workflow_request import ServiceUpdateWorkflowRequest from .service_waitlist_request import ServiceWaitlistRequest from .state_action_workflow_state import StateActionWorkflowState @@ -330,7 +414,7 @@ from .state_actions_state import StateActionsState from .state_actions_state_workflows import StateActionsStateWorkflows from .state_app_state import StateAppState -from .state_app_state_secrets import StateAppStateSecrets +from .state_app_state_variables import StateAppStateVariables from .state_aws_cloud_account import StateAWSCloudAccount from .state_azure_cloud_account import StateAzureCloudAccount from .state_cloud_account import StateCloudAccount @@ -389,6 +473,7 @@ "AppAWSECRImageConfig", "AppAWSIAMRoleType", "AppAWSStackOutputs", + "AppAWSStackOutputsBreakGlassRoleArns", "AppAzureAccount", "AppAzureStackOutputs", "AppCloudPlatform", @@ -406,6 +491,7 @@ "AppConnectedGithubVCSConfig", "AppDockerBuildComponentConfig", "AppDockerBuildComponentConfigEnvVars", + "AppDriftedObject", "AppExternalImageComponentConfig", "AppHelmChart", "AppHelmComponentConfig", @@ -440,20 +526,24 @@ "AppInstallInputsRedactedValues", "AppInstallInputsValues", "AppInstallLinks", + "AppInstallMetadata", "AppInstallSandbox", "AppInstallSandboxRun", "AppInstallSandboxRunOutputs", "AppInstallStack", "AppInstallStackOutputs", "AppInstallStackOutputsData", + "AppInstallStackOutputsDataContents", "AppInstallStackVersion", "AppInstallStackVersionRun", "AppInstallStackVersionRunData", + "AppInstallStackVersionRunDataContents", "AppInstallState", "AppJobComponentConfig", "AppJobComponentConfigEnvVars", "AppJSONMap", "AppKubernetesManifestComponentConfig", + "AppLatestRunnerHeartBeat", "AppLogStream", "AppLogStreamAttrs", "AppNotificationsConfig", @@ -514,6 +604,9 @@ "AppTerraformWorkspaceLock", "AppTerraformWorkspaceState", "AppTerraformWorkspaceStateJSON", + "AppUserJourney", + "AppUserJourneyStep", + "AppUserJourneyStepMetadata", "AppVCSConnection", "AppVCSConnectionCommit", "AppWaitlist", @@ -531,18 +624,77 @@ "AppWorkflowStepResponseType", "AppWorkflowType", "ConfigAppPolicyType", + "ConfigsOCIRegistryAuth", + "ConfigsOCIRegistryRepository", + "ConfigsOCIRegistryType", + "CredentialsAssumeRoleConfig", + "CredentialsServicePrincipalCredentials", + "CredentialsStaticCredentials", + "GenericsNullTime", "GetAppConfigTemplateType", "GetConfigSchemaResponse200", "GetInstallComponentOutputsResponse200", "GetTerraformWorkspaceStateJSONResourcesResponse200", + "GetTerraformWorkspaceStateJSONResourcesV2Response200", "GetTerraformWorkspaceStatesJSONByIDResponse200", + "GetTerraformWorkspaceStatesJSONByIDV2Response200", + "GetWorkflowStepApprovalContentsResponse200", + "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig", + "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig", "GithubComPowertoolsdevMonoPkgTypesStateState", "GithubComPowertoolsdevMonoPkgTypesStateStateComponents", "HelpersCreateInstallConfigParams", + "HelpersInstallMetadata", + "IamStaticCredentials", + "IamTwoStepConfig", + "KubeClusterInfo", + "KubeClusterInfoEnvVars", "LockTerraformWorkspaceBody", "OutputsSecretSyncOutput", "PermissionsPermission", "PermissionsSet", + "PlantypesActionWorkflowRunPlan", + "PlantypesActionWorkflowRunPlanAttrs", + "PlantypesActionWorkflowRunPlanBuiltinEnvVars", + "PlantypesActionWorkflowRunPlanOverrideEnvVars", + "PlantypesActionWorkflowRunStepPlan", + "PlantypesActionWorkflowRunStepPlanAttrs", + "PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars", + "PlantypesBuildPlan", + "PlantypesCompositePlan", + "PlantypesContainerImagePullPlan", + "PlantypesDeployPlan", + "PlantypesDockerBuildPlan", + "PlantypesDockerBuildPlanBuildArgs", + "PlantypesGitSource", + "PlantypesHelmBuildPlan", + "PlantypesHelmBuildPlanLabels", + "PlantypesHelmDeployPlan", + "PlantypesHelmSandboxMode", + "PlantypesHelmValue", + "PlantypesKubernetesManifestDeployPlan", + "PlantypesKubernetesSandboxMode", + "PlantypesKubernetesSecretSync", + "PlantypesNoopDeployPlan", + "PlantypesSandboxMode", + "PlantypesSandboxModeOutputs", + "PlantypesSandboxRunPlan", + "PlantypesSandboxRunPlanEnvVars", + "PlantypesSandboxRunPlanPolicies", + "PlantypesSandboxRunPlanVars", + "PlantypesSyncOCIPlan", + "PlantypesSyncSecretsPlan", + "PlantypesTerraformBackend", + "PlantypesTerraformBuildPlan", + "PlantypesTerraformBuildPlanLabels", + "PlantypesTerraformDeployHooks", + "PlantypesTerraformDeployHooksEnvVars", + "PlantypesTerraformDeployPlan", + "PlantypesTerraformDeployPlanEnvVars", + "PlantypesTerraformDeployPlanPolicies", + "PlantypesTerraformDeployPlanVars", + "PlantypesTerraformLocalArchive", + "PlantypesTerraformSandboxMode", "RefsRef", "RefsRefType", "ServiceAppAWSIAMPolicyConfig", @@ -554,6 +706,7 @@ "ServiceAppPolicyConfig", "ServiceAppSecretConfig", "ServiceAwsECRImageConfigRequest", + "ServiceBuildAllComponentsRequest", "ServiceCancelRunnerJobRequest", "ServiceCLIConfig", "ServiceComponentChildren", @@ -564,6 +717,7 @@ "ServiceCreateActionWorkflowConfigStepRequest", "ServiceCreateActionWorkflowConfigStepRequestEnvVars", "ServiceCreateActionWorkflowConfigTriggerRequest", + "ServiceCreateAppActionRequest", "ServiceCreateAppActionWorkflowRequest", "ServiceCreateAppBranchRequest", "ServiceCreateAppBreakGlassConfigRequest", @@ -595,6 +749,7 @@ "ServiceCreateHelmComponentConfigRequestValues", "ServiceCreateInstallActionWorkflowRunRequest", "ServiceCreateInstallActionWorkflowRunRequestRunEnvVars", + "ServiceCreateInstallComponentDeployRequest", "ServiceCreateInstallConfigRequest", "ServiceCreateInstallDeployRequest", "ServiceCreateInstallerRequest", @@ -615,7 +770,10 @@ "ServiceCreateTerraformModuleComponentConfigRequestEnvVars", "ServiceCreateTerraformModuleComponentConfigRequestVariables", "ServiceCreateTerraformWorkspaceRequest", + "ServiceCreateUserJourneyRequest", + "ServiceCreateUserJourneyStepReq", "ServiceCreateWorkflowStepApprovalResponseRequest", + "ServiceCreateWorkflowStepApprovalResponseResponse", "ServiceDeployInstallComponentsRequest", "ServiceDeprovisionInstallRequest", "ServiceDeprovisionInstallSandboxRequest", @@ -623,9 +781,11 @@ "ServiceForgetInstallRequest", "ServiceGracefulShutdownRequest", "ServiceInstallPhoneHomeRequest", + "ServiceLatestRunnerHeartBeats", "ServiceMngShutDownRequest", "ServiceMngUpdateRequest", "ServiceMngVMShutDownRequest", + "ServicePatchInstallConfigParams", "ServicePublicGitVCSActionWorkflowConfigRequest", "ServicePublicGitVCSConfigRequest", "ServicePublicGitVCSSandboxConfigRequest", @@ -638,6 +798,7 @@ "ServiceRetryWorkflowByIDResponse", "ServiceRetryWorkflowRequest", "ServiceRetryWorkflowResponse", + "ServiceRetryWorkflowStepResponse", "ServiceRunnerConnectionStatus", "ServiceSyncSecretsRequest", "ServiceTeardownInstallComponentRequest", @@ -655,6 +816,7 @@ "ServiceUpdateInstallRequest", "ServiceUpdateOrgRequest", "ServiceUpdateRunnerSettingsRequest", + "ServiceUpdateUserJourneyStepRequest", "ServiceUpdateWorkflowRequest", "ServiceWaitlistRequest", "StateActionsState", @@ -662,7 +824,7 @@ "StateActionWorkflowState", "StateActionWorkflowStateOutputs", "StateAppState", - "StateAppStateSecrets", + "StateAppStateVariables", "StateAWSCloudAccount", "StateAzureCloudAccount", "StateCloudAccount", diff --git a/nuon/models/app_account.py b/nuon/models/app_account.py index b00e72d4..1ed0c67e 100644 --- a/nuon/models/app_account.py +++ b/nuon/models/app_account.py @@ -9,6 +9,7 @@ if TYPE_CHECKING: from ..models.app_role import AppRole + from ..models.app_user_journey import AppUserJourney from ..models.permissions_set import PermissionsSet @@ -28,6 +29,7 @@ class AppAccount: roles (Union[Unset, list['AppRole']]): subject (Union[Unset, str]): updated_at (Union[Unset, str]): + user_journeys (Union[Unset, list['AppUserJourney']]): """ account_type: Union[Unset, AppAccountType] = UNSET @@ -39,6 +41,7 @@ class AppAccount: roles: Union[Unset, list["AppRole"]] = UNSET subject: Union[Unset, str] = UNSET updated_at: Union[Unset, str] = UNSET + user_journeys: Union[Unset, list["AppUserJourney"]] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -71,6 +74,13 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at + user_journeys: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.user_journeys, Unset): + user_journeys = [] + for user_journeys_item_data in self.user_journeys: + user_journeys_item = user_journeys_item_data.to_dict() + user_journeys.append(user_journeys_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -92,12 +102,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["subject"] = subject if updated_at is not UNSET: field_dict["updated_at"] = updated_at + if user_journeys is not UNSET: + field_dict["user_journeys"] = user_journeys return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.app_role import AppRole + from ..models.app_user_journey import AppUserJourney from ..models.permissions_set import PermissionsSet d = dict(src_dict) @@ -134,6 +147,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) + user_journeys = [] + _user_journeys = d.pop("user_journeys", UNSET) + for user_journeys_item_data in _user_journeys or []: + user_journeys_item = AppUserJourney.from_dict(user_journeys_item_data) + + user_journeys.append(user_journeys_item) + app_account = cls( account_type=account_type, created_at=created_at, @@ -144,6 +164,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: roles=roles, subject=subject, updated_at=updated_at, + user_journeys=user_journeys, ) app_account.additional_properties = d diff --git a/nuon/models/app_action_workflow_config.py b/nuon/models/app_action_workflow_config.py index e97e81b7..7a3bf90e 100644 --- a/nuon/models/app_action_workflow_config.py +++ b/nuon/models/app_action_workflow_config.py @@ -22,6 +22,7 @@ class AppActionWorkflowConfig: action_workflow_id (Union[Unset, str]): app_config_id (Union[Unset, str]): app_id (Union[Unset, str]): + break_glass_role_arn (Union[Unset, str]): component_dependency_ids (Union[Unset, list[str]]): created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): @@ -38,6 +39,7 @@ class AppActionWorkflowConfig: action_workflow_id: Union[Unset, str] = UNSET app_config_id: Union[Unset, str] = UNSET app_id: Union[Unset, str] = UNSET + break_glass_role_arn: Union[Unset, str] = UNSET component_dependency_ids: Union[Unset, list[str]] = UNSET created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET @@ -57,6 +59,8 @@ def to_dict(self) -> dict[str, Any]: app_id = self.app_id + break_glass_role_arn = self.break_glass_role_arn + component_dependency_ids: Union[Unset, list[str]] = UNSET if not isinstance(self.component_dependency_ids, Unset): component_dependency_ids = self.component_dependency_ids @@ -105,6 +109,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["app_config_id"] = app_config_id if app_id is not UNSET: field_dict["app_id"] = app_id + if break_glass_role_arn is not UNSET: + field_dict["break_glass_role_arn"] = break_glass_role_arn if component_dependency_ids is not UNSET: field_dict["component_dependency_ids"] = component_dependency_ids if created_at is not UNSET: @@ -141,6 +147,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_id = d.pop("app_id", UNSET) + break_glass_role_arn = d.pop("break_glass_role_arn", UNSET) + component_dependency_ids = cast(list[str], d.pop("component_dependency_ids", UNSET)) created_at = d.pop("created_at", UNSET) @@ -180,6 +188,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: action_workflow_id=action_workflow_id, app_config_id=app_config_id, app_id=app_id, + break_glass_role_arn=break_glass_role_arn, component_dependency_ids=component_dependency_ids, created_at=created_at, created_by_id=created_by_id, diff --git a/nuon/models/app_action_workflow_trigger_config.py b/nuon/models/app_action_workflow_trigger_config.py index c3790d83..12faeda8 100644 --- a/nuon/models/app_action_workflow_trigger_config.py +++ b/nuon/models/app_action_workflow_trigger_config.py @@ -26,6 +26,7 @@ class AppActionWorkflowTriggerConfig: created_by_id (Union[Unset, str]): cron_schedule (Union[Unset, str]): id (Union[Unset, str]): + index (Union[Unset, int]): type_ (Union[Unset, str]): updated_at (Union[Unset, str]): """ @@ -39,6 +40,7 @@ class AppActionWorkflowTriggerConfig: created_by_id: Union[Unset, str] = UNSET cron_schedule: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET + index: Union[Unset, int] = UNSET type_: Union[Unset, str] = UNSET updated_at: Union[Unset, str] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -64,6 +66,8 @@ def to_dict(self) -> dict[str, Any]: id = self.id + index = self.index + type_ = self.type_ updated_at = self.updated_at @@ -89,6 +93,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["cron_schedule"] = cron_schedule if id is not UNSET: field_dict["id"] = id + if index is not UNSET: + field_dict["index"] = index if type_ is not UNSET: field_dict["type"] = type_ if updated_at is not UNSET: @@ -124,6 +130,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) + index = d.pop("index", UNSET) + type_ = d.pop("type", UNSET) updated_at = d.pop("updated_at", UNSET) @@ -138,6 +146,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id=created_by_id, cron_schedule=cron_schedule, id=id, + index=index, type_=type_, updated_at=updated_at, ) diff --git a/nuon/models/app_app.py b/nuon/models/app_app.py index 8048d0f0..4da12f71 100644 --- a/nuon/models/app_app.py +++ b/nuon/models/app_app.py @@ -7,6 +7,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.app_app_config import AppAppConfig from ..models.app_app_input_config import AppAppInputConfig from ..models.app_app_links import AppAppLinks from ..models.app_app_runner_config import AppAppRunnerConfig @@ -21,6 +22,7 @@ class AppApp: """ Attributes: + app_configs (Union[Unset, list['AppAppConfig']]): cloud_platform (Union[Unset, str]): config_directory (Union[Unset, str]): config_repo (Union[Unset, str]): @@ -42,6 +44,7 @@ class AppApp: updated_at (Union[Unset, str]): """ + app_configs: Union[Unset, list["AppAppConfig"]] = UNSET cloud_platform: Union[Unset, str] = UNSET config_directory: Union[Unset, str] = UNSET config_repo: Union[Unset, str] = UNSET @@ -64,6 +67,13 @@ class AppApp: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + app_configs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.app_configs, Unset): + app_configs = [] + for app_configs_item_data in self.app_configs: + app_configs_item = app_configs_item_data.to_dict() + app_configs.append(app_configs_item) + cloud_platform = self.cloud_platform config_directory = self.config_directory @@ -115,6 +125,8 @@ def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if app_configs is not UNSET: + field_dict["app_configs"] = app_configs if cloud_platform is not UNSET: field_dict["cloud_platform"] = cloud_platform if config_directory is not UNSET: @@ -158,6 +170,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_app_config import AppAppConfig from ..models.app_app_input_config import AppAppInputConfig from ..models.app_app_links import AppAppLinks from ..models.app_app_runner_config import AppAppRunnerConfig @@ -165,6 +178,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.app_notifications_config import AppNotificationsConfig d = dict(src_dict) + app_configs = [] + _app_configs = d.pop("app_configs", UNSET) + for app_configs_item_data in _app_configs or []: + app_configs_item = AppAppConfig.from_dict(app_configs_item_data) + + app_configs.append(app_configs_item) + cloud_platform = d.pop("cloud_platform", UNSET) config_directory = d.pop("config_directory", UNSET) @@ -229,6 +249,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) app_app = cls( + app_configs=app_configs, cloud_platform=cloud_platform, config_directory=config_directory, config_repo=config_repo, diff --git a/nuon/models/app_app_permissions_config.py b/nuon/models/app_app_permissions_config.py index ae0c0fbf..3e2827d2 100644 --- a/nuon/models/app_app_permissions_config.py +++ b/nuon/models/app_app_permissions_config.py @@ -20,6 +20,7 @@ class AppAppPermissionsConfig: app_config_id (Union[Unset, str]): app_id (Union[Unset, str]): aws_iam_roles (Union[Unset, list['AppAppAWSIAMRoleConfig']]): + break_glass_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): deprovision_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): @@ -33,6 +34,7 @@ class AppAppPermissionsConfig: app_config_id: Union[Unset, str] = UNSET app_id: Union[Unset, str] = UNSET aws_iam_roles: Union[Unset, list["AppAppAWSIAMRoleConfig"]] = UNSET + break_glass_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET deprovision_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET @@ -55,6 +57,10 @@ def to_dict(self) -> dict[str, Any]: aws_iam_roles_item = aws_iam_roles_item_data.to_dict() aws_iam_roles.append(aws_iam_roles_item) + break_glass_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.break_glass_aws_iam_role, Unset): + break_glass_aws_iam_role = self.break_glass_aws_iam_role.to_dict() + created_at = self.created_at created_by_id = self.created_by_id @@ -86,6 +92,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["app_id"] = app_id if aws_iam_roles is not UNSET: field_dict["aws_iam_roles"] = aws_iam_roles + if break_glass_aws_iam_role is not UNSET: + field_dict["break_glass_aws_iam_role"] = break_glass_aws_iam_role if created_at is not UNSET: field_dict["created_at"] = created_at if created_by_id is not UNSET: @@ -121,6 +129,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: aws_iam_roles.append(aws_iam_roles_item) + _break_glass_aws_iam_role = d.pop("break_glass_aws_iam_role", UNSET) + break_glass_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] + if isinstance(_break_glass_aws_iam_role, Unset): + break_glass_aws_iam_role = UNSET + else: + break_glass_aws_iam_role = AppAppAWSIAMRoleConfig.from_dict(_break_glass_aws_iam_role) + created_at = d.pop("created_at", UNSET) created_by_id = d.pop("created_by_id", UNSET) @@ -156,6 +171,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_config_id=app_config_id, app_id=app_id, aws_iam_roles=aws_iam_roles, + break_glass_aws_iam_role=break_glass_aws_iam_role, created_at=created_at, created_by_id=created_by_id, deprovision_aws_iam_role=deprovision_aws_iam_role, diff --git a/nuon/models/app_app_sandbox_config.py b/nuon/models/app_app_sandbox_config.py index 80c12e6b..c924955e 100644 --- a/nuon/models/app_app_sandbox_config.py +++ b/nuon/models/app_app_sandbox_config.py @@ -11,6 +11,7 @@ from ..models.app_app_sandbox_config_variables import AppAppSandboxConfigVariables from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + from ..models.refs_ref import RefsRef T = TypeVar("T", bound="AppAppSandboxConfig") @@ -27,10 +28,13 @@ class AppAppSandboxConfig: connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): + drift_schedule (Union[Unset, str]): env_vars (Union[Unset, AppAppSandboxConfigEnvVars]): id (Union[Unset, str]): org_id (Union[Unset, str]): public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): + references (Union[Unset, list[str]]): + refs (Union[Unset, list['RefsRef']]): terraform_version (Union[Unset, str]): updated_at (Union[Unset, str]): variables (Union[Unset, AppAppSandboxConfigVariables]): @@ -44,10 +48,13 @@ class AppAppSandboxConfig: connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET + drift_schedule: Union[Unset, str] = UNSET env_vars: Union[Unset, "AppAppSandboxConfigEnvVars"] = UNSET id: Union[Unset, str] = UNSET org_id: Union[Unset, str] = UNSET public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET + references: Union[Unset, list[str]] = UNSET + refs: Union[Unset, list["RefsRef"]] = UNSET terraform_version: Union[Unset, str] = UNSET updated_at: Union[Unset, str] = UNSET variables: Union[Unset, "AppAppSandboxConfigVariables"] = UNSET @@ -71,6 +78,8 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id + drift_schedule = self.drift_schedule + env_vars: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() @@ -83,6 +92,17 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.public_git_vcs_config, Unset): public_git_vcs_config = self.public_git_vcs_config.to_dict() + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + + refs: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.refs, Unset): + refs = [] + for refs_item_data in self.refs: + refs_item = refs_item_data.to_dict() + refs.append(refs_item) + terraform_version = self.terraform_version updated_at = self.updated_at @@ -112,6 +132,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["created_at"] = created_at if created_by_id is not UNSET: field_dict["created_by_id"] = created_by_id + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule if env_vars is not UNSET: field_dict["env_vars"] = env_vars if id is not UNSET: @@ -120,6 +142,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["org_id"] = org_id if public_git_vcs_config is not UNSET: field_dict["public_git_vcs_config"] = public_git_vcs_config + if references is not UNSET: + field_dict["references"] = references + if refs is not UNSET: + field_dict["refs"] = refs if terraform_version is not UNSET: field_dict["terraform_version"] = terraform_version if updated_at is not UNSET: @@ -137,6 +163,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.app_app_sandbox_config_variables import AppAppSandboxConfigVariables from ..models.app_connected_github_vcs_config import AppConnectedGithubVCSConfig from ..models.app_public_git_vcs_config import AppPublicGitVCSConfig + from ..models.refs_ref import RefsRef d = dict(src_dict) app_config_id = d.pop("app_config_id", UNSET) @@ -158,6 +185,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) + drift_schedule = d.pop("drift_schedule", UNSET) + _env_vars = d.pop("env_vars", UNSET) env_vars: Union[Unset, AppAppSandboxConfigEnvVars] if isinstance(_env_vars, Unset): @@ -176,6 +205,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: public_git_vcs_config = AppPublicGitVCSConfig.from_dict(_public_git_vcs_config) + references = cast(list[str], d.pop("references", UNSET)) + + refs = [] + _refs = d.pop("refs", UNSET) + for refs_item_data in _refs or []: + refs_item = RefsRef.from_dict(refs_item_data) + + refs.append(refs_item) + terraform_version = d.pop("terraform_version", UNSET) updated_at = d.pop("updated_at", UNSET) @@ -197,10 +235,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: connected_github_vcs_config=connected_github_vcs_config, created_at=created_at, created_by_id=created_by_id, + drift_schedule=drift_schedule, env_vars=env_vars, id=id, org_id=org_id, public_git_vcs_config=public_git_vcs_config, + references=references, + refs=refs, terraform_version=terraform_version, updated_at=updated_at, variables=variables, diff --git a/nuon/models/app_aws_stack_outputs.py b/nuon/models/app_aws_stack_outputs.py index bddc09cb..ec97efd1 100644 --- a/nuon/models/app_aws_stack_outputs.py +++ b/nuon/models/app_aws_stack_outputs.py @@ -1,11 +1,15 @@ from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.app_aws_stack_outputs_break_glass_role_arns import AppAWSStackOutputsBreakGlassRoleArns + + T = TypeVar("T", bound="AppAWSStackOutputs") @@ -14,6 +18,7 @@ class AppAWSStackOutputs: """ Attributes: account_id (Union[Unset, str]): + break_glass_role_arns (Union[Unset, AppAWSStackOutputsBreakGlassRoleArns]): deprovision_iam_role_arn (Union[Unset, str]): maintenance_iam_role_arn (Union[Unset, str]): private_subnets (Union[Unset, list[str]]): @@ -26,6 +31,7 @@ class AppAWSStackOutputs: """ account_id: Union[Unset, str] = UNSET + break_glass_role_arns: Union[Unset, "AppAWSStackOutputsBreakGlassRoleArns"] = UNSET deprovision_iam_role_arn: Union[Unset, str] = UNSET maintenance_iam_role_arn: Union[Unset, str] = UNSET private_subnets: Union[Unset, list[str]] = UNSET @@ -40,6 +46,10 @@ class AppAWSStackOutputs: def to_dict(self) -> dict[str, Any]: account_id = self.account_id + break_glass_role_arns: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.break_glass_role_arns, Unset): + break_glass_role_arns = self.break_glass_role_arns.to_dict() + deprovision_iam_role_arn = self.deprovision_iam_role_arn maintenance_iam_role_arn = self.maintenance_iam_role_arn @@ -67,6 +77,8 @@ def to_dict(self) -> dict[str, Any]: field_dict.update({}) if account_id is not UNSET: field_dict["account_id"] = account_id + if break_glass_role_arns is not UNSET: + field_dict["break_glass_role_arns"] = break_glass_role_arns if deprovision_iam_role_arn is not UNSET: field_dict["deprovision_iam_role_arn"] = deprovision_iam_role_arn if maintenance_iam_role_arn is not UNSET: @@ -90,9 +102,18 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_aws_stack_outputs_break_glass_role_arns import AppAWSStackOutputsBreakGlassRoleArns + d = dict(src_dict) account_id = d.pop("account_id", UNSET) + _break_glass_role_arns = d.pop("break_glass_role_arns", UNSET) + break_glass_role_arns: Union[Unset, AppAWSStackOutputsBreakGlassRoleArns] + if isinstance(_break_glass_role_arns, Unset): + break_glass_role_arns = UNSET + else: + break_glass_role_arns = AppAWSStackOutputsBreakGlassRoleArns.from_dict(_break_glass_role_arns) + deprovision_iam_role_arn = d.pop("deprovision_iam_role_arn", UNSET) maintenance_iam_role_arn = d.pop("maintenance_iam_role_arn", UNSET) @@ -113,6 +134,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_aws_stack_outputs = cls( account_id=account_id, + break_glass_role_arns=break_glass_role_arns, deprovision_iam_role_arn=deprovision_iam_role_arn, maintenance_iam_role_arn=maintenance_iam_role_arn, private_subnets=private_subnets, diff --git a/nuon/models/app_aws_stack_outputs_break_glass_role_arns.py b/nuon/models/app_aws_stack_outputs_break_glass_role_arns.py new file mode 100644 index 00000000..8df2d2ef --- /dev/null +++ b/nuon/models/app_aws_stack_outputs_break_glass_role_arns.py @@ -0,0 +1,44 @@ +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="AppAWSStackOutputsBreakGlassRoleArns") + + +@_attrs_define +class AppAWSStackOutputsBreakGlassRoleArns: + """ """ + + additional_properties: dict[str, str] = _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_aws_stack_outputs_break_glass_role_arns = cls() + + app_aws_stack_outputs_break_glass_role_arns.additional_properties = d + return app_aws_stack_outputs_break_glass_role_arns + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/app_component_config_connection.py b/nuon/models/app_component_config_connection.py index ef7139c5..27aa75dd 100644 --- a/nuon/models/app_component_config_connection.py +++ b/nuon/models/app_component_config_connection.py @@ -33,6 +33,7 @@ class AppComponentConfigConnection: created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): docker_build (Union[Unset, AppDockerBuildComponentConfig]): + drift_schedule (Union[Unset, str]): external_image (Union[Unset, AppExternalImageComponentConfig]): helm (Union[Unset, AppHelmComponentConfig]): id (Union[Unset, str]): @@ -55,6 +56,7 @@ class AppComponentConfigConnection: created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET docker_build: Union[Unset, "AppDockerBuildComponentConfig"] = UNSET + drift_schedule: Union[Unset, str] = UNSET external_image: Union[Unset, "AppExternalImageComponentConfig"] = UNSET helm: Union[Unset, "AppHelmComponentConfig"] = UNSET id: Union[Unset, str] = UNSET @@ -91,6 +93,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.docker_build, Unset): docker_build = self.docker_build.to_dict() + drift_schedule = self.drift_schedule + external_image: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.external_image, Unset): external_image = self.external_image.to_dict() @@ -153,6 +157,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["created_by_id"] = created_by_id if docker_build is not UNSET: field_dict["docker_build"] = docker_build + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule if external_image is not UNSET: field_dict["external_image"] = external_image if helm is not UNSET: @@ -212,6 +218,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: docker_build = AppDockerBuildComponentConfig.from_dict(_docker_build) + drift_schedule = d.pop("drift_schedule", UNSET) + _external_image = d.pop("external_image", UNSET) external_image: Union[Unset, AppExternalImageComponentConfig] if isinstance(_external_image, Unset): @@ -279,6 +287,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at=created_at, created_by_id=created_by_id, docker_build=docker_build, + drift_schedule=drift_schedule, external_image=external_image, helm=helm, id=id, diff --git a/nuon/models/app_drifted_object.py b/nuon/models/app_drifted_object.py new file mode 100644 index 00000000..980fe74e --- /dev/null +++ b/nuon/models/app_drifted_object.py @@ -0,0 +1,140 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppDriftedObject") + + +@_attrs_define +class AppDriftedObject: + """ + Attributes: + app_sandbox_config_id (Union[Unset, str]): + component_build_id (Union[Unset, str]): + component_name (Union[Unset, str]): + install_component_id (Union[Unset, str]): + install_id (Union[Unset, str]): + install_sandbox_id (Union[Unset, str]): + install_workflow_id (Union[Unset, str]): + org_id (Union[Unset, str]): + target_id (Union[Unset, str]): + target_type (Union[Unset, str]): These fields will be populated from the drifts_view + """ + + app_sandbox_config_id: Union[Unset, str] = UNSET + component_build_id: Union[Unset, str] = UNSET + component_name: Union[Unset, str] = UNSET + install_component_id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + install_sandbox_id: Union[Unset, str] = UNSET + install_workflow_id: Union[Unset, str] = UNSET + org_id: Union[Unset, str] = UNSET + target_id: Union[Unset, str] = UNSET + target_type: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_sandbox_config_id = self.app_sandbox_config_id + + component_build_id = self.component_build_id + + component_name = self.component_name + + install_component_id = self.install_component_id + + install_id = self.install_id + + install_sandbox_id = self.install_sandbox_id + + install_workflow_id = self.install_workflow_id + + org_id = self.org_id + + target_id = self.target_id + + target_type = self.target_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_sandbox_config_id is not UNSET: + field_dict["app_sandbox_config_id"] = app_sandbox_config_id + if component_build_id is not UNSET: + field_dict["component_build_id"] = component_build_id + if component_name is not UNSET: + field_dict["component_name"] = component_name + if install_component_id is not UNSET: + field_dict["install_component_id"] = install_component_id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if install_sandbox_id is not UNSET: + field_dict["install_sandbox_id"] = install_sandbox_id + if install_workflow_id is not UNSET: + field_dict["install_workflow_id"] = install_workflow_id + if org_id is not UNSET: + field_dict["org_id"] = org_id + if target_id is not UNSET: + field_dict["target_id"] = target_id + if target_type is not UNSET: + field_dict["target_type"] = target_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + app_sandbox_config_id = d.pop("app_sandbox_config_id", UNSET) + + component_build_id = d.pop("component_build_id", UNSET) + + component_name = d.pop("component_name", UNSET) + + install_component_id = d.pop("install_component_id", UNSET) + + install_id = d.pop("install_id", UNSET) + + install_sandbox_id = d.pop("install_sandbox_id", UNSET) + + install_workflow_id = d.pop("install_workflow_id", UNSET) + + org_id = d.pop("org_id", UNSET) + + target_id = d.pop("target_id", UNSET) + + target_type = d.pop("target_type", UNSET) + + app_drifted_object = cls( + app_sandbox_config_id=app_sandbox_config_id, + component_build_id=component_build_id, + component_name=component_name, + install_component_id=install_component_id, + install_id=install_id, + install_sandbox_id=install_sandbox_id, + install_workflow_id=install_workflow_id, + org_id=org_id, + target_id=target_id, + target_type=target_type, + ) + + app_drifted_object.additional_properties = d + return app_drifted_object + + @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 diff --git a/nuon/models/app_install.py b/nuon/models/app_install.py index 44f8b889..99685c8a 100644 --- a/nuon/models/app_install.py +++ b/nuon/models/app_install.py @@ -11,6 +11,7 @@ from ..models.app_app_sandbox_config import AppAppSandboxConfig from ..models.app_aws_account import AppAWSAccount from ..models.app_azure_account import AppAzureAccount + from ..models.app_drifted_object import AppDriftedObject from ..models.app_install_action_workflow import AppInstallActionWorkflow from ..models.app_install_component import AppInstallComponent from ..models.app_install_component_statuses import AppInstallComponentStatuses @@ -18,6 +19,7 @@ from ..models.app_install_event import AppInstallEvent from ..models.app_install_inputs import AppInstallInputs from ..models.app_install_links import AppInstallLinks + from ..models.app_install_metadata import AppInstallMetadata from ..models.app_install_sandbox import AppInstallSandbox from ..models.app_install_sandbox_run import AppInstallSandboxRun from ..models.app_install_stack import AppInstallStack @@ -44,6 +46,7 @@ class AppInstall: composite_component_status_description (Union[Unset, str]): created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): + drifted_objects (Union[Unset, list['AppDriftedObject']]): id (Union[Unset, str]): install_action_workflows (Union[Unset, list['AppInstallActionWorkflow']]): install_components (Union[Unset, list['AppInstallComponent']]): @@ -55,6 +58,7 @@ class AppInstall: install_stack (Union[Unset, AppInstallStack]): install_states (Union[Unset, list['AppInstallState']]): links (Union[Unset, AppInstallLinks]): + metadata (Union[Unset, AppInstallMetadata]): name (Union[Unset, str]): runner_id (Union[Unset, str]): runner_status (Union[Unset, str]): @@ -81,6 +85,7 @@ class AppInstall: composite_component_status_description: Union[Unset, str] = UNSET created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET + drifted_objects: Union[Unset, list["AppDriftedObject"]] = UNSET id: Union[Unset, str] = UNSET install_action_workflows: Union[Unset, list["AppInstallActionWorkflow"]] = UNSET install_components: Union[Unset, list["AppInstallComponent"]] = UNSET @@ -92,6 +97,7 @@ class AppInstall: install_stack: Union[Unset, "AppInstallStack"] = UNSET install_states: Union[Unset, list["AppInstallState"]] = UNSET links: Union[Unset, "AppInstallLinks"] = UNSET + metadata: Union[Unset, "AppInstallMetadata"] = UNSET name: Union[Unset, str] = UNSET runner_id: Union[Unset, str] = UNSET runner_status: Union[Unset, str] = UNSET @@ -141,6 +147,13 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id + drifted_objects: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.drifted_objects, Unset): + drifted_objects = [] + for drifted_objects_item_data in self.drifted_objects: + drifted_objects_item = drifted_objects_item_data.to_dict() + drifted_objects.append(drifted_objects_item) + id = self.id install_action_workflows: Union[Unset, list[dict[str, Any]]] = UNSET @@ -199,6 +212,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.links, Unset): links = self.links.to_dict() + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + name = self.name runner_id = self.runner_id @@ -257,6 +274,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["created_at"] = created_at if created_by_id is not UNSET: field_dict["created_by_id"] = created_by_id + if drifted_objects is not UNSET: + field_dict["drifted_objects"] = drifted_objects if id is not UNSET: field_dict["id"] = id if install_action_workflows is not UNSET: @@ -279,6 +298,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["install_states"] = install_states if links is not UNSET: field_dict["links"] = links + if metadata is not UNSET: + field_dict["metadata"] = metadata if name is not UNSET: field_dict["name"] = name if runner_id is not UNSET: @@ -312,6 +333,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.app_app_sandbox_config import AppAppSandboxConfig from ..models.app_aws_account import AppAWSAccount from ..models.app_azure_account import AppAzureAccount + from ..models.app_drifted_object import AppDriftedObject from ..models.app_install_action_workflow import AppInstallActionWorkflow from ..models.app_install_component import AppInstallComponent from ..models.app_install_component_statuses import AppInstallComponentStatuses @@ -319,6 +341,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.app_install_event import AppInstallEvent from ..models.app_install_inputs import AppInstallInputs from ..models.app_install_links import AppInstallLinks + from ..models.app_install_metadata import AppInstallMetadata from ..models.app_install_sandbox import AppInstallSandbox from ..models.app_install_sandbox_run import AppInstallSandboxRun from ..models.app_install_stack import AppInstallStack @@ -375,6 +398,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) + drifted_objects = [] + _drifted_objects = d.pop("drifted_objects", UNSET) + for drifted_objects_item_data in _drifted_objects or []: + drifted_objects_item = AppDriftedObject.from_dict(drifted_objects_item_data) + + drifted_objects.append(drifted_objects_item) + id = d.pop("id", UNSET) install_action_workflows = [] @@ -442,6 +472,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: links = AppInstallLinks.from_dict(_links) + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppInstallMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppInstallMetadata.from_dict(_metadata) + name = d.pop("name", UNSET) runner_id = d.pop("runner_id", UNSET) @@ -489,6 +526,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: composite_component_status_description=composite_component_status_description, created_at=created_at, created_by_id=created_by_id, + drifted_objects=drifted_objects, id=id, install_action_workflows=install_action_workflows, install_components=install_components, @@ -500,6 +538,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_stack=install_stack, install_states=install_states, links=links, + metadata=metadata, name=name, runner_id=runner_id, runner_status=runner_status, diff --git a/nuon/models/app_install_component.py b/nuon/models/app_install_component.py index 60bce3e0..786a6439 100644 --- a/nuon/models/app_install_component.py +++ b/nuon/models/app_install_component.py @@ -9,6 +9,7 @@ if TYPE_CHECKING: from ..models.app_component import AppComponent from ..models.app_composite_status import AppCompositeStatus + from ..models.app_drifted_object import AppDriftedObject from ..models.app_helm_chart import AppHelmChart from ..models.app_install_component_links import AppInstallComponentLinks from ..models.app_install_deploy import AppInstallDeploy @@ -26,6 +27,7 @@ class AppInstallComponent: component_id (Union[Unset, str]): created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): + drifted_object (Union[Unset, AppDriftedObject]): helm_chart (Union[Unset, AppHelmChart]): id (Union[Unset, str]): install_deploys (Union[Unset, list['AppInstallDeploy']]): @@ -42,6 +44,7 @@ class AppInstallComponent: component_id: Union[Unset, str] = UNSET created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET + drifted_object: Union[Unset, "AppDriftedObject"] = UNSET helm_chart: Union[Unset, "AppHelmChart"] = UNSET id: Union[Unset, str] = UNSET install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET @@ -65,6 +68,10 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id + drifted_object: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.drifted_object, Unset): + drifted_object = self.drifted_object.to_dict() + helm_chart: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.helm_chart, Unset): helm_chart = self.helm_chart.to_dict() @@ -109,6 +116,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["created_at"] = created_at if created_by_id is not UNSET: field_dict["created_by_id"] = created_by_id + if drifted_object is not UNSET: + field_dict["drifted_object"] = drifted_object if helm_chart is not UNSET: field_dict["helm_chart"] = helm_chart if id is not UNSET: @@ -136,6 +145,7 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.app_component import AppComponent from ..models.app_composite_status import AppCompositeStatus + from ..models.app_drifted_object import AppDriftedObject from ..models.app_helm_chart import AppHelmChart from ..models.app_install_component_links import AppInstallComponentLinks from ..models.app_install_deploy import AppInstallDeploy @@ -155,6 +165,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) + _drifted_object = d.pop("drifted_object", UNSET) + drifted_object: Union[Unset, AppDriftedObject] + if isinstance(_drifted_object, Unset): + drifted_object = UNSET + else: + drifted_object = AppDriftedObject.from_dict(_drifted_object) + _helm_chart = d.pop("helm_chart", UNSET) helm_chart: Union[Unset, AppHelmChart] if isinstance(_helm_chart, Unset): @@ -205,6 +222,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: component_id=component_id, created_at=created_at, created_by_id=created_by_id, + drifted_object=drifted_object, helm_chart=helm_chart, id=id, install_deploys=install_deploys, diff --git a/nuon/models/app_install_component_summary.py b/nuon/models/app_install_component_summary.py index 3f55a42b..ba10fa89 100644 --- a/nuon/models/app_install_component_summary.py +++ b/nuon/models/app_install_component_summary.py @@ -28,6 +28,7 @@ class AppInstallComponentSummary: dependencies (Union[Unset, list['AppComponent']]): deploy_status (Union[Unset, AppInstallDeployStatus]): deploy_status_description (Union[Unset, str]): + drifted_status (Union[Unset, bool]): id (Union[Unset, str]): """ @@ -39,6 +40,7 @@ class AppInstallComponentSummary: dependencies: Union[Unset, list["AppComponent"]] = UNSET deploy_status: Union[Unset, AppInstallDeployStatus] = UNSET deploy_status_description: Union[Unset, str] = UNSET + drifted_status: Union[Unset, bool] = UNSET id: Union[Unset, str] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -70,6 +72,8 @@ def to_dict(self) -> dict[str, Any]: deploy_status_description = self.deploy_status_description + drifted_status = self.drifted_status + id = self.id field_dict: dict[str, Any] = {} @@ -91,6 +95,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["deploy_status"] = deploy_status if deploy_status_description is not UNSET: field_dict["deploy_status_description"] = deploy_status_description + if drifted_status is not UNSET: + field_dict["drifted_status"] = drifted_status if id is not UNSET: field_dict["id"] = id @@ -138,6 +144,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: deploy_status_description = d.pop("deploy_status_description", UNSET) + drifted_status = d.pop("drifted_status", UNSET) + id = d.pop("id", UNSET) app_install_component_summary = cls( @@ -149,6 +157,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dependencies=dependencies, deploy_status=deploy_status, deploy_status_description=deploy_status_description, + drifted_status=drifted_status, id=id, ) diff --git a/nuon/models/app_install_deploy.py b/nuon/models/app_install_deploy.py index c12cfbb5..e511236e 100644 --- a/nuon/models/app_install_deploy.py +++ b/nuon/models/app_install_deploy.py @@ -43,6 +43,7 @@ class AppInstallDeploy: log_stream (Union[Unset, AppLogStream]): oci_artifact (Union[Unset, AppOCIArtifact]): outputs (Union[Unset, AppInstallDeployOutputs]): + plan_only (Union[Unset, bool]): release_id (Union[Unset, str]): runner_jobs (Union[Unset, list['AppRunnerJob']]): runner details status (Union[Unset, str]): @@ -70,6 +71,7 @@ class AppInstallDeploy: log_stream: Union[Unset, "AppLogStream"] = UNSET oci_artifact: Union[Unset, "AppOCIArtifact"] = UNSET outputs: Union[Unset, "AppInstallDeployOutputs"] = UNSET + plan_only: Union[Unset, bool] = UNSET release_id: Union[Unset, str] = UNSET runner_jobs: Union[Unset, list["AppRunnerJob"]] = UNSET status: Union[Unset, str] = UNSET @@ -132,6 +134,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() + plan_only = self.plan_only + release_id = self.release_id runner_jobs: Union[Unset, list[dict[str, Any]]] = UNSET @@ -194,6 +198,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["oci_artifact"] = oci_artifact if outputs is not UNSET: field_dict["outputs"] = outputs + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only if release_id is not UNSET: field_dict["release_id"] = release_id if runner_jobs is not UNSET: @@ -295,6 +301,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: outputs = AppInstallDeployOutputs.from_dict(_outputs) + plan_only = d.pop("plan_only", UNSET) + release_id = d.pop("release_id", UNSET) runner_jobs = [] @@ -344,6 +352,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: log_stream=log_stream, oci_artifact=oci_artifact, outputs=outputs, + plan_only=plan_only, release_id=release_id, runner_jobs=runner_jobs, status=status, diff --git a/nuon/models/app_install_deploy_status.py b/nuon/models/app_install_deploy_status.py index b4273baf..e570a1c1 100644 --- a/nuon/models/app_install_deploy_status.py +++ b/nuon/models/app_install_deploy_status.py @@ -4,11 +4,14 @@ class AppInstallDeployStatus(str, Enum): ACTIVE = "active" APPROVAL_DENIED = "approval-denied" + AUTO_SKIPPED = "auto-skipped" CANCELLED = "cancelled" + DRIFT_DETECTED = "drift-detected" ERROR = "error" EXECUTING = "executing" INACTIVE = "inactive" NOOP = "noop" + NO_DRIFT = "no-drift" PENDING = "pending" PENDING_APPROVAL = "pending-approval" PLANNING = "planning" diff --git a/nuon/models/state_app_state_secrets.py b/nuon/models/app_install_metadata.py similarity index 83% rename from nuon/models/state_app_state_secrets.py rename to nuon/models/app_install_metadata.py index f9daabe1..ca9b4c85 100644 --- a/nuon/models/state_app_state_secrets.py +++ b/nuon/models/app_install_metadata.py @@ -4,11 +4,11 @@ from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="StateAppStateSecrets") +T = TypeVar("T", bound="AppInstallMetadata") @_attrs_define -class StateAppStateSecrets: +class AppInstallMetadata: """ """ additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) @@ -22,10 +22,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - state_app_state_secrets = cls() + app_install_metadata = cls() - state_app_state_secrets.additional_properties = d - return state_app_state_secrets + app_install_metadata.additional_properties = d + return app_install_metadata @property def additional_keys(self) -> list[str]: diff --git a/nuon/models/app_install_stack_outputs.py b/nuon/models/app_install_stack_outputs.py index 90e6b4dc..abceb687 100644 --- a/nuon/models/app_install_stack_outputs.py +++ b/nuon/models/app_install_stack_outputs.py @@ -10,6 +10,7 @@ from ..models.app_aws_stack_outputs import AppAWSStackOutputs from ..models.app_azure_stack_outputs import AppAzureStackOutputs from ..models.app_install_stack_outputs_data import AppInstallStackOutputsData + from ..models.app_install_stack_outputs_data_contents import AppInstallStackOutputsDataContents T = TypeVar("T", bound="AppInstallStackOutputs") @@ -24,6 +25,7 @@ class AppInstallStackOutputs: created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): data (Union[Unset, AppInstallStackOutputsData]): + data_contents (Union[Unset, AppInstallStackOutputsDataContents]): id (Union[Unset, str]): install_stack_id (Union[Unset, str]): install_version_run_id (Union[Unset, str]): @@ -36,6 +38,7 @@ class AppInstallStackOutputs: created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET data: Union[Unset, "AppInstallStackOutputsData"] = UNSET + data_contents: Union[Unset, "AppInstallStackOutputsDataContents"] = UNSET id: Union[Unset, str] = UNSET install_stack_id: Union[Unset, str] = UNSET install_version_run_id: Union[Unset, str] = UNSET @@ -60,6 +63,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.data, Unset): data = self.data.to_dict() + data_contents: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.data_contents, Unset): + data_contents = self.data_contents.to_dict() + id = self.id install_stack_id = self.install_stack_id @@ -83,6 +90,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["created_by_id"] = created_by_id if data is not UNSET: field_dict["data"] = data + if data_contents is not UNSET: + field_dict["data_contents"] = data_contents if id is not UNSET: field_dict["id"] = id if install_stack_id is not UNSET: @@ -101,6 +110,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.app_aws_stack_outputs import AppAWSStackOutputs from ..models.app_azure_stack_outputs import AppAzureStackOutputs from ..models.app_install_stack_outputs_data import AppInstallStackOutputsData + from ..models.app_install_stack_outputs_data_contents import AppInstallStackOutputsDataContents d = dict(src_dict) _aws = d.pop("aws", UNSET) @@ -128,6 +138,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: data = AppInstallStackOutputsData.from_dict(_data) + _data_contents = d.pop("data_contents", UNSET) + data_contents: Union[Unset, AppInstallStackOutputsDataContents] + if isinstance(_data_contents, Unset): + data_contents = UNSET + else: + data_contents = AppInstallStackOutputsDataContents.from_dict(_data_contents) + id = d.pop("id", UNSET) install_stack_id = d.pop("install_stack_id", UNSET) @@ -144,6 +161,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at=created_at, created_by_id=created_by_id, data=data, + data_contents=data_contents, id=id, install_stack_id=install_stack_id, install_version_run_id=install_version_run_id, diff --git a/nuon/models/app_install_stack_outputs_data_contents.py b/nuon/models/app_install_stack_outputs_data_contents.py new file mode 100644 index 00000000..cf60adf7 --- /dev/null +++ b/nuon/models/app_install_stack_outputs_data_contents.py @@ -0,0 +1,44 @@ +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="AppInstallStackOutputsDataContents") + + +@_attrs_define +class AppInstallStackOutputsDataContents: + """ """ + + 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_install_stack_outputs_data_contents = cls() + + app_install_stack_outputs_data_contents.additional_properties = d + return app_install_stack_outputs_data_contents + + @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 diff --git a/nuon/models/app_install_stack_version_run.py b/nuon/models/app_install_stack_version_run.py index a15a3158..9ced1e0b 100644 --- a/nuon/models/app_install_stack_version_run.py +++ b/nuon/models/app_install_stack_version_run.py @@ -8,6 +8,7 @@ if TYPE_CHECKING: from ..models.app_install_stack_version_run_data import AppInstallStackVersionRunData + from ..models.app_install_stack_version_run_data_contents import AppInstallStackVersionRunDataContents T = TypeVar("T", bound="AppInstallStackVersionRun") @@ -20,6 +21,7 @@ class AppInstallStackVersionRun: created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): data (Union[Unset, AppInstallStackVersionRunData]): + data_contents (Union[Unset, AppInstallStackVersionRunDataContents]): id (Union[Unset, str]): updated_at (Union[Unset, str]): """ @@ -27,6 +29,7 @@ class AppInstallStackVersionRun: created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET data: Union[Unset, "AppInstallStackVersionRunData"] = UNSET + data_contents: Union[Unset, "AppInstallStackVersionRunDataContents"] = UNSET id: Union[Unset, str] = UNSET updated_at: Union[Unset, str] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -40,6 +43,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.data, Unset): data = self.data.to_dict() + data_contents: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.data_contents, Unset): + data_contents = self.data_contents.to_dict() + id = self.id updated_at = self.updated_at @@ -53,6 +60,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["created_by_id"] = created_by_id if data is not UNSET: field_dict["data"] = data + if data_contents is not UNSET: + field_dict["data_contents"] = data_contents if id is not UNSET: field_dict["id"] = id if updated_at is not UNSET: @@ -63,6 +72,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.app_install_stack_version_run_data import AppInstallStackVersionRunData + from ..models.app_install_stack_version_run_data_contents import AppInstallStackVersionRunDataContents d = dict(src_dict) created_at = d.pop("created_at", UNSET) @@ -76,6 +86,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: data = AppInstallStackVersionRunData.from_dict(_data) + _data_contents = d.pop("data_contents", UNSET) + data_contents: Union[Unset, AppInstallStackVersionRunDataContents] + if isinstance(_data_contents, Unset): + data_contents = UNSET + else: + data_contents = AppInstallStackVersionRunDataContents.from_dict(_data_contents) + id = d.pop("id", UNSET) updated_at = d.pop("updated_at", UNSET) @@ -84,6 +101,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at=created_at, created_by_id=created_by_id, data=data, + data_contents=data_contents, id=id, updated_at=updated_at, ) diff --git a/nuon/models/app_install_stack_version_run_data_contents.py b/nuon/models/app_install_stack_version_run_data_contents.py new file mode 100644 index 00000000..90c4f8f8 --- /dev/null +++ b/nuon/models/app_install_stack_version_run_data_contents.py @@ -0,0 +1,44 @@ +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="AppInstallStackVersionRunDataContents") + + +@_attrs_define +class AppInstallStackVersionRunDataContents: + """ """ + + 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_install_stack_version_run_data_contents = cls() + + app_install_stack_version_run_data_contents.additional_properties = d + return app_install_stack_version_run_data_contents + + @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 diff --git a/nuon/models/app_install_state.py b/nuon/models/app_install_state.py index c4f13ef4..692ab245 100644 --- a/nuon/models/app_install_state.py +++ b/nuon/models/app_install_state.py @@ -1,11 +1,15 @@ from collections.abc import Mapping -from typing import Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.generics_null_time import GenericsNullTime + + T = TypeVar("T", bound="AppInstallState") @@ -19,6 +23,7 @@ class AppInstallState: created_by_id (Union[Unset, str]): id (Union[Unset, str]): install_id (Union[Unset, str]): + stale_at (Union[Unset, GenericsNullTime]): triggered_by_id (Union[Unset, str]): triggered_by_type (Union[Unset, str]): updated_at (Union[Unset, str]): @@ -31,6 +36,7 @@ class AppInstallState: created_by_id: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET install_id: Union[Unset, str] = UNSET + stale_at: Union[Unset, "GenericsNullTime"] = UNSET triggered_by_id: Union[Unset, str] = UNSET triggered_by_type: Union[Unset, str] = UNSET updated_at: Union[Unset, str] = UNSET @@ -50,6 +56,10 @@ def to_dict(self) -> dict[str, Any]: install_id = self.install_id + stale_at: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.stale_at, Unset): + stale_at = self.stale_at.to_dict() + triggered_by_id = self.triggered_by_id triggered_by_type = self.triggered_by_type @@ -73,6 +83,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["id"] = id if install_id is not UNSET: field_dict["install_id"] = install_id + if stale_at is not UNSET: + field_dict["stale_at"] = stale_at if triggered_by_id is not UNSET: field_dict["triggered_by_id"] = triggered_by_id if triggered_by_type is not UNSET: @@ -86,6 +98,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.generics_null_time import GenericsNullTime + d = dict(src_dict) archived = d.pop("archived", UNSET) @@ -99,6 +113,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_id = d.pop("install_id", UNSET) + _stale_at = d.pop("stale_at", UNSET) + stale_at: Union[Unset, GenericsNullTime] + if isinstance(_stale_at, Unset): + stale_at = UNSET + else: + stale_at = GenericsNullTime.from_dict(_stale_at) + triggered_by_id = d.pop("triggered_by_id", UNSET) triggered_by_type = d.pop("triggered_by_type", UNSET) @@ -114,6 +135,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id=created_by_id, id=id, install_id=install_id, + stale_at=stale_at, triggered_by_id=triggered_by_id, triggered_by_type=triggered_by_type, updated_at=updated_at, diff --git a/nuon/models/app_latest_runner_heart_beat.py b/nuon/models/app_latest_runner_heart_beat.py new file mode 100644 index 00000000..605c82fc --- /dev/null +++ b/nuon/models/app_latest_runner_heart_beat.py @@ -0,0 +1,104 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AppLatestRunnerHeartBeat") + + +@_attrs_define +class AppLatestRunnerHeartBeat: + """ + Attributes: + alive_time (Union[Unset, int]): + created_at (Union[Unset, str]): + process (Union[Unset, str]): + runner_id (Union[Unset, str]): + started_at (Union[Unset, str]): + version (Union[Unset, str]): + """ + + alive_time: Union[Unset, int] = UNSET + created_at: Union[Unset, str] = UNSET + process: Union[Unset, str] = UNSET + runner_id: Union[Unset, str] = UNSET + started_at: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + alive_time = self.alive_time + + created_at = self.created_at + + process = self.process + + runner_id = self.runner_id + + started_at = self.started_at + + version = self.version + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if alive_time is not UNSET: + field_dict["alive_time"] = alive_time + if created_at is not UNSET: + field_dict["created_at"] = created_at + if process is not UNSET: + field_dict["process"] = process + if runner_id is not UNSET: + field_dict["runner_id"] = runner_id + if started_at is not UNSET: + field_dict["started_at"] = started_at + if version is not UNSET: + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + alive_time = d.pop("alive_time", UNSET) + + created_at = d.pop("created_at", UNSET) + + process = d.pop("process", UNSET) + + runner_id = d.pop("runner_id", UNSET) + + started_at = d.pop("started_at", UNSET) + + version = d.pop("version", UNSET) + + app_latest_runner_heart_beat = cls( + alive_time=alive_time, + created_at=created_at, + process=process, + runner_id=runner_id, + started_at=started_at, + version=version, + ) + + app_latest_runner_heart_beat.additional_properties = d + return app_latest_runner_heart_beat + + @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 diff --git a/nuon/models/app_runner.py b/nuon/models/app_runner.py index f0179bd6..90789613 100644 --- a/nuon/models/app_runner.py +++ b/nuon/models/app_runner.py @@ -7,6 +7,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.app_runner_group import AppRunnerGroup from ..models.app_runner_job import AppRunnerJob from ..models.app_runner_operation import AppRunnerOperation @@ -26,6 +27,7 @@ class AppRunner: name (Union[Unset, str]): operations (Union[Unset, list['AppRunnerOperation']]): org_id (Union[Unset, str]): + runner_group (Union[Unset, AppRunnerGroup]): runner_group_id (Union[Unset, str]): runner_job (Union[Unset, AppRunnerJob]): status (Union[Unset, str]): @@ -41,6 +43,7 @@ class AppRunner: name: Union[Unset, str] = UNSET operations: Union[Unset, list["AppRunnerOperation"]] = UNSET org_id: Union[Unset, str] = UNSET + runner_group: Union[Unset, "AppRunnerGroup"] = UNSET runner_group_id: Union[Unset, str] = UNSET runner_job: Union[Unset, "AppRunnerJob"] = UNSET status: Union[Unset, str] = UNSET @@ -75,6 +78,10 @@ def to_dict(self) -> dict[str, Any]: org_id = self.org_id + runner_group: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.runner_group, Unset): + runner_group = self.runner_group.to_dict() + runner_group_id = self.runner_group_id runner_job: Union[Unset, dict[str, Any]] = UNSET @@ -106,6 +113,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["operations"] = operations if org_id is not UNSET: field_dict["org_id"] = org_id + if runner_group is not UNSET: + field_dict["runner_group"] = runner_group if runner_group_id is not UNSET: field_dict["runner_group_id"] = runner_group_id if runner_job is not UNSET: @@ -121,6 +130,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_runner_group import AppRunnerGroup from ..models.app_runner_job import AppRunnerJob from ..models.app_runner_operation import AppRunnerOperation @@ -151,6 +161,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) + _runner_group = d.pop("runner_group", UNSET) + runner_group: Union[Unset, AppRunnerGroup] + if isinstance(_runner_group, Unset): + runner_group = UNSET + else: + runner_group = AppRunnerGroup.from_dict(_runner_group) + runner_group_id = d.pop("runner_group_id", UNSET) _runner_job = d.pop("runner_job", UNSET) @@ -175,6 +192,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name=name, operations=operations, org_id=org_id, + runner_group=runner_group, runner_group_id=runner_group_id, runner_job=runner_job, status=status, diff --git a/nuon/models/app_runner_health_check.py b/nuon/models/app_runner_health_check.py index 217f3232..3746f58b 100644 --- a/nuon/models/app_runner_health_check.py +++ b/nuon/models/app_runner_health_check.py @@ -22,6 +22,7 @@ class AppRunnerHealthCheck: created_by_id (Union[Unset, str]): id (Union[Unset, str]): minute_bucket (Union[Unset, str]): + process (Union[Unset, str]): runner_id (Union[Unset, str]): runner_job (Union[Unset, AppRunnerJob]): status (Union[Unset, AppRunnerStatus]): @@ -33,6 +34,7 @@ class AppRunnerHealthCheck: created_by_id: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET minute_bucket: Union[Unset, str] = UNSET + process: Union[Unset, str] = UNSET runner_id: Union[Unset, str] = UNSET runner_job: Union[Unset, "AppRunnerJob"] = UNSET status: Union[Unset, AppRunnerStatus] = UNSET @@ -49,6 +51,8 @@ def to_dict(self) -> dict[str, Any]: minute_bucket = self.minute_bucket + process = self.process + runner_id = self.runner_id runner_job: Union[Unset, dict[str, Any]] = UNSET @@ -74,6 +78,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["id"] = id if minute_bucket is not UNSET: field_dict["minute_bucket"] = minute_bucket + if process is not UNSET: + field_dict["process"] = process if runner_id is not UNSET: field_dict["runner_id"] = runner_id if runner_job is not UNSET: @@ -100,6 +106,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: minute_bucket = d.pop("minute_bucket", UNSET) + process = d.pop("process", UNSET) + runner_id = d.pop("runner_id", UNSET) _runner_job = d.pop("runner_job", UNSET) @@ -125,6 +133,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id=created_by_id, id=id, minute_bucket=minute_bucket, + process=process, runner_id=runner_id, runner_job=runner_job, status=status, diff --git a/nuon/models/app_runner_heart_beat.py b/nuon/models/app_runner_heart_beat.py index 7ddaefcb..6be7b4cc 100644 --- a/nuon/models/app_runner_heart_beat.py +++ b/nuon/models/app_runner_heart_beat.py @@ -17,6 +17,7 @@ class AppRunnerHeartBeat: created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): id (Union[Unset, str]): + process (Union[Unset, str]): runner_id (Union[Unset, str]): started_at (Union[Unset, str]): updated_at (Union[Unset, str]): @@ -27,6 +28,7 @@ class AppRunnerHeartBeat: created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET + process: Union[Unset, str] = UNSET runner_id: Union[Unset, str] = UNSET started_at: Union[Unset, str] = UNSET updated_at: Union[Unset, str] = UNSET @@ -42,6 +44,8 @@ def to_dict(self) -> dict[str, Any]: id = self.id + process = self.process + runner_id = self.runner_id started_at = self.started_at @@ -61,6 +65,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["created_by_id"] = created_by_id if id is not UNSET: field_dict["id"] = id + if process is not UNSET: + field_dict["process"] = process if runner_id is not UNSET: field_dict["runner_id"] = runner_id if started_at is not UNSET: @@ -83,6 +89,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) + process = d.pop("process", UNSET) + runner_id = d.pop("runner_id", UNSET) started_at = d.pop("started_at", UNSET) @@ -96,6 +104,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at=created_at, created_by_id=created_by_id, id=id, + process=process, runner_id=runner_id, started_at=started_at, updated_at=updated_at, diff --git a/nuon/models/app_status.py b/nuon/models/app_status.py index 21c366e3..c1496f3c 100644 --- a/nuon/models/app_status.py +++ b/nuon/models/app_status.py @@ -9,19 +9,26 @@ class AppStatus(str, Enum): APPROVAL_EXPIRED = "approval-expired" APPROVAL_RETRY = "approval-retry" APPROVED = "approved" + AUTO_SKIPPED = "auto-skipped" AWAITING_USER_RUN = "awaiting-user-run" + BUILDING = "building" CANCELLED = "cancelled" + CHECKING_PLAN = "checking-plan" + DELETING = "deleting" DISCARDED = "discarded" + DRIFTED = "drifted" ERROR = "error" EXPIRED = "expired" GENERATING = "generating" IN_PROGRESS = "in-progress" NOOP = "noop" NOT_ATTEMPTED = "not-attempted" + NO_DRIFT = "no-drift" OUTDATED = "outdated" PENDING = "pending" PLANNING = "planning" PROVISIONING = "provisioning" + QUEUED = "queued" RETRYING = "retrying" SUCCESS = "success" USER_SKIPPED = "user-skipped" diff --git a/nuon/models/app_user_journey.py b/nuon/models/app_user_journey.py new file mode 100644 index 00000000..aa47d6e0 --- /dev/null +++ b/nuon/models/app_user_journey.py @@ -0,0 +1,93 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_user_journey_step import AppUserJourneyStep + + +T = TypeVar("T", bound="AppUserJourney") + + +@_attrs_define +class AppUserJourney: + """ + Attributes: + name (Union[Unset, str]): + steps (Union[Unset, list['AppUserJourneyStep']]): + title (Union[Unset, str]): + """ + + name: Union[Unset, str] = UNSET + steps: Union[Unset, list["AppUserJourneyStep"]] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + steps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.steps, Unset): + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if steps is not UNSET: + field_dict["steps"] = steps + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_user_journey_step import AppUserJourneyStep + + d = dict(src_dict) + name = d.pop("name", UNSET) + + steps = [] + _steps = d.pop("steps", UNSET) + for steps_item_data in _steps or []: + steps_item = AppUserJourneyStep.from_dict(steps_item_data) + + steps.append(steps_item) + + title = d.pop("title", UNSET) + + app_user_journey = cls( + name=name, + steps=steps, + title=title, + ) + + app_user_journey.additional_properties = d + return app_user_journey + + @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 diff --git a/nuon/models/app_user_journey_step.py b/nuon/models/app_user_journey_step.py new file mode 100644 index 00000000..02875c80 --- /dev/null +++ b/nuon/models/app_user_journey_step.py @@ -0,0 +1,126 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.app_user_journey_step_metadata import AppUserJourneyStepMetadata + + +T = TypeVar("T", bound="AppUserJourneyStep") + + +@_attrs_define +class AppUserJourneyStep: + """ + Attributes: + complete (Union[Unset, bool]): + completed_at (Union[Unset, str]): Top-level completion tracking fields + completion_method (Union[Unset, str]): + completion_source (Union[Unset, str]): + metadata (Union[Unset, AppUserJourneyStepMetadata]): Flexible metadata for business data + name (Union[Unset, str]): + title (Union[Unset, str]): + """ + + complete: Union[Unset, bool] = UNSET + completed_at: Union[Unset, str] = UNSET + completion_method: Union[Unset, str] = UNSET + completion_source: Union[Unset, str] = UNSET + metadata: Union[Unset, "AppUserJourneyStepMetadata"] = UNSET + name: Union[Unset, str] = UNSET + title: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + complete = self.complete + + completed_at = self.completed_at + + completion_method = self.completion_method + + completion_source = self.completion_source + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + + name = self.name + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if complete is not UNSET: + field_dict["complete"] = complete + if completed_at is not UNSET: + field_dict["completed_at"] = completed_at + if completion_method is not UNSET: + field_dict["completion_method"] = completion_method + if completion_source is not UNSET: + field_dict["completion_source"] = completion_source + if metadata is not UNSET: + field_dict["metadata"] = metadata + if name is not UNSET: + field_dict["name"] = name + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_user_journey_step_metadata import AppUserJourneyStepMetadata + + d = dict(src_dict) + complete = d.pop("complete", UNSET) + + completed_at = d.pop("completed_at", UNSET) + + completion_method = d.pop("completion_method", UNSET) + + completion_source = d.pop("completion_source", UNSET) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, AppUserJourneyStepMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = AppUserJourneyStepMetadata.from_dict(_metadata) + + name = d.pop("name", UNSET) + + title = d.pop("title", UNSET) + + app_user_journey_step = cls( + complete=complete, + completed_at=completed_at, + completion_method=completion_method, + completion_source=completion_source, + metadata=metadata, + name=name, + title=title, + ) + + app_user_journey_step.additional_properties = d + return app_user_journey_step + + @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 diff --git a/nuon/models/app_user_journey_step_metadata.py b/nuon/models/app_user_journey_step_metadata.py new file mode 100644 index 00000000..bb98982e --- /dev/null +++ b/nuon/models/app_user_journey_step_metadata.py @@ -0,0 +1,44 @@ +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="AppUserJourneyStepMetadata") + + +@_attrs_define +class AppUserJourneyStepMetadata: + """Flexible metadata for business data""" + + 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_user_journey_step_metadata = cls() + + app_user_journey_step_metadata.additional_properties = d + return app_user_journey_step_metadata + + @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 diff --git a/nuon/models/app_vcs_connection.py b/nuon/models/app_vcs_connection.py index 1366f90c..77ffc23a 100644 --- a/nuon/models/app_vcs_connection.py +++ b/nuon/models/app_vcs_connection.py @@ -19,6 +19,8 @@ class AppVCSConnection: Attributes: created_at (Union[Unset, str]): created_by_id (Union[Unset, str]): + github_account_id (Union[Unset, str]): + github_account_name (Union[Unset, str]): github_install_id (Union[Unset, str]): id (Union[Unset, str]): updated_at (Union[Unset, str]): @@ -27,6 +29,8 @@ class AppVCSConnection: created_at: Union[Unset, str] = UNSET created_by_id: Union[Unset, str] = UNSET + github_account_id: Union[Unset, str] = UNSET + github_account_name: Union[Unset, str] = UNSET github_install_id: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET updated_at: Union[Unset, str] = UNSET @@ -38,6 +42,10 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id + github_account_id = self.github_account_id + + github_account_name = self.github_account_name + github_install_id = self.github_install_id id = self.id @@ -58,6 +66,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["created_at"] = created_at if created_by_id is not UNSET: field_dict["created_by_id"] = created_by_id + if github_account_id is not UNSET: + field_dict["github_account_id"] = github_account_id + if github_account_name is not UNSET: + field_dict["github_account_name"] = github_account_name if github_install_id is not UNSET: field_dict["github_install_id"] = github_install_id if id is not UNSET: @@ -78,6 +90,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) + github_account_id = d.pop("github_account_id", UNSET) + + github_account_name = d.pop("github_account_name", UNSET) + github_install_id = d.pop("github_install_id", UNSET) id = d.pop("id", UNSET) @@ -94,6 +110,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_vcs_connection = cls( created_at=created_at, created_by_id=created_by_id, + github_account_id=github_account_id, + github_account_name=github_account_name, github_install_id=github_install_id, id=id, updated_at=updated_at, diff --git a/nuon/models/app_workflow_step_approval.py b/nuon/models/app_workflow_step_approval.py index 53a16161..918a6009 100644 --- a/nuon/models/app_workflow_step_approval.py +++ b/nuon/models/app_workflow_step_approval.py @@ -111,7 +111,7 @@ def to_dict(self) -> dict[str, Any]: if response is not UNSET: field_dict["response"] = response if runner_job is not UNSET: - field_dict["runnerJob"] = runner_job + field_dict["runner_job"] = runner_job if runner_job_id is not UNSET: field_dict["runner_job_id"] = runner_job_id if type_ is not UNSET: @@ -158,7 +158,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: response = AppWorkflowStepApprovalResponse.from_dict(_response) - _runner_job = d.pop("runnerJob", UNSET) + _runner_job = d.pop("runner_job", UNSET) runner_job: Union[Unset, AppRunnerJob] if isinstance(_runner_job, Unset): runner_job = UNSET diff --git a/nuon/models/app_workflow_step_approval_response.py b/nuon/models/app_workflow_step_approval_response.py index 5716a1b7..65c19dae 100644 --- a/nuon/models/app_workflow_step_approval_response.py +++ b/nuon/models/app_workflow_step_approval_response.py @@ -1,105 +1,28 @@ from collections.abc import Mapping -from typing import Any, TypeVar, Union +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.app_workflow_step_response_type import AppWorkflowStepResponseType -from ..types import UNSET, Unset - T = TypeVar("T", bound="AppWorkflowStepApprovalResponse") @_attrs_define class AppWorkflowStepApprovalResponse: - """ - Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_workflow_step_approval_id (Union[Unset, str]): the approval the response belongs to - note (Union[Unset, str]): - type_ (Union[Unset, AppWorkflowStepResponseType]): - updated_at (Union[Unset, str]): - """ + """ """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_workflow_step_approval_id: Union[Unset, str] = UNSET - note: Union[Unset, str] = UNSET - type_: Union[Unset, AppWorkflowStepResponseType] = UNSET - updated_at: Union[Unset, str] = UNSET - additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - created_at = self.created_at - - created_by_id = self.created_by_id - - id = self.id - - install_workflow_step_approval_id = self.install_workflow_step_approval_id - - note = self.note - - type_: Union[Unset, str] = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_.value - - updated_at = self.updated_at - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if created_by_id is not UNSET: - field_dict["created_by_id"] = created_by_id - if id is not UNSET: - field_dict["id"] = id - if install_workflow_step_approval_id is not UNSET: - field_dict["install_workflow_step_approval_id"] = install_workflow_step_approval_id - if note is not UNSET: - field_dict["note"] = note - if type_ is not UNSET: - field_dict["type"] = type_ - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - created_at = d.pop("created_at", UNSET) - - created_by_id = d.pop("created_by_id", UNSET) - - id = d.pop("id", UNSET) - - install_workflow_step_approval_id = d.pop("install_workflow_step_approval_id", UNSET) - - note = d.pop("note", UNSET) - - _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppWorkflowStepResponseType] - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = AppWorkflowStepResponseType(_type_) - - updated_at = d.pop("updated_at", UNSET) - - app_workflow_step_approval_response = cls( - created_at=created_at, - created_by_id=created_by_id, - id=id, - install_workflow_step_approval_id=install_workflow_step_approval_id, - note=note, - type_=type_, - updated_at=updated_at, - ) + app_workflow_step_approval_response = cls() app_workflow_step_approval_response.additional_properties = d return app_workflow_step_approval_response @@ -108,10 +31,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> Any: + def __getitem__(self, key: str) -> str: return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: + def __setitem__(self, key: str, value: str) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/nuon/models/app_workflow_step_response_type.py b/nuon/models/app_workflow_step_response_type.py index c4b47425..353c24d0 100644 --- a/nuon/models/app_workflow_step_response_type.py +++ b/nuon/models/app_workflow_step_response_type.py @@ -5,8 +5,9 @@ class AppWorkflowStepResponseType(str, Enum): APPROVE = "approve" AUTO_APPROVE = "auto-approve" DENY = "deny" + DENY_SKIP_CURRENT = "deny-skip-current" + DENY_SKIP_CURRENT_AND_DEPENDENTS = "deny-skip-current-and-dependents" RETRY = "retry" - SKIP = "skip" def __str__(self) -> str: return str(self.value) diff --git a/nuon/models/app_workflow_type.py b/nuon/models/app_workflow_type.py index ab95e8cb..3341f7a3 100644 --- a/nuon/models/app_workflow_type.py +++ b/nuon/models/app_workflow_type.py @@ -9,6 +9,8 @@ class AppWorkflowType(str, Enum): DEPLOY_COMPONENTS = "deploy_components" DEPROVISION = "deprovision" DEPROVISION_SANDBOX = "deprovision_sandbox" + DRIFT_RUN = "drift_run" + DRIFT_RUN_REPROVISION_SANDBOX = "drift_run_reprovision_sandbox" INPUT_UPDATE = "input_update" MANUAL_DEPLOY = "manual_deploy" PROVISION = "provision" diff --git a/nuon/models/configs_oci_registry_auth.py b/nuon/models/configs_oci_registry_auth.py new file mode 100644 index 00000000..be062c3f --- /dev/null +++ b/nuon/models/configs_oci_registry_auth.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ConfigsOCIRegistryAuth") + + +@_attrs_define +class ConfigsOCIRegistryAuth: + """ + Attributes: + password (Union[Unset, str]): + username (Union[Unset, str]): + """ + + password: Union[Unset, str] = UNSET + username: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + password = self.password + + username = self.username + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if password is not UNSET: + field_dict["password"] = password + if username is not UNSET: + field_dict["username"] = username + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + password = d.pop("password", UNSET) + + username = d.pop("username", UNSET) + + configs_oci_registry_auth = cls( + password=password, + username=username, + ) + + configs_oci_registry_auth.additional_properties = d + return configs_oci_registry_auth + + @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 diff --git a/nuon/models/configs_oci_registry_repository.py b/nuon/models/configs_oci_registry_repository.py new file mode 100644 index 00000000..83ecdfaa --- /dev/null +++ b/nuon/models/configs_oci_registry_repository.py @@ -0,0 +1,170 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.configs_oci_registry_type import ConfigsOCIRegistryType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_auth import ConfigsOCIRegistryAuth + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + + +T = TypeVar("T", bound="ConfigsOCIRegistryRepository") + + +@_attrs_define +class ConfigsOCIRegistryRepository: + """ + Attributes: + acrauth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + ecrauth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + login_server (Union[Unset, str]): + ociauth (Union[Unset, ConfigsOCIRegistryAuth]): + plugin (Union[Unset, str]): + region (Union[Unset, str]): + registry_type (Union[Unset, ConfigsOCIRegistryType]): + repository (Union[Unset, str]): based on the type of access, either the repository (ecr) or login server (acr) + will be provided. + """ + + acrauth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + ecrauth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + login_server: Union[Unset, str] = UNSET + ociauth: Union[Unset, "ConfigsOCIRegistryAuth"] = UNSET + plugin: Union[Unset, str] = UNSET + region: Union[Unset, str] = UNSET + registry_type: Union[Unset, ConfigsOCIRegistryType] = UNSET + repository: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + acrauth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.acrauth, Unset): + acrauth = self.acrauth.to_dict() + + ecrauth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.ecrauth, Unset): + ecrauth = self.ecrauth.to_dict() + + login_server = self.login_server + + ociauth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.ociauth, Unset): + ociauth = self.ociauth.to_dict() + + plugin = self.plugin + + region = self.region + + registry_type: Union[Unset, str] = UNSET + if not isinstance(self.registry_type, Unset): + registry_type = self.registry_type.value + + repository = self.repository + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if acrauth is not UNSET: + field_dict["acrauth"] = acrauth + if ecrauth is not UNSET: + field_dict["ecrauth"] = ecrauth + if login_server is not UNSET: + field_dict["loginServer"] = login_server + if ociauth is not UNSET: + field_dict["ociauth"] = ociauth + if plugin is not UNSET: + field_dict["plugin"] = plugin + if region is not UNSET: + field_dict["region"] = region + if registry_type is not UNSET: + field_dict["registryType"] = registry_type + if repository is not UNSET: + field_dict["repository"] = repository + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_auth import ConfigsOCIRegistryAuth + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + + d = dict(src_dict) + _acrauth = d.pop("acrauth", UNSET) + acrauth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_acrauth, Unset): + acrauth = UNSET + else: + acrauth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_acrauth) + + _ecrauth = d.pop("ecrauth", UNSET) + ecrauth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_ecrauth, Unset): + ecrauth = UNSET + else: + ecrauth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_ecrauth) + + login_server = d.pop("loginServer", UNSET) + + _ociauth = d.pop("ociauth", UNSET) + ociauth: Union[Unset, ConfigsOCIRegistryAuth] + if isinstance(_ociauth, Unset): + ociauth = UNSET + else: + ociauth = ConfigsOCIRegistryAuth.from_dict(_ociauth) + + plugin = d.pop("plugin", UNSET) + + region = d.pop("region", UNSET) + + _registry_type = d.pop("registryType", UNSET) + registry_type: Union[Unset, ConfigsOCIRegistryType] + if isinstance(_registry_type, Unset): + registry_type = UNSET + else: + registry_type = ConfigsOCIRegistryType(_registry_type) + + repository = d.pop("repository", UNSET) + + configs_oci_registry_repository = cls( + acrauth=acrauth, + ecrauth=ecrauth, + login_server=login_server, + ociauth=ociauth, + plugin=plugin, + region=region, + registry_type=registry_type, + repository=repository, + ) + + configs_oci_registry_repository.additional_properties = d + return configs_oci_registry_repository + + @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 diff --git a/nuon/models/configs_oci_registry_type.py b/nuon/models/configs_oci_registry_type.py new file mode 100644 index 00000000..734dceca --- /dev/null +++ b/nuon/models/configs_oci_registry_type.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class ConfigsOCIRegistryType(str, Enum): + ACR = "acr" + ECR = "ecr" + PRIVATE_OCI = "private_oci" + PUBLIC_OCI = "public_oci" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/credentials_assume_role_config.py b/nuon/models/credentials_assume_role_config.py new file mode 100644 index 00000000..9c6811c1 --- /dev/null +++ b/nuon/models/credentials_assume_role_config.py @@ -0,0 +1,109 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.iam_two_step_config import IamTwoStepConfig + + +T = TypeVar("T", bound="CredentialsAssumeRoleConfig") + + +@_attrs_define +class CredentialsAssumeRoleConfig: + """ + Attributes: + role_arn (str): + session_name (str): + session_duration_seconds (Union[Unset, int]): + two_step_config (Union[Unset, IamTwoStepConfig]): + use_github_oidc (Union[Unset, bool]): + """ + + role_arn: str + session_name: str + session_duration_seconds: Union[Unset, int] = UNSET + two_step_config: Union[Unset, "IamTwoStepConfig"] = UNSET + use_github_oidc: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + role_arn = self.role_arn + + session_name = self.session_name + + session_duration_seconds = self.session_duration_seconds + + two_step_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.two_step_config, Unset): + two_step_config = self.two_step_config.to_dict() + + use_github_oidc = self.use_github_oidc + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "role_arn": role_arn, + "session_name": session_name, + } + ) + if session_duration_seconds is not UNSET: + field_dict["session_duration_seconds"] = session_duration_seconds + if two_step_config is not UNSET: + field_dict["two_step_config"] = two_step_config + if use_github_oidc is not UNSET: + field_dict["use_github_oidc"] = use_github_oidc + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.iam_two_step_config import IamTwoStepConfig + + d = dict(src_dict) + role_arn = d.pop("role_arn") + + session_name = d.pop("session_name") + + session_duration_seconds = d.pop("session_duration_seconds", UNSET) + + _two_step_config = d.pop("two_step_config", UNSET) + two_step_config: Union[Unset, IamTwoStepConfig] + if isinstance(_two_step_config, Unset): + two_step_config = UNSET + else: + two_step_config = IamTwoStepConfig.from_dict(_two_step_config) + + use_github_oidc = d.pop("use_github_oidc", UNSET) + + credentials_assume_role_config = cls( + role_arn=role_arn, + session_name=session_name, + session_duration_seconds=session_duration_seconds, + two_step_config=two_step_config, + use_github_oidc=use_github_oidc, + ) + + credentials_assume_role_config.additional_properties = d + return credentials_assume_role_config + + @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 diff --git a/nuon/models/credentials_service_principal_credentials.py b/nuon/models/credentials_service_principal_credentials.py new file mode 100644 index 00000000..3c3fd83c --- /dev/null +++ b/nuon/models/credentials_service_principal_credentials.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CredentialsServicePrincipalCredentials") + + +@_attrs_define +class CredentialsServicePrincipalCredentials: + """ + Attributes: + subscription_id (Union[Unset, str]): + subscription_tenant_id (Union[Unset, str]): + """ + + subscription_id: Union[Unset, str] = UNSET + subscription_tenant_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + subscription_id = self.subscription_id + + subscription_tenant_id = self.subscription_tenant_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if subscription_id is not UNSET: + field_dict["subscription_id"] = subscription_id + if subscription_tenant_id is not UNSET: + field_dict["subscription_tenant_id"] = subscription_tenant_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + subscription_id = d.pop("subscription_id", UNSET) + + subscription_tenant_id = d.pop("subscription_tenant_id", UNSET) + + credentials_service_principal_credentials = cls( + subscription_id=subscription_id, + subscription_tenant_id=subscription_tenant_id, + ) + + credentials_service_principal_credentials.additional_properties = d + return credentials_service_principal_credentials + + @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 diff --git a/nuon/models/credentials_static_credentials.py b/nuon/models/credentials_static_credentials.py new file mode 100644 index 00000000..0c5adb73 --- /dev/null +++ b/nuon/models/credentials_static_credentials.py @@ -0,0 +1,75 @@ +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="CredentialsStaticCredentials") + + +@_attrs_define +class CredentialsStaticCredentials: + """ + Attributes: + access_key_id (str): + secret_access_key (str): + session_token (str): + """ + + access_key_id: str + secret_access_key: str + session_token: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + access_key_id = self.access_key_id + + secret_access_key = self.secret_access_key + + session_token = self.session_token + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "access_key_id": access_key_id, + "secret_access_key": secret_access_key, + "session_token": session_token, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + access_key_id = d.pop("access_key_id") + + secret_access_key = d.pop("secret_access_key") + + session_token = d.pop("session_token") + + credentials_static_credentials = cls( + access_key_id=access_key_id, + secret_access_key=secret_access_key, + session_token=session_token, + ) + + credentials_static_credentials.additional_properties = d + return credentials_static_credentials + + @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 diff --git a/nuon/models/generics_null_time.py b/nuon/models/generics_null_time.py new file mode 100644 index 00000000..8e567168 --- /dev/null +++ b/nuon/models/generics_null_time.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GenericsNullTime") + + +@_attrs_define +class GenericsNullTime: + """ + Attributes: + time (Union[Unset, str]): + valid (Union[Unset, bool]): Valid is true if Time is not NULL + """ + + time: Union[Unset, str] = UNSET + valid: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + time = self.time + + valid = self.valid + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if time is not UNSET: + field_dict["time"] = time + if valid is not UNSET: + field_dict["valid"] = valid + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + time = d.pop("time", UNSET) + + valid = d.pop("valid", UNSET) + + generics_null_time = cls( + time=time, + valid=valid, + ) + + generics_null_time.additional_properties = d + return generics_null_time + + @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 diff --git a/nuon/models/get_terraform_workspace_state_json_resources_v2_response_200.py b/nuon/models/get_terraform_workspace_state_json_resources_v2_response_200.py new file mode 100644 index 00000000..4a5daed2 --- /dev/null +++ b/nuon/models/get_terraform_workspace_state_json_resources_v2_response_200.py @@ -0,0 +1,44 @@ +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="GetTerraformWorkspaceStateJSONResourcesV2Response200") + + +@_attrs_define +class GetTerraformWorkspaceStateJSONResourcesV2Response200: + """ """ + + 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) + get_terraform_workspace_state_json_resources_v2_response_200 = cls() + + get_terraform_workspace_state_json_resources_v2_response_200.additional_properties = d + return get_terraform_workspace_state_json_resources_v2_response_200 + + @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 diff --git a/nuon/models/get_terraform_workspace_states_json_by_idv2_response_200.py b/nuon/models/get_terraform_workspace_states_json_by_idv2_response_200.py new file mode 100644 index 00000000..b608aa4e --- /dev/null +++ b/nuon/models/get_terraform_workspace_states_json_by_idv2_response_200.py @@ -0,0 +1,44 @@ +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="GetTerraformWorkspaceStatesJSONByIDV2Response200") + + +@_attrs_define +class GetTerraformWorkspaceStatesJSONByIDV2Response200: + """ """ + + 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) + get_terraform_workspace_states_json_by_idv2_response_200 = cls() + + get_terraform_workspace_states_json_by_idv2_response_200.additional_properties = d + return get_terraform_workspace_states_json_by_idv2_response_200 + + @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 diff --git a/nuon/models/get_workflow_step_approval_contents_response_200.py b/nuon/models/get_workflow_step_approval_contents_response_200.py new file mode 100644 index 00000000..d4c2ab56 --- /dev/null +++ b/nuon/models/get_workflow_step_approval_contents_response_200.py @@ -0,0 +1,44 @@ +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="GetWorkflowStepApprovalContentsResponse200") + + +@_attrs_define +class GetWorkflowStepApprovalContentsResponse200: + """ """ + + 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) + get_workflow_step_approval_contents_response_200 = cls() + + get_workflow_step_approval_contents_response_200.additional_properties = d + return get_workflow_step_approval_contents_response_200 + + @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 diff --git a/nuon/models/github_com_powertoolsdev_mono_pkg_aws_credentials_config.py b/nuon/models/github_com_powertoolsdev_mono_pkg_aws_credentials_config.py new file mode 100644 index 00000000..cec7dcf7 --- /dev/null +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_aws_credentials_config.py @@ -0,0 +1,127 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.credentials_assume_role_config import CredentialsAssumeRoleConfig + from ..models.credentials_static_credentials import CredentialsStaticCredentials + + +T = TypeVar("T", bound="GithubComPowertoolsdevMonoPkgAwsCredentialsConfig") + + +@_attrs_define +class GithubComPowertoolsdevMonoPkgAwsCredentialsConfig: + """ + Attributes: + assume_role (Union[Unset, CredentialsAssumeRoleConfig]): + cache_id (Union[Unset, str]): when cache ID is set, these credentials will be reused, up to the duration of the + sessionTimeout (or default) + profile (Union[Unset, str]): If profile is provided, we'll use that profile over the default credentials + region (Union[Unset, str]): + static (Union[Unset, CredentialsStaticCredentials]): + use_default (Union[Unset, bool]): + """ + + assume_role: Union[Unset, "CredentialsAssumeRoleConfig"] = UNSET + cache_id: Union[Unset, str] = UNSET + profile: Union[Unset, str] = UNSET + region: Union[Unset, str] = UNSET + static: Union[Unset, "CredentialsStaticCredentials"] = UNSET + use_default: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + assume_role: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.assume_role, Unset): + assume_role = self.assume_role.to_dict() + + cache_id = self.cache_id + + profile = self.profile + + region = self.region + + static: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.static, Unset): + static = self.static.to_dict() + + use_default = self.use_default + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if assume_role is not UNSET: + field_dict["assume_role"] = assume_role + if cache_id is not UNSET: + field_dict["cache_id"] = cache_id + if profile is not UNSET: + field_dict["profile"] = profile + if region is not UNSET: + field_dict["region"] = region + if static is not UNSET: + field_dict["static"] = static + if use_default is not UNSET: + field_dict["use_default"] = use_default + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.credentials_assume_role_config import CredentialsAssumeRoleConfig + from ..models.credentials_static_credentials import CredentialsStaticCredentials + + d = dict(src_dict) + _assume_role = d.pop("assume_role", UNSET) + assume_role: Union[Unset, CredentialsAssumeRoleConfig] + if isinstance(_assume_role, Unset): + assume_role = UNSET + else: + assume_role = CredentialsAssumeRoleConfig.from_dict(_assume_role) + + cache_id = d.pop("cache_id", UNSET) + + profile = d.pop("profile", UNSET) + + region = d.pop("region", UNSET) + + _static = d.pop("static", UNSET) + static: Union[Unset, CredentialsStaticCredentials] + if isinstance(_static, Unset): + static = UNSET + else: + static = CredentialsStaticCredentials.from_dict(_static) + + use_default = d.pop("use_default", UNSET) + + github_com_powertoolsdev_mono_pkg_aws_credentials_config = cls( + assume_role=assume_role, + cache_id=cache_id, + profile=profile, + region=region, + static=static, + use_default=use_default, + ) + + github_com_powertoolsdev_mono_pkg_aws_credentials_config.additional_properties = d + return github_com_powertoolsdev_mono_pkg_aws_credentials_config + + @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 diff --git a/nuon/models/github_com_powertoolsdev_mono_pkg_azure_credentials_config.py b/nuon/models/github_com_powertoolsdev_mono_pkg_azure_credentials_config.py new file mode 100644 index 00000000..7613fb9c --- /dev/null +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_azure_credentials_config.py @@ -0,0 +1,81 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.credentials_service_principal_credentials import CredentialsServicePrincipalCredentials + + +T = TypeVar("T", bound="GithubComPowertoolsdevMonoPkgAzureCredentialsConfig") + + +@_attrs_define +class GithubComPowertoolsdevMonoPkgAzureCredentialsConfig: + """ + Attributes: + service_principal (Union[Unset, CredentialsServicePrincipalCredentials]): + use_default (Union[Unset, bool]): + """ + + service_principal: Union[Unset, "CredentialsServicePrincipalCredentials"] = UNSET + use_default: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + service_principal: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.service_principal, Unset): + service_principal = self.service_principal.to_dict() + + use_default = self.use_default + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if service_principal is not UNSET: + field_dict["service_principal"] = service_principal + if use_default is not UNSET: + field_dict["use_default"] = use_default + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.credentials_service_principal_credentials import CredentialsServicePrincipalCredentials + + d = dict(src_dict) + _service_principal = d.pop("service_principal", UNSET) + service_principal: Union[Unset, CredentialsServicePrincipalCredentials] + if isinstance(_service_principal, Unset): + service_principal = UNSET + else: + service_principal = CredentialsServicePrincipalCredentials.from_dict(_service_principal) + + use_default = d.pop("use_default", UNSET) + + github_com_powertoolsdev_mono_pkg_azure_credentials_config = cls( + service_principal=service_principal, + use_default=use_default, + ) + + github_com_powertoolsdev_mono_pkg_azure_credentials_config.additional_properties = d + return github_com_powertoolsdev_mono_pkg_azure_credentials_config + + @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 diff --git a/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py index d49d901e..dd0f5dc7 100644 --- a/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state.py @@ -44,6 +44,7 @@ class GithubComPowertoolsdevMonoPkgTypesStateState: runner (Union[Unset, StateRunnerState]): sandbox (Union[Unset, StateSandboxState]): secrets (Union[Unset, StateSecretsState]): + stale_at (Union[Unset, str]): loaded from the database but not part of the state itself """ actions: Union[Unset, "StateActionsState"] = UNSET @@ -60,6 +61,7 @@ class GithubComPowertoolsdevMonoPkgTypesStateState: runner: Union[Unset, "StateRunnerState"] = UNSET sandbox: Union[Unset, "StateSandboxState"] = UNSET secrets: Union[Unset, "StateSecretsState"] = UNSET + stale_at: Union[Unset, str] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -115,6 +117,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.secrets, Unset): secrets = self.secrets.to_dict() + stale_at = self.stale_at + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -146,6 +150,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["sandbox"] = sandbox if secrets is not UNSET: field_dict["secrets"] = secrets + if stale_at is not UNSET: + field_dict["stale_at"] = stale_at return field_dict @@ -255,6 +261,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: secrets = StateSecretsState.from_dict(_secrets) + stale_at = d.pop("stale_at", UNSET) + github_com_powertoolsdev_mono_pkg_types_state_state = cls( actions=actions, app=app, @@ -270,6 +278,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner=runner, sandbox=sandbox, secrets=secrets, + stale_at=stale_at, ) github_com_powertoolsdev_mono_pkg_types_state_state.additional_properties = d diff --git a/nuon/models/helpers_install_metadata.py b/nuon/models/helpers_install_metadata.py new file mode 100644 index 00000000..7a4c6607 --- /dev/null +++ b/nuon/models/helpers_install_metadata.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="HelpersInstallMetadata") + + +@_attrs_define +class HelpersInstallMetadata: + """ + Attributes: + managed_by (Union[Unset, str]): + """ + + managed_by: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + managed_by = self.managed_by + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = d.pop("managed_by", UNSET) + + helpers_install_metadata = cls( + managed_by=managed_by, + ) + + helpers_install_metadata.additional_properties = d + return helpers_install_metadata + + @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 diff --git a/nuon/models/iam_static_credentials.py b/nuon/models/iam_static_credentials.py new file mode 100644 index 00000000..1359315b --- /dev/null +++ b/nuon/models/iam_static_credentials.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="IamStaticCredentials") + + +@_attrs_define +class IamStaticCredentials: + """ + Attributes: + access_key_id (Union[Unset, str]): + secret_access_key (Union[Unset, str]): + session_token (Union[Unset, str]): + """ + + access_key_id: Union[Unset, str] = UNSET + secret_access_key: Union[Unset, str] = UNSET + session_token: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + access_key_id = self.access_key_id + + secret_access_key = self.secret_access_key + + session_token = self.session_token + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if access_key_id is not UNSET: + field_dict["access_key_id"] = access_key_id + if secret_access_key is not UNSET: + field_dict["secret_access_key"] = secret_access_key + if session_token is not UNSET: + field_dict["session_token"] = session_token + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + access_key_id = d.pop("access_key_id", UNSET) + + secret_access_key = d.pop("secret_access_key", UNSET) + + session_token = d.pop("session_token", UNSET) + + iam_static_credentials = cls( + access_key_id=access_key_id, + secret_access_key=secret_access_key, + session_token=session_token, + ) + + iam_static_credentials.additional_properties = d + return iam_static_credentials + + @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 diff --git a/nuon/models/iam_two_step_config.py b/nuon/models/iam_two_step_config.py new file mode 100644 index 00000000..500e26fc --- /dev/null +++ b/nuon/models/iam_two_step_config.py @@ -0,0 +1,90 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.iam_static_credentials import IamStaticCredentials + + +T = TypeVar("T", bound="IamTwoStepConfig") + + +@_attrs_define +class IamTwoStepConfig: + """ + Attributes: + iam_role_arn (Union[Unset, str]): + src_iam_role_arn (Union[Unset, str]): + src_static_credentials (Union[Unset, IamStaticCredentials]): + """ + + iam_role_arn: Union[Unset, str] = UNSET + src_iam_role_arn: Union[Unset, str] = UNSET + src_static_credentials: Union[Unset, "IamStaticCredentials"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + iam_role_arn = self.iam_role_arn + + src_iam_role_arn = self.src_iam_role_arn + + src_static_credentials: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.src_static_credentials, Unset): + src_static_credentials = self.src_static_credentials.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if iam_role_arn is not UNSET: + field_dict["iam_role_arn"] = iam_role_arn + if src_iam_role_arn is not UNSET: + field_dict["src_iam_role_arn"] = src_iam_role_arn + if src_static_credentials is not UNSET: + field_dict["src_static_credentials"] = src_static_credentials + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.iam_static_credentials import IamStaticCredentials + + d = dict(src_dict) + iam_role_arn = d.pop("iam_role_arn", UNSET) + + src_iam_role_arn = d.pop("src_iam_role_arn", UNSET) + + _src_static_credentials = d.pop("src_static_credentials", UNSET) + src_static_credentials: Union[Unset, IamStaticCredentials] + if isinstance(_src_static_credentials, Unset): + src_static_credentials = UNSET + else: + src_static_credentials = IamStaticCredentials.from_dict(_src_static_credentials) + + iam_two_step_config = cls( + iam_role_arn=iam_role_arn, + src_iam_role_arn=src_iam_role_arn, + src_static_credentials=src_static_credentials, + ) + + iam_two_step_config.additional_properties = d + return iam_two_step_config + + @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 diff --git a/nuon/models/kube_cluster_info.py b/nuon/models/kube_cluster_info.py new file mode 100644 index 00000000..dbd3e7c0 --- /dev/null +++ b/nuon/models/kube_cluster_info.py @@ -0,0 +1,174 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.kube_cluster_info_env_vars import KubeClusterInfoEnvVars + + +T = TypeVar("T", bound="KubeClusterInfo") + + +@_attrs_define +class KubeClusterInfo: + """ + Attributes: + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + azure_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + ca_data (Union[Unset, str]): CAData is the base64 encoded public certificate + endpoint (Union[Unset, str]): Endpoint is the URL of the k8s api server + env_vars (Union[Unset, KubeClusterInfoEnvVars]): + id (Union[Unset, str]): ID is the ID of the EKS cluster + inline (Union[Unset, bool]): If this is set, we will _not_ use aws-iam-authenticator, but rather inline create + the token + kube_config (Union[Unset, str]): KubeConfig will override the kube config, and be parsed instead of generating a + new one + trusted_role_arn (Union[Unset, str]): TrustedRoleARN is the arn of the role that should be assumed to interact + with the cluster + NOTE(JM): we are deprecating this + """ + + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + azure_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + ca_data: Union[Unset, str] = UNSET + endpoint: Union[Unset, str] = UNSET + env_vars: Union[Unset, "KubeClusterInfoEnvVars"] = UNSET + id: Union[Unset, str] = UNSET + inline: Union[Unset, bool] = UNSET + kube_config: Union[Unset, str] = UNSET + trusted_role_arn: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + azure_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_auth, Unset): + azure_auth = self.azure_auth.to_dict() + + ca_data = self.ca_data + + endpoint = self.endpoint + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + id = self.id + + inline = self.inline + + kube_config = self.kube_config + + trusted_role_arn = self.trusted_role_arn + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if azure_auth is not UNSET: + field_dict["azure_auth"] = azure_auth + if ca_data is not UNSET: + field_dict["ca_data"] = ca_data + if endpoint is not UNSET: + field_dict["endpoint"] = endpoint + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if id is not UNSET: + field_dict["id"] = id + if inline is not UNSET: + field_dict["inline"] = inline + if kube_config is not UNSET: + field_dict["kube_config"] = kube_config + if trusted_role_arn is not UNSET: + field_dict["trusted_role_arn"] = trusted_role_arn + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.kube_cluster_info_env_vars import KubeClusterInfoEnvVars + + d = dict(src_dict) + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _azure_auth = d.pop("azure_auth", UNSET) + azure_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_azure_auth, Unset): + azure_auth = UNSET + else: + azure_auth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_azure_auth) + + ca_data = d.pop("ca_data", UNSET) + + endpoint = d.pop("endpoint", UNSET) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, KubeClusterInfoEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = KubeClusterInfoEnvVars.from_dict(_env_vars) + + id = d.pop("id", UNSET) + + inline = d.pop("inline", UNSET) + + kube_config = d.pop("kube_config", UNSET) + + trusted_role_arn = d.pop("trusted_role_arn", UNSET) + + kube_cluster_info = cls( + aws_auth=aws_auth, + azure_auth=azure_auth, + ca_data=ca_data, + endpoint=endpoint, + env_vars=env_vars, + id=id, + inline=inline, + kube_config=kube_config, + trusted_role_arn=trusted_role_arn, + ) + + kube_cluster_info.additional_properties = d + return kube_cluster_info + + @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 diff --git a/nuon/models/kube_cluster_info_env_vars.py b/nuon/models/kube_cluster_info_env_vars.py new file mode 100644 index 00000000..4f60a974 --- /dev/null +++ b/nuon/models/kube_cluster_info_env_vars.py @@ -0,0 +1,44 @@ +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="KubeClusterInfoEnvVars") + + +@_attrs_define +class KubeClusterInfoEnvVars: + """ """ + + additional_properties: dict[str, str] = _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) + kube_cluster_info_env_vars = cls() + + kube_cluster_info_env_vars.additional_properties = d + return kube_cluster_info_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_action_workflow_run_plan.py b/nuon/models/plantypes_action_workflow_run_plan.py new file mode 100644 index 00000000..b3205d0e --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_plan.py @@ -0,0 +1,213 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_action_workflow_run_plan_attrs import PlantypesActionWorkflowRunPlanAttrs + from ..models.plantypes_action_workflow_run_plan_builtin_env_vars import ( + PlantypesActionWorkflowRunPlanBuiltinEnvVars, + ) + from ..models.plantypes_action_workflow_run_plan_override_env_vars import ( + PlantypesActionWorkflowRunPlanOverrideEnvVars, + ) + from ..models.plantypes_action_workflow_run_step_plan import PlantypesActionWorkflowRunStepPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + +T = TypeVar("T", bound="PlantypesActionWorkflowRunPlan") + + +@_attrs_define +class PlantypesActionWorkflowRunPlan: + """ + Attributes: + attrs (Union[Unset, PlantypesActionWorkflowRunPlanAttrs]): + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + builtin_env_vars (Union[Unset, PlantypesActionWorkflowRunPlanBuiltinEnvVars]): + cluster_info (Union[Unset, KubeClusterInfo]): + id (Union[Unset, str]): + install_id (Union[Unset, str]): + override_env_vars (Union[Unset, PlantypesActionWorkflowRunPlanOverrideEnvVars]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + steps (Union[Unset, list['PlantypesActionWorkflowRunStepPlan']]): + """ + + attrs: Union[Unset, "PlantypesActionWorkflowRunPlanAttrs"] = UNSET + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + builtin_env_vars: Union[Unset, "PlantypesActionWorkflowRunPlanBuiltinEnvVars"] = UNSET + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + id: Union[Unset, str] = UNSET + install_id: Union[Unset, str] = UNSET + override_env_vars: Union[Unset, "PlantypesActionWorkflowRunPlanOverrideEnvVars"] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + steps: Union[Unset, list["PlantypesActionWorkflowRunStepPlan"]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + attrs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.attrs, Unset): + attrs = self.attrs.to_dict() + + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + builtin_env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.builtin_env_vars, Unset): + builtin_env_vars = self.builtin_env_vars.to_dict() + + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + id = self.id + + install_id = self.install_id + + override_env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.override_env_vars, Unset): + override_env_vars = self.override_env_vars.to_dict() + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + steps: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.steps, Unset): + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attrs is not UNSET: + field_dict["attrs"] = attrs + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if builtin_env_vars is not UNSET: + field_dict["builtin_env_vars"] = builtin_env_vars + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if id is not UNSET: + field_dict["id"] = id + if install_id is not UNSET: + field_dict["install_id"] = install_id + if override_env_vars is not UNSET: + field_dict["override_env_vars"] = override_env_vars + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if steps is not UNSET: + field_dict["steps"] = steps + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_action_workflow_run_plan_attrs import PlantypesActionWorkflowRunPlanAttrs + from ..models.plantypes_action_workflow_run_plan_builtin_env_vars import ( + PlantypesActionWorkflowRunPlanBuiltinEnvVars, + ) + from ..models.plantypes_action_workflow_run_plan_override_env_vars import ( + PlantypesActionWorkflowRunPlanOverrideEnvVars, + ) + from ..models.plantypes_action_workflow_run_step_plan import PlantypesActionWorkflowRunStepPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + d = dict(src_dict) + _attrs = d.pop("attrs", UNSET) + attrs: Union[Unset, PlantypesActionWorkflowRunPlanAttrs] + if isinstance(_attrs, Unset): + attrs = UNSET + else: + attrs = PlantypesActionWorkflowRunPlanAttrs.from_dict(_attrs) + + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _builtin_env_vars = d.pop("builtin_env_vars", UNSET) + builtin_env_vars: Union[Unset, PlantypesActionWorkflowRunPlanBuiltinEnvVars] + if isinstance(_builtin_env_vars, Unset): + builtin_env_vars = UNSET + else: + builtin_env_vars = PlantypesActionWorkflowRunPlanBuiltinEnvVars.from_dict(_builtin_env_vars) + + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + id = d.pop("id", UNSET) + + install_id = d.pop("install_id", UNSET) + + _override_env_vars = d.pop("override_env_vars", UNSET) + override_env_vars: Union[Unset, PlantypesActionWorkflowRunPlanOverrideEnvVars] + if isinstance(_override_env_vars, Unset): + override_env_vars = UNSET + else: + override_env_vars = PlantypesActionWorkflowRunPlanOverrideEnvVars.from_dict(_override_env_vars) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + steps = [] + _steps = d.pop("steps", UNSET) + for steps_item_data in _steps or []: + steps_item = PlantypesActionWorkflowRunStepPlan.from_dict(steps_item_data) + + steps.append(steps_item) + + plantypes_action_workflow_run_plan = cls( + attrs=attrs, + aws_auth=aws_auth, + builtin_env_vars=builtin_env_vars, + cluster_info=cluster_info, + id=id, + install_id=install_id, + override_env_vars=override_env_vars, + sandbox_mode=sandbox_mode, + steps=steps, + ) + + plantypes_action_workflow_run_plan.additional_properties = d + return plantypes_action_workflow_run_plan + + @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 diff --git a/nuon/models/plantypes_action_workflow_run_plan_attrs.py b/nuon/models/plantypes_action_workflow_run_plan_attrs.py new file mode 100644 index 00000000..c54a8331 --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_plan_attrs.py @@ -0,0 +1,44 @@ +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="PlantypesActionWorkflowRunPlanAttrs") + + +@_attrs_define +class PlantypesActionWorkflowRunPlanAttrs: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_action_workflow_run_plan_attrs = cls() + + plantypes_action_workflow_run_plan_attrs.additional_properties = d + return plantypes_action_workflow_run_plan_attrs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_action_workflow_run_plan_builtin_env_vars.py b/nuon/models/plantypes_action_workflow_run_plan_builtin_env_vars.py new file mode 100644 index 00000000..c25aafb0 --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_plan_builtin_env_vars.py @@ -0,0 +1,44 @@ +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="PlantypesActionWorkflowRunPlanBuiltinEnvVars") + + +@_attrs_define +class PlantypesActionWorkflowRunPlanBuiltinEnvVars: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_action_workflow_run_plan_builtin_env_vars = cls() + + plantypes_action_workflow_run_plan_builtin_env_vars.additional_properties = d + return plantypes_action_workflow_run_plan_builtin_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_action_workflow_run_plan_override_env_vars.py b/nuon/models/plantypes_action_workflow_run_plan_override_env_vars.py new file mode 100644 index 00000000..4300ac9a --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_plan_override_env_vars.py @@ -0,0 +1,44 @@ +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="PlantypesActionWorkflowRunPlanOverrideEnvVars") + + +@_attrs_define +class PlantypesActionWorkflowRunPlanOverrideEnvVars: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_action_workflow_run_plan_override_env_vars = cls() + + plantypes_action_workflow_run_plan_override_env_vars.additional_properties = d + return plantypes_action_workflow_run_plan_override_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_action_workflow_run_step_plan.py b/nuon/models/plantypes_action_workflow_run_step_plan.py new file mode 100644 index 00000000..635e8170 --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_step_plan.py @@ -0,0 +1,141 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_action_workflow_run_step_plan_attrs import PlantypesActionWorkflowRunStepPlanAttrs + from ..models.plantypes_action_workflow_run_step_plan_interpolated_env_vars import ( + PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars, + ) + from ..models.plantypes_git_source import PlantypesGitSource + + +T = TypeVar("T", bound="PlantypesActionWorkflowRunStepPlan") + + +@_attrs_define +class PlantypesActionWorkflowRunStepPlan: + """ + Attributes: + attrs (Union[Unset, PlantypesActionWorkflowRunStepPlanAttrs]): + git_source (Union[Unset, PlantypesGitSource]): + interpolated_command (Union[Unset, str]): + interpolated_env_vars (Union[Unset, PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars]): + interpolated_inline_contents (Union[Unset, str]): + run_id (Union[Unset, str]): + """ + + attrs: Union[Unset, "PlantypesActionWorkflowRunStepPlanAttrs"] = UNSET + git_source: Union[Unset, "PlantypesGitSource"] = UNSET + interpolated_command: Union[Unset, str] = UNSET + interpolated_env_vars: Union[Unset, "PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars"] = UNSET + interpolated_inline_contents: Union[Unset, str] = UNSET + run_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + attrs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.attrs, Unset): + attrs = self.attrs.to_dict() + + git_source: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.git_source, Unset): + git_source = self.git_source.to_dict() + + interpolated_command = self.interpolated_command + + interpolated_env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.interpolated_env_vars, Unset): + interpolated_env_vars = self.interpolated_env_vars.to_dict() + + interpolated_inline_contents = self.interpolated_inline_contents + + run_id = self.run_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if attrs is not UNSET: + field_dict["attrs"] = attrs + if git_source is not UNSET: + field_dict["git_source"] = git_source + if interpolated_command is not UNSET: + field_dict["interpolated_command"] = interpolated_command + if interpolated_env_vars is not UNSET: + field_dict["interpolated_env_vars"] = interpolated_env_vars + if interpolated_inline_contents is not UNSET: + field_dict["interpolated_inline_contents"] = interpolated_inline_contents + if run_id is not UNSET: + field_dict["run_id"] = run_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_action_workflow_run_step_plan_attrs import PlantypesActionWorkflowRunStepPlanAttrs + from ..models.plantypes_action_workflow_run_step_plan_interpolated_env_vars import ( + PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars, + ) + from ..models.plantypes_git_source import PlantypesGitSource + + d = dict(src_dict) + _attrs = d.pop("attrs", UNSET) + attrs: Union[Unset, PlantypesActionWorkflowRunStepPlanAttrs] + if isinstance(_attrs, Unset): + attrs = UNSET + else: + attrs = PlantypesActionWorkflowRunStepPlanAttrs.from_dict(_attrs) + + _git_source = d.pop("git_source", UNSET) + git_source: Union[Unset, PlantypesGitSource] + if isinstance(_git_source, Unset): + git_source = UNSET + else: + git_source = PlantypesGitSource.from_dict(_git_source) + + interpolated_command = d.pop("interpolated_command", UNSET) + + _interpolated_env_vars = d.pop("interpolated_env_vars", UNSET) + interpolated_env_vars: Union[Unset, PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars] + if isinstance(_interpolated_env_vars, Unset): + interpolated_env_vars = UNSET + else: + interpolated_env_vars = PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars.from_dict( + _interpolated_env_vars + ) + + interpolated_inline_contents = d.pop("interpolated_inline_contents", UNSET) + + run_id = d.pop("run_id", UNSET) + + plantypes_action_workflow_run_step_plan = cls( + attrs=attrs, + git_source=git_source, + interpolated_command=interpolated_command, + interpolated_env_vars=interpolated_env_vars, + interpolated_inline_contents=interpolated_inline_contents, + run_id=run_id, + ) + + plantypes_action_workflow_run_step_plan.additional_properties = d + return plantypes_action_workflow_run_step_plan + + @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 diff --git a/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py b/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py new file mode 100644 index 00000000..17c3392e --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py @@ -0,0 +1,44 @@ +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="PlantypesActionWorkflowRunStepPlanAttrs") + + +@_attrs_define +class PlantypesActionWorkflowRunStepPlanAttrs: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_action_workflow_run_step_plan_attrs = cls() + + plantypes_action_workflow_run_step_plan_attrs.additional_properties = d + return plantypes_action_workflow_run_step_plan_attrs + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_action_workflow_run_step_plan_interpolated_env_vars.py b/nuon/models/plantypes_action_workflow_run_step_plan_interpolated_env_vars.py new file mode 100644 index 00000000..12ee1dbb --- /dev/null +++ b/nuon/models/plantypes_action_workflow_run_step_plan_interpolated_env_vars.py @@ -0,0 +1,44 @@ +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="PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars") + + +@_attrs_define +class PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_action_workflow_run_step_plan_interpolated_env_vars = cls() + + plantypes_action_workflow_run_step_plan_interpolated_env_vars.additional_properties = d + return plantypes_action_workflow_run_step_plan_interpolated_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_build_plan.py b/nuon/models/plantypes_build_plan.py new file mode 100644 index 00000000..a48f6bd2 --- /dev/null +++ b/nuon/models/plantypes_build_plan.py @@ -0,0 +1,201 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_container_image_pull_plan import PlantypesContainerImagePullPlan + from ..models.plantypes_docker_build_plan import PlantypesDockerBuildPlan + from ..models.plantypes_git_source import PlantypesGitSource + from ..models.plantypes_helm_build_plan import PlantypesHelmBuildPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_terraform_build_plan import PlantypesTerraformBuildPlan + + +T = TypeVar("T", bound="PlantypesBuildPlan") + + +@_attrs_define +class PlantypesBuildPlan: + """ + Attributes: + dst_registry (ConfigsOCIRegistryRepository): + dst_tag (str): + component_build_id (Union[Unset, str]): + component_id (Union[Unset, str]): + container_image_pull_plan (Union[Unset, PlantypesContainerImagePullPlan]): + docker_build_plan (Union[Unset, PlantypesDockerBuildPlan]): + git_source (Union[Unset, PlantypesGitSource]): + helm_build_plan (Union[Unset, PlantypesHelmBuildPlan]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + terraform_build_plan (Union[Unset, PlantypesTerraformBuildPlan]): + """ + + dst_registry: "ConfigsOCIRegistryRepository" + dst_tag: str + component_build_id: Union[Unset, str] = UNSET + component_id: Union[Unset, str] = UNSET + container_image_pull_plan: Union[Unset, "PlantypesContainerImagePullPlan"] = UNSET + docker_build_plan: Union[Unset, "PlantypesDockerBuildPlan"] = UNSET + git_source: Union[Unset, "PlantypesGitSource"] = UNSET + helm_build_plan: Union[Unset, "PlantypesHelmBuildPlan"] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + terraform_build_plan: Union[Unset, "PlantypesTerraformBuildPlan"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dst_registry = self.dst_registry.to_dict() + + dst_tag = self.dst_tag + + component_build_id = self.component_build_id + + component_id = self.component_id + + container_image_pull_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.container_image_pull_plan, Unset): + container_image_pull_plan = self.container_image_pull_plan.to_dict() + + docker_build_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.docker_build_plan, Unset): + docker_build_plan = self.docker_build_plan.to_dict() + + git_source: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.git_source, Unset): + git_source = self.git_source.to_dict() + + helm_build_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm_build_plan, Unset): + helm_build_plan = self.helm_build_plan.to_dict() + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + terraform_build_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_build_plan, Unset): + terraform_build_plan = self.terraform_build_plan.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dst_registry": dst_registry, + "dst_tag": dst_tag, + } + ) + if component_build_id is not UNSET: + field_dict["component_build_id"] = component_build_id + if component_id is not UNSET: + field_dict["component_id"] = component_id + if container_image_pull_plan is not UNSET: + field_dict["container_image_pull_plan"] = container_image_pull_plan + if docker_build_plan is not UNSET: + field_dict["docker_build_plan"] = docker_build_plan + if git_source is not UNSET: + field_dict["git_source"] = git_source + if helm_build_plan is not UNSET: + field_dict["helm_build_plan"] = helm_build_plan + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if terraform_build_plan is not UNSET: + field_dict["terraform_build_plan"] = terraform_build_plan + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_container_image_pull_plan import PlantypesContainerImagePullPlan + from ..models.plantypes_docker_build_plan import PlantypesDockerBuildPlan + from ..models.plantypes_git_source import PlantypesGitSource + from ..models.plantypes_helm_build_plan import PlantypesHelmBuildPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_terraform_build_plan import PlantypesTerraformBuildPlan + + d = dict(src_dict) + dst_registry = ConfigsOCIRegistryRepository.from_dict(d.pop("dst_registry")) + + dst_tag = d.pop("dst_tag") + + component_build_id = d.pop("component_build_id", UNSET) + + component_id = d.pop("component_id", UNSET) + + _container_image_pull_plan = d.pop("container_image_pull_plan", UNSET) + container_image_pull_plan: Union[Unset, PlantypesContainerImagePullPlan] + if isinstance(_container_image_pull_plan, Unset): + container_image_pull_plan = UNSET + else: + container_image_pull_plan = PlantypesContainerImagePullPlan.from_dict(_container_image_pull_plan) + + _docker_build_plan = d.pop("docker_build_plan", UNSET) + docker_build_plan: Union[Unset, PlantypesDockerBuildPlan] + if isinstance(_docker_build_plan, Unset): + docker_build_plan = UNSET + else: + docker_build_plan = PlantypesDockerBuildPlan.from_dict(_docker_build_plan) + + _git_source = d.pop("git_source", UNSET) + git_source: Union[Unset, PlantypesGitSource] + if isinstance(_git_source, Unset): + git_source = UNSET + else: + git_source = PlantypesGitSource.from_dict(_git_source) + + _helm_build_plan = d.pop("helm_build_plan", UNSET) + helm_build_plan: Union[Unset, PlantypesHelmBuildPlan] + if isinstance(_helm_build_plan, Unset): + helm_build_plan = UNSET + else: + helm_build_plan = PlantypesHelmBuildPlan.from_dict(_helm_build_plan) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + _terraform_build_plan = d.pop("terraform_build_plan", UNSET) + terraform_build_plan: Union[Unset, PlantypesTerraformBuildPlan] + if isinstance(_terraform_build_plan, Unset): + terraform_build_plan = UNSET + else: + terraform_build_plan = PlantypesTerraformBuildPlan.from_dict(_terraform_build_plan) + + plantypes_build_plan = cls( + dst_registry=dst_registry, + dst_tag=dst_tag, + component_build_id=component_build_id, + component_id=component_id, + container_image_pull_plan=container_image_pull_plan, + docker_build_plan=docker_build_plan, + git_source=git_source, + helm_build_plan=helm_build_plan, + sandbox_mode=sandbox_mode, + terraform_build_plan=terraform_build_plan, + ) + + plantypes_build_plan.additional_properties = d + return plantypes_build_plan + + @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 diff --git a/nuon/models/plantypes_composite_plan.py b/nuon/models/plantypes_composite_plan.py new file mode 100644 index 00000000..edf3c9af --- /dev/null +++ b/nuon/models/plantypes_composite_plan.py @@ -0,0 +1,162 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_action_workflow_run_plan import PlantypesActionWorkflowRunPlan + from ..models.plantypes_build_plan import PlantypesBuildPlan + from ..models.plantypes_deploy_plan import PlantypesDeployPlan + from ..models.plantypes_sandbox_run_plan import PlantypesSandboxRunPlan + from ..models.plantypes_sync_oci_plan import PlantypesSyncOCIPlan + from ..models.plantypes_sync_secrets_plan import PlantypesSyncSecretsPlan + + +T = TypeVar("T", bound="PlantypesCompositePlan") + + +@_attrs_define +class PlantypesCompositePlan: + """ + Attributes: + action_workflow_run_plan (Union[Unset, PlantypesActionWorkflowRunPlan]): + build_plan (Union[Unset, PlantypesBuildPlan]): + deploy_plan (Union[Unset, PlantypesDeployPlan]): + sandbox_run_plan (Union[Unset, PlantypesSandboxRunPlan]): + sync_oci_plan (Union[Unset, PlantypesSyncOCIPlan]): + sync_secrets_plan (Union[Unset, PlantypesSyncSecretsPlan]): + """ + + action_workflow_run_plan: Union[Unset, "PlantypesActionWorkflowRunPlan"] = UNSET + build_plan: Union[Unset, "PlantypesBuildPlan"] = UNSET + deploy_plan: Union[Unset, "PlantypesDeployPlan"] = UNSET + sandbox_run_plan: Union[Unset, "PlantypesSandboxRunPlan"] = UNSET + sync_oci_plan: Union[Unset, "PlantypesSyncOCIPlan"] = UNSET + sync_secrets_plan: Union[Unset, "PlantypesSyncSecretsPlan"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + action_workflow_run_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.action_workflow_run_plan, Unset): + action_workflow_run_plan = self.action_workflow_run_plan.to_dict() + + build_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.build_plan, Unset): + build_plan = self.build_plan.to_dict() + + deploy_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.deploy_plan, Unset): + deploy_plan = self.deploy_plan.to_dict() + + sandbox_run_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_run_plan, Unset): + sandbox_run_plan = self.sandbox_run_plan.to_dict() + + sync_oci_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sync_oci_plan, Unset): + sync_oci_plan = self.sync_oci_plan.to_dict() + + sync_secrets_plan: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sync_secrets_plan, Unset): + sync_secrets_plan = self.sync_secrets_plan.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if action_workflow_run_plan is not UNSET: + field_dict["action_workflow_run_plan"] = action_workflow_run_plan + if build_plan is not UNSET: + field_dict["build_plan"] = build_plan + if deploy_plan is not UNSET: + field_dict["deploy_plan"] = deploy_plan + if sandbox_run_plan is not UNSET: + field_dict["sandbox_run_plan"] = sandbox_run_plan + if sync_oci_plan is not UNSET: + field_dict["sync_oci_plan"] = sync_oci_plan + if sync_secrets_plan is not UNSET: + field_dict["sync_secrets_plan"] = sync_secrets_plan + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_action_workflow_run_plan import PlantypesActionWorkflowRunPlan + from ..models.plantypes_build_plan import PlantypesBuildPlan + from ..models.plantypes_deploy_plan import PlantypesDeployPlan + from ..models.plantypes_sandbox_run_plan import PlantypesSandboxRunPlan + from ..models.plantypes_sync_oci_plan import PlantypesSyncOCIPlan + from ..models.plantypes_sync_secrets_plan import PlantypesSyncSecretsPlan + + d = dict(src_dict) + _action_workflow_run_plan = d.pop("action_workflow_run_plan", UNSET) + action_workflow_run_plan: Union[Unset, PlantypesActionWorkflowRunPlan] + if isinstance(_action_workflow_run_plan, Unset): + action_workflow_run_plan = UNSET + else: + action_workflow_run_plan = PlantypesActionWorkflowRunPlan.from_dict(_action_workflow_run_plan) + + _build_plan = d.pop("build_plan", UNSET) + build_plan: Union[Unset, PlantypesBuildPlan] + if isinstance(_build_plan, Unset): + build_plan = UNSET + else: + build_plan = PlantypesBuildPlan.from_dict(_build_plan) + + _deploy_plan = d.pop("deploy_plan", UNSET) + deploy_plan: Union[Unset, PlantypesDeployPlan] + if isinstance(_deploy_plan, Unset): + deploy_plan = UNSET + else: + deploy_plan = PlantypesDeployPlan.from_dict(_deploy_plan) + + _sandbox_run_plan = d.pop("sandbox_run_plan", UNSET) + sandbox_run_plan: Union[Unset, PlantypesSandboxRunPlan] + if isinstance(_sandbox_run_plan, Unset): + sandbox_run_plan = UNSET + else: + sandbox_run_plan = PlantypesSandboxRunPlan.from_dict(_sandbox_run_plan) + + _sync_oci_plan = d.pop("sync_oci_plan", UNSET) + sync_oci_plan: Union[Unset, PlantypesSyncOCIPlan] + if isinstance(_sync_oci_plan, Unset): + sync_oci_plan = UNSET + else: + sync_oci_plan = PlantypesSyncOCIPlan.from_dict(_sync_oci_plan) + + _sync_secrets_plan = d.pop("sync_secrets_plan", UNSET) + sync_secrets_plan: Union[Unset, PlantypesSyncSecretsPlan] + if isinstance(_sync_secrets_plan, Unset): + sync_secrets_plan = UNSET + else: + sync_secrets_plan = PlantypesSyncSecretsPlan.from_dict(_sync_secrets_plan) + + plantypes_composite_plan = cls( + action_workflow_run_plan=action_workflow_run_plan, + build_plan=build_plan, + deploy_plan=deploy_plan, + sandbox_run_plan=sandbox_run_plan, + sync_oci_plan=sync_oci_plan, + sync_secrets_plan=sync_secrets_plan, + ) + + plantypes_composite_plan.additional_properties = d + return plantypes_composite_plan + + @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 diff --git a/nuon/models/plantypes_container_image_pull_plan.py b/nuon/models/plantypes_container_image_pull_plan.py new file mode 100644 index 00000000..cbb50183 --- /dev/null +++ b/nuon/models/plantypes_container_image_pull_plan.py @@ -0,0 +1,90 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + + +T = TypeVar("T", bound="PlantypesContainerImagePullPlan") + + +@_attrs_define +class PlantypesContainerImagePullPlan: + """ + Attributes: + image (Union[Unset, str]): + repo_config (Union[Unset, ConfigsOCIRegistryRepository]): + tag (Union[Unset, str]): + """ + + image: Union[Unset, str] = UNSET + repo_config: Union[Unset, "ConfigsOCIRegistryRepository"] = UNSET + tag: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + image = self.image + + repo_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.repo_config, Unset): + repo_config = self.repo_config.to_dict() + + tag = self.tag + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if image is not UNSET: + field_dict["image"] = image + if repo_config is not UNSET: + field_dict["repo_config"] = repo_config + if tag is not UNSET: + field_dict["tag"] = tag + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + + d = dict(src_dict) + image = d.pop("image", UNSET) + + _repo_config = d.pop("repo_config", UNSET) + repo_config: Union[Unset, ConfigsOCIRegistryRepository] + if isinstance(_repo_config, Unset): + repo_config = UNSET + else: + repo_config = ConfigsOCIRegistryRepository.from_dict(_repo_config) + + tag = d.pop("tag", UNSET) + + plantypes_container_image_pull_plan = cls( + image=image, + repo_config=repo_config, + tag=tag, + ) + + plantypes_container_image_pull_plan.additional_properties = d + return plantypes_container_image_pull_plan + + @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 diff --git a/nuon/models/plantypes_deploy_plan.py b/nuon/models/plantypes_deploy_plan.py new file mode 100644 index 00000000..053f0469 --- /dev/null +++ b/nuon/models/plantypes_deploy_plan.py @@ -0,0 +1,229 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_helm_deploy_plan import PlantypesHelmDeployPlan + from ..models.plantypes_kubernetes_manifest_deploy_plan import PlantypesKubernetesManifestDeployPlan + from ..models.plantypes_noop_deploy_plan import PlantypesNoopDeployPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_terraform_deploy_plan import PlantypesTerraformDeployPlan + + +T = TypeVar("T", bound="PlantypesDeployPlan") + + +@_attrs_define +class PlantypesDeployPlan: + """ + Attributes: + src_registry (ConfigsOCIRegistryRepository): + src_tag (str): + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + apply_plan_contents (Union[Unset, str]): The following field is for applying a plan that is already save + apply_plan_display (Union[Unset, str]): This field is for storing a human legible plan or corollary + representation + component_id (Union[Unset, str]): + component_name (Union[Unset, str]): + helm (Union[Unset, PlantypesHelmDeployPlan]): + install_id (Union[Unset, str]): + kubernetes_manifest (Union[Unset, PlantypesKubernetesManifestDeployPlan]): + noop (Union[Unset, PlantypesNoopDeployPlan]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + terraform (Union[Unset, PlantypesTerraformDeployPlan]): + """ + + src_registry: "ConfigsOCIRegistryRepository" + src_tag: str + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + apply_plan_contents: Union[Unset, str] = UNSET + apply_plan_display: Union[Unset, str] = UNSET + component_id: Union[Unset, str] = UNSET + component_name: Union[Unset, str] = UNSET + helm: Union[Unset, "PlantypesHelmDeployPlan"] = UNSET + install_id: Union[Unset, str] = UNSET + kubernetes_manifest: Union[Unset, "PlantypesKubernetesManifestDeployPlan"] = UNSET + noop: Union[Unset, "PlantypesNoopDeployPlan"] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + terraform: Union[Unset, "PlantypesTerraformDeployPlan"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + src_registry = self.src_registry.to_dict() + + src_tag = self.src_tag + + app_config_id = self.app_config_id + + app_id = self.app_id + + apply_plan_contents = self.apply_plan_contents + + apply_plan_display = self.apply_plan_display + + component_id = self.component_id + + component_name = self.component_name + + helm: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm, Unset): + helm = self.helm.to_dict() + + install_id = self.install_id + + kubernetes_manifest: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.kubernetes_manifest, Unset): + kubernetes_manifest = self.kubernetes_manifest.to_dict() + + noop: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.noop, Unset): + noop = self.noop.to_dict() + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + terraform: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform, Unset): + terraform = self.terraform.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "src_registry": src_registry, + "src_tag": src_tag, + } + ) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if apply_plan_contents is not UNSET: + field_dict["apply_plan_contents"] = apply_plan_contents + if apply_plan_display is not UNSET: + field_dict["apply_plan_display"] = apply_plan_display + if component_id is not UNSET: + field_dict["component_id"] = component_id + if component_name is not UNSET: + field_dict["component_name"] = component_name + if helm is not UNSET: + field_dict["helm"] = helm + if install_id is not UNSET: + field_dict["install_id"] = install_id + if kubernetes_manifest is not UNSET: + field_dict["kubernetes_manifest"] = kubernetes_manifest + if noop is not UNSET: + field_dict["noop"] = noop + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if terraform is not UNSET: + field_dict["terraform"] = terraform + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_helm_deploy_plan import PlantypesHelmDeployPlan + from ..models.plantypes_kubernetes_manifest_deploy_plan import PlantypesKubernetesManifestDeployPlan + from ..models.plantypes_noop_deploy_plan import PlantypesNoopDeployPlan + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_terraform_deploy_plan import PlantypesTerraformDeployPlan + + d = dict(src_dict) + src_registry = ConfigsOCIRegistryRepository.from_dict(d.pop("src_registry")) + + src_tag = d.pop("src_tag") + + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + apply_plan_contents = d.pop("apply_plan_contents", UNSET) + + apply_plan_display = d.pop("apply_plan_display", UNSET) + + component_id = d.pop("component_id", UNSET) + + component_name = d.pop("component_name", UNSET) + + _helm = d.pop("helm", UNSET) + helm: Union[Unset, PlantypesHelmDeployPlan] + if isinstance(_helm, Unset): + helm = UNSET + else: + helm = PlantypesHelmDeployPlan.from_dict(_helm) + + install_id = d.pop("install_id", UNSET) + + _kubernetes_manifest = d.pop("kubernetes_manifest", UNSET) + kubernetes_manifest: Union[Unset, PlantypesKubernetesManifestDeployPlan] + if isinstance(_kubernetes_manifest, Unset): + kubernetes_manifest = UNSET + else: + kubernetes_manifest = PlantypesKubernetesManifestDeployPlan.from_dict(_kubernetes_manifest) + + _noop = d.pop("noop", UNSET) + noop: Union[Unset, PlantypesNoopDeployPlan] + if isinstance(_noop, Unset): + noop = UNSET + else: + noop = PlantypesNoopDeployPlan.from_dict(_noop) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + _terraform = d.pop("terraform", UNSET) + terraform: Union[Unset, PlantypesTerraformDeployPlan] + if isinstance(_terraform, Unset): + terraform = UNSET + else: + terraform = PlantypesTerraformDeployPlan.from_dict(_terraform) + + plantypes_deploy_plan = cls( + src_registry=src_registry, + src_tag=src_tag, + app_config_id=app_config_id, + app_id=app_id, + apply_plan_contents=apply_plan_contents, + apply_plan_display=apply_plan_display, + component_id=component_id, + component_name=component_name, + helm=helm, + install_id=install_id, + kubernetes_manifest=kubernetes_manifest, + noop=noop, + sandbox_mode=sandbox_mode, + terraform=terraform, + ) + + plantypes_deploy_plan.additional_properties = d + return plantypes_deploy_plan + + @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 diff --git a/nuon/models/plantypes_docker_build_plan.py b/nuon/models/plantypes_docker_build_plan.py new file mode 100644 index 00000000..9a516f34 --- /dev/null +++ b/nuon/models/plantypes_docker_build_plan.py @@ -0,0 +1,99 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_docker_build_plan_build_args import PlantypesDockerBuildPlanBuildArgs + + +T = TypeVar("T", bound="PlantypesDockerBuildPlan") + + +@_attrs_define +class PlantypesDockerBuildPlan: + """ + Attributes: + build_args (Union[Unset, PlantypesDockerBuildPlanBuildArgs]): + context (Union[Unset, str]): + dockerfile (Union[Unset, str]): + target (Union[Unset, str]): + """ + + build_args: Union[Unset, "PlantypesDockerBuildPlanBuildArgs"] = UNSET + context: Union[Unset, str] = UNSET + dockerfile: Union[Unset, str] = UNSET + target: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + build_args: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.build_args, Unset): + build_args = self.build_args.to_dict() + + context = self.context + + dockerfile = self.dockerfile + + target = self.target + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if build_args is not UNSET: + field_dict["build_args"] = build_args + if context is not UNSET: + field_dict["context"] = context + if dockerfile is not UNSET: + field_dict["dockerfile"] = dockerfile + if target is not UNSET: + field_dict["target"] = target + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_docker_build_plan_build_args import PlantypesDockerBuildPlanBuildArgs + + d = dict(src_dict) + _build_args = d.pop("build_args", UNSET) + build_args: Union[Unset, PlantypesDockerBuildPlanBuildArgs] + if isinstance(_build_args, Unset): + build_args = UNSET + else: + build_args = PlantypesDockerBuildPlanBuildArgs.from_dict(_build_args) + + context = d.pop("context", UNSET) + + dockerfile = d.pop("dockerfile", UNSET) + + target = d.pop("target", UNSET) + + plantypes_docker_build_plan = cls( + build_args=build_args, + context=context, + dockerfile=dockerfile, + target=target, + ) + + plantypes_docker_build_plan.additional_properties = d + return plantypes_docker_build_plan + + @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 diff --git a/nuon/models/plantypes_docker_build_plan_build_args.py b/nuon/models/plantypes_docker_build_plan_build_args.py new file mode 100644 index 00000000..21b331e6 --- /dev/null +++ b/nuon/models/plantypes_docker_build_plan_build_args.py @@ -0,0 +1,44 @@ +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="PlantypesDockerBuildPlanBuildArgs") + + +@_attrs_define +class PlantypesDockerBuildPlanBuildArgs: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_docker_build_plan_build_args = cls() + + plantypes_docker_build_plan_build_args.additional_properties = d + return plantypes_docker_build_plan_build_args + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_git_source.py b/nuon/models/plantypes_git_source.py new file mode 100644 index 00000000..651268d2 --- /dev/null +++ b/nuon/models/plantypes_git_source.py @@ -0,0 +1,86 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesGitSource") + + +@_attrs_define +class PlantypesGitSource: + """ + Attributes: + path (str): + ref (str): + url (str): + recurse_submodules (Union[Unset, bool]): + """ + + path: str + ref: str + url: str + recurse_submodules: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + path = self.path + + ref = self.ref + + url = self.url + + recurse_submodules = self.recurse_submodules + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "path": path, + "ref": ref, + "url": url, + } + ) + if recurse_submodules is not UNSET: + field_dict["recurse_submodules"] = recurse_submodules + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + path = d.pop("path") + + ref = d.pop("ref") + + url = d.pop("url") + + recurse_submodules = d.pop("recurse_submodules", UNSET) + + plantypes_git_source = cls( + path=path, + ref=ref, + url=url, + recurse_submodules=recurse_submodules, + ) + + plantypes_git_source.additional_properties = d + return plantypes_git_source + + @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 diff --git a/nuon/models/plantypes_helm_build_plan.py b/nuon/models/plantypes_helm_build_plan.py new file mode 100644 index 00000000..1262f829 --- /dev/null +++ b/nuon/models/plantypes_helm_build_plan.py @@ -0,0 +1,72 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_helm_build_plan_labels import PlantypesHelmBuildPlanLabels + + +T = TypeVar("T", bound="PlantypesHelmBuildPlan") + + +@_attrs_define +class PlantypesHelmBuildPlan: + """ + Attributes: + labels (Union[Unset, PlantypesHelmBuildPlanLabels]): + """ + + labels: Union[Unset, "PlantypesHelmBuildPlanLabels"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + labels: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.labels, Unset): + labels = self.labels.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if labels is not UNSET: + field_dict["labels"] = labels + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_helm_build_plan_labels import PlantypesHelmBuildPlanLabels + + d = dict(src_dict) + _labels = d.pop("labels", UNSET) + labels: Union[Unset, PlantypesHelmBuildPlanLabels] + if isinstance(_labels, Unset): + labels = UNSET + else: + labels = PlantypesHelmBuildPlanLabels.from_dict(_labels) + + plantypes_helm_build_plan = cls( + labels=labels, + ) + + plantypes_helm_build_plan.additional_properties = d + return plantypes_helm_build_plan + + @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 diff --git a/nuon/models/plantypes_helm_build_plan_labels.py b/nuon/models/plantypes_helm_build_plan_labels.py new file mode 100644 index 00000000..2d636055 --- /dev/null +++ b/nuon/models/plantypes_helm_build_plan_labels.py @@ -0,0 +1,44 @@ +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="PlantypesHelmBuildPlanLabels") + + +@_attrs_define +class PlantypesHelmBuildPlanLabels: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_helm_build_plan_labels = cls() + + plantypes_helm_build_plan_labels.additional_properties = d + return plantypes_helm_build_plan_labels + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_helm_deploy_plan.py b/nuon/models/plantypes_helm_deploy_plan.py new file mode 100644 index 00000000..2bb129bb --- /dev/null +++ b/nuon/models/plantypes_helm_deploy_plan.py @@ -0,0 +1,160 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_helm_value import PlantypesHelmValue + + +T = TypeVar("T", bound="PlantypesHelmDeployPlan") + + +@_attrs_define +class PlantypesHelmDeployPlan: + """ + Attributes: + cluster_info (Union[Unset, KubeClusterInfo]): + create_namespace (Union[Unset, bool]): + helm_chart_id (Union[Unset, str]): + name (Union[Unset, str]): NOTE(jm): these fields should probably just come from the app config, however we keep + them around for + debuggability + namespace (Union[Unset, str]): + storage_driver (Union[Unset, str]): + take_ownership (Union[Unset, bool]): + values (Union[Unset, list['PlantypesHelmValue']]): + values_files (Union[Unset, list[str]]): + """ + + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + create_namespace: Union[Unset, bool] = UNSET + helm_chart_id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + storage_driver: Union[Unset, str] = UNSET + take_ownership: Union[Unset, bool] = UNSET + values: Union[Unset, list["PlantypesHelmValue"]] = UNSET + values_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + create_namespace = self.create_namespace + + helm_chart_id = self.helm_chart_id + + name = self.name + + namespace = self.namespace + + storage_driver = self.storage_driver + + take_ownership = self.take_ownership + + values: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.values, Unset): + values = [] + for values_item_data in self.values: + values_item = values_item_data.to_dict() + values.append(values_item) + + values_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.values_files, Unset): + values_files = self.values_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if create_namespace is not UNSET: + field_dict["create_namespace"] = create_namespace + if helm_chart_id is not UNSET: + field_dict["helm_chart_id"] = helm_chart_id + if name is not UNSET: + field_dict["name"] = name + if namespace is not UNSET: + field_dict["namespace"] = namespace + if storage_driver is not UNSET: + field_dict["storage_driver"] = storage_driver + if take_ownership is not UNSET: + field_dict["take_ownership"] = take_ownership + if values is not UNSET: + field_dict["values"] = values + if values_files is not UNSET: + field_dict["values_files"] = values_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_helm_value import PlantypesHelmValue + + d = dict(src_dict) + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + create_namespace = d.pop("create_namespace", UNSET) + + helm_chart_id = d.pop("helm_chart_id", UNSET) + + name = d.pop("name", UNSET) + + namespace = d.pop("namespace", UNSET) + + storage_driver = d.pop("storage_driver", UNSET) + + take_ownership = d.pop("take_ownership", UNSET) + + values = [] + _values = d.pop("values", UNSET) + for values_item_data in _values or []: + values_item = PlantypesHelmValue.from_dict(values_item_data) + + values.append(values_item) + + values_files = cast(list[str], d.pop("values_files", UNSET)) + + plantypes_helm_deploy_plan = cls( + cluster_info=cluster_info, + create_namespace=create_namespace, + helm_chart_id=helm_chart_id, + name=name, + namespace=namespace, + storage_driver=storage_driver, + take_ownership=take_ownership, + values=values, + values_files=values_files, + ) + + plantypes_helm_deploy_plan.additional_properties = d + return plantypes_helm_deploy_plan + + @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 diff --git a/nuon/models/plantypes_helm_sandbox_mode.py b/nuon/models/plantypes_helm_sandbox_mode.py new file mode 100644 index 00000000..37710fc7 --- /dev/null +++ b/nuon/models/plantypes_helm_sandbox_mode.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesHelmSandboxMode") + + +@_attrs_define +class PlantypesHelmSandboxMode: + """ + Attributes: + plan_contents (Union[Unset, str]): + plan_display_contents (Union[Unset, str]): + """ + + plan_contents: Union[Unset, str] = UNSET + plan_display_contents: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_contents = self.plan_contents + + plan_display_contents = self.plan_display_contents + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_contents is not UNSET: + field_dict["plan_contents"] = plan_contents + if plan_display_contents is not UNSET: + field_dict["plan_display_contents"] = plan_display_contents + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_contents = d.pop("plan_contents", UNSET) + + plan_display_contents = d.pop("plan_display_contents", UNSET) + + plantypes_helm_sandbox_mode = cls( + plan_contents=plan_contents, + plan_display_contents=plan_display_contents, + ) + + plantypes_helm_sandbox_mode.additional_properties = d + return plantypes_helm_sandbox_mode + + @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 diff --git a/nuon/models/plantypes_helm_value.py b/nuon/models/plantypes_helm_value.py new file mode 100644 index 00000000..4e9695e9 --- /dev/null +++ b/nuon/models/plantypes_helm_value.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesHelmValue") + + +@_attrs_define +class PlantypesHelmValue: + """ + Attributes: + name (Union[Unset, str]): + type_ (Union[Unset, str]): + value (Union[Unset, str]): + """ + + name: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET + value: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + type_ = self.type_ + + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if type_ is not UNSET: + field_dict["type"] = type_ + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + type_ = d.pop("type", UNSET) + + value = d.pop("value", UNSET) + + plantypes_helm_value = cls( + name=name, + type_=type_, + value=value, + ) + + plantypes_helm_value.additional_properties = d + return plantypes_helm_value + + @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 diff --git a/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py b/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py new file mode 100644 index 00000000..41aa8c0d --- /dev/null +++ b/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py @@ -0,0 +1,90 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.kube_cluster_info import KubeClusterInfo + + +T = TypeVar("T", bound="PlantypesKubernetesManifestDeployPlan") + + +@_attrs_define +class PlantypesKubernetesManifestDeployPlan: + """ + Attributes: + cluster_info (Union[Unset, KubeClusterInfo]): + manifest (Union[Unset, str]): + namespace (Union[Unset, str]): + """ + + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + manifest: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + manifest = self.manifest + + namespace = self.namespace + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if manifest is not UNSET: + field_dict["manifest"] = manifest + if namespace is not UNSET: + field_dict["namespace"] = namespace + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.kube_cluster_info import KubeClusterInfo + + d = dict(src_dict) + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + manifest = d.pop("manifest", UNSET) + + namespace = d.pop("namespace", UNSET) + + plantypes_kubernetes_manifest_deploy_plan = cls( + cluster_info=cluster_info, + manifest=manifest, + namespace=namespace, + ) + + plantypes_kubernetes_manifest_deploy_plan.additional_properties = d + return plantypes_kubernetes_manifest_deploy_plan + + @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 diff --git a/nuon/models/plantypes_kubernetes_sandbox_mode.py b/nuon/models/plantypes_kubernetes_sandbox_mode.py new file mode 100644 index 00000000..d0e4a69a --- /dev/null +++ b/nuon/models/plantypes_kubernetes_sandbox_mode.py @@ -0,0 +1,68 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesKubernetesSandboxMode") + + +@_attrs_define +class PlantypesKubernetesSandboxMode: + """ + Attributes: + plan_contents (Union[Unset, str]): + plan_display_contents (Union[Unset, str]): + """ + + plan_contents: Union[Unset, str] = UNSET + plan_display_contents: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_contents = self.plan_contents + + plan_display_contents = self.plan_display_contents + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_contents is not UNSET: + field_dict["plan_contents"] = plan_contents + if plan_display_contents is not UNSET: + field_dict["plan_display_contents"] = plan_display_contents + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_contents = d.pop("plan_contents", UNSET) + + plan_display_contents = d.pop("plan_display_contents", UNSET) + + plantypes_kubernetes_sandbox_mode = cls( + plan_contents=plan_contents, + plan_display_contents=plan_display_contents, + ) + + plantypes_kubernetes_sandbox_mode.additional_properties = d + return plantypes_kubernetes_sandbox_mode + + @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 diff --git a/nuon/models/plantypes_kubernetes_secret_sync.py b/nuon/models/plantypes_kubernetes_secret_sync.py new file mode 100644 index 00000000..2c3b9c93 --- /dev/null +++ b/nuon/models/plantypes_kubernetes_secret_sync.py @@ -0,0 +1,106 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesKubernetesSecretSync") + + +@_attrs_define +class PlantypesKubernetesSecretSync: + """ + Attributes: + format_ (Union[Unset, str]): NOTE(jm): this should probably come from the app config, but for now we just use + string parsing to avoid + updating the runner job and save time. + key_name (Union[Unset, str]): + name (Union[Unset, str]): + namespace (Union[Unset, str]): + secret_arn (Union[Unset, str]): + secret_name (Union[Unset, str]): the name of the secret from the config + """ + + format_: Union[Unset, str] = UNSET + key_name: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + namespace: Union[Unset, str] = UNSET + secret_arn: Union[Unset, str] = UNSET + secret_name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + format_ = self.format_ + + key_name = self.key_name + + name = self.name + + namespace = self.namespace + + secret_arn = self.secret_arn + + secret_name = self.secret_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if format_ is not UNSET: + field_dict["format"] = format_ + if key_name is not UNSET: + field_dict["key_name"] = key_name + if name is not UNSET: + field_dict["name"] = name + if namespace is not UNSET: + field_dict["namespace"] = namespace + if secret_arn is not UNSET: + field_dict["secret_arn"] = secret_arn + if secret_name is not UNSET: + field_dict["secret_name"] = secret_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + format_ = d.pop("format", UNSET) + + key_name = d.pop("key_name", UNSET) + + name = d.pop("name", UNSET) + + namespace = d.pop("namespace", UNSET) + + secret_arn = d.pop("secret_arn", UNSET) + + secret_name = d.pop("secret_name", UNSET) + + plantypes_kubernetes_secret_sync = cls( + format_=format_, + key_name=key_name, + name=name, + namespace=namespace, + secret_arn=secret_arn, + secret_name=secret_name, + ) + + plantypes_kubernetes_secret_sync.additional_properties = d + return plantypes_kubernetes_secret_sync + + @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 diff --git a/nuon/models/plantypes_noop_deploy_plan.py b/nuon/models/plantypes_noop_deploy_plan.py new file mode 100644 index 00000000..7a0f5963 --- /dev/null +++ b/nuon/models/plantypes_noop_deploy_plan.py @@ -0,0 +1,44 @@ +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="PlantypesNoopDeployPlan") + + +@_attrs_define +class PlantypesNoopDeployPlan: + """ """ + + 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) + plantypes_noop_deploy_plan = cls() + + plantypes_noop_deploy_plan.additional_properties = d + return plantypes_noop_deploy_plan + + @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 diff --git a/nuon/models/plantypes_sandbox_mode.py b/nuon/models/plantypes_sandbox_mode.py new file mode 100644 index 00000000..a6741e85 --- /dev/null +++ b/nuon/models/plantypes_sandbox_mode.py @@ -0,0 +1,135 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_helm_sandbox_mode import PlantypesHelmSandboxMode + from ..models.plantypes_kubernetes_sandbox_mode import PlantypesKubernetesSandboxMode + from ..models.plantypes_sandbox_mode_outputs import PlantypesSandboxModeOutputs + from ..models.plantypes_terraform_sandbox_mode import PlantypesTerraformSandboxMode + + +T = TypeVar("T", bound="PlantypesSandboxMode") + + +@_attrs_define +class PlantypesSandboxMode: + """ + Attributes: + enabled (Union[Unset, bool]): + helm (Union[Unset, PlantypesHelmSandboxMode]): + kubernetes_manifest (Union[Unset, PlantypesKubernetesSandboxMode]): + outputs (Union[Unset, PlantypesSandboxModeOutputs]): + terraform (Union[Unset, PlantypesTerraformSandboxMode]): + """ + + enabled: Union[Unset, bool] = UNSET + helm: Union[Unset, "PlantypesHelmSandboxMode"] = UNSET + kubernetes_manifest: Union[Unset, "PlantypesKubernetesSandboxMode"] = UNSET + outputs: Union[Unset, "PlantypesSandboxModeOutputs"] = UNSET + terraform: Union[Unset, "PlantypesTerraformSandboxMode"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + enabled = self.enabled + + helm: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.helm, Unset): + helm = self.helm.to_dict() + + kubernetes_manifest: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.kubernetes_manifest, Unset): + kubernetes_manifest = self.kubernetes_manifest.to_dict() + + outputs: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.outputs, Unset): + outputs = self.outputs.to_dict() + + terraform: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform, Unset): + terraform = self.terraform.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if enabled is not UNSET: + field_dict["enabled"] = enabled + if helm is not UNSET: + field_dict["helm"] = helm + if kubernetes_manifest is not UNSET: + field_dict["kubernetes_manifest"] = kubernetes_manifest + if outputs is not UNSET: + field_dict["outputs"] = outputs + if terraform is not UNSET: + field_dict["terraform"] = terraform + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_helm_sandbox_mode import PlantypesHelmSandboxMode + from ..models.plantypes_kubernetes_sandbox_mode import PlantypesKubernetesSandboxMode + from ..models.plantypes_sandbox_mode_outputs import PlantypesSandboxModeOutputs + from ..models.plantypes_terraform_sandbox_mode import PlantypesTerraformSandboxMode + + d = dict(src_dict) + enabled = d.pop("enabled", UNSET) + + _helm = d.pop("helm", UNSET) + helm: Union[Unset, PlantypesHelmSandboxMode] + if isinstance(_helm, Unset): + helm = UNSET + else: + helm = PlantypesHelmSandboxMode.from_dict(_helm) + + _kubernetes_manifest = d.pop("kubernetes_manifest", UNSET) + kubernetes_manifest: Union[Unset, PlantypesKubernetesSandboxMode] + if isinstance(_kubernetes_manifest, Unset): + kubernetes_manifest = UNSET + else: + kubernetes_manifest = PlantypesKubernetesSandboxMode.from_dict(_kubernetes_manifest) + + _outputs = d.pop("outputs", UNSET) + outputs: Union[Unset, PlantypesSandboxModeOutputs] + if isinstance(_outputs, Unset): + outputs = UNSET + else: + outputs = PlantypesSandboxModeOutputs.from_dict(_outputs) + + _terraform = d.pop("terraform", UNSET) + terraform: Union[Unset, PlantypesTerraformSandboxMode] + if isinstance(_terraform, Unset): + terraform = UNSET + else: + terraform = PlantypesTerraformSandboxMode.from_dict(_terraform) + + plantypes_sandbox_mode = cls( + enabled=enabled, + helm=helm, + kubernetes_manifest=kubernetes_manifest, + outputs=outputs, + terraform=terraform, + ) + + plantypes_sandbox_mode.additional_properties = d + return plantypes_sandbox_mode + + @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 diff --git a/nuon/models/plantypes_sandbox_mode_outputs.py b/nuon/models/plantypes_sandbox_mode_outputs.py new file mode 100644 index 00000000..d863ffb6 --- /dev/null +++ b/nuon/models/plantypes_sandbox_mode_outputs.py @@ -0,0 +1,44 @@ +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="PlantypesSandboxModeOutputs") + + +@_attrs_define +class PlantypesSandboxModeOutputs: + """ """ + + 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) + plantypes_sandbox_mode_outputs = cls() + + plantypes_sandbox_mode_outputs.additional_properties = d + return plantypes_sandbox_mode_outputs + + @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 diff --git a/nuon/models/plantypes_sandbox_run_plan.py b/nuon/models/plantypes_sandbox_run_plan.py new file mode 100644 index 00000000..a813de7b --- /dev/null +++ b/nuon/models/plantypes_sandbox_run_plan.py @@ -0,0 +1,323 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state import ( + GithubComPowertoolsdevMonoPkgTypesStateState, + ) + from ..models.plantypes_git_source import PlantypesGitSource + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_sandbox_run_plan_env_vars import PlantypesSandboxRunPlanEnvVars + from ..models.plantypes_sandbox_run_plan_policies import PlantypesSandboxRunPlanPolicies + from ..models.plantypes_sandbox_run_plan_vars import PlantypesSandboxRunPlanVars + from ..models.plantypes_terraform_backend import PlantypesTerraformBackend + from ..models.plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks + from ..models.plantypes_terraform_local_archive import PlantypesTerraformLocalArchive + + +T = TypeVar("T", bound="PlantypesSandboxRunPlan") + + +@_attrs_define +class PlantypesSandboxRunPlan: + """ + Attributes: + app_config_id (Union[Unset, str]): + app_id (Union[Unset, str]): + apply_plan_contents (Union[Unset, str]): The following field is for applying a plan that is already saved + apply_plan_display (Union[Unset, list[int]]): This field is for storing a human legible plan or corollary + representation + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + azure_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + env_vars (Union[Unset, PlantypesSandboxRunPlanEnvVars]): + git_source (Union[Unset, PlantypesGitSource]): + hooks (Union[Unset, PlantypesTerraformDeployHooks]): + install_id (Union[Unset, str]): + local_archive (Union[Unset, PlantypesTerraformLocalArchive]): + policies (Union[Unset, PlantypesSandboxRunPlanPolicies]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + state (Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateState]): + terraform_backend (Union[Unset, PlantypesTerraformBackend]): + vars_ (Union[Unset, PlantypesSandboxRunPlanVars]): + vars_files (Union[Unset, list[str]]): + """ + + app_config_id: Union[Unset, str] = UNSET + app_id: Union[Unset, str] = UNSET + apply_plan_contents: Union[Unset, str] = UNSET + apply_plan_display: Union[Unset, list[int]] = UNSET + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + azure_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + env_vars: Union[Unset, "PlantypesSandboxRunPlanEnvVars"] = UNSET + git_source: Union[Unset, "PlantypesGitSource"] = UNSET + hooks: Union[Unset, "PlantypesTerraformDeployHooks"] = UNSET + install_id: Union[Unset, str] = UNSET + local_archive: Union[Unset, "PlantypesTerraformLocalArchive"] = UNSET + policies: Union[Unset, "PlantypesSandboxRunPlanPolicies"] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + state: Union[Unset, "GithubComPowertoolsdevMonoPkgTypesStateState"] = UNSET + terraform_backend: Union[Unset, "PlantypesTerraformBackend"] = UNSET + vars_: Union[Unset, "PlantypesSandboxRunPlanVars"] = UNSET + vars_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_config_id = self.app_config_id + + app_id = self.app_id + + apply_plan_contents = self.apply_plan_contents + + apply_plan_display: Union[Unset, list[int]] = UNSET + if not isinstance(self.apply_plan_display, Unset): + apply_plan_display = self.apply_plan_display + + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + azure_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_auth, Unset): + azure_auth = self.azure_auth.to_dict() + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + git_source: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.git_source, Unset): + git_source = self.git_source.to_dict() + + hooks: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.hooks, Unset): + hooks = self.hooks.to_dict() + + install_id = self.install_id + + local_archive: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.local_archive, Unset): + local_archive = self.local_archive.to_dict() + + policies: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.policies, Unset): + policies = self.policies.to_dict() + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + state: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + terraform_backend: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_backend, Unset): + terraform_backend = self.terraform_backend.to_dict() + + vars_: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.vars_, Unset): + vars_ = self.vars_.to_dict() + + vars_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.vars_files, Unset): + vars_files = self.vars_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if app_config_id is not UNSET: + field_dict["app_config_id"] = app_config_id + if app_id is not UNSET: + field_dict["app_id"] = app_id + if apply_plan_contents is not UNSET: + field_dict["apply_plan_contents"] = apply_plan_contents + if apply_plan_display is not UNSET: + field_dict["apply_plan_display"] = apply_plan_display + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if azure_auth is not UNSET: + field_dict["azure_auth"] = azure_auth + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if git_source is not UNSET: + field_dict["git_source"] = git_source + if hooks is not UNSET: + field_dict["hooks"] = hooks + if install_id is not UNSET: + field_dict["install_id"] = install_id + if local_archive is not UNSET: + field_dict["local_archive"] = local_archive + if policies is not UNSET: + field_dict["policies"] = policies + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + if state is not UNSET: + field_dict["state"] = state + if terraform_backend is not UNSET: + field_dict["terraform_backend"] = terraform_backend + if vars_ is not UNSET: + field_dict["vars"] = vars_ + if vars_files is not UNSET: + field_dict["vars_files"] = vars_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state import ( + GithubComPowertoolsdevMonoPkgTypesStateState, + ) + from ..models.plantypes_git_source import PlantypesGitSource + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + from ..models.plantypes_sandbox_run_plan_env_vars import PlantypesSandboxRunPlanEnvVars + from ..models.plantypes_sandbox_run_plan_policies import PlantypesSandboxRunPlanPolicies + from ..models.plantypes_sandbox_run_plan_vars import PlantypesSandboxRunPlanVars + from ..models.plantypes_terraform_backend import PlantypesTerraformBackend + from ..models.plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks + from ..models.plantypes_terraform_local_archive import PlantypesTerraformLocalArchive + + d = dict(src_dict) + app_config_id = d.pop("app_config_id", UNSET) + + app_id = d.pop("app_id", UNSET) + + apply_plan_contents = d.pop("apply_plan_contents", UNSET) + + apply_plan_display = cast(list[int], d.pop("apply_plan_display", UNSET)) + + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _azure_auth = d.pop("azure_auth", UNSET) + azure_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_azure_auth, Unset): + azure_auth = UNSET + else: + azure_auth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_azure_auth) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, PlantypesSandboxRunPlanEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = PlantypesSandboxRunPlanEnvVars.from_dict(_env_vars) + + _git_source = d.pop("git_source", UNSET) + git_source: Union[Unset, PlantypesGitSource] + if isinstance(_git_source, Unset): + git_source = UNSET + else: + git_source = PlantypesGitSource.from_dict(_git_source) + + _hooks = d.pop("hooks", UNSET) + hooks: Union[Unset, PlantypesTerraformDeployHooks] + if isinstance(_hooks, Unset): + hooks = UNSET + else: + hooks = PlantypesTerraformDeployHooks.from_dict(_hooks) + + install_id = d.pop("install_id", UNSET) + + _local_archive = d.pop("local_archive", UNSET) + local_archive: Union[Unset, PlantypesTerraformLocalArchive] + if isinstance(_local_archive, Unset): + local_archive = UNSET + else: + local_archive = PlantypesTerraformLocalArchive.from_dict(_local_archive) + + _policies = d.pop("policies", UNSET) + policies: Union[Unset, PlantypesSandboxRunPlanPolicies] + if isinstance(_policies, Unset): + policies = UNSET + else: + policies = PlantypesSandboxRunPlanPolicies.from_dict(_policies) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + _state = d.pop("state", UNSET) + state: Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateState] + if isinstance(_state, Unset): + state = UNSET + else: + state = GithubComPowertoolsdevMonoPkgTypesStateState.from_dict(_state) + + _terraform_backend = d.pop("terraform_backend", UNSET) + terraform_backend: Union[Unset, PlantypesTerraformBackend] + if isinstance(_terraform_backend, Unset): + terraform_backend = UNSET + else: + terraform_backend = PlantypesTerraformBackend.from_dict(_terraform_backend) + + _vars_ = d.pop("vars", UNSET) + vars_: Union[Unset, PlantypesSandboxRunPlanVars] + if isinstance(_vars_, Unset): + vars_ = UNSET + else: + vars_ = PlantypesSandboxRunPlanVars.from_dict(_vars_) + + vars_files = cast(list[str], d.pop("vars_files", UNSET)) + + plantypes_sandbox_run_plan = cls( + app_config_id=app_config_id, + app_id=app_id, + apply_plan_contents=apply_plan_contents, + apply_plan_display=apply_plan_display, + aws_auth=aws_auth, + azure_auth=azure_auth, + env_vars=env_vars, + git_source=git_source, + hooks=hooks, + install_id=install_id, + local_archive=local_archive, + policies=policies, + sandbox_mode=sandbox_mode, + state=state, + terraform_backend=terraform_backend, + vars_=vars_, + vars_files=vars_files, + ) + + plantypes_sandbox_run_plan.additional_properties = d + return plantypes_sandbox_run_plan + + @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 diff --git a/nuon/models/plantypes_sandbox_run_plan_env_vars.py b/nuon/models/plantypes_sandbox_run_plan_env_vars.py new file mode 100644 index 00000000..bc4a8205 --- /dev/null +++ b/nuon/models/plantypes_sandbox_run_plan_env_vars.py @@ -0,0 +1,44 @@ +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="PlantypesSandboxRunPlanEnvVars") + + +@_attrs_define +class PlantypesSandboxRunPlanEnvVars: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_sandbox_run_plan_env_vars = cls() + + plantypes_sandbox_run_plan_env_vars.additional_properties = d + return plantypes_sandbox_run_plan_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_sandbox_run_plan_policies.py b/nuon/models/plantypes_sandbox_run_plan_policies.py new file mode 100644 index 00000000..cf1a9d89 --- /dev/null +++ b/nuon/models/plantypes_sandbox_run_plan_policies.py @@ -0,0 +1,44 @@ +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="PlantypesSandboxRunPlanPolicies") + + +@_attrs_define +class PlantypesSandboxRunPlanPolicies: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_sandbox_run_plan_policies = cls() + + plantypes_sandbox_run_plan_policies.additional_properties = d + return plantypes_sandbox_run_plan_policies + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_sandbox_run_plan_vars.py b/nuon/models/plantypes_sandbox_run_plan_vars.py new file mode 100644 index 00000000..115e9ecb --- /dev/null +++ b/nuon/models/plantypes_sandbox_run_plan_vars.py @@ -0,0 +1,44 @@ +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="PlantypesSandboxRunPlanVars") + + +@_attrs_define +class PlantypesSandboxRunPlanVars: + """ """ + + 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) + plantypes_sandbox_run_plan_vars = cls() + + plantypes_sandbox_run_plan_vars.additional_properties = d + return plantypes_sandbox_run_plan_vars + + @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 diff --git a/nuon/models/plantypes_sync_oci_plan.py b/nuon/models/plantypes_sync_oci_plan.py new file mode 100644 index 00000000..fbe1bba4 --- /dev/null +++ b/nuon/models/plantypes_sync_oci_plan.py @@ -0,0 +1,109 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + +T = TypeVar("T", bound="PlantypesSyncOCIPlan") + + +@_attrs_define +class PlantypesSyncOCIPlan: + """ + Attributes: + dst_registry (ConfigsOCIRegistryRepository): + dst_tag (str): + src_registry (ConfigsOCIRegistryRepository): + src_tag (str): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + """ + + dst_registry: "ConfigsOCIRegistryRepository" + dst_tag: str + src_registry: "ConfigsOCIRegistryRepository" + src_tag: str + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dst_registry = self.dst_registry.to_dict() + + dst_tag = self.dst_tag + + src_registry = self.src_registry.to_dict() + + src_tag = self.src_tag + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dst_registry": dst_registry, + "dst_tag": dst_tag, + "src_registry": src_registry, + "src_tag": src_tag, + } + ) + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.configs_oci_registry_repository import ConfigsOCIRegistryRepository + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + d = dict(src_dict) + dst_registry = ConfigsOCIRegistryRepository.from_dict(d.pop("dst_registry")) + + dst_tag = d.pop("dst_tag") + + src_registry = ConfigsOCIRegistryRepository.from_dict(d.pop("src_registry")) + + src_tag = d.pop("src_tag") + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + plantypes_sync_oci_plan = cls( + dst_registry=dst_registry, + dst_tag=dst_tag, + src_registry=src_registry, + src_tag=src_tag, + sandbox_mode=sandbox_mode, + ) + + plantypes_sync_oci_plan.additional_properties = d + return plantypes_sync_oci_plan + + @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 diff --git a/nuon/models/plantypes_sync_secrets_plan.py b/nuon/models/plantypes_sync_secrets_plan.py new file mode 100644 index 00000000..80df93fa --- /dev/null +++ b/nuon/models/plantypes_sync_secrets_plan.py @@ -0,0 +1,155 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_kubernetes_secret_sync import PlantypesKubernetesSecretSync + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + +T = TypeVar("T", bound="PlantypesSyncSecretsPlan") + + +@_attrs_define +class PlantypesSyncSecretsPlan: + """ + Attributes: + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + azure_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + cluster_info (Union[Unset, KubeClusterInfo]): + kubernetes_secrets (Union[Unset, list['PlantypesKubernetesSecretSync']]): + sandbox_mode (Union[Unset, PlantypesSandboxMode]): + """ + + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + azure_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + kubernetes_secrets: Union[Unset, list["PlantypesKubernetesSecretSync"]] = UNSET + sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + azure_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_auth, Unset): + azure_auth = self.azure_auth.to_dict() + + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + kubernetes_secrets: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.kubernetes_secrets, Unset): + kubernetes_secrets = [] + for kubernetes_secrets_item_data in self.kubernetes_secrets: + kubernetes_secrets_item = kubernetes_secrets_item_data.to_dict() + kubernetes_secrets.append(kubernetes_secrets_item) + + sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.sandbox_mode, Unset): + sandbox_mode = self.sandbox_mode.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if azure_auth is not UNSET: + field_dict["azure_auth"] = azure_auth + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if kubernetes_secrets is not UNSET: + field_dict["kubernetes_secrets"] = kubernetes_secrets + if sandbox_mode is not UNSET: + field_dict["sandbox_mode"] = sandbox_mode + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_kubernetes_secret_sync import PlantypesKubernetesSecretSync + from ..models.plantypes_sandbox_mode import PlantypesSandboxMode + + d = dict(src_dict) + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _azure_auth = d.pop("azure_auth", UNSET) + azure_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_azure_auth, Unset): + azure_auth = UNSET + else: + azure_auth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_azure_auth) + + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + kubernetes_secrets = [] + _kubernetes_secrets = d.pop("kubernetes_secrets", UNSET) + for kubernetes_secrets_item_data in _kubernetes_secrets or []: + kubernetes_secrets_item = PlantypesKubernetesSecretSync.from_dict(kubernetes_secrets_item_data) + + kubernetes_secrets.append(kubernetes_secrets_item) + + _sandbox_mode = d.pop("sandbox_mode", UNSET) + sandbox_mode: Union[Unset, PlantypesSandboxMode] + if isinstance(_sandbox_mode, Unset): + sandbox_mode = UNSET + else: + sandbox_mode = PlantypesSandboxMode.from_dict(_sandbox_mode) + + plantypes_sync_secrets_plan = cls( + aws_auth=aws_auth, + azure_auth=azure_auth, + cluster_info=cluster_info, + kubernetes_secrets=kubernetes_secrets, + sandbox_mode=sandbox_mode, + ) + + plantypes_sync_secrets_plan.additional_properties = d + return plantypes_sync_secrets_plan + + @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 diff --git a/nuon/models/plantypes_terraform_backend.py b/nuon/models/plantypes_terraform_backend.py new file mode 100644 index 00000000..4a5f62c0 --- /dev/null +++ b/nuon/models/plantypes_terraform_backend.py @@ -0,0 +1,59 @@ +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="PlantypesTerraformBackend") + + +@_attrs_define +class PlantypesTerraformBackend: + """ + Attributes: + workspace_id (str): + """ + + workspace_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + workspace_id = self.workspace_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workspaceID": workspace_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workspace_id = d.pop("workspaceID") + + plantypes_terraform_backend = cls( + workspace_id=workspace_id, + ) + + plantypes_terraform_backend.additional_properties = d + return plantypes_terraform_backend + + @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 diff --git a/nuon/models/plantypes_terraform_build_plan.py b/nuon/models/plantypes_terraform_build_plan.py new file mode 100644 index 00000000..c46064f6 --- /dev/null +++ b/nuon/models/plantypes_terraform_build_plan.py @@ -0,0 +1,72 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.plantypes_terraform_build_plan_labels import PlantypesTerraformBuildPlanLabels + + +T = TypeVar("T", bound="PlantypesTerraformBuildPlan") + + +@_attrs_define +class PlantypesTerraformBuildPlan: + """ + Attributes: + labels (Union[Unset, PlantypesTerraformBuildPlanLabels]): + """ + + labels: Union[Unset, "PlantypesTerraformBuildPlanLabels"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + labels: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.labels, Unset): + labels = self.labels.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if labels is not UNSET: + field_dict["labels"] = labels + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.plantypes_terraform_build_plan_labels import PlantypesTerraformBuildPlanLabels + + d = dict(src_dict) + _labels = d.pop("labels", UNSET) + labels: Union[Unset, PlantypesTerraformBuildPlanLabels] + if isinstance(_labels, Unset): + labels = UNSET + else: + labels = PlantypesTerraformBuildPlanLabels.from_dict(_labels) + + plantypes_terraform_build_plan = cls( + labels=labels, + ) + + plantypes_terraform_build_plan.additional_properties = d + return plantypes_terraform_build_plan + + @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 diff --git a/nuon/models/plantypes_terraform_build_plan_labels.py b/nuon/models/plantypes_terraform_build_plan_labels.py new file mode 100644 index 00000000..b8480c60 --- /dev/null +++ b/nuon/models/plantypes_terraform_build_plan_labels.py @@ -0,0 +1,44 @@ +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="PlantypesTerraformBuildPlanLabels") + + +@_attrs_define +class PlantypesTerraformBuildPlanLabels: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_terraform_build_plan_labels = cls() + + plantypes_terraform_build_plan_labels.additional_properties = d + return plantypes_terraform_build_plan_labels + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_terraform_deploy_hooks.py b/nuon/models/plantypes_terraform_deploy_hooks.py new file mode 100644 index 00000000..1dab00ff --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_hooks.py @@ -0,0 +1,103 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.plantypes_terraform_deploy_hooks_env_vars import PlantypesTerraformDeployHooksEnvVars + + +T = TypeVar("T", bound="PlantypesTerraformDeployHooks") + + +@_attrs_define +class PlantypesTerraformDeployHooks: + """ + Attributes: + enabled (Union[Unset, bool]): + env_vars (Union[Unset, PlantypesTerraformDeployHooksEnvVars]): + run_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + """ + + enabled: Union[Unset, bool] = UNSET + env_vars: Union[Unset, "PlantypesTerraformDeployHooksEnvVars"] = UNSET + run_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + enabled = self.enabled + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + run_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.run_auth, Unset): + run_auth = self.run_auth.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if enabled is not UNSET: + field_dict["enabled"] = enabled + if env_vars is not UNSET: + field_dict["envVars"] = env_vars + if run_auth is not UNSET: + field_dict["runAuth"] = run_auth + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.plantypes_terraform_deploy_hooks_env_vars import PlantypesTerraformDeployHooksEnvVars + + d = dict(src_dict) + enabled = d.pop("enabled", UNSET) + + _env_vars = d.pop("envVars", UNSET) + env_vars: Union[Unset, PlantypesTerraformDeployHooksEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = PlantypesTerraformDeployHooksEnvVars.from_dict(_env_vars) + + _run_auth = d.pop("runAuth", UNSET) + run_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_run_auth, Unset): + run_auth = UNSET + else: + run_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_run_auth) + + plantypes_terraform_deploy_hooks = cls( + enabled=enabled, + env_vars=env_vars, + run_auth=run_auth, + ) + + plantypes_terraform_deploy_hooks.additional_properties = d + return plantypes_terraform_deploy_hooks + + @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 diff --git a/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py b/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py new file mode 100644 index 00000000..6924e361 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py @@ -0,0 +1,44 @@ +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="PlantypesTerraformDeployHooksEnvVars") + + +@_attrs_define +class PlantypesTerraformDeployHooksEnvVars: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_terraform_deploy_hooks_env_vars = cls() + + plantypes_terraform_deploy_hooks_env_vars.additional_properties = d + return plantypes_terraform_deploy_hooks_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_terraform_deploy_plan.py b/nuon/models/plantypes_terraform_deploy_plan.py new file mode 100644 index 00000000..f8610814 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_plan.py @@ -0,0 +1,250 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state import ( + GithubComPowertoolsdevMonoPkgTypesStateState, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_terraform_backend import PlantypesTerraformBackend + from ..models.plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks + from ..models.plantypes_terraform_deploy_plan_env_vars import PlantypesTerraformDeployPlanEnvVars + from ..models.plantypes_terraform_deploy_plan_policies import PlantypesTerraformDeployPlanPolicies + from ..models.plantypes_terraform_deploy_plan_vars import PlantypesTerraformDeployPlanVars + + +T = TypeVar("T", bound="PlantypesTerraformDeployPlan") + + +@_attrs_define +class PlantypesTerraformDeployPlan: + """ + Attributes: + aws_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + azure_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig]): + cluster_info (Union[Unset, KubeClusterInfo]): + env_vars (Union[Unset, PlantypesTerraformDeployPlanEnvVars]): + hooks (Union[Unset, PlantypesTerraformDeployHooks]): + plan_json (Union[Unset, list[int]]): + policies (Union[Unset, PlantypesTerraformDeployPlanPolicies]): + state (Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateState]): + terraform_backend (Union[Unset, PlantypesTerraformBackend]): + vars_ (Union[Unset, PlantypesTerraformDeployPlanVars]): + vars_files (Union[Unset, list[str]]): + """ + + aws_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + azure_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAzureCredentialsConfig"] = UNSET + cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET + env_vars: Union[Unset, "PlantypesTerraformDeployPlanEnvVars"] = UNSET + hooks: Union[Unset, "PlantypesTerraformDeployHooks"] = UNSET + plan_json: Union[Unset, list[int]] = UNSET + policies: Union[Unset, "PlantypesTerraformDeployPlanPolicies"] = UNSET + state: Union[Unset, "GithubComPowertoolsdevMonoPkgTypesStateState"] = UNSET + terraform_backend: Union[Unset, "PlantypesTerraformBackend"] = UNSET + vars_: Union[Unset, "PlantypesTerraformDeployPlanVars"] = UNSET + vars_files: Union[Unset, list[str]] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aws_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.aws_auth, Unset): + aws_auth = self.aws_auth.to_dict() + + azure_auth: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.azure_auth, Unset): + azure_auth = self.azure_auth.to_dict() + + cluster_info: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.cluster_info, Unset): + cluster_info = self.cluster_info.to_dict() + + env_vars: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.env_vars, Unset): + env_vars = self.env_vars.to_dict() + + hooks: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.hooks, Unset): + hooks = self.hooks.to_dict() + + plan_json: Union[Unset, list[int]] = UNSET + if not isinstance(self.plan_json, Unset): + plan_json = self.plan_json + + policies: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.policies, Unset): + policies = self.policies.to_dict() + + state: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.state, Unset): + state = self.state.to_dict() + + terraform_backend: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.terraform_backend, Unset): + terraform_backend = self.terraform_backend.to_dict() + + vars_: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.vars_, Unset): + vars_ = self.vars_.to_dict() + + vars_files: Union[Unset, list[str]] = UNSET + if not isinstance(self.vars_files, Unset): + vars_files = self.vars_files + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if aws_auth is not UNSET: + field_dict["aws_auth"] = aws_auth + if azure_auth is not UNSET: + field_dict["azure_auth"] = azure_auth + if cluster_info is not UNSET: + field_dict["cluster_info"] = cluster_info + if env_vars is not UNSET: + field_dict["env_vars"] = env_vars + if hooks is not UNSET: + field_dict["hooks"] = hooks + if plan_json is not UNSET: + field_dict["plan_json"] = plan_json + if policies is not UNSET: + field_dict["policies"] = policies + if state is not UNSET: + field_dict["state"] = state + if terraform_backend is not UNSET: + field_dict["terraform_backend"] = terraform_backend + if vars_ is not UNSET: + field_dict["vars"] = vars_ + if vars_files is not UNSET: + field_dict["vars_files"] = vars_files + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.github_com_powertoolsdev_mono_pkg_aws_credentials_config import ( + GithubComPowertoolsdevMonoPkgAwsCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_azure_credentials_config import ( + GithubComPowertoolsdevMonoPkgAzureCredentialsConfig, + ) + from ..models.github_com_powertoolsdev_mono_pkg_types_state_state import ( + GithubComPowertoolsdevMonoPkgTypesStateState, + ) + from ..models.kube_cluster_info import KubeClusterInfo + from ..models.plantypes_terraform_backend import PlantypesTerraformBackend + from ..models.plantypes_terraform_deploy_hooks import PlantypesTerraformDeployHooks + from ..models.plantypes_terraform_deploy_plan_env_vars import PlantypesTerraformDeployPlanEnvVars + from ..models.plantypes_terraform_deploy_plan_policies import PlantypesTerraformDeployPlanPolicies + from ..models.plantypes_terraform_deploy_plan_vars import PlantypesTerraformDeployPlanVars + + d = dict(src_dict) + _aws_auth = d.pop("aws_auth", UNSET) + aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + if isinstance(_aws_auth, Unset): + aws_auth = UNSET + else: + aws_auth = GithubComPowertoolsdevMonoPkgAwsCredentialsConfig.from_dict(_aws_auth) + + _azure_auth = d.pop("azure_auth", UNSET) + azure_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + if isinstance(_azure_auth, Unset): + azure_auth = UNSET + else: + azure_auth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_azure_auth) + + _cluster_info = d.pop("cluster_info", UNSET) + cluster_info: Union[Unset, KubeClusterInfo] + if isinstance(_cluster_info, Unset): + cluster_info = UNSET + else: + cluster_info = KubeClusterInfo.from_dict(_cluster_info) + + _env_vars = d.pop("env_vars", UNSET) + env_vars: Union[Unset, PlantypesTerraformDeployPlanEnvVars] + if isinstance(_env_vars, Unset): + env_vars = UNSET + else: + env_vars = PlantypesTerraformDeployPlanEnvVars.from_dict(_env_vars) + + _hooks = d.pop("hooks", UNSET) + hooks: Union[Unset, PlantypesTerraformDeployHooks] + if isinstance(_hooks, Unset): + hooks = UNSET + else: + hooks = PlantypesTerraformDeployHooks.from_dict(_hooks) + + plan_json = cast(list[int], d.pop("plan_json", UNSET)) + + _policies = d.pop("policies", UNSET) + policies: Union[Unset, PlantypesTerraformDeployPlanPolicies] + if isinstance(_policies, Unset): + policies = UNSET + else: + policies = PlantypesTerraformDeployPlanPolicies.from_dict(_policies) + + _state = d.pop("state", UNSET) + state: Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateState] + if isinstance(_state, Unset): + state = UNSET + else: + state = GithubComPowertoolsdevMonoPkgTypesStateState.from_dict(_state) + + _terraform_backend = d.pop("terraform_backend", UNSET) + terraform_backend: Union[Unset, PlantypesTerraformBackend] + if isinstance(_terraform_backend, Unset): + terraform_backend = UNSET + else: + terraform_backend = PlantypesTerraformBackend.from_dict(_terraform_backend) + + _vars_ = d.pop("vars", UNSET) + vars_: Union[Unset, PlantypesTerraformDeployPlanVars] + if isinstance(_vars_, Unset): + vars_ = UNSET + else: + vars_ = PlantypesTerraformDeployPlanVars.from_dict(_vars_) + + vars_files = cast(list[str], d.pop("vars_files", UNSET)) + + plantypes_terraform_deploy_plan = cls( + aws_auth=aws_auth, + azure_auth=azure_auth, + cluster_info=cluster_info, + env_vars=env_vars, + hooks=hooks, + plan_json=plan_json, + policies=policies, + state=state, + terraform_backend=terraform_backend, + vars_=vars_, + vars_files=vars_files, + ) + + plantypes_terraform_deploy_plan.additional_properties = d + return plantypes_terraform_deploy_plan + + @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 diff --git a/nuon/models/plantypes_terraform_deploy_plan_env_vars.py b/nuon/models/plantypes_terraform_deploy_plan_env_vars.py new file mode 100644 index 00000000..20bc3fb1 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_plan_env_vars.py @@ -0,0 +1,44 @@ +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="PlantypesTerraformDeployPlanEnvVars") + + +@_attrs_define +class PlantypesTerraformDeployPlanEnvVars: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_terraform_deploy_plan_env_vars = cls() + + plantypes_terraform_deploy_plan_env_vars.additional_properties = d + return plantypes_terraform_deploy_plan_env_vars + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_terraform_deploy_plan_policies.py b/nuon/models/plantypes_terraform_deploy_plan_policies.py new file mode 100644 index 00000000..661166b9 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_plan_policies.py @@ -0,0 +1,44 @@ +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="PlantypesTerraformDeployPlanPolicies") + + +@_attrs_define +class PlantypesTerraformDeployPlanPolicies: + """ """ + + additional_properties: dict[str, str] = _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) + plantypes_terraform_deploy_plan_policies = cls() + + plantypes_terraform_deploy_plan_policies.additional_properties = d + return plantypes_terraform_deploy_plan_policies + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/plantypes_terraform_deploy_plan_vars.py b/nuon/models/plantypes_terraform_deploy_plan_vars.py new file mode 100644 index 00000000..72cc0f46 --- /dev/null +++ b/nuon/models/plantypes_terraform_deploy_plan_vars.py @@ -0,0 +1,44 @@ +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="PlantypesTerraformDeployPlanVars") + + +@_attrs_define +class PlantypesTerraformDeployPlanVars: + """ """ + + 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) + plantypes_terraform_deploy_plan_vars = cls() + + plantypes_terraform_deploy_plan_vars.additional_properties = d + return plantypes_terraform_deploy_plan_vars + + @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 diff --git a/nuon/models/plantypes_terraform_local_archive.py b/nuon/models/plantypes_terraform_local_archive.py new file mode 100644 index 00000000..744b8f10 --- /dev/null +++ b/nuon/models/plantypes_terraform_local_archive.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesTerraformLocalArchive") + + +@_attrs_define +class PlantypesTerraformLocalArchive: + """ + Attributes: + local_archive (Union[Unset, str]): + """ + + local_archive: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + local_archive = self.local_archive + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if local_archive is not UNSET: + field_dict["local_archive"] = local_archive + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + local_archive = d.pop("local_archive", UNSET) + + plantypes_terraform_local_archive = cls( + local_archive=local_archive, + ) + + plantypes_terraform_local_archive.additional_properties = d + return plantypes_terraform_local_archive + + @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 diff --git a/nuon/models/plantypes_terraform_sandbox_mode.py b/nuon/models/plantypes_terraform_sandbox_mode.py new file mode 100644 index 00000000..cfc178a8 --- /dev/null +++ b/nuon/models/plantypes_terraform_sandbox_mode.py @@ -0,0 +1,88 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PlantypesTerraformSandboxMode") + + +@_attrs_define +class PlantypesTerraformSandboxMode: + """ + Attributes: + plan_contents (Union[Unset, str]): create the plan output + plan_display_contents (Union[Unset, str]): + state_json (Union[Unset, list[int]]): needs to be the outputs of `terraform show -json` + workspace_id (Union[Unset, str]): + """ + + plan_contents: Union[Unset, str] = UNSET + plan_display_contents: Union[Unset, str] = UNSET + state_json: Union[Unset, list[int]] = UNSET + workspace_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + plan_contents = self.plan_contents + + plan_display_contents = self.plan_display_contents + + state_json: Union[Unset, list[int]] = UNSET + if not isinstance(self.state_json, Unset): + state_json = self.state_json + + workspace_id = self.workspace_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plan_contents is not UNSET: + field_dict["plan_contents"] = plan_contents + if plan_display_contents is not UNSET: + field_dict["plan_display_contents"] = plan_display_contents + if state_json is not UNSET: + field_dict["state_json"] = state_json + if workspace_id is not UNSET: + field_dict["workspace_id"] = workspace_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + plan_contents = d.pop("plan_contents", UNSET) + + plan_display_contents = d.pop("plan_display_contents", UNSET) + + state_json = cast(list[int], d.pop("state_json", UNSET)) + + workspace_id = d.pop("workspace_id", UNSET) + + plantypes_terraform_sandbox_mode = cls( + plan_contents=plan_contents, + plan_display_contents=plan_display_contents, + state_json=state_json, + workspace_id=workspace_id, + ) + + plantypes_terraform_sandbox_mode.additional_properties = d + return plantypes_terraform_sandbox_mode + + @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 diff --git a/nuon/models/service_build_all_components_request.py b/nuon/models/service_build_all_components_request.py new file mode 100644 index 00000000..1b563545 --- /dev/null +++ b/nuon/models/service_build_all_components_request.py @@ -0,0 +1,44 @@ +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="ServiceBuildAllComponentsRequest") + + +@_attrs_define +class ServiceBuildAllComponentsRequest: + """ """ + + 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) + service_build_all_components_request = cls() + + service_build_all_components_request.additional_properties = d + return service_build_all_components_request + + @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 diff --git a/nuon/models/service_create_action_workflow_config_request.py b/nuon/models/service_create_action_workflow_config_request.py index 81b774bc..125de9f6 100644 --- a/nuon/models/service_create_action_workflow_config_request.py +++ b/nuon/models/service_create_action_workflow_config_request.py @@ -23,6 +23,7 @@ class ServiceCreateActionWorkflowConfigRequest: app_config_id (str): steps (list['ServiceCreateActionWorkflowConfigStepRequest']): triggers (list['ServiceCreateActionWorkflowConfigTriggerRequest']): + break_glass_role_arn (Union[Unset, str]): dependencies (Union[Unset, list[str]]): references (Union[Unset, list[str]]): timeout (Union[Unset, int]): @@ -31,6 +32,7 @@ class ServiceCreateActionWorkflowConfigRequest: app_config_id: str steps: list["ServiceCreateActionWorkflowConfigStepRequest"] triggers: list["ServiceCreateActionWorkflowConfigTriggerRequest"] + break_glass_role_arn: Union[Unset, str] = UNSET dependencies: Union[Unset, list[str]] = UNSET references: Union[Unset, list[str]] = UNSET timeout: Union[Unset, int] = UNSET @@ -49,6 +51,8 @@ def to_dict(self) -> dict[str, Any]: triggers_item = triggers_item_data.to_dict() triggers.append(triggers_item) + break_glass_role_arn = self.break_glass_role_arn + dependencies: Union[Unset, list[str]] = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies @@ -68,6 +72,8 @@ def to_dict(self) -> dict[str, Any]: "triggers": triggers, } ) + if break_glass_role_arn is not UNSET: + field_dict["break_glass_role_arn"] = break_glass_role_arn if dependencies is not UNSET: field_dict["dependencies"] = dependencies if references is not UNSET: @@ -103,6 +109,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: triggers.append(triggers_item) + break_glass_role_arn = d.pop("break_glass_role_arn", UNSET) + dependencies = cast(list[str], d.pop("dependencies", UNSET)) references = cast(list[str], d.pop("references", UNSET)) @@ -113,6 +121,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_config_id=app_config_id, steps=steps, triggers=triggers, + break_glass_role_arn=break_glass_role_arn, dependencies=dependencies, references=references, timeout=timeout, diff --git a/nuon/models/service_create_action_workflow_config_trigger_request.py b/nuon/models/service_create_action_workflow_config_trigger_request.py index 46853b53..ce7aaa7a 100644 --- a/nuon/models/service_create_action_workflow_config_trigger_request.py +++ b/nuon/models/service_create_action_workflow_config_trigger_request.py @@ -17,11 +17,13 @@ class ServiceCreateActionWorkflowConfigTriggerRequest: type_ (AppActionWorkflowTriggerType): component_name (Union[Unset, str]): cron_schedule (Union[Unset, str]): + index (Union[Unset, int]): """ type_: AppActionWorkflowTriggerType component_name: Union[Unset, str] = UNSET cron_schedule: Union[Unset, str] = UNSET + index: Union[Unset, int] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -31,6 +33,8 @@ def to_dict(self) -> dict[str, Any]: cron_schedule = self.cron_schedule + index = self.index + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -42,6 +46,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["component_name"] = component_name if cron_schedule is not UNSET: field_dict["cron_schedule"] = cron_schedule + if index is not UNSET: + field_dict["index"] = index return field_dict @@ -54,10 +60,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: cron_schedule = d.pop("cron_schedule", UNSET) + index = d.pop("index", UNSET) + service_create_action_workflow_config_trigger_request = cls( type_=type_, component_name=component_name, cron_schedule=cron_schedule, + index=index, ) service_create_action_workflow_config_trigger_request.additional_properties = d diff --git a/nuon/models/service_create_app_action_request.py b/nuon/models/service_create_app_action_request.py new file mode 100644 index 00000000..e440a42f --- /dev/null +++ b/nuon/models/service_create_app_action_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateAppActionRequest") + + +@_attrs_define +class ServiceCreateAppActionRequest: + """ + Attributes: + name (Union[Unset, str]): + """ + + name: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name", UNSET) + + service_create_app_action_request = cls( + name=name, + ) + + service_create_app_action_request.additional_properties = d + return service_create_app_action_request + + @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 diff --git a/nuon/models/service_create_app_permissions_config_request.py b/nuon/models/service_create_app_permissions_config_request.py index cf5a220c..fc532d8a 100644 --- a/nuon/models/service_create_app_permissions_config_request.py +++ b/nuon/models/service_create_app_permissions_config_request.py @@ -1,9 +1,11 @@ from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.service_app_awsiam_role_config import ServiceAppAWSIAMRoleConfig @@ -19,12 +21,14 @@ class ServiceCreateAppPermissionsConfigRequest: deprovision_role (ServiceAppAWSIAMRoleConfig): maintenance_role (ServiceAppAWSIAMRoleConfig): provision_role (ServiceAppAWSIAMRoleConfig): + break_glass_roles (Union[Unset, list['ServiceAppAWSIAMRoleConfig']]): """ app_config_id: str deprovision_role: "ServiceAppAWSIAMRoleConfig" maintenance_role: "ServiceAppAWSIAMRoleConfig" provision_role: "ServiceAppAWSIAMRoleConfig" + break_glass_roles: Union[Unset, list["ServiceAppAWSIAMRoleConfig"]] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,6 +40,13 @@ def to_dict(self) -> dict[str, Any]: provision_role = self.provision_role.to_dict() + break_glass_roles: Union[Unset, list[dict[str, Any]]] = UNSET + if not isinstance(self.break_glass_roles, Unset): + break_glass_roles = [] + for break_glass_roles_item_data in self.break_glass_roles: + break_glass_roles_item = break_glass_roles_item_data.to_dict() + break_glass_roles.append(break_glass_roles_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -46,6 +57,8 @@ def to_dict(self) -> dict[str, Any]: "provision_role": provision_role, } ) + if break_glass_roles is not UNSET: + field_dict["break_glass_roles"] = break_glass_roles return field_dict @@ -62,11 +75,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: provision_role = ServiceAppAWSIAMRoleConfig.from_dict(d.pop("provision_role")) + break_glass_roles = [] + _break_glass_roles = d.pop("break_glass_roles", UNSET) + for break_glass_roles_item_data in _break_glass_roles or []: + break_glass_roles_item = ServiceAppAWSIAMRoleConfig.from_dict(break_glass_roles_item_data) + + break_glass_roles.append(break_glass_roles_item) + service_create_app_permissions_config_request = cls( app_config_id=app_config_id, deprovision_role=deprovision_role, maintenance_role=maintenance_role, provision_role=provision_role, + break_glass_roles=break_glass_roles, ) service_create_app_permissions_config_request.additional_properties = d diff --git a/nuon/models/service_create_app_sandbox_config_request.py b/nuon/models/service_create_app_sandbox_config_request.py index 6961c2c3..3dd72c26 100644 --- a/nuon/models/service_create_app_sandbox_config_request.py +++ b/nuon/models/service_create_app_sandbox_config_request.py @@ -29,7 +29,9 @@ class ServiceCreateAppSandboxConfigRequest: variables (ServiceCreateAppSandboxConfigRequestVariables): app_config_id (Union[Unset, str]): connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSSandboxConfigRequest]): + drift_schedule (Union[Unset, str]): public_git_vcs_config (Union[Unset, ServicePublicGitVCSSandboxConfigRequest]): + references (Union[Unset, list[str]]): variables_files (Union[Unset, list[str]]): """ @@ -38,7 +40,9 @@ class ServiceCreateAppSandboxConfigRequest: variables: "ServiceCreateAppSandboxConfigRequestVariables" app_config_id: Union[Unset, str] = UNSET connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSSandboxConfigRequest"] = UNSET + drift_schedule: Union[Unset, str] = UNSET public_git_vcs_config: Union[Unset, "ServicePublicGitVCSSandboxConfigRequest"] = UNSET + references: Union[Unset, list[str]] = UNSET variables_files: Union[Unset, list[str]] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -55,10 +59,16 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() + drift_schedule = self.drift_schedule + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.public_git_vcs_config, Unset): public_git_vcs_config = self.public_git_vcs_config.to_dict() + references: Union[Unset, list[str]] = UNSET + if not isinstance(self.references, Unset): + references = self.references + variables_files: Union[Unset, list[str]] = UNSET if not isinstance(self.variables_files, Unset): variables_files = self.variables_files @@ -76,8 +86,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["app_config_id"] = app_config_id if connected_github_vcs_config is not UNSET: field_dict["connected_github_vcs_config"] = connected_github_vcs_config + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule if public_git_vcs_config is not UNSET: field_dict["public_git_vcs_config"] = public_git_vcs_config + if references is not UNSET: + field_dict["references"] = references if variables_files is not UNSET: field_dict["variables_files"] = variables_files @@ -114,6 +128,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: _connected_github_vcs_config ) + drift_schedule = d.pop("drift_schedule", UNSET) + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) public_git_vcs_config: Union[Unset, ServicePublicGitVCSSandboxConfigRequest] if isinstance(_public_git_vcs_config, Unset): @@ -121,6 +137,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: public_git_vcs_config = ServicePublicGitVCSSandboxConfigRequest.from_dict(_public_git_vcs_config) + references = cast(list[str], d.pop("references", UNSET)) + variables_files = cast(list[str], d.pop("variables_files", UNSET)) service_create_app_sandbox_config_request = cls( @@ -129,7 +147,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: variables=variables, app_config_id=app_config_id, connected_github_vcs_config=connected_github_vcs_config, + drift_schedule=drift_schedule, public_git_vcs_config=public_git_vcs_config, + references=references, variables_files=variables_files, ) diff --git a/nuon/models/service_create_helm_component_config_request.py b/nuon/models/service_create_helm_component_config_request.py index f15b3598..e5f2e720 100644 --- a/nuon/models/service_create_helm_component_config_request.py +++ b/nuon/models/service_create_helm_component_config_request.py @@ -27,6 +27,7 @@ class ServiceCreateHelmComponentConfigRequest: checksum (Union[Unset, str]): connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSConfigRequest]): dependencies (Union[Unset, list[str]]): + drift_schedule (Union[Unset, str]): namespace (Union[Unset, str]): public_git_vcs_config (Union[Unset, ServicePublicGitVCSConfigRequest]): references (Union[Unset, list[str]]): @@ -41,6 +42,7 @@ class ServiceCreateHelmComponentConfigRequest: checksum: Union[Unset, str] = UNSET connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSConfigRequest"] = UNSET dependencies: Union[Unset, list[str]] = UNSET + drift_schedule: Union[Unset, str] = UNSET namespace: Union[Unset, str] = UNSET public_git_vcs_config: Union[Unset, "ServicePublicGitVCSConfigRequest"] = UNSET references: Union[Unset, list[str]] = UNSET @@ -66,6 +68,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.dependencies, Unset): dependencies = self.dependencies + drift_schedule = self.drift_schedule + namespace = self.namespace public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET @@ -100,6 +104,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["connected_github_vcs_config"] = connected_github_vcs_config if dependencies is not UNSET: field_dict["dependencies"] = dependencies + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule if namespace is not UNSET: field_dict["namespace"] = namespace if public_git_vcs_config is not UNSET: @@ -141,6 +147,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dependencies = cast(list[str], d.pop("dependencies", UNSET)) + drift_schedule = d.pop("drift_schedule", UNSET) + namespace = d.pop("namespace", UNSET) _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) @@ -165,6 +173,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: checksum=checksum, connected_github_vcs_config=connected_github_vcs_config, dependencies=dependencies, + drift_schedule=drift_schedule, namespace=namespace, public_git_vcs_config=public_git_vcs_config, references=references, diff --git a/nuon/models/service_create_install_component_deploy_request.py b/nuon/models/service_create_install_component_deploy_request.py new file mode 100644 index 00000000..f82c83da --- /dev/null +++ b/nuon/models/service_create_install_component_deploy_request.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateInstallComponentDeployRequest") + + +@_attrs_define +class ServiceCreateInstallComponentDeployRequest: + """ + Attributes: + build_id (Union[Unset, str]): + deploy_dependents (Union[Unset, bool]): + plan_only (Union[Unset, bool]): + """ + + build_id: Union[Unset, str] = UNSET + deploy_dependents: Union[Unset, bool] = UNSET + plan_only: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + build_id = self.build_id + + deploy_dependents = self.deploy_dependents + + plan_only = self.plan_only + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if build_id is not UNSET: + field_dict["build_id"] = build_id + if deploy_dependents is not UNSET: + field_dict["deploy_dependents"] = deploy_dependents + if plan_only is not UNSET: + field_dict["plan_only"] = plan_only + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + build_id = d.pop("build_id", UNSET) + + deploy_dependents = d.pop("deploy_dependents", UNSET) + + plan_only = d.pop("plan_only", UNSET) + + service_create_install_component_deploy_request = cls( + build_id=build_id, + deploy_dependents=deploy_dependents, + plan_only=plan_only, + ) + + service_create_install_component_deploy_request.additional_properties = d + return service_create_install_component_deploy_request + + @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 diff --git a/nuon/models/service_create_install_request.py b/nuon/models/service_create_install_request.py index 6a1ccd35..d6c6cabf 100644 --- a/nuon/models/service_create_install_request.py +++ b/nuon/models/service_create_install_request.py @@ -8,6 +8,7 @@ if TYPE_CHECKING: from ..models.helpers_create_install_config_params import HelpersCreateInstallConfigParams + from ..models.helpers_install_metadata import HelpersInstallMetadata from ..models.service_create_install_request_aws_account import ServiceCreateInstallRequestAwsAccount from ..models.service_create_install_request_azure_account import ServiceCreateInstallRequestAzureAccount from ..models.service_create_install_request_inputs import ServiceCreateInstallRequestInputs @@ -25,6 +26,7 @@ class ServiceCreateInstallRequest: azure_account (Union[Unset, ServiceCreateInstallRequestAzureAccount]): inputs (Union[Unset, ServiceCreateInstallRequestInputs]): install_config (Union[Unset, HelpersCreateInstallConfigParams]): + metadata (Union[Unset, HelpersInstallMetadata]): """ name: str @@ -32,6 +34,7 @@ class ServiceCreateInstallRequest: azure_account: Union[Unset, "ServiceCreateInstallRequestAzureAccount"] = UNSET inputs: Union[Unset, "ServiceCreateInstallRequestInputs"] = UNSET install_config: Union[Unset, "HelpersCreateInstallConfigParams"] = UNSET + metadata: Union[Unset, "HelpersInstallMetadata"] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -53,6 +56,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.install_config, Unset): install_config = self.install_config.to_dict() + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -68,12 +75,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["inputs"] = inputs if install_config is not UNSET: field_dict["install_config"] = install_config + if metadata is not UNSET: + field_dict["metadata"] = metadata return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.helpers_create_install_config_params import HelpersCreateInstallConfigParams + from ..models.helpers_install_metadata import HelpersInstallMetadata from ..models.service_create_install_request_aws_account import ServiceCreateInstallRequestAwsAccount from ..models.service_create_install_request_azure_account import ServiceCreateInstallRequestAzureAccount from ..models.service_create_install_request_inputs import ServiceCreateInstallRequestInputs @@ -109,12 +119,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: install_config = HelpersCreateInstallConfigParams.from_dict(_install_config) + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, HelpersInstallMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = HelpersInstallMetadata.from_dict(_metadata) + service_create_install_request = cls( name=name, aws_account=aws_account, azure_account=azure_account, inputs=inputs, install_config=install_config, + metadata=metadata, ) service_create_install_request.additional_properties = d diff --git a/nuon/models/service_create_install_request_aws_account.py b/nuon/models/service_create_install_request_aws_account.py index 17f41749..2449009e 100644 --- a/nuon/models/service_create_install_request_aws_account.py +++ b/nuon/models/service_create_install_request_aws_account.py @@ -13,24 +13,18 @@ class ServiceCreateInstallRequestAwsAccount: """ Attributes: - iam_role_arn (Union[Unset, str]): region (Union[Unset, str]): """ - iam_role_arn: Union[Unset, str] = UNSET region: Union[Unset, str] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - iam_role_arn = self.iam_role_arn - region = self.region field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if iam_role_arn is not UNSET: - field_dict["iam_role_arn"] = iam_role_arn if region is not UNSET: field_dict["region"] = region @@ -39,12 +33,9 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) - iam_role_arn = d.pop("iam_role_arn", UNSET) - region = d.pop("region", UNSET) service_create_install_request_aws_account = cls( - iam_role_arn=iam_role_arn, region=region, ) diff --git a/nuon/models/service_create_install_request_azure_account.py b/nuon/models/service_create_install_request_azure_account.py index 49c6511d..3fd7df2e 100644 --- a/nuon/models/service_create_install_request_azure_account.py +++ b/nuon/models/service_create_install_request_azure_account.py @@ -14,43 +14,19 @@ class ServiceCreateInstallRequestAzureAccount: """ Attributes: location (Union[Unset, str]): - service_principal_app_id (Union[Unset, str]): - service_principal_password (Union[Unset, str]): - subscription_id (Union[Unset, str]): - subscription_tenant_id (Union[Unset, str]): """ location: Union[Unset, str] = UNSET - service_principal_app_id: Union[Unset, str] = UNSET - service_principal_password: Union[Unset, str] = UNSET - subscription_id: Union[Unset, str] = UNSET - subscription_tenant_id: Union[Unset, str] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: location = self.location - service_principal_app_id = self.service_principal_app_id - - service_principal_password = self.service_principal_password - - subscription_id = self.subscription_id - - subscription_tenant_id = self.subscription_tenant_id - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if location is not UNSET: field_dict["location"] = location - if service_principal_app_id is not UNSET: - field_dict["service_principal_app_id"] = service_principal_app_id - if service_principal_password is not UNSET: - field_dict["service_principal_password"] = service_principal_password - if subscription_id is not UNSET: - field_dict["subscription_id"] = subscription_id - if subscription_tenant_id is not UNSET: - field_dict["subscription_tenant_id"] = subscription_tenant_id return field_dict @@ -59,20 +35,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) location = d.pop("location", UNSET) - service_principal_app_id = d.pop("service_principal_app_id", UNSET) - - service_principal_password = d.pop("service_principal_password", UNSET) - - subscription_id = d.pop("subscription_id", UNSET) - - subscription_tenant_id = d.pop("subscription_tenant_id", UNSET) - service_create_install_request_azure_account = cls( location=location, - service_principal_app_id=service_principal_app_id, - service_principal_password=service_principal_password, - subscription_id=subscription_id, - subscription_tenant_id=subscription_tenant_id, ) service_create_install_request_azure_account.additional_properties = d diff --git a/nuon/models/service_create_kubernetes_manifest_component_config_request.py b/nuon/models/service_create_kubernetes_manifest_component_config_request.py index fc5ed464..4c7e2f45 100644 --- a/nuon/models/service_create_kubernetes_manifest_component_config_request.py +++ b/nuon/models/service_create_kubernetes_manifest_component_config_request.py @@ -16,6 +16,7 @@ class ServiceCreateKubernetesManifestComponentConfigRequest: app_config_id (Union[Unset, str]): checksum (Union[Unset, str]): dependencies (Union[Unset, list[str]]): + drift_schedule (Union[Unset, str]): manifest (Union[Unset, str]): namespace (Union[Unset, str]): references (Union[Unset, list[str]]): @@ -24,6 +25,7 @@ class ServiceCreateKubernetesManifestComponentConfigRequest: app_config_id: Union[Unset, str] = UNSET checksum: Union[Unset, str] = UNSET dependencies: Union[Unset, list[str]] = UNSET + drift_schedule: Union[Unset, str] = UNSET manifest: Union[Unset, str] = UNSET namespace: Union[Unset, str] = UNSET references: Union[Unset, list[str]] = UNSET @@ -38,6 +40,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.dependencies, Unset): dependencies = self.dependencies + drift_schedule = self.drift_schedule + manifest = self.manifest namespace = self.namespace @@ -55,6 +59,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["checksum"] = checksum if dependencies is not UNSET: field_dict["dependencies"] = dependencies + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule if manifest is not UNSET: field_dict["manifest"] = manifest if namespace is not UNSET: @@ -73,6 +79,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dependencies = cast(list[str], d.pop("dependencies", UNSET)) + drift_schedule = d.pop("drift_schedule", UNSET) + manifest = d.pop("manifest", UNSET) namespace = d.pop("namespace", UNSET) @@ -83,6 +91,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_config_id=app_config_id, checksum=checksum, dependencies=dependencies, + drift_schedule=drift_schedule, manifest=manifest, namespace=namespace, references=references, diff --git a/nuon/models/service_create_terraform_module_component_config_request.py b/nuon/models/service_create_terraform_module_component_config_request.py index 8239e431..7a6182a7 100644 --- a/nuon/models/service_create_terraform_module_component_config_request.py +++ b/nuon/models/service_create_terraform_module_component_config_request.py @@ -30,6 +30,7 @@ class ServiceCreateTerraformModuleComponentConfigRequest: checksum (Union[Unset, str]): connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSConfigRequest]): dependencies (Union[Unset, list[str]]): + drift_schedule (Union[Unset, str]): public_git_vcs_config (Union[Unset, ServicePublicGitVCSConfigRequest]): references (Union[Unset, list[str]]): variables_files (Union[Unset, list[str]]): @@ -42,6 +43,7 @@ class ServiceCreateTerraformModuleComponentConfigRequest: checksum: Union[Unset, str] = UNSET connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSConfigRequest"] = UNSET dependencies: Union[Unset, list[str]] = UNSET + drift_schedule: Union[Unset, str] = UNSET public_git_vcs_config: Union[Unset, "ServicePublicGitVCSConfigRequest"] = UNSET references: Union[Unset, list[str]] = UNSET variables_files: Union[Unset, list[str]] = UNSET @@ -65,6 +67,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.dependencies, Unset): dependencies = self.dependencies + drift_schedule = self.drift_schedule + public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET if not isinstance(self.public_git_vcs_config, Unset): public_git_vcs_config = self.public_git_vcs_config.to_dict() @@ -95,6 +99,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["connected_github_vcs_config"] = connected_github_vcs_config if dependencies is not UNSET: field_dict["dependencies"] = dependencies + if drift_schedule is not UNSET: + field_dict["drift_schedule"] = drift_schedule if public_git_vcs_config is not UNSET: field_dict["public_git_vcs_config"] = public_git_vcs_config if references is not UNSET: @@ -135,6 +141,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dependencies = cast(list[str], d.pop("dependencies", UNSET)) + drift_schedule = d.pop("drift_schedule", UNSET) + _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) public_git_vcs_config: Union[Unset, ServicePublicGitVCSConfigRequest] if isinstance(_public_git_vcs_config, Unset): @@ -155,6 +163,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: checksum=checksum, connected_github_vcs_config=connected_github_vcs_config, dependencies=dependencies, + drift_schedule=drift_schedule, public_git_vcs_config=public_git_vcs_config, references=references, variables_files=variables_files, diff --git a/nuon/models/service_create_user_journey_request.py b/nuon/models/service_create_user_journey_request.py new file mode 100644 index 00000000..7d7d0785 --- /dev/null +++ b/nuon/models/service_create_user_journey_request.py @@ -0,0 +1,89 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.service_create_user_journey_step_req import ServiceCreateUserJourneyStepReq + + +T = TypeVar("T", bound="ServiceCreateUserJourneyRequest") + + +@_attrs_define +class ServiceCreateUserJourneyRequest: + """ + Attributes: + name (str): + steps (list['ServiceCreateUserJourneyStepReq']): + title (str): + """ + + name: str + steps: list["ServiceCreateUserJourneyStepReq"] + title: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + steps = [] + for steps_item_data in self.steps: + steps_item = steps_item_data.to_dict() + steps.append(steps_item) + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "steps": steps, + "title": title, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.service_create_user_journey_step_req import ServiceCreateUserJourneyStepReq + + d = dict(src_dict) + name = d.pop("name") + + steps = [] + _steps = d.pop("steps") + for steps_item_data in _steps: + steps_item = ServiceCreateUserJourneyStepReq.from_dict(steps_item_data) + + steps.append(steps_item) + + title = d.pop("title") + + service_create_user_journey_request = cls( + name=name, + steps=steps, + title=title, + ) + + service_create_user_journey_request.additional_properties = d + return service_create_user_journey_request + + @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 diff --git a/nuon/models/service_create_user_journey_step_req.py b/nuon/models/service_create_user_journey_step_req.py new file mode 100644 index 00000000..93e3eed3 --- /dev/null +++ b/nuon/models/service_create_user_journey_step_req.py @@ -0,0 +1,67 @@ +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="ServiceCreateUserJourneyStepReq") + + +@_attrs_define +class ServiceCreateUserJourneyStepReq: + """ + Attributes: + name (str): + title (str): + """ + + name: str + title: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "title": title, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + title = d.pop("title") + + service_create_user_journey_step_req = cls( + name=name, + title=title, + ) + + service_create_user_journey_step_req.additional_properties = d + return service_create_user_journey_step_req + + @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 diff --git a/nuon/models/service_create_workflow_step_approval_response_response.py b/nuon/models/service_create_workflow_step_approval_response_response.py new file mode 100644 index 00000000..2415662f --- /dev/null +++ b/nuon/models/service_create_workflow_step_approval_response_response.py @@ -0,0 +1,77 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateWorkflowStepApprovalResponseResponse") + + +@_attrs_define +class ServiceCreateWorkflowStepApprovalResponseResponse: + """ + Attributes: + id (Union[Unset, str]): + note (Union[Unset, str]): + type_ (Union[Unset, str]): + """ + + id: Union[Unset, str] = UNSET + note: Union[Unset, str] = UNSET + type_: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + note = self.note + + type_ = self.type_ + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict["id"] = id + if note is not UNSET: + field_dict["note"] = note + if type_ is not UNSET: + field_dict["type"] = type_ + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id", UNSET) + + note = d.pop("note", UNSET) + + type_ = d.pop("type", UNSET) + + service_create_workflow_step_approval_response_response = cls( + id=id, + note=note, + type_=type_, + ) + + service_create_workflow_step_approval_response_response.additional_properties = d + return service_create_workflow_step_approval_response_response + + @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 diff --git a/nuon/models/service_latest_runner_heart_beats.py b/nuon/models/service_latest_runner_heart_beats.py new file mode 100644 index 00000000..4478747f --- /dev/null +++ b/nuon/models/service_latest_runner_heart_beats.py @@ -0,0 +1,57 @@ +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.app_latest_runner_heart_beat import AppLatestRunnerHeartBeat + + +T = TypeVar("T", bound="ServiceLatestRunnerHeartBeats") + + +@_attrs_define +class ServiceLatestRunnerHeartBeats: + """ """ + + additional_properties: dict[str, "AppLatestRunnerHeartBeat"] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.app_latest_runner_heart_beat import AppLatestRunnerHeartBeat + + d = dict(src_dict) + service_latest_runner_heart_beats = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = AppLatestRunnerHeartBeat.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + service_latest_runner_heart_beats.additional_properties = additional_properties + return service_latest_runner_heart_beats + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> "AppLatestRunnerHeartBeat": + return self.additional_properties[key] + + def __setitem__(self, key: str, value: "AppLatestRunnerHeartBeat") -> 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_patch_install_config_params.py b/nuon/models/service_patch_install_config_params.py new file mode 100644 index 00000000..0608b1c3 --- /dev/null +++ b/nuon/models/service_patch_install_config_params.py @@ -0,0 +1,67 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.app_install_approval_option import AppInstallApprovalOption +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServicePatchInstallConfigParams") + + +@_attrs_define +class ServicePatchInstallConfigParams: + """ + Attributes: + approval_option (Union[Unset, AppInstallApprovalOption]): + """ + + approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + approval_option: Union[Unset, str] = UNSET + if not isinstance(self.approval_option, Unset): + approval_option = self.approval_option.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if approval_option is not UNSET: + field_dict["approval_option"] = approval_option + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _approval_option = d.pop("approval_option", UNSET) + approval_option: Union[Unset, AppInstallApprovalOption] + if isinstance(_approval_option, Unset): + approval_option = UNSET + else: + approval_option = AppInstallApprovalOption(_approval_option) + + service_patch_install_config_params = cls( + approval_option=approval_option, + ) + + service_patch_install_config_params.additional_properties = d + return service_patch_install_config_params + + @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 diff --git a/nuon/models/service_retry_workflow_step_response.py b/nuon/models/service_retry_workflow_step_response.py new file mode 100644 index 00000000..e8de15b0 --- /dev/null +++ b/nuon/models/service_retry_workflow_step_response.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceRetryWorkflowStepResponse") + + +@_attrs_define +class ServiceRetryWorkflowStepResponse: + """ + Attributes: + workflow_id (Union[Unset, str]): + """ + + workflow_id: Union[Unset, str] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + workflow_id = self.workflow_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if workflow_id is not UNSET: + field_dict["workflow_id"] = workflow_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workflow_id = d.pop("workflow_id", UNSET) + + service_retry_workflow_step_response = cls( + workflow_id=workflow_id, + ) + + service_retry_workflow_step_response.additional_properties = d + return service_retry_workflow_step_response + + @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 diff --git a/nuon/models/service_update_install_request.py b/nuon/models/service_update_install_request.py index 30f00e43..cb81b4bf 100644 --- a/nuon/models/service_update_install_request.py +++ b/nuon/models/service_update_install_request.py @@ -1,11 +1,16 @@ from collections.abc import Mapping -from typing import Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.helpers_install_metadata import HelpersInstallMetadata + from ..models.service_patch_install_config_params import ServicePatchInstallConfigParams + + T = TypeVar("T", bound="ServiceUpdateInstallRequest") @@ -13,18 +18,34 @@ class ServiceUpdateInstallRequest: """ Attributes: + install_config (Union[Unset, ServicePatchInstallConfigParams]): + metadata (Union[Unset, HelpersInstallMetadata]): name (Union[Unset, str]): """ + install_config: Union[Unset, "ServicePatchInstallConfigParams"] = UNSET + metadata: Union[Unset, "HelpersInstallMetadata"] = UNSET name: Union[Unset, str] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + install_config: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.install_config, Unset): + install_config = self.install_config.to_dict() + + metadata: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.metadata, Unset): + metadata = self.metadata.to_dict() + name = self.name field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if install_config is not UNSET: + field_dict["install_config"] = install_config + if metadata is not UNSET: + field_dict["metadata"] = metadata if name is not UNSET: field_dict["name"] = name @@ -32,10 +53,29 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.helpers_install_metadata import HelpersInstallMetadata + from ..models.service_patch_install_config_params import ServicePatchInstallConfigParams + d = dict(src_dict) + _install_config = d.pop("install_config", UNSET) + install_config: Union[Unset, ServicePatchInstallConfigParams] + if isinstance(_install_config, Unset): + install_config = UNSET + else: + install_config = ServicePatchInstallConfigParams.from_dict(_install_config) + + _metadata = d.pop("metadata", UNSET) + metadata: Union[Unset, HelpersInstallMetadata] + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = HelpersInstallMetadata.from_dict(_metadata) + name = d.pop("name", UNSET) service_update_install_request = cls( + install_config=install_config, + metadata=metadata, name=name, ) diff --git a/nuon/models/service_update_user_journey_step_request.py b/nuon/models/service_update_user_journey_step_request.py new file mode 100644 index 00000000..9884e6b8 --- /dev/null +++ b/nuon/models/service_update_user_journey_step_request.py @@ -0,0 +1,59 @@ +from collections.abc import Mapping +from typing import Any, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceUpdateUserJourneyStepRequest") + + +@_attrs_define +class ServiceUpdateUserJourneyStepRequest: + """ + Attributes: + complete (Union[Unset, bool]): + """ + + complete: Union[Unset, bool] = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + complete = self.complete + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if complete is not UNSET: + field_dict["complete"] = complete + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + complete = d.pop("complete", UNSET) + + service_update_user_journey_step_request = cls( + complete=complete, + ) + + service_update_user_journey_step_request.additional_properties = d + return service_update_user_journey_step_request + + @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 diff --git a/nuon/models/state_app_state.py b/nuon/models/state_app_state.py index 9d78e54a..bffafb49 100644 --- a/nuon/models/state_app_state.py +++ b/nuon/models/state_app_state.py @@ -7,7 +7,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.state_app_state_secrets import StateAppStateSecrets + from ..models.state_app_state_variables import StateAppStateVariables T = TypeVar("T", bound="StateAppState") @@ -20,15 +20,15 @@ class StateAppState: id (Union[Unset, str]): name (Union[Unset, str]): populated (Union[Unset, bool]): - secrets (Union[Unset, StateAppStateSecrets]): status (Union[Unset, str]): + variables (Union[Unset, StateAppStateVariables]): """ id: Union[Unset, str] = UNSET name: Union[Unset, str] = UNSET populated: Union[Unset, bool] = UNSET - secrets: Union[Unset, "StateAppStateSecrets"] = UNSET status: Union[Unset, str] = UNSET + variables: Union[Unset, "StateAppStateVariables"] = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,12 +38,12 @@ def to_dict(self) -> dict[str, Any]: populated = self.populated - secrets: Union[Unset, dict[str, Any]] = UNSET - if not isinstance(self.secrets, Unset): - secrets = self.secrets.to_dict() - status = self.status + variables: Union[Unset, dict[str, Any]] = UNSET + if not isinstance(self.variables, Unset): + variables = self.variables.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -53,16 +53,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["name"] = name if populated is not UNSET: field_dict["populated"] = populated - if secrets is not UNSET: - field_dict["secrets"] = secrets if status is not UNSET: field_dict["status"] = status + if variables is not UNSET: + field_dict["variables"] = variables return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.state_app_state_secrets import StateAppStateSecrets + from ..models.state_app_state_variables import StateAppStateVariables d = dict(src_dict) id = d.pop("id", UNSET) @@ -71,21 +71,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: populated = d.pop("populated", UNSET) - _secrets = d.pop("secrets", UNSET) - secrets: Union[Unset, StateAppStateSecrets] - if isinstance(_secrets, Unset): - secrets = UNSET - else: - secrets = StateAppStateSecrets.from_dict(_secrets) - status = d.pop("status", UNSET) + _variables = d.pop("variables", UNSET) + variables: Union[Unset, StateAppStateVariables] + if isinstance(_variables, Unset): + variables = UNSET + else: + variables = StateAppStateVariables.from_dict(_variables) + state_app_state = cls( id=id, name=name, populated=populated, - secrets=secrets, status=status, + variables=variables, ) state_app_state.additional_properties = d diff --git a/nuon/models/state_app_state_variables.py b/nuon/models/state_app_state_variables.py new file mode 100644 index 00000000..b82e4fb7 --- /dev/null +++ b/nuon/models/state_app_state_variables.py @@ -0,0 +1,44 @@ +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="StateAppStateVariables") + + +@_attrs_define +class StateAppStateVariables: + """ """ + + additional_properties: dict[str, str] = _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) + state_app_state_variables = cls() + + state_app_state_variables.additional_properties = d + return state_app_state_variables + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> 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/state_install_stack_state_outputs.py b/nuon/models/state_install_stack_state_outputs.py index e11f07f5..be21cf31 100644 --- a/nuon/models/state_install_stack_state_outputs.py +++ b/nuon/models/state_install_stack_state_outputs.py @@ -11,7 +11,7 @@ class StateInstallStackStateOutputs: """ """ - additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} @@ -31,10 +31,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: def additional_keys(self) -> list[str]: return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> str: + def __getitem__(self, key: str) -> Any: return self.additional_properties[key] - def __setitem__(self, key: str, value: str) -> None: + def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/pyproject.toml b/pyproject.toml index a77ff287..5fbc5b46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nuon" -version = "0.19.619" +version = "0.19.679" description = "A client library for accessing Nuon" authors = [] requires-python = "~=3.9" diff --git a/scripts/clean.sh b/scripts/clean.sh index 8d5bedc5..1b4a40c3 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1 +1,4 @@ -rm -r version.txt .openapi-generator docs nuon pyproject.toml requirements.txt setup.cfg setup.py test-requirements.txt test tox.ini dist +rm -rf \ + version.txt \ + nuon \ + dist diff --git a/scripts/generate.sh b/scripts/generate.sh index f626dd1f..a0bcef7e 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -4,13 +4,15 @@ set -e set -o pipefail set -u -ENV="{$1:-prod}" +ENV=${1:-prod} HOST="https://api.nuon.co" if [ "$ENV" == "dev" ]; then + echo "ENV: $ENV" HOST="http://localhost:8081" elif [ "$ENV" == "stage" ]; then + echo "ENV: $ENV" HOST="https://api.stage.nuon.co" fi @@ -20,10 +22,13 @@ config=`pwd`"/gen.yaml" echo echo "preparing to generate SDK" echo "> host: $HOST" +echo "> env: $ENV" echo "> config: $config" +echo echo "> installing dependencies" pipx install openapi-python-client --include-deps +echo echo "> spec: $SPEC" @@ -34,6 +39,7 @@ openapi-python-client generate \ --output-path . \ --overwrite \ --meta uv +echo # save version to file for workflows to read from cat pyproject.toml | grep version | sed -e 's/.*version = "\(.*\)"/\1/' > version.txt diff --git a/uv.lock b/uv.lock index af9f38f6..b07f0eed 100644 --- a/uv.lock +++ b/uv.lock @@ -35,6 +35,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e5/48/1549795ba7742c948d2ad169c1c8cdbae65bc450d6cd753d124b17c8cd32/certifi-2025.8.3-py3-none-any.whl", hash = "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5", size = 161216, upload-time = "2025-08-03T03:07:45.777Z" }, ] +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + [[package]] name = "exceptiongroup" version = "1.3.0" @@ -93,9 +102,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442, upload-time = "2024-09-15T18:07:37.964Z" }, ] +[[package]] +name = "iniconfig" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" }, +] + [[package]] name = "nuon" -version = "0.19.620" +version = "0.19.668" source = { editable = "." } dependencies = [ { name = "attrs" }, @@ -103,6 +121,12 @@ dependencies = [ { name = "python-dateutil" }, ] +[package.dev-dependencies] +dev = [ + { name = "pytest" }, + { name = "pyyaml" }, +] + [package.metadata] requires-dist = [ { name = "attrs", specifier = ">=22.2.0" }, @@ -110,6 +134,57 @@ requires-dist = [ { name = "python-dateutil", specifier = ">=2.8.0,<3" }, ] +[package.metadata.requires-dev] +dev = [ + { name = "pytest", specifier = ">=8.4.2" }, + { name = "pyyaml", specifier = ">=6.0.3" }, +] + +[[package]] +name = "packaging" +version = "25.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, +] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + +[[package]] +name = "pygments" +version = "2.19.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, +] + +[[package]] +name = "pytest" +version = "8.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", size = 1519618, upload-time = "2025-09-04T14:34:22.711Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79", size = 365750, upload-time = "2025-09-04T14:34:20.226Z" }, +] + [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -122,6 +197,79 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, ] +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" }, + { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" }, + { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" }, + { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" }, + { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" }, + { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" }, + { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" }, + { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" }, + { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" }, + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, + { url = "https://files.pythonhosted.org/packages/9f/62/67fc8e68a75f738c9200422bf65693fb79a4cd0dc5b23310e5202e978090/pyyaml-6.0.3-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:b865addae83924361678b652338317d1bd7e79b1f4596f96b96c77a5a34b34da", size = 184450, upload-time = "2025-09-25T21:33:00.618Z" }, + { url = "https://files.pythonhosted.org/packages/ae/92/861f152ce87c452b11b9d0977952259aa7df792d71c1053365cc7b09cc08/pyyaml-6.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c3355370a2c156cffb25e876646f149d5d68f5e0a3ce86a5084dd0b64a994917", size = 174319, upload-time = "2025-09-25T21:33:02.086Z" }, + { url = "https://files.pythonhosted.org/packages/d0/cd/f0cfc8c74f8a030017a2b9c771b7f47e5dd702c3e28e5b2071374bda2948/pyyaml-6.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3c5677e12444c15717b902a5798264fa7909e41153cdf9ef7ad571b704a63dd9", size = 737631, upload-time = "2025-09-25T21:33:03.25Z" }, + { url = "https://files.pythonhosted.org/packages/ef/b2/18f2bd28cd2055a79a46c9b0895c0b3d987ce40ee471cecf58a1a0199805/pyyaml-6.0.3-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5ed875a24292240029e4483f9d4a4b8a1ae08843b9c54f43fcc11e404532a8a5", size = 836795, upload-time = "2025-09-25T21:33:05.014Z" }, + { url = "https://files.pythonhosted.org/packages/73/b9/793686b2d54b531203c160ef12bec60228a0109c79bae6c1277961026770/pyyaml-6.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a", size = 750767, upload-time = "2025-09-25T21:33:06.398Z" }, + { url = "https://files.pythonhosted.org/packages/a9/86/a137b39a611def2ed78b0e66ce2fe13ee701a07c07aebe55c340ed2a050e/pyyaml-6.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926", size = 727982, upload-time = "2025-09-25T21:33:08.708Z" }, + { url = "https://files.pythonhosted.org/packages/dd/62/71c27c94f457cf4418ef8ccc71735324c549f7e3ea9d34aba50874563561/pyyaml-6.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:27c0abcb4a5dac13684a37f76e701e054692a9b2d3064b70f5e4eb54810553d7", size = 755677, upload-time = "2025-09-25T21:33:09.876Z" }, + { url = "https://files.pythonhosted.org/packages/29/3d/6f5e0d58bd924fb0d06c3a6bad00effbdae2de5adb5cda5648006ffbd8d3/pyyaml-6.0.3-cp39-cp39-win32.whl", hash = "sha256:1ebe39cb5fc479422b83de611d14e2c0d3bb2a18bbcb01f229ab3cfbd8fee7a0", size = 142592, upload-time = "2025-09-25T21:33:10.983Z" }, + { url = "https://files.pythonhosted.org/packages/f0/0c/25113e0b5e103d7f1490c0e947e303fe4a696c10b501dea7a9f49d4e876c/pyyaml-6.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:2e71d11abed7344e42a8849600193d15b6def118602c4c176f748e4583246007", size = 158777, upload-time = "2025-09-25T21:33:15.55Z" }, +] + [[package]] name = "six" version = "1.17.0" @@ -140,6 +288,55 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235, upload-time = "2024-02-25T23:20:01.196Z" }, ] +[[package]] +name = "tomli" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549", size = 17392, upload-time = "2025-10-08T22:01:47.119Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/2e/299f62b401438d5fe1624119c723f5d877acc86a4c2492da405626665f12/tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45", size = 153236, upload-time = "2025-10-08T22:01:00.137Z" }, + { url = "https://files.pythonhosted.org/packages/86/7f/d8fffe6a7aefdb61bced88fcb5e280cfd71e08939da5894161bd71bea022/tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba", size = 148084, upload-time = "2025-10-08T22:01:01.63Z" }, + { url = "https://files.pythonhosted.org/packages/47/5c/24935fb6a2ee63e86d80e4d3b58b222dafaf438c416752c8b58537c8b89a/tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf", size = 234832, upload-time = "2025-10-08T22:01:02.543Z" }, + { url = "https://files.pythonhosted.org/packages/89/da/75dfd804fc11e6612846758a23f13271b76d577e299592b4371a4ca4cd09/tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441", size = 242052, upload-time = "2025-10-08T22:01:03.836Z" }, + { url = "https://files.pythonhosted.org/packages/70/8c/f48ac899f7b3ca7eb13af73bacbc93aec37f9c954df3c08ad96991c8c373/tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845", size = 239555, upload-time = "2025-10-08T22:01:04.834Z" }, + { url = "https://files.pythonhosted.org/packages/ba/28/72f8afd73f1d0e7829bfc093f4cb98ce0a40ffc0cc997009ee1ed94ba705/tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c", size = 245128, upload-time = "2025-10-08T22:01:05.84Z" }, + { url = "https://files.pythonhosted.org/packages/b6/eb/a7679c8ac85208706d27436e8d421dfa39d4c914dcf5fa8083a9305f58d9/tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456", size = 96445, upload-time = "2025-10-08T22:01:06.896Z" }, + { url = "https://files.pythonhosted.org/packages/0a/fe/3d3420c4cb1ad9cb462fb52967080575f15898da97e21cb6f1361d505383/tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be", size = 107165, upload-time = "2025-10-08T22:01:08.107Z" }, + { url = "https://files.pythonhosted.org/packages/ff/b7/40f36368fcabc518bb11c8f06379a0fd631985046c038aca08c6d6a43c6e/tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac", size = 154891, upload-time = "2025-10-08T22:01:09.082Z" }, + { url = "https://files.pythonhosted.org/packages/f9/3f/d9dd692199e3b3aab2e4e4dd948abd0f790d9ded8cd10cbaae276a898434/tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22", size = 148796, upload-time = "2025-10-08T22:01:10.266Z" }, + { url = "https://files.pythonhosted.org/packages/60/83/59bff4996c2cf9f9387a0f5a3394629c7efa5ef16142076a23a90f1955fa/tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f", size = 242121, upload-time = "2025-10-08T22:01:11.332Z" }, + { url = "https://files.pythonhosted.org/packages/45/e5/7c5119ff39de8693d6baab6c0b6dcb556d192c165596e9fc231ea1052041/tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52", size = 250070, upload-time = "2025-10-08T22:01:12.498Z" }, + { url = "https://files.pythonhosted.org/packages/45/12/ad5126d3a278f27e6701abde51d342aa78d06e27ce2bb596a01f7709a5a2/tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8", size = 245859, upload-time = "2025-10-08T22:01:13.551Z" }, + { url = "https://files.pythonhosted.org/packages/fb/a1/4d6865da6a71c603cfe6ad0e6556c73c76548557a8d658f9e3b142df245f/tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6", size = 250296, upload-time = "2025-10-08T22:01:14.614Z" }, + { url = "https://files.pythonhosted.org/packages/a0/b7/a7a7042715d55c9ba6e8b196d65d2cb662578b4d8cd17d882d45322b0d78/tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876", size = 97124, upload-time = "2025-10-08T22:01:15.629Z" }, + { url = "https://files.pythonhosted.org/packages/06/1e/f22f100db15a68b520664eb3328fb0ae4e90530887928558112c8d1f4515/tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878", size = 107698, upload-time = "2025-10-08T22:01:16.51Z" }, + { url = "https://files.pythonhosted.org/packages/89/48/06ee6eabe4fdd9ecd48bf488f4ac783844fd777f547b8d1b61c11939974e/tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b", size = 154819, upload-time = "2025-10-08T22:01:17.964Z" }, + { url = "https://files.pythonhosted.org/packages/f1/01/88793757d54d8937015c75dcdfb673c65471945f6be98e6a0410fba167ed/tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae", size = 148766, upload-time = "2025-10-08T22:01:18.959Z" }, + { url = "https://files.pythonhosted.org/packages/42/17/5e2c956f0144b812e7e107f94f1cc54af734eb17b5191c0bbfb72de5e93e/tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b", size = 240771, upload-time = "2025-10-08T22:01:20.106Z" }, + { url = "https://files.pythonhosted.org/packages/d5/f4/0fbd014909748706c01d16824eadb0307115f9562a15cbb012cd9b3512c5/tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf", size = 248586, upload-time = "2025-10-08T22:01:21.164Z" }, + { url = "https://files.pythonhosted.org/packages/30/77/fed85e114bde5e81ecf9bc5da0cc69f2914b38f4708c80ae67d0c10180c5/tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f", size = 244792, upload-time = "2025-10-08T22:01:22.417Z" }, + { url = "https://files.pythonhosted.org/packages/55/92/afed3d497f7c186dc71e6ee6d4fcb0acfa5f7d0a1a2878f8beae379ae0cc/tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05", size = 248909, upload-time = "2025-10-08T22:01:23.859Z" }, + { url = "https://files.pythonhosted.org/packages/f8/84/ef50c51b5a9472e7265ce1ffc7f24cd4023d289e109f669bdb1553f6a7c2/tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606", size = 96946, upload-time = "2025-10-08T22:01:24.893Z" }, + { url = "https://files.pythonhosted.org/packages/b2/b7/718cd1da0884f281f95ccfa3a6cc572d30053cba64603f79d431d3c9b61b/tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999", size = 107705, upload-time = "2025-10-08T22:01:26.153Z" }, + { url = "https://files.pythonhosted.org/packages/19/94/aeafa14a52e16163008060506fcb6aa1949d13548d13752171a755c65611/tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e", size = 154244, upload-time = "2025-10-08T22:01:27.06Z" }, + { url = "https://files.pythonhosted.org/packages/db/e4/1e58409aa78eefa47ccd19779fc6f36787edbe7d4cd330eeeedb33a4515b/tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3", size = 148637, upload-time = "2025-10-08T22:01:28.059Z" }, + { url = "https://files.pythonhosted.org/packages/26/b6/d1eccb62f665e44359226811064596dd6a366ea1f985839c566cd61525ae/tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc", size = 241925, upload-time = "2025-10-08T22:01:29.066Z" }, + { url = "https://files.pythonhosted.org/packages/70/91/7cdab9a03e6d3d2bb11beae108da5bdc1c34bdeb06e21163482544ddcc90/tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0", size = 249045, upload-time = "2025-10-08T22:01:31.98Z" }, + { url = "https://files.pythonhosted.org/packages/15/1b/8c26874ed1f6e4f1fcfeb868db8a794cbe9f227299402db58cfcc858766c/tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879", size = 245835, upload-time = "2025-10-08T22:01:32.989Z" }, + { url = "https://files.pythonhosted.org/packages/fd/42/8e3c6a9a4b1a1360c1a2a39f0b972cef2cc9ebd56025168c4137192a9321/tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005", size = 253109, upload-time = "2025-10-08T22:01:34.052Z" }, + { url = "https://files.pythonhosted.org/packages/22/0c/b4da635000a71b5f80130937eeac12e686eefb376b8dee113b4a582bba42/tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463", size = 97930, upload-time = "2025-10-08T22:01:35.082Z" }, + { url = "https://files.pythonhosted.org/packages/b9/74/cb1abc870a418ae99cd5c9547d6bce30701a954e0e721821df483ef7223c/tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8", size = 107964, upload-time = "2025-10-08T22:01:36.057Z" }, + { url = "https://files.pythonhosted.org/packages/54/78/5c46fff6432a712af9f792944f4fcd7067d8823157949f4e40c56b8b3c83/tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77", size = 163065, upload-time = "2025-10-08T22:01:37.27Z" }, + { url = "https://files.pythonhosted.org/packages/39/67/f85d9bd23182f45eca8939cd2bc7050e1f90c41f4a2ecbbd5963a1d1c486/tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf", size = 159088, upload-time = "2025-10-08T22:01:38.235Z" }, + { url = "https://files.pythonhosted.org/packages/26/5a/4b546a0405b9cc0659b399f12b6adb750757baf04250b148d3c5059fc4eb/tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530", size = 268193, upload-time = "2025-10-08T22:01:39.712Z" }, + { url = "https://files.pythonhosted.org/packages/42/4f/2c12a72ae22cf7b59a7fe75b3465b7aba40ea9145d026ba41cb382075b0e/tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b", size = 275488, upload-time = "2025-10-08T22:01:40.773Z" }, + { url = "https://files.pythonhosted.org/packages/92/04/a038d65dbe160c3aa5a624e93ad98111090f6804027d474ba9c37c8ae186/tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67", size = 272669, upload-time = "2025-10-08T22:01:41.824Z" }, + { url = "https://files.pythonhosted.org/packages/be/2f/8b7c60a9d1612a7cbc39ffcca4f21a73bf368a80fc25bccf8253e2563267/tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f", size = 279709, upload-time = "2025-10-08T22:01:43.177Z" }, + { url = "https://files.pythonhosted.org/packages/7e/46/cc36c679f09f27ded940281c38607716c86cf8ba4a518d524e349c8b4874/tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0", size = 107563, upload-time = "2025-10-08T22:01:44.233Z" }, + { url = "https://files.pythonhosted.org/packages/84/ff/426ca8683cf7b753614480484f6437f568fd2fda2edbdf57a2d3d8b27a0b/tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba", size = 119756, upload-time = "2025-10-08T22:01:45.234Z" }, + { url = "https://files.pythonhosted.org/packages/77/b8/0135fadc89e73be292b473cb820b4f5a08197779206b33191e801feeae40/tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b", size = 14408, upload-time = "2025-10-08T22:01:46.04Z" }, +] + [[package]] name = "typing-extensions" version = "4.14.1" diff --git a/version.txt b/version.txt index 20fbb5a7..848ef50c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.19.619 +0.19.679